You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by sn...@apache.org on 2014/01/28 23:21:11 UTC

[01/96] [abbrv] [partial] Change package namespace to org.apache.usergrid

Updated Branches:
  refs/pull/39/head [created] 3ccbfd8a6
  refs/pull/39/merge [created] 71a08e406


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/test/java/org/apache/usergrid/batch/job/TestJobListenerTest.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/TestJobListenerTest.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/TestJobListenerTest.java
new file mode 100644
index 0000000..ea59fbf
--- /dev/null
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/TestJobListenerTest.java
@@ -0,0 +1,143 @@
+/*
+ * 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.batch.job;
+
+
+import org.apache.usergrid.batch.JobExecution;
+import org.apache.usergrid.persistence.entities.JobData;
+import org.apache.usergrid.persistence.entities.JobStat;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static org.junit.Assert.assertTrue;
+
+
+/**
+ * Tests the TestJobListener.
+ */
+public class TestJobListenerTest {
+    private static final Logger LOG = LoggerFactory.getLogger( TestJobListenerTest.class );
+    JobExecution jobExecution = new JobExecution() {
+        @Override
+        public JobData getJobData() {
+            return null;
+        }
+
+
+        @Override
+        public JobStat getJobStats() {
+            return null;
+        }
+
+
+        @Override
+        public void start( final int maxFailures ) {
+        }
+
+
+        @Override
+        public void completed() {
+        }
+
+
+        @Override
+        public void failed() {
+        }
+
+
+        @Override
+        public void killed() {
+        }
+
+
+        @Override
+        public void heartbeat() {
+        }
+
+
+        @Override
+        public void heartbeat( final long milliseconds ) {
+        }
+
+
+        @Override
+        public void delay( final long milliseconds ) {
+        }
+
+
+        @Override
+        public JobExecution.Status getStatus() {
+            return null;
+        }
+
+
+        @Override
+        public String getJobName() {
+            return "mockJob";
+        }
+
+
+        @Override
+        public java.util.UUID getJobId() {
+            return null;
+        }
+
+
+        @Override
+        public java.util.UUID getTransactionId() {
+            return null;
+        }
+    };
+
+    @Test
+    public void testIdleOut() throws InterruptedException {
+        TestJobListener listener = new TestJobListener();
+        long waitTime = 1000L;
+        long startTime = System.currentTimeMillis();
+		listener.blockTilDone( 100, waitTime );
+        long elapsedTime = System.currentTimeMillis() - startTime;
+        LOG.info( "IdleOut in {} millis", elapsedTime );
+        // assertTrue( elapsedTime >= ( 1000L + TestJobListener.WAIT_MAX_MILLIS ) );
+        assertTrue("Elapsed time: " + elapsedTime + " fails to be greater than idle wait time: " + waitTime,  elapsedTime>= waitTime );
+    }
+
+
+    @Test
+    public void testHitCount() throws InterruptedException {
+        final TestJobListener listener = new TestJobListener();
+
+        Thread t = new Thread( new Runnable() {
+            @Override
+            public void run() {
+                try {
+                    Thread.sleep( 100 );
+                }
+                catch ( InterruptedException e ) {
+                    LOG.warn( "Thread got interrupted", e );
+                }
+                for ( int ii = 0; ii < 1000; ii++ ) {
+                    listener.onSuccess( jobExecution );
+                }
+            }
+        });
+        t.start();
+
+        assertTrue( listener.blockTilDone( 1000, 1000L ) );
+    }
+}


[26/96] [abbrv] [partial] Change package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/batch/service/JobSchedulerService.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/batch/service/JobSchedulerService.java b/stack/core/src/main/java/org/usergrid/batch/service/JobSchedulerService.java
deleted file mode 100644
index c35a9c8..0000000
--- a/stack/core/src/main/java/org/usergrid/batch/service/JobSchedulerService.java
+++ /dev/null
@@ -1,315 +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.usergrid.batch.service;
-
-
-import java.util.List;
-import java.util.concurrent.Callable;
-import java.util.concurrent.Executors;
-import java.util.concurrent.Semaphore;
-import java.util.concurrent.TimeUnit;
-
-import com.google.common.util.concurrent.AbstractScheduledService;
-import com.google.common.util.concurrent.FutureCallback;
-import com.google.common.util.concurrent.Futures;
-import com.google.common.util.concurrent.ListenableFuture;
-import com.google.common.util.concurrent.ListeningScheduledExecutorService;
-import com.google.common.util.concurrent.MoreExecutors;
-import com.yammer.metrics.annotation.ExceptionMetered;
-import com.yammer.metrics.annotation.Timed;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.usergrid.batch.Job;
-import org.usergrid.batch.JobExecution;
-import org.usergrid.batch.JobExecution.Status;
-import org.usergrid.batch.JobExecutionImpl;
-import org.usergrid.batch.JobFactory;
-import org.usergrid.batch.JobNotFoundException;
-import org.usergrid.batch.repository.JobAccessor;
-import org.usergrid.batch.repository.JobDescriptor;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-/**
- * Service that schedules itself, then schedules jobs in the same pool
- */
-public class JobSchedulerService extends AbstractScheduledService {
-    protected static final long DEFAULT_DELAY = 1000;
-
-    private static final Logger LOG = LoggerFactory.getLogger( JobSchedulerService.class );
-
-    // keep track of exceptions thrown in scheduler so we can reduce noise in logs
-    private Map<String, Integer> schedulerRunFailures = new HashMap<String, Integer>();
-
-    private long interval = DEFAULT_DELAY;
-    private int workerSize = 1;
-    private int maxFailCount = 10;
-
-    private JobAccessor jobAccessor;
-    private JobFactory jobFactory;
-
-    private Semaphore capacitySemaphore;
-
-    private ListeningScheduledExecutorService service;
-    private JobListener jobListener;
-
-    public JobSchedulerService() { }
-
-
-    @Timed(name = "BulkJobScheduledService_runOneIteration", group = "scheduler", durationUnit = TimeUnit.MILLISECONDS,
-            rateUnit = TimeUnit.MINUTES)
-    @Override
-    protected void runOneIteration() throws Exception {
-
-        try {
-            LOG.info( "running iteration..." );
-            List<JobDescriptor> activeJobs;
-
-            // run until there are no more active jobs
-            while ( true ) {
-
-                // get the semaphore if we can. This means we have space for at least 1
-                // job
-                if ( LOG.isDebugEnabled() ) {
-                    LOG.debug( "About to acquire semaphore.  Capacity is {}", capacitySemaphore.availablePermits() );
-                }
-
-                capacitySemaphore.acquire();
-                // release the sempaphore we only need to acquire as a way to stop the
-                // loop if there's no capacity
-                capacitySemaphore.release();
-
-                int capacity = capacitySemaphore.availablePermits();
-
-                LOG.debug( "Capacity is {}", capacity );
-
-                activeJobs = jobAccessor.getJobs( capacity );
-
-                // nothing to do, we don't have any jobs to run
-                if ( activeJobs.size() == 0 ) {
-                    LOG.debug( "No jobs returned. Exiting run loop" );
-                    return;
-                }
-
-                for ( JobDescriptor jd : activeJobs ) {
-                    LOG.info( "Submitting work for {}", jd );
-                    submitWork( jd );
-                    LOG.info( "Work submitted for {}", jd );
-                }
-            }
-        }
-        catch ( Throwable t ) {
-
-            // errors here happen a lot on shutdown, don't fill the logs with them
-            String error = t.getClass().getCanonicalName();
-            if (schedulerRunFailures.get( error ) == null) {
-                LOG.error( "Scheduler run failed, first instance of this exception", t );
-                schedulerRunFailures.put( error, 1);
-
-            } else {
-                int count = schedulerRunFailures.get(error) + 1; 
-                schedulerRunFailures.put(error, count);
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug( error + " caused scheduler run failure, count =  " + count, t );
-                } else {
-                    LOG.error( error + " caused scheduler run failure, count =  " + count );
-                }
-            }
-        }
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see com.google.common.util.concurrent.AbstractScheduledService#scheduler()
-     */
-    @Override
-    protected Scheduler scheduler() {
-        return Scheduler.newFixedDelaySchedule( 0, interval, TimeUnit.MILLISECONDS );
-    }
-
-
-    /** Use the provided BulkJobFactory to build and submit BulkJob items as ListenableFuture objects */
-    @ExceptionMetered(name = "BulkJobScheduledService_submitWork_exceptions", group = "scheduler")
-    private void submitWork( final JobDescriptor jobDescriptor ) {
-        List<Job> jobs;
-
-        try {
-            jobs = jobFactory.jobsFrom( jobDescriptor );
-        }
-        catch ( JobNotFoundException e ) {
-            LOG.error( "Could not create jobs", e );
-            return;
-        }
-
-        for ( final Job job : jobs ) {
-
-            // job execution needs to be external to both the callback and the task.
-            // This way regardless of any error we can
-            // mark a job as failed if required
-            final JobExecution execution = new JobExecutionImpl( jobDescriptor );
-
-            // We don't care if this is atomic (not worth using a lock object)
-            // we just need to prevent NPEs from ever occurring
-            final JobListener currentListener = this.jobListener;
-
-            ListenableFuture<Void> future = service.submit( new Callable<Void>() {
-                @Override
-                public Void call() throws Exception {
-                    capacitySemaphore.acquire();
-
-                    execution.start( maxFailCount );
-
-                    jobAccessor.save( execution );
-
-                    //this job is dead, treat it as such
-                    if ( execution.getStatus() == Status.DEAD ) {
-                        return null;
-                    }
-
-                    // TODO wrap and throw specifically typed exception for onFailure,
-                    // needs jobId
-                    job.execute( execution );
-
-                    if ( currentListener != null ) {
-                        currentListener.onSubmit( execution );
-                    }
-
-                    return null;
-                }
-            } );
-
-            Futures.addCallback( future, new FutureCallback<Void>() {
-                @Override
-                public void onSuccess( Void param ) {
-
-                    if ( execution.getStatus() == Status.IN_PROGRESS ) {
-                        LOG.info( "Successful completion of bulkJob {}", execution );
-                        execution.completed();
-                    }
-
-                    jobAccessor.save( execution );
-                    capacitySemaphore.release();
-
-                    if ( currentListener != null ) {
-                        currentListener.onSuccess( execution );
-                    }
-                }
-
-
-                @Override
-                public void onFailure( Throwable throwable ) {
-                    LOG.error( "Failed execution for bulkJob", throwable );
-                    // mark it as failed
-                    if ( execution.getStatus() == Status.IN_PROGRESS ) {
-                        execution.failed();
-                    }
-
-                    jobAccessor.save( execution );
-                    capacitySemaphore.release();
-
-                    if ( currentListener != null ) {
-                        currentListener.onFailure( execution );
-                    }
-                }
-            } );
-        }
-    }
-
-
-    /** @param milliseconds the milliseconds to set to wait if we didn't receive a job to run */
-    public void setInterval( long milliseconds ) {
-        this.interval = milliseconds;
-    }
-
-
-    /** @param listeners the listeners to set */
-    public void setWorkerSize( int listeners ) {
-        this.workerSize = listeners;
-    }
-
-
-    /** @param jobAccessor the jobAccessor to set */
-    public void setJobAccessor( JobAccessor jobAccessor ) {
-        this.jobAccessor = jobAccessor;
-    }
-
-
-    /** @param jobFactory the jobFactory to set */
-    public void setJobFactory( JobFactory jobFactory ) {
-        this.jobFactory = jobFactory;
-    }
-
-
-    /** @param maxFailCount the maxFailCount to set */
-    public void setMaxFailCount( int maxFailCount ) {
-        this.maxFailCount = maxFailCount;
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see com.google.common.util.concurrent.AbstractScheduledService#startUp()
-     */
-    @Override
-    protected void startUp() throws Exception {
-        service = MoreExecutors.listeningDecorator( Executors.newScheduledThreadPool( workerSize ) );
-        capacitySemaphore = new Semaphore( workerSize );
-        super.startUp();
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see com.google.common.util.concurrent.AbstractScheduledService#shutDown()
-     */
-    @Override
-    protected void shutDown() throws Exception {
-        service.shutdown();
-        super.shutDown();
-    }
-
-
-    /**
-     * Sets the JobListener notified of Job events on this SchedulerService.
-     *
-     * @param jobListener the listener to receive Job events
-     * @return the previous listener if set, or null if none was set
-     */
-    public JobListener setJobListener( JobListener jobListener ) {
-        JobListener old = this.jobListener;
-        this.jobListener = jobListener;
-        return old;
-    }
-
-
-    /**
-     * Gets the current JobListener to be notified of Job events on this SchedulerService.
-     *
-     * @return the current JobListener or null if none was set
-     */
-    public JobListener getJobListener() {
-        return jobListener;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/batch/service/SchedulerService.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/batch/service/SchedulerService.java b/stack/core/src/main/java/org/usergrid/batch/service/SchedulerService.java
deleted file mode 100644
index 92d5161..0000000
--- a/stack/core/src/main/java/org/usergrid/batch/service/SchedulerService.java
+++ /dev/null
@@ -1,54 +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.usergrid.batch.service;
-
-
-import java.util.UUID;
-
-import org.usergrid.persistence.Query;
-import org.usergrid.persistence.Results;
-import org.usergrid.persistence.entities.JobData;
-import org.usergrid.persistence.entities.JobStat;
-
-
-/**
- * Simple interface for performing job scheduling
- */
-public interface SchedulerService {
-
-    /**
-     * Create a new job
-     *
-     * @param jobName The name of the job.  There must be an implentation in the spring context of type
-     * org.usergrid.batch.Job with the name
-     * @param fireTime The time to fire in milliseconds since epoch
-     * @param jobData The data to pass to the job
-     *
-     * @return The newly created job data.  The job data uuid is the job id
-     */
-    JobData createJob( String jobName, long fireTime, JobData jobData );
-
-    /** Delete the job. */
-    void deleteJob( UUID jobId );
-
-
-    /** Query the job data with the given query object */
-    Results queryJobData( Query query ) throws Exception;
-
-    /** Get the stats for a job */
-    JobStat getStatsForJob( String jobName, UUID jobId ) throws Exception;
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/batch/service/SchedulerServiceImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/batch/service/SchedulerServiceImpl.java b/stack/core/src/main/java/org/usergrid/batch/service/SchedulerServiceImpl.java
deleted file mode 100644
index 0c875f3..0000000
--- a/stack/core/src/main/java/org/usergrid/batch/service/SchedulerServiceImpl.java
+++ /dev/null
@@ -1,428 +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.usergrid.batch.service;
-
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.UUID;
-
-import javax.annotation.PostConstruct;
-
-import org.usergrid.batch.JobExecution;
-import org.usergrid.batch.JobExecution.Status;
-import org.usergrid.batch.JobRuntime;
-import org.usergrid.batch.JobRuntimeException;
-import org.usergrid.batch.repository.JobAccessor;
-import org.usergrid.batch.repository.JobDescriptor;
-import org.usergrid.mq.Message;
-import org.usergrid.mq.QueueManager;
-import org.usergrid.mq.QueueManagerFactory;
-import org.usergrid.mq.QueueQuery;
-import org.usergrid.mq.QueueResults;
-import org.usergrid.persistence.EntityManager;
-import org.usergrid.persistence.EntityManagerFactory;
-import org.usergrid.persistence.Query;
-import org.usergrid.persistence.Results;
-import org.usergrid.persistence.SimpleEntityRef;
-import org.usergrid.persistence.cassandra.CassandraService;
-import org.usergrid.persistence.entities.JobData;
-import org.usergrid.persistence.entities.JobStat;
-import org.usergrid.persistence.exceptions.TransactionNotFoundException;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.util.Assert;
-
-import static org.usergrid.persistence.cassandra.CassandraService.MANAGEMENT_APPLICATION_ID;
-
-
-/**
- * Should be referenced by services as a SchedulerService instance. Only the internal job runtime should refer to this
- * as a JobAccessor
- */
-public class SchedulerServiceImpl implements SchedulerService, JobAccessor, JobRuntimeService {
-
-    /**
-     *
-     */
-    private static final String STATS_ID = "statsId";
-
-    /**
-     *
-     */
-    private static final String JOB_ID = "jobId";
-
-    /**
-     *
-     */
-    private static final String JOB_NAME = "jobName";
-
-    private static final Logger LOG = LoggerFactory.getLogger( SchedulerServiceImpl.class );
-
-    private static final String DEFAULT_QUEUE_NAME = "/jobs";
-
-    private QueueManagerFactory qmf;
-    private EntityManagerFactory emf;
-
-    private String jobQueueName = DEFAULT_QUEUE_NAME;
-
-    private QueueManager qm;
-    private EntityManager em;
-
-    /** Timeout for how long to set the transaction timeout from the queue. Default is 30000 */
-    private long jobTimeout = 30000;
-
-
-    /**
-     *
-     */
-    public SchedulerServiceImpl() {
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see
-     * org.usergrid.batch.service.SchedulerService#createJob(java.lang.String,
-     * long, org.usergrid.persistence.Entity)
-     */
-    @Override
-    public JobData createJob( String jobName, long fireTime, JobData jobData ) {
-        Assert.notNull( jobName, "jobName is required" );
-        Assert.notNull( jobData, "jobData is required" );
-
-        try {
-            jobData.setJobName( jobName );
-            JobData job = em.create( jobData );
-            JobStat stat = em.create( new JobStat( jobName, job.getUuid() ) );
-
-            scheduleJob( jobName, fireTime, job.getUuid(), stat.getUuid() );
-
-            return job;
-        }
-        catch ( Exception e ) {
-            throw new JobRuntimeException( e );
-        }
-    }
-
-
-    /** Schedule the job internally */
-    private void scheduleJob( String jobName, long fireTime, UUID jobDataId, UUID jobStatId ) {
-        Assert.notNull( jobName, "jobName is required" );
-        Assert.isTrue( fireTime > -1, "fireTime must be positive" );
-        Assert.notNull( jobDataId, "jobDataId is required" );
-        Assert.notNull( jobStatId, "jobStatId is required" );
-
-        Message message = new Message();
-        message.setTimestamp( fireTime );
-        message.setStringProperty( JOB_NAME, jobName );
-        message.setProperty( JOB_ID, jobDataId );
-        message.setProperty( STATS_ID, jobStatId );
-
-        qm.postToQueue( jobQueueName, message );
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see org.usergrid.batch.service.SchedulerService#deleteJob(java.util.UUID)
-     */
-    @Override
-    public void deleteJob( UUID jobId ) {
-        /**
-         * just delete our target job data. This is easier than attempting to delete
-         * from the queue. The runner should catch this and treat the queued message
-         * as discarded
-         */
-        try {
-            LOG.debug( "deleteJob {}", jobId );
-            em.delete( new SimpleEntityRef( "jobData", jobId ) );
-        }
-        catch ( Exception e ) {
-            throw new JobRuntimeException( e );
-        }
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see org.usergrid.batch.repository.JobAccessor#getJobs(int)
-     */
-    @Override
-    public List<JobDescriptor> getJobs( int size ) {
-        QueueQuery query = new QueueQuery();
-        query.setTimeout( jobTimeout );
-        query.setLimit( size );
-
-        QueueResults jobs = qm.getFromQueue( jobQueueName, query );
-
-        List<JobDescriptor> results = new ArrayList<JobDescriptor>( jobs.size() );
-
-        for ( Message job : jobs.getMessages() ) {
-
-            UUID jobUuid = UUID.fromString( job.getStringProperty( JOB_ID ) );
-            UUID statsUuid = UUID.fromString( job.getStringProperty( STATS_ID ) );
-            String jobName = job.getStringProperty( JOB_NAME );
-
-            try {
-                JobData data = em.get( jobUuid, JobData.class );
-
-                JobStat stats = em.get( statsUuid, JobStat.class );
-
-                /**
-                 * no job data, which is required even if empty to signal the job should
-                 * still fire. Ignore this job
-                 */
-                if ( data == null || stats == null ) {
-                    LOG.info( "Received job with data id '{}' from the queue, but no data was found.  Dropping job",
-                            jobUuid );
-                    qm.deleteTransaction( jobQueueName, job.getTransaction(), null );
-
-                    if ( data != null ) {
-                        em.delete( data );
-                    }
-
-                    if ( stats != null ) {
-                        em.delete( stats );
-                    }
-
-                    continue;
-                }
-
-                results.add( new JobDescriptor( jobName, job.getUuid(), job.getTransaction(), data, stats, this ) );
-            }
-            catch ( Exception e ) {
-                // log and skip. This is a catastrophic runtime error if we see an
-                // exception here. We don't want to cause job loss, so leave the job in
-                // the Q.
-                LOG.error(
-                        "Unable to retrieve job data for jobname {}, job id {}, stats id {}.  Skipping to avoid job "
-                                + "loss", new Object[] { jobName, jobUuid, statsUuid, e } );
-            }
-        }
-
-        return results;
-    }
-
-
-    @Override
-    public void heartbeat( JobRuntime execution, long delay ) {
-        LOG.debug( "renew transaction {}", execution.getTransactionId() );
-        try {
-            // @TODO - what's the point to this sychronized block on an argument?
-            synchronized ( execution ) {
-                UUID newId = qm.renewTransaction( jobQueueName, execution.getTransactionId(),
-                        new QueueQuery().withTimeout( delay ) );
-
-                execution.setTransactionId( newId );
-                LOG.debug( "renewed transaction {}", newId );
-            }
-        }
-        catch ( TransactionNotFoundException e ) {
-            LOG.error( "Could not renew transaction", e );
-            throw new JobRuntimeException( "Could not renew transaction during heartbeat", e );
-        }
-    }
-
-
-    /* (non-Javadoc)
-     * @see org.usergrid.batch.service.JobRuntimeService#heartbeat(org.usergrid.batch.JobRuntime)
-     */
-    @Override
-    public void heartbeat( JobRuntime execution ) {
-        heartbeat( execution, jobTimeout );
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see org.usergrid.batch.service.SchedulerService#delay(org.usergrid.batch.
-     * JobExecutionImpl)
-     */
-    @Override
-    public void delay( JobRuntime execution ) {
-        delayRetry( execution.getExecution(), execution.getDelay() );
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see
-     * org.usergrid.batch.repository.JobAccessor#save(org.usergrid.batch.JobExecution
-     * )
-     */
-    @Override
-    public void save( JobExecution bulkJobExecution ) {
-
-        JobData data = bulkJobExecution.getJobData();
-        JobStat stat = bulkJobExecution.getJobStats();
-
-        Status jobStatus = bulkJobExecution.getStatus();
-
-        try {
-
-            // we're done. Mark the transaction as complete and delete the job info
-            if ( jobStatus == Status.COMPLETED ) {
-                LOG.info( "Job {} is complete id: {}", data.getJobName(), bulkJobExecution.getTransactionId() );
-                qm.deleteTransaction( jobQueueName, bulkJobExecution.getTransactionId(), null );
-                LOG.debug( "delete job data {}", data.getUuid() );
-                em.delete( data );
-            }
-
-            // the job failed too many times. Delete the transaction to prevent it
-            // running again and save it for querying later
-            else if ( jobStatus == Status.DEAD ) {
-                LOG.warn( "Job {} is dead.  Removing", data.getJobName() );
-                qm.deleteTransaction( jobQueueName, bulkJobExecution.getTransactionId(), null );
-                em.update( data );
-            }
-
-            // update the job for the next run
-            else {
-                em.update( data );
-            }
-
-            LOG.info( "Updating stats for job {}", data.getJobName() );
-
-            em.update( stat );
-        }
-        catch ( Exception e ) {
-            // should never happen
-            throw new JobRuntimeException( String.format( "Unable to delete job data with id %s", data.getUuid() ), e );
-        }
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see org.usergrid.batch.service.SchedulerService#queryJobData(org.usergrid.
-     * persistence.Query)
-     */
-    @Override
-    public Results queryJobData( Query query ) throws Exception {
-
-        if ( query == null ) {
-            query = new Query();
-        }
-
-        return em.searchCollection( em.getApplicationRef(), "job_data", query );
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see
-     * org.usergrid.batch.repository.JobAccessor#delayRetry(org.usergrid.batch
-     * .JobExecution, long)
-     */
-    @Override
-    public void delayRetry( JobExecution execution, long delay ) {
-
-        JobData data = execution.getJobData();
-        JobStat stat = execution.getJobStats();
-
-        try {
-
-            // if it's a dead status, it's failed too many times, just kill the job
-            if ( execution.getStatus() == Status.DEAD ) {
-                qm.deleteTransaction( jobQueueName, execution.getTransactionId(), null );
-                em.update( data );
-                em.update( stat );
-                return;
-            }
-
-            // re-schedule the job to run again in the future
-            scheduleJob( execution.getJobName(), System.currentTimeMillis() + delay, data.getUuid(), stat.getUuid() );
-
-            // delete the pending transaction
-            qm.deleteTransaction( jobQueueName, execution.getTransactionId(), null );
-
-            // update the data for the next run
-
-            em.update( data );
-            em.update( stat );
-        }
-        catch ( Exception e ) {
-            // should never happen
-            throw new JobRuntimeException( String.format( "Unable to delete job data with id %s", data.getUuid() ), e );
-        }
-    }
-
-
-    /* (non-Javadoc)
-     * @see org.usergrid.batch.service.SchedulerService#getStatsForJob(java.lang.String, java.util.UUID)
-     */
-    @Override
-    public JobStat getStatsForJob( String jobName, UUID jobId ) throws Exception {
-        EntityManager em = emf.getEntityManager( MANAGEMENT_APPLICATION_ID );
-
-
-        Query query = new Query();
-        query.addEqualityFilter( JOB_NAME, jobName );
-        query.addEqualityFilter( JOB_ID, jobId );
-
-        Results r = em.searchCollection( em.getApplicationRef(), "job_stats", query );
-
-        if ( r.size() == 1 ) {
-            return ( JobStat ) r.getEntity();
-        }
-
-        return null;
-    }
-
-
-    @PostConstruct
-    public void init() {
-        qm = qmf.getQueueManager( CassandraService.MANAGEMENT_APPLICATION_ID );
-        em = emf.getEntityManager( CassandraService.MANAGEMENT_APPLICATION_ID );
-    }
-
-
-    /** @param qmf the qmf to set */
-    @Autowired
-    public void setQmf( QueueManagerFactory qmf ) {
-        this.qmf = qmf;
-    }
-
-
-    /** @param emf the emf to set */
-    @Autowired
-    public void setEmf( EntityManagerFactory emf ) {
-        this.emf = emf;
-    }
-
-
-    /** @param jobQueueName the jobQueueName to set */
-    public void setJobQueueName( String jobQueueName ) {
-        this.jobQueueName = jobQueueName;
-    }
-
-
-    /** @param timeout the timeout to set */
-    public void setJobTimeout( long timeout ) {
-        this.jobTimeout = timeout;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/batch/service/package-info.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/batch/service/package-info.java b/stack/core/src/main/java/org/usergrid/batch/service/package-info.java
deleted file mode 100644
index c910c09..0000000
--- a/stack/core/src/main/java/org/usergrid/batch/service/package-info.java
+++ /dev/null
@@ -1,18 +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.usergrid.batch.service;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/clustering/hazelcast/HazelcastLifecycleMonitor.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/clustering/hazelcast/HazelcastLifecycleMonitor.java b/stack/core/src/main/java/org/usergrid/clustering/hazelcast/HazelcastLifecycleMonitor.java
deleted file mode 100644
index 9221fa3..0000000
--- a/stack/core/src/main/java/org/usergrid/clustering/hazelcast/HazelcastLifecycleMonitor.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.clustering.hazelcast;
-
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.hazelcast.core.Hazelcast;
-import com.hazelcast.core.Instance;
-import com.hazelcast.core.InstanceEvent;
-import com.hazelcast.core.InstanceListener;
-import com.hazelcast.core.MembershipEvent;
-import com.hazelcast.core.MembershipListener;
-
-
-public class HazelcastLifecycleMonitor implements InstanceListener, MembershipListener {
-
-    private static final Logger logger = LoggerFactory.getLogger( HazelcastLifecycleMonitor.class );
-
-
-    public HazelcastLifecycleMonitor() {
-    }
-
-
-    public void init() {
-        logger.info( "HazelcastLifecycleMonitor initializing..." );
-        Hazelcast.addInstanceListener( this );
-        Hazelcast.getCluster().addMembershipListener( this );
-        logger.info( "HazelcastLifecycleMonitor initialized" );
-    }
-
-
-    public void destroy() {
-        logger.info( "Shutting down Hazelcast" );
-        Hazelcast.shutdownAll();
-        logger.info( "Hazelcast shutdown" );
-    }
-
-
-    @Override
-    public void instanceCreated( InstanceEvent event ) {
-        Instance instance = event.getInstance();
-        logger.info( "Created instance ID: [" + instance.getId() + "] Type: [" + instance.getInstanceType() + "]" );
-    }
-
-
-    @Override
-    public void instanceDestroyed( InstanceEvent event ) {
-        Instance instance = event.getInstance();
-        logger.info( "Destroyed isntance ID: [" + instance.getId() + "] Type: [" + instance.getInstanceType() + "]" );
-    }
-
-
-    @Override
-    public void memberAdded( MembershipEvent membersipEvent ) {
-        logger.info( "MemberAdded " + membersipEvent );
-    }
-
-
-    @Override
-    public void memberRemoved( MembershipEvent membersipEvent ) {
-        logger.info( "MemberRemoved " + membersipEvent );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/count/AbstractBatcher.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/count/AbstractBatcher.java b/stack/core/src/main/java/org/usergrid/count/AbstractBatcher.java
deleted file mode 100644
index f682ab3..0000000
--- a/stack/core/src/main/java/org/usergrid/count/AbstractBatcher.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.count;
-
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.concurrent.ArrayBlockingQueue;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.Future;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.concurrent.atomic.AtomicLong;
-
-import org.usergrid.count.common.Count;
-import com.yammer.metrics.Metrics;
-import com.yammer.metrics.core.Counter;
-import com.yammer.metrics.core.Timer;
-import com.yammer.metrics.core.TimerContext;
-
-
-/**
- * Base batcher implementation, handles concurrency and locking throughput throttling.
- *
- * @author zznate
- */
-public abstract class AbstractBatcher implements Batcher {
-    protected BatchSubmitter batchSubmitter;
-
-    private volatile Batch batch;
-    private final AtomicLong opCount = new AtomicLong();
-    private final Timer addTimer =
-            Metrics.newTimer( AbstractBatcher.class, "add_invocation", TimeUnit.MICROSECONDS, TimeUnit.SECONDS );
-    protected final Counter invocationCounter = Metrics.newCounter( AbstractBatcher.class, "batch_add_invocations" );
-    private final Counter existingCounterHit = Metrics.newCounter( AbstractBatcher.class, "counter_existed" );
-    // TODO add batchCount, remove shouldSubmit, impl submit, change simpleBatcher to just be an extension
-    protected int batchSize = 500;
-    private final AtomicLong batchSubmissionCount = new AtomicLong();
-    private final AtomicBoolean lock = new AtomicBoolean( false );
-
-
-    public void setBatchSize( int batchSize ) {
-        this.batchSize = batchSize;
-    }
-
-
-    public void setBatchSubmitter( BatchSubmitter batchSubmitter ) {
-        this.batchSubmitter = batchSubmitter;
-    }
-
-
-    /**
-     * Individual {@link Count} for the same counter get rolled up, so we track the individual number of operations.
-     *
-     * @return the number of operation against this SimpleBatcher
-     */
-    public long getOpCount() {
-        return opCount.get();
-    }
-
-
-    /** Add a count object to this batcher */
-    public void add( Count count ) throws CounterProcessingUnavailableException {
-        invocationCounter.inc();
-        final TimerContext context = addTimer.time();
-        if ( batchSize == 1 ) {
-            getBatch().addSerial( count );
-        }
-        else {
-            getBatch().add( count );
-        }
-        context.stop();
-    }
-
-
-    Batch getBatch() {
-        Batch active = batch;
-        if ( active == null ) {
-            synchronized ( this ) {
-                active = batch;
-                if ( active == null ) {
-                    batch = active = new Batch();
-                }
-            }
-        }
-        if ( batchSize > 1 && active.getCapacity() == 0 ) {
-            synchronized ( this ) {
-                if ( active.getCapacity() == 0 ) {
-                    active.flush();
-                }
-            }
-        }
-        return active;
-    }
-
-
-    public long getBatchSubmissionCount() {
-        return batchSubmissionCount.get();
-    }
-
-
-    class Batch {
-        private BlockingQueue<Count> counts;
-        private final AtomicInteger localCallCounter = new AtomicInteger();
-
-        private final AtomicBoolean lock = new AtomicBoolean( false );
-
-
-        Batch() {
-            counts = new ArrayBlockingQueue<Count>( batchSize );
-        }
-
-
-        int getCapacity() {
-            return counts.remainingCapacity();
-        }
-
-
-        void flush() {
-            ArrayList<Count> flushed = new ArrayList<Count>( batchSize );
-            counts.drainTo( flushed );
-            batchSubmitter.submit( flushed );
-            batchSubmissionCount.incrementAndGet();
-            opCount.incrementAndGet();
-            localCallCounter.incrementAndGet();
-        }
-
-
-        void add( Count count ) {
-            try {
-                counts.offer( count, 500, TimeUnit.MILLISECONDS );
-            }
-            catch ( Exception ex ) {
-                ex.printStackTrace();
-            }
-        }
-
-
-        void addSerial( Count count ) {
-            Future f = batchSubmitter.submit( Arrays.asList( count ) );
-            try {
-                f.get();
-            }
-            catch ( Exception ex ) {
-                ex.printStackTrace();
-            }
-            batchSubmissionCount.incrementAndGet();
-            opCount.incrementAndGet();
-            localCallCounter.incrementAndGet();
-        }
-
-
-        /**
-         * The number of times the {@link #add(org.usergrid.count.common.Count)} method has been invoked on this batch
-         * instance
-         */
-        public int getLocalCallCount() {
-            return localCallCounter.get();
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/count/BatchSubmitter.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/count/BatchSubmitter.java b/stack/core/src/main/java/org/usergrid/count/BatchSubmitter.java
deleted file mode 100644
index bb44709..0000000
--- a/stack/core/src/main/java/org/usergrid/count/BatchSubmitter.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.count;
-
-
-import java.util.Collection;
-import java.util.concurrent.Future;
-
-import org.usergrid.count.common.Count;
-
-
-/** @author zznate */
-public interface BatchSubmitter {
-    Future<?> submit( Collection<Count> counts );
-
-    void shutdown();
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/count/Batcher.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/count/Batcher.java b/stack/core/src/main/java/org/usergrid/count/Batcher.java
deleted file mode 100644
index 78711fd..0000000
--- a/stack/core/src/main/java/org/usergrid/count/Batcher.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.count;
-
-
-import org.usergrid.count.common.Count;
-
-
-/**
- * Defines minimal set of batch submission operations
- *
- * @author zznate
- */
-public interface Batcher {
-    void setBatchSubmitter( BatchSubmitter batchSubmitter );
-
-    void add( Count count );
-
-    long getOpCount();
-
-    long getBatchSubmissionCount();
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/count/CassandraCounterStore.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/count/CassandraCounterStore.java b/stack/core/src/main/java/org/usergrid/count/CassandraCounterStore.java
deleted file mode 100644
index 216d80f..0000000
--- a/stack/core/src/main/java/org/usergrid/count/CassandraCounterStore.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.count;
-
-
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.usergrid.count.common.Count;
-
-import me.prettyprint.cassandra.model.HCounterColumnImpl;
-import me.prettyprint.cassandra.serializers.ByteBufferSerializer;
-import me.prettyprint.hector.api.Keyspace;
-import me.prettyprint.hector.api.factory.HFactory;
-import me.prettyprint.hector.api.mutation.Mutator;
-
-
-/**
- * Encapsulate counter writes to Cassandra
- *
- * @author zznate
- */
-public class CassandraCounterStore implements CounterStore {
-    private Logger log = LoggerFactory.getLogger( CassandraCounterStore.class );
-
-    // keep track of exceptions thrown in scheduler so we can reduce noise in logs
-    private Map<String, Integer> counterInsertFailures = new HashMap<String, Integer>();
-
-    private final Keyspace keyspace;
-
-
-    public CassandraCounterStore( Keyspace keyspace ) {
-        this.keyspace = keyspace;
-    }
-
-
-    public void save( Count count ) {
-        this.save( Arrays.asList( count ) );
-    }
-
-
-    public void save( Collection<Count> counts ) {
-        Map<String, Count> countHolder = new HashMap<String, Count>();
-        for ( Count count : counts ) {
-            Count c = countHolder.get( count.getCounterName() );
-            if ( c != null ) {
-                c.apply( count );
-            }
-            else {
-                countHolder.put( count.getCounterName(), count );
-            }
-        }
-        Mutator<ByteBuffer> mutator = HFactory.createMutator( keyspace, ByteBufferSerializer.get() );
-        for ( Count count : countHolder.values() ) {
-            mutator.addCounter( count.getKeyNameBytes(), count.getTableName(),
-                    new HCounterColumnImpl( count.getColumnName(), count.getValue(),
-                            count.getColumnNameSerializer() ) );
-        }
-        try {
-            mutator.execute();
-        }
-        catch ( Exception e ) {
-
-            // errors here happen a lot on shutdown, don't fill the logs with them
-            String error = e.getClass().getCanonicalName();
-            if (counterInsertFailures.get( error ) == null) {
-                log.error( "CounterStore insert failed, first instance", e);
-                counterInsertFailures.put( error, 1);
-
-            } else {
-                int count = counterInsertFailures.get(error) + 1; 
-                counterInsertFailures.put(error, count);
-                if (log.isDebugEnabled()) {
-                    log.debug( error + " caused CounterStore insert failure, count =  " + count, e );
-                } else {
-                    log.error( error + " caused CounterStore insert failure, count =  " + count );
-                }
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/count/CassandraSubmitter.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/count/CassandraSubmitter.java b/stack/core/src/main/java/org/usergrid/count/CassandraSubmitter.java
deleted file mode 100644
index 8fd6d01..0000000
--- a/stack/core/src/main/java/org/usergrid/count/CassandraSubmitter.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.count;
-
-
-import java.util.Collection;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.Future;
-import java.util.concurrent.TimeUnit;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.usergrid.count.common.Count;
-import com.yammer.metrics.Metrics;
-import com.yammer.metrics.core.Timer;
-import com.yammer.metrics.core.TimerContext;
-
-
-/**
- * Submits directly to Cassandra for insertion
- *
- * @author zznate
- */
-public class CassandraSubmitter implements BatchSubmitter {
-    private final Logger log = LoggerFactory.getLogger( CassandraSubmitter.class );
-
-    private final int threadCount = 3;
-    private final CassandraCounterStore cassandraCounterStore;
-
-    private final ExecutorService executor = Executors.newFixedThreadPool( threadCount );
-    private final Timer addTimer =
-            Metrics.newTimer( CassandraSubmitter.class, "submit_invocation", TimeUnit.MICROSECONDS, TimeUnit.SECONDS );
-
-
-    public CassandraSubmitter( CassandraCounterStore cassandraCounterStore ) {
-        this.cassandraCounterStore = cassandraCounterStore;
-    }
-
-
-    @Override
-    public Future submit( final Collection<Count> counts ) {
-        return executor.submit( new Callable<Object>() {
-            final TimerContext timer = addTimer.time();
-
-
-            @Override
-            public Object call() throws Exception {
-                cassandraCounterStore.save( counts );
-                timer.stop();
-                return true;
-            }
-        } );
-    }
-
-
-    @Override
-    public void shutdown() {
-        log.warn( "Shutting down CassandraSubmitter" );
-        executor.shutdown();
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/count/CountProducer.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/count/CountProducer.java b/stack/core/src/main/java/org/usergrid/count/CountProducer.java
deleted file mode 100644
index 3a2d6cb..0000000
--- a/stack/core/src/main/java/org/usergrid/count/CountProducer.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.count;
-
-
-import org.usergrid.count.common.Count;
-
-
-/** @author zznate */
-public interface CountProducer {
-    void send( Count count );
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/count/CounterProcessingUnavailableException.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/count/CounterProcessingUnavailableException.java b/stack/core/src/main/java/org/usergrid/count/CounterProcessingUnavailableException.java
deleted file mode 100644
index f9147cf..0000000
--- a/stack/core/src/main/java/org/usergrid/count/CounterProcessingUnavailableException.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.count;
-
-
-/** @author zznate */
-public class CounterProcessingUnavailableException extends RuntimeException {
-
-    private static final String ERR_MSG = "Counter was not processed. Reason: ";
-
-
-    public CounterProcessingUnavailableException() {
-        super( ERR_MSG );
-    }
-
-
-    public CounterProcessingUnavailableException( String errMsg ) {
-        super( ERR_MSG + errMsg );
-    }
-
-
-    public CounterProcessingUnavailableException( String errMsg, Throwable t ) {
-        super( ERR_MSG + errMsg, t );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/count/CounterStore.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/count/CounterStore.java b/stack/core/src/main/java/org/usergrid/count/CounterStore.java
deleted file mode 100644
index afa9678..0000000
--- a/stack/core/src/main/java/org/usergrid/count/CounterStore.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.count;
-
-
-import java.util.Collection;
-
-import org.usergrid.count.common.Count;
-
-
-/** @author zznate */
-public interface CounterStore {
-    // TODO consider inforcing Async via Future<T> as return type
-    void save( Count count );
-
-    void save( Collection<Count> counts );
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/count/SimpleBatcher.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/count/SimpleBatcher.java b/stack/core/src/main/java/org/usergrid/count/SimpleBatcher.java
deleted file mode 100644
index bd73466..0000000
--- a/stack/core/src/main/java/org/usergrid/count/SimpleBatcher.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.count;
-
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.usergrid.count.common.Count;
-
-
-/**
- * A simple Batcher implementation that keeps a sum of the number of {@link Count} operations which have been applied.
- * Counters are aggregated by name.
- *
- * @author zznate
- */
-public class SimpleBatcher extends AbstractBatcher {
-    private Logger log = LoggerFactory.getLogger( SimpleBatcher.class );
-
-    private boolean blockingSubmit = false;
-
-
-    public void setBlockingSubmit( boolean blockingSubmit ) {
-        this.blockingSubmit = blockingSubmit;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/count/Slf4JBatchSubmitter.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/count/Slf4JBatchSubmitter.java b/stack/core/src/main/java/org/usergrid/count/Slf4JBatchSubmitter.java
deleted file mode 100644
index 34162f1..0000000
--- a/stack/core/src/main/java/org/usergrid/count/Slf4JBatchSubmitter.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.count;
-
-
-import java.util.Collection;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.Future;
-import java.util.concurrent.TimeUnit;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.usergrid.count.common.Count;
-import com.yammer.metrics.Metrics;
-import com.yammer.metrics.core.Timer;
-import com.yammer.metrics.core.TimerContext;
-
-
-/**
- * A BatchSubmitter that prints contents to the configured slf4j logger logger
- *
- * @author zznate
- */
-public class Slf4JBatchSubmitter implements BatchSubmitter {
-
-    // TODO custom logger for printing counts
-    // - should be configed programatically
-    private Logger log = LoggerFactory.getLogger( Slf4JBatchSubmitter.class );
-
-    private int threadCount = 3;
-
-    private ExecutorService executor = Executors.newFixedThreadPool( threadCount );
-    private final Timer addTimer =
-            Metrics.newTimer( Slf4JBatchSubmitter.class, "submit_invocation", TimeUnit.MICROSECONDS, TimeUnit.SECONDS );
-
-
-    @Override
-    public Future submit( final Collection<Count> counts ) {
-        return executor.submit( new Callable<Object>() {
-            final TimerContext timer = addTimer.time();
-
-
-            @Override
-            public Object call() throws Exception {
-                // TODO perhaps this could be pushed down further into CountProducer Impl?
-                // - this would leave generic submitter class
-                for ( Count c : counts ) {
-                    log.info( "found count {}", c );
-                }
-                timer.stop();
-                return true;
-            }
-        } );
-    }
-
-
-    public void shutdown() {
-        log.warn( "Shutdown Slf4jBatchSubmitter" );
-        executor.shutdown();
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/count/common/Count.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/count/common/Count.java b/stack/core/src/main/java/org/usergrid/count/common/Count.java
deleted file mode 100644
index 243ee90..0000000
--- a/stack/core/src/main/java/org/usergrid/count/common/Count.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.count.common;
-
-
-import java.nio.ByteBuffer;
-
-import org.codehaus.jackson.annotate.JsonAutoDetect;
-import org.codehaus.jackson.annotate.JsonCreator;
-import org.codehaus.jackson.annotate.JsonIgnore;
-import org.codehaus.jackson.annotate.JsonProperty;
-
-import org.apache.commons.codec.binary.Hex;
-import org.apache.commons.lang.StringUtils;
-
-import me.prettyprint.cassandra.serializers.SerializerTypeInferer;
-import me.prettyprint.cassandra.serializers.StringSerializer;
-import me.prettyprint.hector.api.Serializer;
-
-import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility;
-
-
-/**
- * Loosely models a 'count' of things to
- *
- * @author zznate
- */
-@JsonAutoDetect(creatorVisibility = Visibility.PUBLIC_ONLY)
-public class Count<K, C> {
-    private static final StringSerializer se = StringSerializer.get();
-
-    @JsonProperty
-    private final String tableName;
-    @JsonProperty
-    private final K keyName;
-    @JsonProperty
-    private final C columnName;
-    @JsonProperty
-    private long value;
-
-    private Serializer<K> keySerializer;
-    private Serializer<C> columnNameSerializer;
-    private String counterName;
-
-
-    @JsonCreator
-    public Count( @JsonProperty(value = "tableName") String tableName, @JsonProperty(value = "keyName") K keyName,
-                  @JsonProperty(value = "columnName") C columnName, @JsonProperty(value = "value") long value ) {
-        this.tableName = tableName;
-        this.keyName = keyName;
-        this.columnName = columnName;
-        this.value = value;
-        this.keySerializer = SerializerTypeInferer.getSerializer( keyName );
-        this.columnNameSerializer = SerializerTypeInferer.getSerializer( columnName );
-    }
-
-
-    public Count apply( Count count ) {
-        if ( !StringUtils.equals( count.getCounterName(), getCounterName() ) ) {
-            throw new IllegalArgumentException( "Attempt to apply a counter with a different name" );
-        }
-        this.value += count.getValue();
-        return this;
-    }
-
-
-    /** the counter name should uniquely identify the entity being counted. */
-    @JsonIgnore
-    public String getCounterName() {
-        if ( counterName == null ) {
-            counterName = tableName + ":" + Hex.encodeHexString( getKeyNameBytes().array() ) + ":" + Hex
-                    .encodeHexString( getColumnNameBytes().array() );
-        }
-        return counterName;
-    }
-
-
-    public long getValue() {
-        return value;
-    }
-
-
-    public C getColumnName() {
-        return columnName;
-    }
-
-
-    public K getKeyName() {
-        return keyName;
-    }
-
-
-    @JsonIgnore
-    public ByteBuffer getKeyNameBytes() {
-        return keySerializer.toByteBuffer( keyName );
-    }
-
-
-    @JsonIgnore
-    public ByteBuffer getColumnNameBytes() {
-        return columnNameSerializer.toByteBuffer( columnName );
-    }
-
-
-    @JsonIgnore
-    public Serializer<K> getKeySerializer() {
-        return keySerializer;
-    }
-
-
-    @JsonIgnore
-    public Serializer<C> getColumnNameSerializer() {
-        return columnNameSerializer;
-    }
-
-
-    public String getTableName() {
-        return tableName;
-    }
-
-
-    @Override
-    public String toString() {
-        return "Counter Name: ".concat( getCounterName() ).concat( " value: " ).concat( Long.toString( value ) );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/count/common/CountSerDeUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/count/common/CountSerDeUtils.java b/stack/core/src/main/java/org/usergrid/count/common/CountSerDeUtils.java
deleted file mode 100644
index 719c0cc..0000000
--- a/stack/core/src/main/java/org/usergrid/count/common/CountSerDeUtils.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.count.common;
-
-
-import java.io.IOException;
-
-import org.codehaus.jackson.annotate.JsonAutoDetect;
-import org.codehaus.jackson.annotate.JsonMethod;
-import org.codehaus.jackson.map.ObjectMapper;
-
-
-/** @author zznate */
-public class CountSerDeUtils {
-
-    public static String serialize( Count count ) {
-        ObjectMapper mapper = new ObjectMapper();
-        try {
-            return mapper.writeValueAsString( count );
-        }
-        catch ( Exception ex ) {
-            throw new CountTransportSerDeException( "Problem in serialize() call", ex );
-        }
-    }
-
-
-    public static Count deserialize( String json ) {
-        ObjectMapper mapper = new ObjectMapper();
-        mapper.setVisibility( JsonMethod.CREATOR, JsonAutoDetect.Visibility.ANY );
-
-        try {
-            return mapper.readValue( json, Count.class );
-        }
-        catch ( IOException e ) {
-            throw new CountTransportSerDeException( "Problem in deserialize() call", e );
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/count/common/CountTransportSerDeException.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/count/common/CountTransportSerDeException.java b/stack/core/src/main/java/org/usergrid/count/common/CountTransportSerDeException.java
deleted file mode 100644
index e8758f2..0000000
--- a/stack/core/src/main/java/org/usergrid/count/common/CountTransportSerDeException.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.count.common;
-
-
-/** @author zznate */
-public class CountTransportSerDeException extends RuntimeException {
-    private static final String DEF_MSG =
-            "There was a serialization/deserialization problem in Count transport. Reason: ";
-
-
-    public CountTransportSerDeException() {
-        super( DEF_MSG );
-    }
-
-
-    public CountTransportSerDeException( String msg ) {
-        super( DEF_MSG + msg );
-    }
-
-
-    public CountTransportSerDeException( String msg, Throwable t ) {
-        super( DEF_MSG + msg, t );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/count/package-info.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/count/package-info.java b/stack/core/src/main/java/org/usergrid/count/package-info.java
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/exception/JsonReadException.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/exception/JsonReadException.java b/stack/core/src/main/java/org/usergrid/exception/JsonReadException.java
deleted file mode 100644
index da7bd43..0000000
--- a/stack/core/src/main/java/org/usergrid/exception/JsonReadException.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.exception;
-
-
-public class JsonReadException extends RuntimeException {
-    private static final long serialVersionUID = 1L;
-
-
-    public JsonReadException( String msg, Throwable t ) {
-        super( msg, t );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/exception/JsonWriteException.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/exception/JsonWriteException.java b/stack/core/src/main/java/org/usergrid/exception/JsonWriteException.java
deleted file mode 100644
index a5906ab..0000000
--- a/stack/core/src/main/java/org/usergrid/exception/JsonWriteException.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.exception;
-
-
-public class JsonWriteException extends RuntimeException {
-    private static final long serialVersionUID = 1L;
-
-
-    public JsonWriteException( String msg, Throwable t ) {
-        super( msg, t );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/exception/NotImplementedException.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/exception/NotImplementedException.java b/stack/core/src/main/java/org/usergrid/exception/NotImplementedException.java
deleted file mode 100644
index 48d8b7c..0000000
--- a/stack/core/src/main/java/org/usergrid/exception/NotImplementedException.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.exception;
-
-
-public class NotImplementedException extends RuntimeException {
-
-    /**
-     *
-     */
-    private static final long serialVersionUID = 1L;
-
-
-    /**
-     *
-     */
-    public NotImplementedException() {
-        super();
-    }
-
-
-    /**
-     * @param message
-     * @param cause
-     */
-    public NotImplementedException( String message, Throwable cause ) {
-        super( message, cause );
-    }
-
-
-    /**
-     * @param message
-     */
-    public NotImplementedException( String message ) {
-        super( message );
-    }
-
-
-    /**
-     * @param cause
-     */
-    public NotImplementedException( Throwable cause ) {
-        super( cause );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/locking/Lock.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/locking/Lock.java b/stack/core/src/main/java/org/usergrid/locking/Lock.java
deleted file mode 100644
index 01bd471..0000000
--- a/stack/core/src/main/java/org/usergrid/locking/Lock.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.locking;
-
-
-import java.util.concurrent.TimeUnit;
-
-import org.usergrid.locking.exception.UGLockException;
-
-
-/**
- * The lock object to acquire
- *
- * @author tnine
- */
-public interface Lock {
-
-    /**
-     * Acquire the lock.  Wait the specified amount of time before giving up
-     *
-     * @param timeout The amount of time to wait
-     * @param time the units of time to wait
-     */
-    public boolean tryLock( long timeout, TimeUnit time ) throws UGLockException;
-
-    /** Block until a lock is available */
-    public void lock() throws UGLockException;
-
-    /** Release the lock */
-    public void unlock() throws UGLockException;
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/locking/LockHelper.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/locking/LockHelper.java b/stack/core/src/main/java/org/usergrid/locking/LockHelper.java
deleted file mode 100644
index 47c1c61..0000000
--- a/stack/core/src/main/java/org/usergrid/locking/LockHelper.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.locking;
-
-
-import java.util.UUID;
-
-import org.usergrid.locking.exception.UGLockException;
-import org.usergrid.locking.noop.NoOpLockImpl;
-
-import org.apache.commons.codec.binary.Hex;
-
-import static org.usergrid.locking.LockPathBuilder.buildPath;
-import static org.usergrid.utils.ConversionUtils.bytes;
-
-
-/** @author tnine */
-public class LockHelper {
-
-
-    private static final NoOpLockImpl NO_OP_LOCK = new NoOpLockImpl();
-
-
-    /**
-     * Build a string path for this lock.  Since it's specifically for updating a property, the property needs appended
-     * to the path.  If the property is null, it's getting deleted, so a lock on it isn't neccessary.  In that case, a
-     * no op lock is returned
-     */
-    public static Lock getUniqueUpdateLock( LockManager manager, UUID applicationId, Object value, String... path )
-            throws UGLockException {
-        //we have no value, therefore there's nothing to lock
-        if ( value == null ) {
-            return NO_OP_LOCK;
-        }
-
-        return manager.createLock( applicationId, buildPath( Hex.encodeHexString( bytes( value ) ), path ) );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/locking/LockManager.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/locking/LockManager.java b/stack/core/src/main/java/org/usergrid/locking/LockManager.java
deleted file mode 100644
index cd023b8..0000000
--- a/stack/core/src/main/java/org/usergrid/locking/LockManager.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.locking;
-
-
-import java.util.UUID;
-
-import org.usergrid.locking.exception.UGLockException;
-
-
-/**
- * This Interface to a class responsible for distributed lock across system.
- *
- * @author tnine
- */
-public interface LockManager {
-
-    /**
-     * Acquires a lock on a particular path.
-     *
-     * @param applicationId application UUID
-     * @param path a unique path
-     *
-     * @throws UGLockException if the lock cannot be acquired
-     */
-    public Lock createLock( final UUID applicationId, final String... path );
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/locking/LockPathBuilder.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/locking/LockPathBuilder.java b/stack/core/src/main/java/org/usergrid/locking/LockPathBuilder.java
deleted file mode 100644
index 54c70c3..0000000
--- a/stack/core/src/main/java/org/usergrid/locking/LockPathBuilder.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.locking;
-
-
-import java.util.UUID;
-
-
-/**
- * Helper class that contains the logic to build a lock path
- *
- * @author eanuff
- */
-public class LockPathBuilder {
-
-    private static final String SLASH = "/";
-
-
-    /** Build a string path for this lock */
-    public static String buildPath( UUID applicationId, String... path ) {
-        StringBuilder builder = new StringBuilder();
-        builder.append( SLASH );
-        builder.append( applicationId.toString() );
-
-        for ( String element : path ) {
-            builder.append( SLASH );
-            builder.append( element );
-        }
-        return builder.toString();
-    }
-
-
-    /**
-     * Build a string path for this lock
-     *
-     * @param The binary value to append to the end of the lock path
-     * @param path The values to prepend to build path
-     */
-    public static String buildPath( String binaryValue, String... path ) {
-
-        StringBuilder builder = new StringBuilder();
-
-        for ( String element : path ) {
-            builder.append( SLASH );
-            builder.append( element );
-        }
-
-        builder.append( SLASH );
-        builder.append( binaryValue );
-
-        builder.deleteCharAt( 0 );
-
-        return builder.toString();
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/locking/cassandra/HectorLockImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/locking/cassandra/HectorLockImpl.java b/stack/core/src/main/java/org/usergrid/locking/cassandra/HectorLockImpl.java
deleted file mode 100644
index af69781..0000000
--- a/stack/core/src/main/java/org/usergrid/locking/cassandra/HectorLockImpl.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.locking.cassandra;
-
-
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import org.usergrid.locking.Lock;
-import org.usergrid.locking.exception.UGLockException;
-
-import me.prettyprint.hector.api.locking.HLock;
-import me.prettyprint.hector.api.locking.HLockManager;
-import me.prettyprint.hector.api.locking.HLockTimeoutException;
-
-
-/** @author tnine */
-public class HectorLockImpl implements Lock {
-
-    private HLock lock;
-    private HLockManager lm;
-    private AtomicInteger count = new AtomicInteger();
-
-
-    /**
-     *
-     */
-    public HectorLockImpl( HLock lock, HLockManager lm ) {
-        this.lock = lock;
-        this.lm = lm;
-    }
-
-
-    /* (non-Javadoc)
-     * @see org.usergrid.locking.Lock#acquire(long, java.util.concurrent.TimeUnit)
-     */
-    @Override
-    public boolean tryLock( long timeout, TimeUnit time ) throws UGLockException {
-        try {
-            lm.acquire( this.lock, time.toMillis( timeout ) );
-            count.incrementAndGet();
-        }
-        catch ( HLockTimeoutException hlte ) {
-            return false;
-        }
-
-        return true;
-    }
-
-
-    /* (non-Javadoc)
-     * @see org.usergrid.locking.Lock#lock()
-     */
-    @Override
-    public void lock() throws UGLockException {
-        lm.acquire( lock );
-        count.incrementAndGet();
-    }
-
-
-    /* (non-Javadoc)
-     * @see org.usergrid.locking.Lock#release()
-     */
-    @Override
-    public void unlock() throws UGLockException {
-        int current = count.decrementAndGet();
-
-        if ( current == 0 ) {
-            lm.release( this.lock );
-        }
-    }
-}


[18/96] [abbrv] [partial] Change package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/EntityFactory.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/EntityFactory.java b/stack/core/src/main/java/org/usergrid/persistence/EntityFactory.java
deleted file mode 100644
index e4c4ae9..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/EntityFactory.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence;
-
-
-import java.util.UUID;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-/** A factory for creating Entity objects. */
-public class EntityFactory {
-
-    /** The Constant logger. */
-    private static final Logger logger = LoggerFactory.getLogger( EntityFactory.class );
-
-
-    /**
-     * New entity.
-     *
-     * @param <A> the generic type
-     * @param id the id
-     * @param type the type
-     * @param entityClass the entity class
-     *
-     * @return new entity
-     */
-    public static <A extends Entity> A newEntity( UUID id, String type, Class<A> entityClass ) {
-        if ( type == null ) {
-            String errorMsg = "Entity type cannot be null";
-            logger.error( errorMsg );
-            throw new IllegalArgumentException( errorMsg );
-        }
-        if ( "entity".equalsIgnoreCase( type ) || "dynamicentity".equalsIgnoreCase( type ) ) {
-            String errorMsg = "Unable to instantiate entity (" + type + ") because that is not a valid type.";
-            logger.error( errorMsg );
-            throw new IllegalArgumentException( errorMsg );
-        }
-        Class<? extends Entity> expectedCls = Schema.getDefaultSchema().getEntityClass( type );
-
-        if ( entityClass == null ) {
-            if ( expectedCls != null ) {
-                entityClass = ( Class<A> ) expectedCls;
-            }
-            else {
-                entityClass = ( Class<A> ) DynamicEntity.class;
-            }
-        }
-
-        if ( ( expectedCls != null ) && !Entity.class.isAssignableFrom( entityClass ) && !expectedCls
-                .isAssignableFrom( entityClass ) ) {
-            String errorMsg = "Unable to instantiate entity (" + type
-                    + ") because type and entityClass do not match, either use DynamicClass as entityClass or fix " +
-                    "mismatch.";
-            logger.error( errorMsg );
-            throw new IllegalArgumentException( errorMsg );
-        }
-        else {
-            try {
-                A entity = entityClass.newInstance();
-                entity.setUuid( id );
-                entity.setType( type );
-                return entity;
-            }
-            catch ( IllegalAccessException e ) {
-                String errorMsg = "Unable to access entity (" + type + "): " + e.getMessage();
-                logger.error( errorMsg );
-            }
-            catch ( InstantiationException e ) {
-                String errorMsg = "Unable to instantiate entity (" + type + "): " + e.getMessage();
-                logger.error( errorMsg );
-            }
-        }
-
-        return null;
-    }
-
-
-    /**
-     * New entity.
-     *
-     * @param <A> the generic type
-     * @param id the id
-     * @param entityClass the entity class
-     *
-     * @return new entity
-     */
-    public static <A extends Entity> A newEntity( UUID id, Class<A> entityClass ) {
-
-        if ( entityClass == DynamicEntity.class ) {
-            return null;
-        }
-
-        String type = Schema.getDefaultSchema().getEntityType( entityClass );
-
-        return newEntity( id, type, entityClass );
-    }
-
-
-    /**
-     * New entity.
-     *
-     * @param id the id
-     * @param type the type
-     *
-     * @return new entity
-     */
-    public static Entity newEntity( UUID id, String type ) {
-
-        Class<? extends Entity> entityClass = Schema.getDefaultSchema().getEntityClass( type );
-        if ( entityClass == null ) {
-            entityClass = DynamicEntity.class;
-        }
-
-        return newEntity( id, type, entityClass );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/EntityManager.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/EntityManager.java b/stack/core/src/main/java/org/usergrid/persistence/EntityManager.java
deleted file mode 100644
index 29f9019..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/EntityManager.java
+++ /dev/null
@@ -1,620 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence;
-
-
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.UUID;
-
-import org.usergrid.persistence.Results.Level;
-import org.usergrid.persistence.cassandra.GeoIndexManager;
-import org.usergrid.persistence.entities.Application;
-import org.usergrid.persistence.entities.Role;
-
-
-/**
- * The interface class for the data access object for Applications. Each application contains a set of users as well as
- * a hierarchy of groups. A application also includes a set of message inboxes and a set of assets.
- */
-public interface EntityManager {
-
-    public void setApplicationId( UUID applicationId );
-
-    public GeoIndexManager getGeoIndexManager();
-
-    public EntityRef getApplicationRef();
-
-    public Application getApplication() throws Exception;
-
-    public void updateApplication( Application app ) throws Exception;
-
-    public void updateApplication( Map<String, Object> properties ) throws Exception;
-
-    public RelationManager getRelationManager( EntityRef entityRef );
-
-    /** Get all collections for the application. Includes both user defined collections and schema collections */
-    public Set<String> getApplicationCollections() throws Exception;
-
-    public Map<String, Object> getApplicationCollectionMetadata() throws Exception;
-
-    public long getApplicationCollectionSize( String collectionName ) throws Exception;
-
-    /**
-     * Creates an entity of the specified type attached to the specified application.
-     *
-     * @param type the type of the entity to create.
-     * @param properties property values to create in the new entity or null.
-     *
-     * @return the newly created entity object.
-     */
-    public Entity create( String entityType, Map<String, Object> properties ) throws Exception;
-
-    public <A extends Entity> A create( String entityType, Class<A> entityClass, Map<String, Object> properties )
-            throws Exception;
-
-    public <A extends TypedEntity> A create( A entity ) throws Exception;
-
-    /**
-     * Creates an entity of the specified type attached to the specified application.
-     *
-     * @param importId the UUID to assign to the imported entity
-     * @param type the type of the entity to create.
-     * @param properties property values to create in the new entity or null.
-     *
-     * @return the newly created entity object.
-     *
-     * @throws Exception the exception
-     */
-    public Entity create( UUID importId, String entityType, Map<String, Object> properties ) throws Exception;
-
-    public void createApplicationCollection( String entityType ) throws Exception;
-
-    public EntityRef getAlias( String aliasType, String alias ) throws Exception;
-
-    /**
-     * Get the entity ref from the value
-     *
-     * @param ownerId The owner Id of the collection
-     * @param collectionName The name of the collection
-     * @param aliasValue The value of the alias
-     */
-    public EntityRef getAlias( UUID ownerId, String collectionName, String aliasValue ) throws Exception;
-
-    public Map<String, EntityRef> getAlias( String aliasType, List<String> aliases ) throws Exception;
-
-    /**
-     * Get aliases from the index with the given value
-     *
-     * @param ownerId The id of the collection owner
-     * @param collectionName The name of the collection
-     * @param aliases The alias property
-     */
-    public Map<String, EntityRef> getAlias( UUID ownerId, String collectionName, List<String> aliases )
-            throws Exception;
-
-    /**
-     * Validates that the entity exists in the datastore meaning that it exists and the type has been loaded if not
-     * already provided.
-     *
-     * @return an validated EntityRef or null.
-     */
-    public EntityRef validate( EntityRef entityRef ) throws Exception;
-
-    public String getType( UUID entityId ) throws Exception;
-
-    public EntityRef getRef( UUID entityId ) throws Exception;
-
-    public Entity get( UUID entityId ) throws Exception;
-
-    /**
-     * Retrieves the entity for the specified entity reference.
-     *
-     * @param entity an Entity reference
-     *
-     * @return an Entity object for the specified entity reference.
-     */
-    public Entity get( EntityRef entityRef ) throws Exception;
-
-    public <A extends Entity> A get( UUID entityId, Class<A> entityClass ) throws Exception;
-
-    /**
-     * Retrieves a set of Entities. Will return an Entity object containing all of the entity's name/value properties
-     * and properties. For large numbers of entities, retrieving the properties can have additional overhead, passing
-     * false for includeProperties can result in better performance.
-     * <p/>
-     * This method will be deprecated in future releases in favor of a version that supports paging.
-     *
-     * @param entityIds a list of entity UUIDs.
-     * @param includeProperties whether to retrieve properties for the specified entities.
-     *
-     * @return a list of entity objects.
-     */
-    public Results get( Collection<UUID> entityIds, Results.Level resultsLevel ) throws Exception;
-
-    /**
-     * Retrieves a set of Entities. Will return an Entity object containing all of the entity's name/value properties
-     * and properties. For large numbers of entities, retrieving the properties can have additional overhead, passing
-     * false for includeProperties can result in better performance.
-     * <p/>
-     * This method will be deprecated in future releases in favor of a version that supports paging.
-     *
-     * @param entityIds a list of entity UUIDs.
-     * @param includeProperties whether to retrieve properties for the specified entities.
-     *
-     * @return a list of entity objects.
-     */
-    public Results get( Collection<UUID> entityIds ) throws Exception;
-
-    /**
-     * Retrieves a set of Entitues cast to the specified class type.
-     *
-     * @return a list of entity objects.
-     */
-    public Results get( Collection<UUID> entityIds, Class<? extends Entity> entityClass, Results.Level resultsLevel )
-            throws Exception;
-
-    /**
-     * Retrieves a set of Entities cast to the specified class type.
-     *
-     * @return a list of entity objects.
-     */
-    public Results get( Collection<UUID> entityIds, String entityType, Class<? extends Entity> entityClass,
-                        Results.Level resultsLevel ) throws Exception;
-
-    /**
-     * Updates the entity with the properties and values in the Entity Object.
-     *
-     * @param entity an Entity object.
-     */
-    public void update( Entity entity ) throws Exception;
-
-    /**
-     * Gets the value for a named entity property. Entity properties must be defined in the schema
-     *
-     * @param entity an entity reference
-     * @param propertyName the property name to retrieve.
-     *
-     * @return the value of the named property or null.
-     *
-     * @throws Exception the exception
-     */
-    public Object getProperty( EntityRef entityRef, String propertyName ) throws Exception;
-
-    /**
-     * Do a single load of all entities with the given properties.  Efficient if you have a subset of properties, and
-     * know the ids of them.  The entity UUID is in the key, the runtime subtype of Entity is in the value.  Note that
-     * if an entity cannot be loaded (id doesn't exist) it is simply ignored
-     */
-    public List<Entity> getPartialEntities( Collection<UUID> ids, Collection<String> properties ) throws Exception;
-
-    /**
-     * Gets the properties for the specified entity property.
-     *
-     * @param entity an entity reference
-     *
-     * @return the property values.
-     *
-     * @throws Exception the exception
-     */
-    public Map<String, Object> getProperties( EntityRef entityRef ) throws Exception;
-
-    /**
-     * Sets the value for a named entity property. If the property is being index, the index is updated to remove the
-     * old value and add the new value.
-     *
-     * @param entity an entity reference
-     * @param propertyName the property to set.
-     * @param propertyValue new value for property.
-     *
-     * @throws Exception the exception
-     */
-    public void setProperty( EntityRef entityRef, String propertyName, Object propertyValue ) throws Exception;
-
-    /**
-     * You should only use this method if you are absolutely sure what you're doing. Use setProperty without the
-     * override param in most cases. With great power comes great responsibility....
-     *
-     * @param override set to true to force this value to persist. This will ignore all mutable attributes as well as
-     * validation. Use with care
-     */
-    void setProperty( EntityRef entityRef, String propertyName, Object propertyValue, boolean override )
-            throws Exception;
-
-    /**
-     * Updates the properties for the specified entity.
-     *
-     * @param entity an entity reference
-     * @param properties the properties
-     *
-     * @throws Exception the exception
-     */
-    public void updateProperties( EntityRef entityRef, Map<String, Object> properties ) throws Exception;
-
-    public void deleteProperty( EntityRef entityRef, String propertyName ) throws Exception;
-
-    /**
-     * Gets the values from an entity list property. Lists are a special type of entity property that can contain an
-     * unordered set of non-duplicate values.
-     *
-     * @param entity an entity reference
-     * @param dictionaryName the property list name to retrieve.
-     *
-     * @return the value of the named property or null.
-     *
-     * @throws Exception the exception
-     */
-    public Set<Object> getDictionaryAsSet( EntityRef entityRef, String dictionaryName ) throws Exception;
-
-    /**
-     * Adds the specified value to the named entity list property. Lists are a special type of entity property that can
-     * contain an unordered set of non-duplicate values.
-     *
-     * @param entity an entity reference
-     * @param dictionaryName the property to set.
-     * @param elementValue new value for property.
-     *
-     * @throws Exception the exception
-     */
-    public void addToDictionary( EntityRef entityRef, String dictionaryName, Object elementValue ) throws Exception;
-
-    public void addToDictionary( EntityRef entityRef, String dictionaryName, Object elementName, Object elementValue )
-            throws Exception;
-
-    public void addSetToDictionary( EntityRef entityRef, String dictionaryName, Set<?> elementValues ) throws Exception;
-
-    public void addMapToDictionary( EntityRef entityRef, String dictionaryName, Map<?, ?> elementValues )
-            throws Exception;
-
-    public Map<Object, Object> getDictionaryAsMap( EntityRef entityRef, String dictionaryName ) throws Exception;
-
-    public Object getDictionaryElementValue( EntityRef entityRef, String dictionaryName, String elementName )
-            throws Exception;
-
-    /**
-     * Removes the specified value to the named entity list property. Lists are a special type of entity property that
-     * can contain an unordered set of non-duplicate values.
-     *
-     * @param entity an entity reference
-     * @param dictionaryName the property to set.
-     * @param elementValue new value for property.
-     *
-     * @throws Exception the exception
-     */
-    public void removeFromDictionary( EntityRef entityRef, String dictionaryName, Object elementValue )
-            throws Exception;
-
-    public Set<String> getDictionaries( EntityRef entity ) throws Exception;
-
-    /**
-     * Deletes the specified entity.
-     *
-     * @param entity an entity reference
-     *
-     * @throws Exception the exception
-     */
-    public void delete( EntityRef entityRef ) throws Exception;
-
-    /**
-     * Gets the entities and collections that the specified entity is a member of.
-     *
-     * @param entity an entity reference
-     *
-     * @return a map of entity references to set of collection names for the entities and collections that this entity
-     *         is a member of.
-     *
-     * @throws Exception the exception
-     */
-    public Map<String, Map<UUID, Set<String>>> getOwners( EntityRef entityRef ) throws Exception;
-
-    /**
-     * Return true if the owner entity ref is an owner of the entity;
-     *
-     * @param owner The owner of the collection
-     * @param collectionName The collection name
-     * @param entity The entity in the collection
-     */
-    public boolean isCollectionMember( EntityRef owner, String collectionName, EntityRef entity ) throws Exception;
-
-    /**
-     * Return true if the owner entity ref is an owner of the entity;
-     *
-     * @param owner The owner of the collection
-     * @param collectionName The collection name
-     * @param entity The entity in the collection
-     */
-    public boolean isConnectionMember( EntityRef owner, String connectionName, EntityRef entity ) throws Exception;
-
-
-    /**
-     * Gets the collections for the specified entity. Collection for a given type are encoded in the schema, this method
-     * loads the entity type and returns the collections from the schema.
-     *
-     * @param entity an entity reference
-     *
-     * @return the collections for the entity type of the given entity.
-     *
-     * @throws Exception the exception
-     */
-    public Set<String> getCollections( EntityRef entityRef ) throws Exception;
-
-    /**
-     * Gets a list of entities in the specified collection belonging to the specified entity.
-     *
-     * @param entity an entity reference
-     * @param collectionName the collection name.
-     * @param startResult the start result
-     * @param count the count
-     *
-     * @return a list of entities in the specified collection.
-     *
-     * @throws Exception the exception
-     */
-    public Results getCollection( EntityRef entityRef, String collectionName, UUID startResult, int count,
-                                  Results.Level resultsLevel, boolean reversed ) throws Exception;
-
-
-    public Results getCollection( UUID entityId, String collectionName, Query query, Results.Level resultsLevel )
-            throws Exception;
-
-    /**
-     * Adds an entity to the specified collection belonging to the specified entity entity.
-     *
-     * @param entity an entity reference
-     * @param collectionName the collection name.
-     * @param item an entity to be added to the collection.
-     *
-     * @throws Exception the exception
-     */
-    public Entity addToCollection( EntityRef entityRef, String collectionName, EntityRef itemRef ) throws Exception;
-
-    public Entity addToCollections( List<EntityRef> ownerEntities, String collectionName, EntityRef itemRef )
-            throws Exception;
-
-    /**
-     * Create the item in a sub collection
-     *
-     * @param entityRef The owning entity
-     * @param collectionName The name of the collection
-     * @param itemType The type of the item
-     * @param properties The properties for the item
-     */
-    public Entity createItemInCollection( EntityRef entityRef, String collectionName, String itemType,
-                                          Map<String, Object> properties ) throws Exception;
-
-    /**
-     * Removes an entity to the specified collection belonging to the specified entity.
-     *
-     * @param entity an entity reference
-     * @param collectionName the collection name.
-     * @param item a entity to be removed from the collection.
-     *
-     * @throws Exception the exception
-     */
-    public void removeFromCollection( EntityRef entityRef, String collectionName, EntityRef itemRef ) throws Exception;
-
-    public Results searchCollection( EntityRef entityRef, String collectionName, Query query ) throws Exception;
-
-    public Set<String> getCollectionIndexes( EntityRef entity, String collectionName ) throws Exception;
-
-    public void copyRelationships( EntityRef srcEntityRef, String srcRelationName, EntityRef dstEntityRef,
-                                   String dstRelationName ) throws Exception;
-
-    /**
-     * Connect the specified entity to another entity with the specified connection type. Connections are directional
-     * relationships that can be traversed in either direction.
-     *
-     * @param entity an entity reference
-     * @param connectionType type of connection to make.
-     * @param connectedEntity the entity to connect.
-     *
-     * @throws Exception the exception
-     */
-    public ConnectionRef createConnection( ConnectionRef connection ) throws Exception;
-
-    public ConnectionRef createConnection( EntityRef connectingEntity, String connectionType,
-                                           EntityRef connectedEntityRef ) throws Exception;
-
-    public ConnectionRef createConnection( EntityRef connectingEntity, String pairedConnectionType,
-                                           EntityRef pairedEntity, String connectionType, EntityRef connectedEntityRef )
-            throws Exception;
-
-    public ConnectionRef createConnection( EntityRef connectingEntity, ConnectedEntityRef... connections )
-            throws Exception;
-
-    public ConnectionRef connectionRef( EntityRef connectingEntity, String connectionType,
-                                        EntityRef connectedEntityRef ) throws Exception;
-
-    public ConnectionRef connectionRef( EntityRef connectingEntity, String pairedConnectionType, EntityRef pairedEntity,
-                                        String connectionType, EntityRef connectedEntityRef ) throws Exception;
-
-    public ConnectionRef connectionRef( EntityRef connectingEntity, ConnectedEntityRef... connections );
-
-    /**
-     * Disconnects two connected entities with the specified connection type. Connections are directional relationships
-     * that can be traversed in either direction.
-     *
-     * @param entity an entity reference
-     * @param connectionType type of connection to make.
-     * @param connectedEntity the entity to connect
-     *
-     * @throws Exception the exception
-     */
-
-    public void deleteConnection( ConnectionRef connectionRef ) throws Exception;
-
-    public Set<String> getConnectionTypes( EntityRef ref ) throws Exception;
-
-
-    /**
-     * Gets the entities of the specified type connected to the specified entity, optionally matching the specified
-     * connection types and/or entity types. Returns a list of entity ids.
-     *
-     * @param entity an entity reference
-     * @param connectionType type of connection or null.
-     * @param connectedEntityType type of entity or null.
-     *
-     * @return a list of connected entity ids.
-     *
-     * @throws Exception the exception
-     */
-    public Results getConnectedEntities( UUID entityId, String connectionType, String connectedEntityType,
-                                         Results.Level resultsLevel ) throws Exception;
-
-    /**
-     * Gets the entities connecting to this entity, optionally with the specified connection type and/or entity type.
-     * <p/>
-     * e.g. "get users who have favorited this place"
-     *
-     * @param entity an entity reference
-     * @param connectionType type of connection or null.
-     * @param connectingEntityType type of entity or null.
-     *
-     * @return a list of entities connecting to this one.
-     *
-     * @throws Exception the exception
-     */
-    public Results getConnectingEntities( UUID entityId, String connectionType, String connectedEntityType,
-                                          Results.Level resultsLevel ) throws Exception;
-
-
-    public Results getConnectingEntities(UUID uuid, String connectionType,
-    		String entityType, Level level, int count) throws Exception;
-
-	public Results searchConnectedEntities( EntityRef connectingEntity, Query query ) throws Exception;
-
-
-    // Application roles
-
-    public Set<String> getConnectionIndexes( EntityRef entity, String connectionType ) throws Exception;
-
-    public Map<String, String> getRoles() throws Exception;
-
-    public void resetRoles() throws Exception;
-
-    /**
-     * Create the role with the title and inactivity
-     *
-     * @param roleName The name of the role
-     * @param roleTitle The human readable title
-     * @param inactivity The amount of inactivity time to have the role expire. 0 is infinity, I.E no expiration
-     */
-    public Entity createRole( String roleName, String roleTitle, long inactivity ) throws Exception;
-
-    public void grantRolePermission( String roleName, String permission ) throws Exception;
-
-    public void grantRolePermissions( String roleName, Collection<String> permissions ) throws Exception;
-
-    public void revokeRolePermission( String roleName, String permission ) throws Exception;
-
-    public Set<String> getRolePermissions( String roleName ) throws Exception;
-
-    public void deleteRole( String roleName ) throws Exception;
-
-    // Group roles
-
-    public Map<String, String> getGroupRoles( UUID groupId ) throws Exception;
-
-    /** Create a group role with the group id, roleName, and inactivity */
-    public Entity createGroupRole( UUID groupId, String roleName, long inactivity ) throws Exception;
-
-    public void grantGroupRolePermission( UUID groupId, String roleName, String permission ) throws Exception;
-
-    public void revokeGroupRolePermission( UUID groupId, String roleName, String permission ) throws Exception;
-
-    public Set<String> getGroupRolePermissions( UUID groupId, String roleName ) throws Exception;
-
-    public void deleteGroupRole( UUID groupId, String roleName ) throws Exception;
-
-    // User role membership
-
-    public Set<String> getUserRoles( UUID userId ) throws Exception;
-
-    public void addUserToRole( UUID userId, String roleName ) throws Exception;
-
-    public void removeUserFromRole( UUID userId, String roleName ) throws Exception;
-
-    // User permissions
-
-    public Set<String> getUserPermissions( UUID userId ) throws Exception;
-
-    public void grantUserPermission( UUID userId, String permission ) throws Exception;
-
-    public void revokeUserPermission( UUID userId, String permission ) throws Exception;
-
-    // User role membership
-
-    public Map<String, String> getUserGroupRoles( UUID userId, UUID groupId ) throws Exception;
-
-    public void addUserToGroupRole( UUID userId, UUID groupId, String roleName ) throws Exception;
-
-    public void removeUserFromGroupRole( UUID userId, UUID groupId, String roleName ) throws Exception;
-
-    public Results getUsersInGroupRole( UUID groupId, String roleName, Results.Level level ) throws Exception;
-
-    public void incrementAggregateCounters( UUID userId, UUID groupId, String category, String counterName,
-                                            long value );
-
-    public Results getAggregateCounters( UUID userId, UUID groupId, String category, String counterName,
-                                         CounterResolution resolution, long start, long finish, boolean pad );
-
-    public Results getAggregateCounters( UUID userId, UUID groupId, UUID queueId, String category, String counterName,
-                                         CounterResolution resolution, long start, long finish, boolean pad );
-
-    public Results getAggregateCounters( Query query ) throws Exception;
-
-    public EntityRef getUserByIdentifier( Identifier identifier ) throws Exception;
-
-    public EntityRef getGroupByIdentifier( Identifier identifier ) throws Exception;
-
-    public Set<String> getCounterNames() throws Exception;
-
-    public Map<String, Long> getEntityCounters( UUID entityId ) throws Exception;
-
-    public Map<String, Long> getApplicationCounters() throws Exception;
-
-    public void incrementAggregateCounters( UUID userId, UUID groupId, String category, Map<String, Long> counters );
-
-    public boolean isPropertyValueUniqueForEntity( String entityType, String propertyName, Object propertyValue )
-            throws Exception;
-
-    public <A extends Entity> A get( EntityRef entityRef, Class<A> entityClass ) throws Exception;
-
-    public Map<String, Role> getRolesWithTitles( Set<String> roleNames ) throws Exception;
-
-    public String getRoleTitle( String roleName ) throws Exception;
-
-    public Map<String, Role> getUserRolesWithTitles( UUID userId ) throws Exception;
-
-
-    // Group role membership
-
-    public Map<String, Role> getGroupRolesWithTitles( UUID userId ) throws Exception;
-
-    public void addGroupToRole( UUID userId, String roleName ) throws Exception;
-
-    public void removeGroupFromRole( UUID userId, String roleName ) throws Exception;
-
-    // Group permissions
-
-    public Set<String> getGroupPermissions( UUID groupId ) throws Exception;
-
-    public void grantGroupPermission( UUID groupId, String permission ) throws Exception;
-
-    public void revokeGroupPermission( UUID groupId, String permission ) throws Exception;
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/EntityManagerFactory.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/EntityManagerFactory.java b/stack/core/src/main/java/org/usergrid/persistence/EntityManagerFactory.java
deleted file mode 100644
index c4e9177..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/EntityManagerFactory.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence;
-
-
-import java.util.Map;
-import java.util.UUID;
-
-
-// TODO: Auto-generated Javadoc
-
-
-/**
- * The interface class that specifies the operations that can be performed on the Usergrid Datastore. This interface is
- * designed to be implemented by different backends. Although these operations are meant to take advantage of the
- * capabilities of Cassandra, they should be implementable using other relational databases such as MySql or NoSQL
- * databases such as GAE or MongoDB.
- */
-public interface EntityManagerFactory {
-
-    /**
-     * A string description provided by the implementing class.
-     *
-     * @return description text
-     *
-     * @throws Exception the exception
-     */
-    public abstract String getImpementationDescription() throws Exception;
-
-    /**
-     * Gets the entity manager.
-     *
-     * @param applicationId the application id
-     *
-     * @return EntityDao for the specfied parameters
-     */
-    public abstract EntityManager getEntityManager( UUID applicationId );
-
-    /**
-     * Creates a new application.
-     *
-     * @param name a unique application name.
-     *
-     * @return the newly created application id.
-     *
-     * @throws Exception the exception
-     */
-    public abstract UUID createApplication( String organizationName, String name ) throws Exception;
-
-    /**
-     * Creates a Application entity. All entities except for applications must be attached to a Application.
-     *
-     * @param name the name of the application to create.
-     * @param properties property values to create in the new entity or null.
-     *
-     * @return the newly created application id.
-     *
-     * @throws Exception the exception
-     */
-    public abstract UUID createApplication( String organizationName, String name, Map<String, Object> properties )
-            throws Exception;
-
-    public abstract UUID importApplication( String organization, UUID applicationId, String name,
-                                            Map<String, Object> properties ) throws Exception;
-
-    /**
-     * Returns the application id for the application name.
-     *
-     * @param name a unique application name.
-     *
-     * @return the Application id or null.
-     *
-     * @throws Exception the exception
-     */
-    public abstract UUID lookupApplication( String name ) throws Exception;
-
-    /**
-     * Returns all the applications in the system.
-     *
-     * @return all the applications.
-     *
-     * @throws Exception the exception
-     */
-    public abstract Map<String, UUID> getApplications() throws Exception;
-
-    public abstract void setup() throws Exception;
-
-    public abstract Map<String, String> getServiceProperties();
-
-    public abstract boolean updateServiceProperties( Map<String, String> properties );
-
-    public abstract boolean setServiceProperty( String name, String value );
-
-    public abstract boolean deleteServiceProperty( String name );
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/EntityPropertyComparator.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/EntityPropertyComparator.java b/stack/core/src/main/java/org/usergrid/persistence/EntityPropertyComparator.java
deleted file mode 100644
index 7b9f0b5..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/EntityPropertyComparator.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence;
-
-
-import java.util.Comparator;
-
-import static org.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/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/EntityRef.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/EntityRef.java b/stack/core/src/main/java/org/usergrid/persistence/EntityRef.java
deleted file mode 100644
index 340206f..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/EntityRef.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence;
-
-
-import java.util.UUID;
-
-
-public interface EntityRef {
-
-    /**
-     * Gets the id.
-     *
-     * @return the id
-     */
-    public UUID getUuid();
-
-    /**
-     * Gets the type.
-     *
-     * @return the type
-     */
-    public String getType();
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/EntityUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/EntityUtils.java b/stack/core/src/main/java/org/usergrid/persistence/EntityUtils.java
deleted file mode 100644
index 5b48f20..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/EntityUtils.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence;
-
-
-import java.util.Map;
-import java.util.TreeMap;
-
-
-public class EntityUtils {
-
-    public static Map<String, Object> getSchemaProperties( String entityType, Map<String, Object> properties ) {
-
-        Map<String, Object> sys_props = new TreeMap<String, Object>( String.CASE_INSENSITIVE_ORDER );
-
-        for ( String propName : properties.keySet() ) {
-            if ( Schema.getDefaultSchema().hasProperty( entityType, propName ) ) {
-                Object propValue = properties.get( propName );
-                sys_props.put( propName, propValue );
-            }
-        }
-
-        return sys_props;
-    }
-
-
-    public static Map<String, Object> getDynamicProperties( String entityType, Map<String, Object> properties ) {
-
-        Map<String, Object> sys_props = new TreeMap<String, Object>( String.CASE_INSENSITIVE_ORDER );
-
-        for ( String propName : properties.keySet() ) {
-            if ( !Schema.getDefaultSchema().hasProperty( entityType, propName ) ) {
-                Object propValue = properties.get( propName );
-                sys_props.put( propName, propValue );
-            }
-        }
-
-        return sys_props;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/Identifier.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/Identifier.java b/stack/core/src/main/java/org/usergrid/persistence/Identifier.java
deleted file mode 100644
index 7139e43..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/Identifier.java
+++ /dev/null
@@ -1,226 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence;
-
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.UUID;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.codehaus.jackson.annotate.JsonIgnore;
-import org.usergrid.utils.UUIDUtils;
-
-
-public class Identifier implements Serializable {
-
-    public enum Type {
-        UUID, NAME, EMAIL
-    }
-
-
-    Type type;
-    Object value;
-
-    static Pattern emailRegEx = Pattern.compile( "[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,4}" );
-    static Pattern nameRegEx = Pattern.compile( "[a-zA-Z0-9_\\-./]*" );
-
-
-    private Identifier( Type type, Object value ) {
-        this.type = type;
-        this.value = value;
-    }
-
-
-    public static Identifier from( Object obj ) {
-        if ( obj == null ) {
-            return null;
-        }
-        if ( obj instanceof UUID ) {
-            return new Identifier( Type.UUID, obj );
-        }
-        if ( obj instanceof String ) {
-            UUID uuid = UUIDUtils.tryGetUUID( ( String ) obj );
-            if ( uuid != null ) {
-                return new Identifier( Type.UUID, uuid );
-            }
-            Matcher m = emailRegEx.matcher( ( String ) obj );
-            if ( m.matches() ) {
-                return new Identifier( Type.EMAIL, ( ( String ) obj ).toLowerCase() );
-            }
-            m = nameRegEx.matcher( ( String ) obj );
-            if ( m.matches() ) {
-                return new Identifier( Type.NAME, ( ( String ) obj ).toLowerCase() );
-            }
-        }
-        return null;
-    }
-
-
-    public static Identifier fromUUID( UUID uuid ) {
-        if ( uuid == null ) {
-            return null;
-        }
-        return new Identifier( Type.UUID, uuid );
-    }
-
-
-    public static Identifier fromName( String name ) {
-        if ( name == null ) {
-            return null;
-        }
-        return new Identifier( Type.NAME, name );
-    }
-
-
-    public static Identifier fromEmail( String email ) {
-        if ( email == null ) {
-            return null;
-        }
-        return new Identifier( Type.EMAIL, email );
-    }
-
-
-    @JsonIgnore
-    public UUID getUUID() {
-        if ( type != Type.UUID ) {
-            return null;
-        }
-        return ( UUID ) value;
-    }
-
-
-    @JsonIgnore
-    public boolean isUUID() {
-        return type == Type.UUID;
-    }
-
-
-    @JsonIgnore
-    public String getEmail() {
-        if ( type != Type.EMAIL ) {
-            return null;
-        }
-        return ( String ) value;
-    }
-
-
-    @JsonIgnore
-    public boolean isEmail() {
-        return type == Type.EMAIL;
-    }
-
-
-    @JsonIgnore
-    public String getName() {
-        if ( type != Type.NAME ) {
-            return null;
-        }
-        return ( String ) value;
-    }
-
-
-    @JsonIgnore
-    public boolean isName() {
-        return type == Type.NAME;
-    }
-
-
-    public Type getType() {
-        return type;
-    }
-
-
-    @Override
-    public String toString() {
-        return value != null ? value.toString() : null;
-    }
-
-
-    @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + ( ( type == null ) ? 0 : type.hashCode() );
-        result = prime * result + ( ( value == null ) ? 0 : value.hashCode() );
-        return result;
-    }
-
-
-    @Override
-    public boolean equals( Object obj ) {
-        if ( this == obj ) {
-            return true;
-        }
-        if ( obj == null ) {
-            return false;
-        }
-        if ( getClass() != obj.getClass() ) {
-            return false;
-        }
-        Identifier other = ( Identifier ) obj;
-        if ( type != other.type ) {
-            return false;
-        }
-        if ( value == null ) {
-            if ( other.value != null ) {
-                return false;
-            }
-        }
-        else if ( !value.equals( other.value ) ) {
-            return false;
-        }
-        return true;
-    }
-
-
-    public static List<Identifier> fromList( List<String> l ) {
-        List<Identifier> identifiers = null;
-        if ( ( l != null ) && ( l.size() > 0 ) ) {
-            for ( String s : l ) {
-                Identifier identifier = Identifier.from( s );
-                if ( identifier != null ) {
-                    if ( identifiers == null ) {
-                        identifiers = new ArrayList<Identifier>();
-                    }
-                    identifiers.add( identifier );
-                }
-            }
-        }
-        return identifiers;
-    }
-
-
-    // for serialization
-    public Identifier() { }
-
-
-    // for serialization
-    public Object getValue() {
-        return value;
-    }
-
-
-    // for serialization
-    public void setValue( Object value ) {
-        if ( isUUID() && value instanceof String ) {
-            value = UUID.fromString( ( String ) value );
-        }
-        this.value = value;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/IndexBucketLocator.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/IndexBucketLocator.java b/stack/core/src/main/java/org/usergrid/persistence/IndexBucketLocator.java
deleted file mode 100644
index 5fe1264..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/IndexBucketLocator.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence;
-
-
-import java.util.List;
-import java.util.UUID;
-
-
-/**
- * Interface for locating different buckets for indexing entities. These buckets are not intended for user with time
- * series indexing. Rather this a means of partitioning index puts across multiple rows
- *
- * @author tnine
- */
-public interface IndexBucketLocator {
-
-    public enum IndexType {
-        COLLECTION( "collection" ), CONNECTION( "connection" ), GEO( "geo" ), UNIQUE( "unique" );
-
-        private final String type;
-
-
-        private IndexType( String type ) {
-            this.type = type;
-        }
-
-
-        public String getType() {
-            return type;
-        }
-
-    }
-
-    /**
-     * Return the bucket to use for indexing this entity
-     *
-     * @param applicationId The application id
-     * @param type The type of the index. This way indexing on the same property value for different types of indexes
-     * does not cause collisions on partitioning and lookups
-     * @param entityId The entity id to be indexed
-     * @param components The strings and uniquely identify the path to this index. I.E entityType and propName,
-     * collection name etc This string must remain the same for all reads and writes
-     *
-     * @return A bucket to use.  Note that ALL properties for the given entity should be in the same bucket.  This
-     *         allows us to shard and execute queries in parallel.  Generally speaking, sharding on entityId is the best
-     *         strategy, since this is an immutable value
-     */
-    public String getBucket( UUID applicationId, IndexType type, UUID entityId, String... components );
-
-    /**
-     * Get all buckets that exist for this application with the given entity type, and property name
-     *
-     * @param applicationId The application id
-     * @param type The type of index
-     * @param components The strings and uniquely identify the path to this index. I.E entityType and propName,
-     * collection name etc
-     *
-     * @return All buckets for this application at the given component path
-     */
-    public List<String> getBuckets( UUID applicationId, IndexType type, String... components );
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/MultiQueryIterator.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/MultiQueryIterator.java b/stack/core/src/main/java/org/usergrid/persistence/MultiQueryIterator.java
deleted file mode 100644
index a4ea562..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/MultiQueryIterator.java
+++ /dev/null
@@ -1,106 +0,0 @@
-package org.usergrid.persistence;
-
-
-import java.util.Iterator;
-import java.util.UUID;
-
-
-/**
- * For each in a set of source UUIDs, executes a sub-query and provides a unified iterator over the union of all
- * results. Honors page sizes for the Query to ensure memory isn't blown out.
- */
-public class MultiQueryIterator implements Iterator {
-
-    private EntityManager entityManager;
-    private Iterator<UUID> source;
-    private Query query;
-    private MutableEntityRef entityRef = new MutableEntityRef();
-    private Iterator currentIterator;
-
-
-    public MultiQueryIterator( Results results, Query query ) {
-        this( results.getQueryProcessor().getEntityManager(), new PagingResultsIterator( results, Results.Level.IDS ),
-                query );
-    }
-
-
-    public MultiQueryIterator( EntityManager entityManager, Iterator<UUID> source, Query query ) {
-        if ( query.getCollection() == null && query.getConnectionType() == null ) {
-            throw new IllegalArgumentException( "Query must have a collection or connectionType value" );
-        }
-        this.entityManager = entityManager;
-        this.source = source;
-        this.query = query;
-    }
-
-
-    @Override
-    public boolean hasNext() {
-        if ( source == null ) {
-            return false;
-        }
-        if ( currentIterator != null && currentIterator.hasNext() ) {
-            return true;
-        }
-        while ( source.hasNext() ) {
-            UUID uuid = source.next();
-            Results r = getResultsFor( uuid );
-            if ( r.size() > 0 ) {
-                currentIterator = new PagingResultsIterator( r, query.getResultsLevel() );
-                return currentIterator.hasNext();
-            }
-        }
-        currentIterator = null;
-        source = null;
-        return false;
-    }
-
-
-    @Override
-    public Object next() {
-        return ( currentIterator != null ) ? currentIterator.next() : null;
-    }
-
-
-    @Override
-    public void remove() {
-        throw new UnsupportedOperationException();
-    }
-
-
-    private Results getResultsFor( UUID uuid ) {
-        entityRef.setUUID( uuid );
-        try {
-            return ( query.getCollection() != null ) ?
-                   entityManager.searchCollection( entityRef, query.getCollection(), query ) :
-                   entityManager.searchConnectedEntities( entityRef, query );
-        }
-        catch ( Exception e ) {
-            throw new RuntimeException( e );
-        }
-    }
-
-
-    // just avoid some garbage collection
-    private static class MutableEntityRef implements EntityRef {
-
-        private UUID uuid;
-
-
-        public void setUUID( UUID uuid ) {
-            this.uuid = uuid;
-        }
-
-
-        @Override
-        public UUID getUuid() {
-            return uuid;
-        }
-
-
-        @Override
-        public String getType() {
-            return null;
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/PagingResultsIterator.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/PagingResultsIterator.java b/stack/core/src/main/java/org/usergrid/persistence/PagingResultsIterator.java
deleted file mode 100644
index 7beeb52..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/PagingResultsIterator.java
+++ /dev/null
@@ -1,109 +0,0 @@
-package org.usergrid.persistence;
-
-
-import java.util.Iterator;
-import java.util.List;
-
-
-/** iterates over a Results object, crossing page boundaries automatically */
-public class PagingResultsIterator implements Iterator, Iterable {
-
-    private Results results;
-    private Iterator currentPageIterator;
-    private Results.Level level;
-
-
-    public PagingResultsIterator( Results results ) {
-        this( results, results.level );
-    }
-
-
-    /**
-     * @param level overrides the default level from the Results - in case you want to return, say, UUIDs where the
-     * Query was set for Entities
-     */
-    public PagingResultsIterator( Results results, Results.Level level ) {
-        this.results = results;
-        this.level = level;
-        initCurrentPageIterator();
-    }
-
-
-    @Override
-    public boolean hasNext() {
-        if ( currentPageIterator != null ) {
-            if ( currentPageIterator.hasNext() ) {
-                return true;
-            }
-            else {
-                return loadNextPage();
-            }
-        }
-        return false;
-    }
-
-
-    /** @return the next object (type varies according the Results.Level) */
-    @Override
-    public Object next() {
-        return currentPageIterator.next();
-    }
-
-
-    /** not supported */
-    @Override
-    public void remove() {
-        throw new UnsupportedOperationException();
-    }
-
-
-    /**
-     * initialize the iterator for the current page of results.
-     *
-     * @return true if the iterator has more results
-     */
-    private boolean initCurrentPageIterator() {
-        List currentPage;
-        if ( results != null ) {
-            switch ( level ) {
-                case IDS:
-                    currentPage = results.getIds();
-                    break;
-                case REFS:
-                    currentPage = results.getRefs();
-                    break;
-                default:
-                    currentPage = results.getEntities();
-            }
-            if ( currentPage.size() > 0 ) {
-                currentPageIterator = currentPage.iterator();
-            }
-        }
-        else {
-            currentPageIterator = null;
-        }
-        return currentPageIterator != null && currentPageIterator.hasNext();
-    }
-
-
-    /**
-     * attempts to load the next page
-     *
-     * @return true if loaded there are more results
-     */
-    private boolean loadNextPage() {
-        try {
-            results = results.getNextPageResults();
-        }
-        catch ( Exception e ) {
-            throw new RuntimeException( e );
-        }
-        return initCurrentPageIterator();
-    }
-
-
-    @Override
-    public Iterator iterator() {
-        return this;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/PathQuery.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/PathQuery.java b/stack/core/src/main/java/org/usergrid/persistence/PathQuery.java
deleted file mode 100644
index cc233e7..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/PathQuery.java
+++ /dev/null
@@ -1,115 +0,0 @@
-package org.usergrid.persistence;
-
-
-import java.util.Iterator;
-import java.util.UUID;
-
-
-public class PathQuery<E> {
-
-    private PathQuery source;
-    private Query query;
-    private UUID head;
-
-
-    public PathQuery() {
-    }
-
-
-    /**
-     * top level
-     *
-     * @param head the top-level entity
-     */
-    public PathQuery( EntityRef head ) {
-        this.head = head.getUuid();
-        this.query = null;
-    }
-
-
-    /**
-     * top level
-     *
-     * @param head the top-level entity
-     * @param collectionName the query - must have a collection or connectType value set
-     */
-    public PathQuery( EntityRef head, Query query ) {
-        if ( query.getCollection() == null && query.getConnectionType() == null ) {
-            throw new IllegalArgumentException( "Query must have a collection or connectionType value" );
-        }
-        this.head = head.getUuid();
-        this.query = query;
-    }
-
-
-    /**
-     * chained
-     *
-     * @param source the source query we're chaining from
-     * @param collectionName the query - must have a collection or connectType value set
-     */
-    public PathQuery( PathQuery source, Query query ) {
-        if ( query.getCollection() == null && query.getConnectionType() == null ) {
-            throw new IllegalArgumentException( "Query must have a collection or connectionType value" );
-        }
-        this.source = source;
-        this.query = query;
-    }
-
-
-    public PathQuery chain( Query query ) {
-        return new PathQuery( this, query );
-    }
-
-
-    public Iterator<E> iterator( EntityManager em ) {
-        try {
-            if ( head != null ) {
-                return new PagingResultsIterator( getHeadResults( em ), query.getResultsLevel() );
-            }
-            else {
-                return new MultiQueryIterator( em, source.uuidIterator( em ), query );
-            }
-        }
-        catch ( Exception e ) {
-            throw new RuntimeException( e );
-        }
-    }
-
-
-    protected Results getHeadResults( EntityManager em ) throws Exception {
-        EntityRef ref = new SimpleEntityRef( head );
-        return ( query.getCollection() != null ) ? em.searchCollection( ref, query.getCollection(), query ) :
-               em.searchConnectedEntities( ref, query );
-    }
-
-
-    protected Iterator uuidIterator( EntityManager em ) throws Exception {
-        if ( head != null ) {
-            return new PagingResultsIterator( getHeadResults( em ), Results.Level.IDS );
-        }
-        else {
-            Query q = query;
-            if ( query.getResultsLevel() != Results.Level.IDS ) { // ensure IDs level
-                q = new Query( q );
-                q.setResultsLevel( Results.Level.IDS );
-            }
-            return new MultiQueryIterator( em, source.uuidIterator( em ), q );
-        }
-    }
-
-
-    public PathQuery getSource() {
-        return source;
-    }
-
-
-    public UUID getHead() {
-        return head;
-    }
-
-
-    public Query getQuery() {
-        return query;
-    }
-}


[22/96] [abbrv] [partial] Change package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/mq/QueryFilterParser.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/mq/QueryFilterParser.java b/stack/core/src/main/java/org/usergrid/mq/QueryFilterParser.java
deleted file mode 100644
index 0f0c913..0000000
--- a/stack/core/src/main/java/org/usergrid/mq/QueryFilterParser.java
+++ /dev/null
@@ -1,1102 +0,0 @@
-// $ANTLR 3.1.3 Mar 17, 2009 19:23:44 org/usergrid/persistence/query/QueryFilter.g 2012-03-07 22:54:28
-
-package org.usergrid.mq;
-
-
-import org.antlr.runtime.BitSet;
-import org.antlr.runtime.MismatchedSetException;
-import org.antlr.runtime.NoViableAltException;
-import org.antlr.runtime.Parser;
-import org.antlr.runtime.ParserRuleReturnScope;
-import org.antlr.runtime.RecognitionException;
-import org.antlr.runtime.RecognizerSharedState;
-import org.antlr.runtime.Token;
-import org.antlr.runtime.TokenStream;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.usergrid.mq.Query.FilterPredicate;
-import org.usergrid.mq.Query.SortPredicate;
-
-
-public class QueryFilterParser extends Parser {
-    public static final String[] tokenNames = new String[] {
-            "<invalid>", "<EOR>", "<DOWN>", "<UP>", "ID", "INT", "EXPONENT", "FLOAT", "ESC_SEQ", "STRING", "BOOLEAN",
-            "HEX_DIGIT", "UUID", "UNICODE_ESC", "OCTAL_ESC", "WS", "'<'", "'<='", "'='", "'>'", "'>='", "'in'", "'eq'",
-            "'lt'", "'gt'", "'lte'", "'gte'", "'contains'", "'within'", "','", "'of'", "':'", "'asc'", "'desc'", "'*'",
-            "'{'", "'}'", "'select'", "'where'", "'and'", "'order by'"
-    };
-    public static final int T__40 = 40;
-    public static final int EXPONENT = 6;
-    public static final int T__29 = 29;
-    public static final int T__28 = 28;
-    public static final int T__27 = 27;
-    public static final int T__26 = 26;
-    public static final int UUID = 12;
-    public static final int T__25 = 25;
-    public static final int T__24 = 24;
-    public static final int T__23 = 23;
-    public static final int T__22 = 22;
-    public static final int T__21 = 21;
-    public static final int UNICODE_ESC = 13;
-    public static final int T__20 = 20;
-    public static final int OCTAL_ESC = 14;
-    public static final int HEX_DIGIT = 11;
-    public static final int FLOAT = 7;
-    public static final int INT = 5;
-    public static final int ID = 4;
-    public static final int EOF = -1;
-    public static final int T__19 = 19;
-    public static final int T__30 = 30;
-    public static final int T__31 = 31;
-    public static final int T__32 = 32;
-    public static final int WS = 15;
-    public static final int BOOLEAN = 10;
-    public static final int ESC_SEQ = 8;
-    public static final int T__33 = 33;
-    public static final int T__16 = 16;
-    public static final int T__34 = 34;
-    public static final int T__35 = 35;
-    public static final int T__18 = 18;
-    public static final int T__36 = 36;
-    public static final int T__17 = 17;
-    public static final int T__37 = 37;
-    public static final int T__38 = 38;
-    public static final int T__39 = 39;
-    public static final int STRING = 9;
-
-    // delegates
-    // delegators
-
-
-    public QueryFilterParser( TokenStream input ) {
-        this( input, new RecognizerSharedState() );
-    }
-
-
-    public QueryFilterParser( TokenStream input, RecognizerSharedState state ) {
-        super( input, state );
-    }
-
-
-    public String[] getTokenNames() { return QueryFilterParser.tokenNames; }
-
-
-    public String getGrammarFileName() { return "org/usergrid/persistence/query/QueryFilter.g"; }
-
-
-    Query query = new Query();
-
-    private static final Logger logger = LoggerFactory.getLogger( QueryFilterLexer.class );
-
-
-    @Override
-    public void emitErrorMessage( String msg ) {
-        logger.info( msg );
-    }
-
-
-    public static class property_return extends ParserRuleReturnScope {}
-
-
-    ;
-
-
-    // $ANTLR start "property"
-    // org/usergrid/persistence/query/QueryFilter.g:101:1: property : ( ID ) ;
-    public final QueryFilterParser.property_return property() throws RecognitionException {
-        QueryFilterParser.property_return retval = new QueryFilterParser.property_return();
-        retval.start = input.LT( 1 );
-
-        try {
-            // org/usergrid/persistence/query/QueryFilter.g:102:2: ( ( ID ) )
-            // org/usergrid/persistence/query/QueryFilter.g:102:5: ( ID )
-            {
-                // org/usergrid/persistence/query/QueryFilter.g:102:5: ( ID )
-                // org/usergrid/persistence/query/QueryFilter.g:102:6: ID
-                {
-                    match( input, ID, FOLLOW_ID_in_property597 );
-                }
-            }
-
-            retval.stop = input.LT( -1 );
-        }
-        catch ( RecognitionException re ) {
-            reportError( re );
-            recover( input, re );
-        }
-        finally {
-        }
-        return retval;
-    }
-    // $ANTLR end "property"
-
-
-    public static class operator_return extends ParserRuleReturnScope {}
-
-
-    ;
-
-
-    // $ANTLR start "operator"
-    // org/usergrid/persistence/query/QueryFilter.g:104:1: operator : ( '<' | '<=' | '=' | '>' | '>=' | 'in' | 'eq' |
-    // 'lt' | 'gt' | 'lte' | 'gte' | 'contains' | 'within' ) ;
-    public final QueryFilterParser.operator_return operator() throws RecognitionException {
-        QueryFilterParser.operator_return retval = new QueryFilterParser.operator_return();
-        retval.start = input.LT( 1 );
-
-        try {
-            // org/usergrid/persistence/query/QueryFilter.g:105:2: ( ( '<' | '<=' | '=' | '>' | '>=' | 'in' | 'eq' |
-            // 'lt' | 'gt' | 'lte' | 'gte' | 'contains' | 'within' ) )
-            // org/usergrid/persistence/query/QueryFilter.g:105:4: ( '<' | '<=' | '=' | '>' | '>=' | 'in' | 'eq' |
-            // 'lt' | 'gt' | 'lte' | 'gte' | 'contains' | 'within' )
-            {
-                if ( ( input.LA( 1 ) >= 16 && input.LA( 1 ) <= 28 ) ) {
-                    input.consume();
-                    state.errorRecovery = false;
-                }
-                else {
-                    MismatchedSetException mse = new MismatchedSetException( null, input );
-                    throw mse;
-                }
-            }
-
-            retval.stop = input.LT( -1 );
-        }
-        catch ( RecognitionException re ) {
-            reportError( re );
-            recover( input, re );
-        }
-        finally {
-        }
-        return retval;
-    }
-    // $ANTLR end "operator"
-
-
-    public static class value_return extends ParserRuleReturnScope {}
-
-
-    ;
-
-
-    // $ANTLR start "value"
-    // org/usergrid/persistence/query/QueryFilter.g:107:1: value : ( BOOLEAN | STRING | INT | FLOAT | UUID ) ;
-    public final QueryFilterParser.value_return value() throws RecognitionException {
-        QueryFilterParser.value_return retval = new QueryFilterParser.value_return();
-        retval.start = input.LT( 1 );
-
-        try {
-            // org/usergrid/persistence/query/QueryFilter.g:107:8: ( ( BOOLEAN | STRING | INT | FLOAT | UUID ) )
-            // org/usergrid/persistence/query/QueryFilter.g:107:10: ( BOOLEAN | STRING | INT | FLOAT | UUID )
-            {
-                if ( input.LA( 1 ) == INT || input.LA( 1 ) == FLOAT || ( input.LA( 1 ) >= STRING
-                        && input.LA( 1 ) <= BOOLEAN ) || input.LA( 1 ) == UUID ) {
-                    input.consume();
-                    state.errorRecovery = false;
-                }
-                else {
-                    MismatchedSetException mse = new MismatchedSetException( null, input );
-                    throw mse;
-                }
-            }
-
-            retval.stop = input.LT( -1 );
-        }
-        catch ( RecognitionException re ) {
-            reportError( re );
-            recover( input, re );
-        }
-        finally {
-        }
-        return retval;
-    }
-    // $ANTLR end "value"
-
-
-    public static class second_value_return extends ParserRuleReturnScope {}
-
-
-    ;
-
-
-    // $ANTLR start "second_value"
-    // org/usergrid/persistence/query/QueryFilter.g:109:1: second_value : ( BOOLEAN | STRING | INT | FLOAT | UUID ) ;
-    public final QueryFilterParser.second_value_return second_value() throws RecognitionException {
-        QueryFilterParser.second_value_return retval = new QueryFilterParser.second_value_return();
-        retval.start = input.LT( 1 );
-
-        try {
-            // org/usergrid/persistence/query/QueryFilter.g:109:15: ( ( BOOLEAN | STRING | INT | FLOAT | UUID ) )
-            // org/usergrid/persistence/query/QueryFilter.g:109:17: ( BOOLEAN | STRING | INT | FLOAT | UUID )
-            {
-                if ( input.LA( 1 ) == INT || input.LA( 1 ) == FLOAT || ( input.LA( 1 ) >= STRING
-                        && input.LA( 1 ) <= BOOLEAN ) || input.LA( 1 ) == UUID ) {
-                    input.consume();
-                    state.errorRecovery = false;
-                }
-                else {
-                    MismatchedSetException mse = new MismatchedSetException( null, input );
-                    throw mse;
-                }
-            }
-
-            retval.stop = input.LT( -1 );
-        }
-        catch ( RecognitionException re ) {
-            reportError( re );
-            recover( input, re );
-        }
-        finally {
-        }
-        return retval;
-    }
-    // $ANTLR end "second_value"
-
-
-    public static class third_value_return extends ParserRuleReturnScope {}
-
-
-    ;
-
-
-    // $ANTLR start "third_value"
-    // org/usergrid/persistence/query/QueryFilter.g:111:1: third_value : ( BOOLEAN | STRING | INT | FLOAT | UUID ) ;
-    public final QueryFilterParser.third_value_return third_value() throws RecognitionException {
-        QueryFilterParser.third_value_return retval = new QueryFilterParser.third_value_return();
-        retval.start = input.LT( 1 );
-
-        try {
-            // org/usergrid/persistence/query/QueryFilter.g:111:14: ( ( BOOLEAN | STRING | INT | FLOAT | UUID ) )
-            // org/usergrid/persistence/query/QueryFilter.g:111:16: ( BOOLEAN | STRING | INT | FLOAT | UUID )
-            {
-                if ( input.LA( 1 ) == INT || input.LA( 1 ) == FLOAT || ( input.LA( 1 ) >= STRING
-                        && input.LA( 1 ) <= BOOLEAN ) || input.LA( 1 ) == UUID ) {
-                    input.consume();
-                    state.errorRecovery = false;
-                }
-                else {
-                    MismatchedSetException mse = new MismatchedSetException( null, input );
-                    throw mse;
-                }
-            }
-
-            retval.stop = input.LT( -1 );
-        }
-        catch ( RecognitionException re ) {
-            reportError( re );
-            recover( input, re );
-        }
-        finally {
-        }
-        return retval;
-    }
-    // $ANTLR end "third_value"
-
-
-    // $ANTLR start "filter"
-    // org/usergrid/persistence/query/QueryFilter.g:113:1: filter returns [FilterPredicate filter] : property
-    // operator value ( ( ',' | 'of' ) second_value ( ',' third_value )? )? EOF ;
-    public final FilterPredicate filter() throws RecognitionException {
-        FilterPredicate filter = null;
-
-        QueryFilterParser.property_return property1 = null;
-
-        QueryFilterParser.operator_return operator2 = null;
-
-        QueryFilterParser.value_return value3 = null;
-
-        QueryFilterParser.second_value_return second_value4 = null;
-
-        QueryFilterParser.third_value_return third_value5 = null;
-
-
-        try {
-            // org/usergrid/persistence/query/QueryFilter.g:114:5: ( property operator value ( ( ',
-            // ' | 'of' ) second_value ( ',' third_value )? )? EOF )
-            // org/usergrid/persistence/query/QueryFilter.g:114:9: property operator value ( ( ',
-            // ' | 'of' ) second_value ( ',' third_value )? )? EOF
-            {
-                pushFollow( FOLLOW_property_in_filter759 );
-                property1 = property();
-
-                state._fsp--;
-
-                pushFollow( FOLLOW_operator_in_filter761 );
-                operator2 = operator();
-
-                state._fsp--;
-
-                pushFollow( FOLLOW_value_in_filter763 );
-                value3 = value();
-
-                state._fsp--;
-
-                // org/usergrid/persistence/query/QueryFilter.g:114:33: ( ( ',' | 'of' ) second_value ( ',
-                // ' third_value )? )?
-                int alt2 = 2;
-                int LA2_0 = input.LA( 1 );
-
-                if ( ( ( LA2_0 >= 29 && LA2_0 <= 30 ) ) ) {
-                    alt2 = 1;
-                }
-                switch ( alt2 ) {
-                    case 1:
-                        // org/usergrid/persistence/query/QueryFilter.g:114:34: ( ',' | 'of' ) second_value ( ',
-                        // ' third_value )?
-                    {
-                        if ( ( input.LA( 1 ) >= 29 && input.LA( 1 ) <= 30 ) ) {
-                            input.consume();
-                            state.errorRecovery = false;
-                        }
-                        else {
-                            MismatchedSetException mse = new MismatchedSetException( null, input );
-                            throw mse;
-                        }
-
-                        pushFollow( FOLLOW_second_value_in_filter774 );
-                        second_value4 = second_value();
-
-                        state._fsp--;
-
-                        // org/usergrid/persistence/query/QueryFilter.g:114:60: ( ',' third_value )?
-                        int alt1 = 2;
-                        int LA1_0 = input.LA( 1 );
-
-                        if ( ( LA1_0 == 29 ) ) {
-                            alt1 = 1;
-                        }
-                        switch ( alt1 ) {
-                            case 1:
-                                // org/usergrid/persistence/query/QueryFilter.g:114:62: ',' third_value
-                            {
-                                match( input, 29, FOLLOW_29_in_filter778 );
-                                pushFollow( FOLLOW_third_value_in_filter780 );
-                                third_value5 = third_value();
-
-                                state._fsp--;
-                            }
-                            break;
-                        }
-                    }
-                    break;
-                }
-
-
-                String property = ( property1 != null ? input.toString( property1.start, property1.stop ) : null );
-                String operator = ( operator2 != null ? input.toString( operator2.start, operator2.stop ) : null );
-                String value = ( value3 != null ? input.toString( value3.start, value3.stop ) : null );
-                String second_value =
-                        ( second_value4 != null ? input.toString( second_value4.start, second_value4.stop ) : null );
-                String third_value =
-                        ( third_value5 != null ? input.toString( third_value5.start, third_value5.stop ) : null );
-                filter = new FilterPredicate( property, operator, value, second_value, third_value );
-                //System.out.println("Parsed query filter: " + property + " " + operator + " " + value + " " +
-                // second_value);
-
-
-                match( input, EOF, FOLLOW_EOF_in_filter789 );
-            }
-        }
-        catch ( RecognitionException re ) {
-            reportError( re );
-            recover( input, re );
-        }
-        finally {
-        }
-        return filter;
-    }
-    // $ANTLR end "filter"
-
-
-    public static class select_subject_return extends ParserRuleReturnScope {}
-
-
-    ;
-
-
-    // $ANTLR start "select_subject"
-    // org/usergrid/persistence/query/QueryFilter.g:127:1: select_subject : ID ;
-    public final QueryFilterParser.select_subject_return select_subject() throws RecognitionException {
-        QueryFilterParser.select_subject_return retval = new QueryFilterParser.select_subject_return();
-        retval.start = input.LT( 1 );
-
-        try {
-            // org/usergrid/persistence/query/QueryFilter.g:128:2: ( ID )
-            // org/usergrid/persistence/query/QueryFilter.g:128:4: ID
-            {
-                match( input, ID, FOLLOW_ID_in_select_subject800 );
-
-
-                query.addSelect( input.toString( retval.start, input.LT( -1 ) ) );
-            }
-
-            retval.stop = input.LT( -1 );
-        }
-        catch ( RecognitionException re ) {
-            reportError( re );
-            recover( input, re );
-        }
-        finally {
-        }
-        return retval;
-    }
-    // $ANTLR end "select_subject"
-
-
-    public static class select_assign_target_return extends ParserRuleReturnScope {}
-
-
-    ;
-
-
-    // $ANTLR start "select_assign_target"
-    // org/usergrid/persistence/query/QueryFilter.g:134:1: select_assign_target : ID ;
-    public final QueryFilterParser.select_assign_target_return select_assign_target() throws RecognitionException {
-        QueryFilterParser.select_assign_target_return retval = new QueryFilterParser.select_assign_target_return();
-        retval.start = input.LT( 1 );
-
-        try {
-            // org/usergrid/persistence/query/QueryFilter.g:135:2: ( ID )
-            // org/usergrid/persistence/query/QueryFilter.g:135:4: ID
-            {
-                match( input, ID, FOLLOW_ID_in_select_assign_target812 );
-            }
-
-            retval.stop = input.LT( -1 );
-        }
-        catch ( RecognitionException re ) {
-            reportError( re );
-            recover( input, re );
-        }
-        finally {
-        }
-        return retval;
-    }
-    // $ANTLR end "select_assign_target"
-
-
-    public static class select_assign_source_return extends ParserRuleReturnScope {}
-
-
-    ;
-
-
-    // $ANTLR start "select_assign_source"
-    // org/usergrid/persistence/query/QueryFilter.g:137:1: select_assign_source : ID ;
-    public final QueryFilterParser.select_assign_source_return select_assign_source() throws RecognitionException {
-        QueryFilterParser.select_assign_source_return retval = new QueryFilterParser.select_assign_source_return();
-        retval.start = input.LT( 1 );
-
-        try {
-            // org/usergrid/persistence/query/QueryFilter.g:138:2: ( ID )
-            // org/usergrid/persistence/query/QueryFilter.g:138:4: ID
-            {
-                match( input, ID, FOLLOW_ID_in_select_assign_source823 );
-            }
-
-            retval.stop = input.LT( -1 );
-        }
-        catch ( RecognitionException re ) {
-            reportError( re );
-            recover( input, re );
-        }
-        finally {
-        }
-        return retval;
-    }
-    // $ANTLR end "select_assign_source"
-
-
-    // $ANTLR start "select_assign"
-    // org/usergrid/persistence/query/QueryFilter.g:140:1: select_assign : select_assign_target ':'
-    // select_assign_source ;
-    public final void select_assign() throws RecognitionException {
-        QueryFilterParser.select_assign_source_return select_assign_source6 = null;
-
-        QueryFilterParser.select_assign_target_return select_assign_target7 = null;
-
-
-        try {
-            // org/usergrid/persistence/query/QueryFilter.g:141:2: ( select_assign_target ':' select_assign_source )
-            // org/usergrid/persistence/query/QueryFilter.g:141:4: select_assign_target ':' select_assign_source
-            {
-                pushFollow( FOLLOW_select_assign_target_in_select_assign836 );
-                select_assign_target7 = select_assign_target();
-
-                state._fsp--;
-
-                match( input, 31, FOLLOW_31_in_select_assign838 );
-                pushFollow( FOLLOW_select_assign_source_in_select_assign840 );
-                select_assign_source6 = select_assign_source();
-
-                state._fsp--;
-
-
-                query.addSelect( ( select_assign_source6 != null ?
-                                   input.toString( select_assign_source6.start, select_assign_source6.stop ) : null ),
-                        ( select_assign_target7 != null ?
-                          input.toString( select_assign_target7.start, select_assign_target7.stop ) : null ) );
-            }
-        }
-        catch ( RecognitionException re ) {
-            reportError( re );
-            recover( input, re );
-        }
-        finally {
-        }
-        return;
-    }
-    // $ANTLR end "select_assign"
-
-
-    // $ANTLR start "where"
-    // org/usergrid/persistence/query/QueryFilter.g:148:1: where : ( property operator value ( ( ',
-    // ' | 'of' ) second_value ( ',' third_value )? )? ) ;
-    public final void where() throws RecognitionException {
-        QueryFilterParser.property_return property8 = null;
-
-        QueryFilterParser.operator_return operator9 = null;
-
-        QueryFilterParser.value_return value10 = null;
-
-        QueryFilterParser.second_value_return second_value11 = null;
-
-        QueryFilterParser.third_value_return third_value12 = null;
-
-
-        try {
-            // org/usergrid/persistence/query/QueryFilter.g:149:2: ( ( property operator value ( ( ',
-            // ' | 'of' ) second_value ( ',' third_value )? )? ) )
-            // org/usergrid/persistence/query/QueryFilter.g:149:4: ( property operator value ( ( ',
-            // ' | 'of' ) second_value ( ',' third_value )? )? )
-            {
-                // org/usergrid/persistence/query/QueryFilter.g:149:4: ( property operator value ( ( ',
-                // ' | 'of' ) second_value ( ',' third_value )? )? )
-                // org/usergrid/persistence/query/QueryFilter.g:149:5: property operator value ( ( ',
-                // ' | 'of' ) second_value ( ',' third_value )? )?
-                {
-                    pushFollow( FOLLOW_property_in_where855 );
-                    property8 = property();
-
-                    state._fsp--;
-
-                    pushFollow( FOLLOW_operator_in_where857 );
-                    operator9 = operator();
-
-                    state._fsp--;
-
-                    pushFollow( FOLLOW_value_in_where859 );
-                    value10 = value();
-
-                    state._fsp--;
-
-                    // org/usergrid/persistence/query/QueryFilter.g:149:29: ( ( ',' | 'of' ) second_value ( ',
-                    // ' third_value )? )?
-                    int alt4 = 2;
-                    int LA4_0 = input.LA( 1 );
-
-                    if ( ( ( LA4_0 >= 29 && LA4_0 <= 30 ) ) ) {
-                        alt4 = 1;
-                    }
-                    switch ( alt4 ) {
-                        case 1:
-                            // org/usergrid/persistence/query/QueryFilter.g:149:30: ( ',' | 'of' ) second_value ( ',
-                            // ' third_value )?
-                        {
-                            if ( ( input.LA( 1 ) >= 29 && input.LA( 1 ) <= 30 ) ) {
-                                input.consume();
-                                state.errorRecovery = false;
-                            }
-                            else {
-                                MismatchedSetException mse = new MismatchedSetException( null, input );
-                                throw mse;
-                            }
-
-                            pushFollow( FOLLOW_second_value_in_where870 );
-                            second_value11 = second_value();
-
-                            state._fsp--;
-
-                            // org/usergrid/persistence/query/QueryFilter.g:149:56: ( ',' third_value )?
-                            int alt3 = 2;
-                            int LA3_0 = input.LA( 1 );
-
-                            if ( ( LA3_0 == 29 ) ) {
-                                alt3 = 1;
-                            }
-                            switch ( alt3 ) {
-                                case 1:
-                                    // org/usergrid/persistence/query/QueryFilter.g:149:58: ',' third_value
-                                {
-                                    match( input, 29, FOLLOW_29_in_where874 );
-                                    pushFollow( FOLLOW_third_value_in_where876 );
-                                    third_value12 = third_value();
-
-                                    state._fsp--;
-                                }
-                                break;
-                            }
-                        }
-                        break;
-                    }
-
-
-                    String property = ( property8 != null ? input.toString( property8.start, property8.stop ) : null );
-                    String operator = ( operator9 != null ? input.toString( operator9.start, operator9.stop ) : null );
-                    String value = ( value10 != null ? input.toString( value10.start, value10.stop ) : null );
-                    int value_type = ( value10 != null ? ( ( Token ) value10.start ) : null ) != null ?
-                                     ( value10 != null ? ( ( Token ) value10.start ) : null ).getType() : 0;
-                    String second_value =
-                            ( second_value11 != null ? input.toString( second_value11.start, second_value11.stop ) :
-                              null );
-                    int second_value_type =
-                            ( second_value11 != null ? ( ( Token ) second_value11.start ) : null ) != null ?
-                            ( second_value11 != null ? ( ( Token ) second_value11.start ) : null ).getType() : 0;
-                    String third_value =
-                            ( third_value12 != null ? input.toString( third_value12.start, third_value12.stop ) :
-                              null );
-                    int third_value_type =
-                            ( third_value12 != null ? ( ( Token ) third_value12.start ) : null ) != null ?
-                            ( third_value12 != null ? ( ( Token ) third_value12.start ) : null ).getType() : 0;
-                    FilterPredicate filter =
-                            new FilterPredicate( property, operator, value, value_type, second_value, second_value_type,
-                                    third_value, third_value_type );
-                    query.addFilter( filter );
-                    //System.out.println("Parsed query filter: " + property + " " + operator + " " + value + " " +
-                    // second_value);
-
-
-                }
-            }
-        }
-        catch ( RecognitionException re ) {
-            reportError( re );
-            recover( input, re );
-        }
-        finally {
-        }
-        return;
-    }
-    // $ANTLR end "where"
-
-
-    public static class direction_return extends ParserRuleReturnScope {}
-
-
-    ;
-
-
-    // $ANTLR start "direction"
-    // org/usergrid/persistence/query/QueryFilter.g:165:1: direction : ( 'asc' | 'desc' ) ;
-    public final QueryFilterParser.direction_return direction() throws RecognitionException {
-        QueryFilterParser.direction_return retval = new QueryFilterParser.direction_return();
-        retval.start = input.LT( 1 );
-
-        try {
-            // org/usergrid/persistence/query/QueryFilter.g:165:12: ( ( 'asc' | 'desc' ) )
-            // org/usergrid/persistence/query/QueryFilter.g:165:14: ( 'asc' | 'desc' )
-            {
-                if ( ( input.LA( 1 ) >= 32 && input.LA( 1 ) <= 33 ) ) {
-                    input.consume();
-                    state.errorRecovery = false;
-                }
-                else {
-                    MismatchedSetException mse = new MismatchedSetException( null, input );
-                    throw mse;
-                }
-            }
-
-            retval.stop = input.LT( -1 );
-        }
-        catch ( RecognitionException re ) {
-            reportError( re );
-            recover( input, re );
-        }
-        finally {
-        }
-        return retval;
-    }
-    // $ANTLR end "direction"
-
-
-    // $ANTLR start "order"
-    // org/usergrid/persistence/query/QueryFilter.g:167:1: order : ( property ( direction )? ) ;
-    public final void order() throws RecognitionException {
-        QueryFilterParser.property_return property13 = null;
-
-        QueryFilterParser.direction_return direction14 = null;
-
-
-        try {
-            // org/usergrid/persistence/query/QueryFilter.g:168:2: ( ( property ( direction )? ) )
-            // org/usergrid/persistence/query/QueryFilter.g:168:4: ( property ( direction )? )
-            {
-                // org/usergrid/persistence/query/QueryFilter.g:168:4: ( property ( direction )? )
-                // org/usergrid/persistence/query/QueryFilter.g:168:5: property ( direction )?
-                {
-                    pushFollow( FOLLOW_property_in_order909 );
-                    property13 = property();
-
-                    state._fsp--;
-
-                    // org/usergrid/persistence/query/QueryFilter.g:168:14: ( direction )?
-                    int alt5 = 2;
-                    int LA5_0 = input.LA( 1 );
-
-                    if ( ( ( LA5_0 >= 32 && LA5_0 <= 33 ) ) ) {
-                        alt5 = 1;
-                    }
-                    switch ( alt5 ) {
-                        case 1:
-                            // org/usergrid/persistence/query/QueryFilter.g:168:14: direction
-                        {
-                            pushFollow( FOLLOW_direction_in_order911 );
-                            direction14 = direction();
-
-                            state._fsp--;
-                        }
-                        break;
-                    }
-                }
-
-
-                String property = ( property13 != null ? input.toString( property13.start, property13.stop ) : null );
-                String direction =
-                        ( direction14 != null ? input.toString( direction14.start, direction14.stop ) : null );
-                SortPredicate sort = new SortPredicate( property, direction );
-                query.addSort( sort );
-                System.out.println( "Parsed query order: " + property + " " + direction );
-            }
-        }
-        catch ( RecognitionException re ) {
-            reportError( re );
-            recover( input, re );
-        }
-        finally {
-        }
-        return;
-    }
-    // $ANTLR end "order"
-
-
-    // $ANTLR start "select_expr"
-    // org/usergrid/persistence/query/QueryFilter.g:178:1: select_expr : ( '*' | select_subject ( ',
-    // ' select_subject )* | '{' select_assign ( ',' select_assign )* '}' ) ;
-    public final void select_expr() throws RecognitionException {
-        try {
-            // org/usergrid/persistence/query/QueryFilter.g:179:2: ( ( '*' | select_subject ( ',
-            // ' select_subject )* | '{' select_assign ( ',' select_assign )* '}' ) )
-            // org/usergrid/persistence/query/QueryFilter.g:179:4: ( '*' | select_subject ( ',
-            // ' select_subject )* | '{' select_assign ( ',' select_assign )* '}' )
-            {
-                // org/usergrid/persistence/query/QueryFilter.g:179:4: ( '*' | select_subject ( ',
-                // ' select_subject )* | '{' select_assign ( ',' select_assign )* '}' )
-                int alt8 = 3;
-                switch ( input.LA( 1 ) ) {
-                    case 34: {
-                        alt8 = 1;
-                    }
-                    break;
-                    case ID: {
-                        alt8 = 2;
-                    }
-                    break;
-                    case 35: {
-                        alt8 = 3;
-                    }
-                    break;
-                    default:
-                        NoViableAltException nvae = new NoViableAltException( "", 8, 0, input );
-
-                        throw nvae;
-                }
-
-                switch ( alt8 ) {
-                    case 1:
-                        // org/usergrid/persistence/query/QueryFilter.g:179:5: '*'
-                    {
-                        match( input, 34, FOLLOW_34_in_select_expr925 );
-                    }
-                    break;
-                    case 2:
-                        // org/usergrid/persistence/query/QueryFilter.g:179:11: select_subject ( ',' select_subject )*
-                    {
-                        pushFollow( FOLLOW_select_subject_in_select_expr929 );
-                        select_subject();
-
-                        state._fsp--;
-
-                        // org/usergrid/persistence/query/QueryFilter.g:179:26: ( ',' select_subject )*
-                        loop6:
-                        do {
-                            int alt6 = 2;
-                            int LA6_0 = input.LA( 1 );
-
-                            if ( ( LA6_0 == 29 ) ) {
-                                alt6 = 1;
-                            }
-
-
-                            switch ( alt6 ) {
-                                case 1:
-                                    // org/usergrid/persistence/query/QueryFilter.g:179:27: ',' select_subject
-                                {
-                                    match( input, 29, FOLLOW_29_in_select_expr932 );
-                                    pushFollow( FOLLOW_select_subject_in_select_expr934 );
-                                    select_subject();
-
-                                    state._fsp--;
-                                }
-                                break;
-
-                                default:
-                                    break loop6;
-                            }
-                        }
-                        while ( true );
-                    }
-                    break;
-                    case 3:
-                        // org/usergrid/persistence/query/QueryFilter.g:179:51: '{' select_assign ( ',
-                        // ' select_assign )* '}'
-                    {
-                        match( input, 35, FOLLOW_35_in_select_expr941 );
-                        pushFollow( FOLLOW_select_assign_in_select_expr943 );
-                        select_assign();
-
-                        state._fsp--;
-
-                        // org/usergrid/persistence/query/QueryFilter.g:179:69: ( ',' select_assign )*
-                        loop7:
-                        do {
-                            int alt7 = 2;
-                            int LA7_0 = input.LA( 1 );
-
-                            if ( ( LA7_0 == 29 ) ) {
-                                alt7 = 1;
-                            }
-
-
-                            switch ( alt7 ) {
-                                case 1:
-                                    // org/usergrid/persistence/query/QueryFilter.g:179:70: ',' select_assign
-                                {
-                                    match( input, 29, FOLLOW_29_in_select_expr946 );
-                                    pushFollow( FOLLOW_select_assign_in_select_expr948 );
-                                    select_assign();
-
-                                    state._fsp--;
-                                }
-                                break;
-
-                                default:
-                                    break loop7;
-                            }
-                        }
-                        while ( true );
-
-                        match( input, 36, FOLLOW_36_in_select_expr953 );
-                    }
-                    break;
-                }
-            }
-        }
-        catch ( RecognitionException re ) {
-            reportError( re );
-            recover( input, re );
-        }
-        finally {
-        }
-        return;
-    }
-    // $ANTLR end "select_expr"
-
-
-    // $ANTLR start "ql"
-    // org/usergrid/persistence/query/QueryFilter.g:181:1: ql returns [Query q] : 'select' select_expr ( 'where'
-    // where ( 'and' where )* )? ( 'order by' order ( ',' order )* )? ;
-    public final Query ql() throws RecognitionException {
-        Query q = null;
-
-        try {
-            // org/usergrid/persistence/query/QueryFilter.g:182:2: ( 'select' select_expr ( 'where' where ( 'and'
-            // where )* )? ( 'order by' order ( ',' order )* )? )
-            // org/usergrid/persistence/query/QueryFilter.g:182:4: 'select' select_expr ( 'where' where ( 'and' where
-            // )* )? ( 'order by' order ( ',' order )* )?
-            {
-                match( input, 37, FOLLOW_37_in_ql970 );
-                pushFollow( FOLLOW_select_expr_in_ql972 );
-                select_expr();
-
-                state._fsp--;
-
-                // org/usergrid/persistence/query/QueryFilter.g:182:25: ( 'where' where ( 'and' where )* )?
-                int alt10 = 2;
-                int LA10_0 = input.LA( 1 );
-
-                if ( ( LA10_0 == 38 ) ) {
-                    alt10 = 1;
-                }
-                switch ( alt10 ) {
-                    case 1:
-                        // org/usergrid/persistence/query/QueryFilter.g:182:26: 'where' where ( 'and' where )*
-                    {
-                        match( input, 38, FOLLOW_38_in_ql975 );
-                        pushFollow( FOLLOW_where_in_ql977 );
-                        where();
-
-                        state._fsp--;
-
-                        // org/usergrid/persistence/query/QueryFilter.g:182:40: ( 'and' where )*
-                        loop9:
-                        do {
-                            int alt9 = 2;
-                            int LA9_0 = input.LA( 1 );
-
-                            if ( ( LA9_0 == 39 ) ) {
-                                alt9 = 1;
-                            }
-
-
-                            switch ( alt9 ) {
-                                case 1:
-                                    // org/usergrid/persistence/query/QueryFilter.g:182:41: 'and' where
-                                {
-                                    match( input, 39, FOLLOW_39_in_ql980 );
-                                    pushFollow( FOLLOW_where_in_ql982 );
-                                    where();
-
-                                    state._fsp--;
-                                }
-                                break;
-
-                                default:
-                                    break loop9;
-                            }
-                        }
-                        while ( true );
-                    }
-                    break;
-                }
-
-                // org/usergrid/persistence/query/QueryFilter.g:182:57: ( 'order by' order ( ',' order )* )?
-                int alt12 = 2;
-                int LA12_0 = input.LA( 1 );
-
-                if ( ( LA12_0 == 40 ) ) {
-                    alt12 = 1;
-                }
-                switch ( alt12 ) {
-                    case 1:
-                        // org/usergrid/persistence/query/QueryFilter.g:182:58: 'order by' order ( ',' order )*
-                    {
-                        match( input, 40, FOLLOW_40_in_ql989 );
-                        pushFollow( FOLLOW_order_in_ql991 );
-                        order();
-
-                        state._fsp--;
-
-                        // org/usergrid/persistence/query/QueryFilter.g:182:75: ( ',' order )*
-                        loop11:
-                        do {
-                            int alt11 = 2;
-                            int LA11_0 = input.LA( 1 );
-
-                            if ( ( LA11_0 == 29 ) ) {
-                                alt11 = 1;
-                            }
-
-
-                            switch ( alt11 ) {
-                                case 1:
-                                    // org/usergrid/persistence/query/QueryFilter.g:182:76: ',' order
-                                {
-                                    match( input, 29, FOLLOW_29_in_ql994 );
-                                    pushFollow( FOLLOW_order_in_ql996 );
-                                    order();
-
-                                    state._fsp--;
-                                }
-                                break;
-
-                                default:
-                                    break loop11;
-                            }
-                        }
-                        while ( true );
-                    }
-                    break;
-                }
-
-
-                q = query;
-            }
-        }
-        catch ( RecognitionException re ) {
-            reportError( re );
-            recover( input, re );
-        }
-        finally {
-        }
-        return q;
-    }
-    // $ANTLR end "ql"
-
-    // Delegated rules
-
-
-    public static final BitSet FOLLOW_ID_in_property597 = new BitSet( new long[] { 0x0000000000000002L } );
-    public static final BitSet FOLLOW_set_in_operator609 = new BitSet( new long[] { 0x0000000000000002L } );
-    public static final BitSet FOLLOW_set_in_value668 = new BitSet( new long[] { 0x0000000000000002L } );
-    public static final BitSet FOLLOW_set_in_second_value695 = new BitSet( new long[] { 0x0000000000000002L } );
-    public static final BitSet FOLLOW_set_in_third_value722 = new BitSet( new long[] { 0x0000000000000002L } );
-    public static final BitSet FOLLOW_property_in_filter759 = new BitSet( new long[] { 0x000000001FFF0000L } );
-    public static final BitSet FOLLOW_operator_in_filter761 = new BitSet( new long[] { 0x00000000000016A0L } );
-    public static final BitSet FOLLOW_value_in_filter763 = new BitSet( new long[] { 0x0000000060000000L } );
-    public static final BitSet FOLLOW_set_in_filter766 = new BitSet( new long[] { 0x00000000000016A0L } );
-    public static final BitSet FOLLOW_second_value_in_filter774 = new BitSet( new long[] { 0x0000000020000000L } );
-    public static final BitSet FOLLOW_29_in_filter778 = new BitSet( new long[] { 0x00000000000016A0L } );
-    public static final BitSet FOLLOW_third_value_in_filter780 = new BitSet( new long[] { 0x0000000000000000L } );
-    public static final BitSet FOLLOW_EOF_in_filter789 = new BitSet( new long[] { 0x0000000000000002L } );
-    public static final BitSet FOLLOW_ID_in_select_subject800 = new BitSet( new long[] { 0x0000000000000002L } );
-    public static final BitSet FOLLOW_ID_in_select_assign_target812 = new BitSet( new long[] { 0x0000000000000002L } );
-    public static final BitSet FOLLOW_ID_in_select_assign_source823 = new BitSet( new long[] { 0x0000000000000002L } );
-    public static final BitSet FOLLOW_select_assign_target_in_select_assign836 =
-            new BitSet( new long[] { 0x0000000080000000L } );
-    public static final BitSet FOLLOW_31_in_select_assign838 = new BitSet( new long[] { 0x0000000000000010L } );
-    public static final BitSet FOLLOW_select_assign_source_in_select_assign840 =
-            new BitSet( new long[] { 0x0000000000000002L } );
-    public static final BitSet FOLLOW_property_in_where855 = new BitSet( new long[] { 0x000000001FFF0000L } );
-    public static final BitSet FOLLOW_operator_in_where857 = new BitSet( new long[] { 0x00000000000016A0L } );
-    public static final BitSet FOLLOW_value_in_where859 = new BitSet( new long[] { 0x0000000060000002L } );
-    public static final BitSet FOLLOW_set_in_where862 = new BitSet( new long[] { 0x00000000000016A0L } );
-    public static final BitSet FOLLOW_second_value_in_where870 = new BitSet( new long[] { 0x0000000020000002L } );
-    public static final BitSet FOLLOW_29_in_where874 = new BitSet( new long[] { 0x00000000000016A0L } );
-    public static final BitSet FOLLOW_third_value_in_where876 = new BitSet( new long[] { 0x0000000000000002L } );
-    public static final BitSet FOLLOW_set_in_direction893 = new BitSet( new long[] { 0x0000000000000002L } );
-    public static final BitSet FOLLOW_property_in_order909 = new BitSet( new long[] { 0x0000000300000002L } );
-    public static final BitSet FOLLOW_direction_in_order911 = new BitSet( new long[] { 0x0000000000000002L } );
-    public static final BitSet FOLLOW_34_in_select_expr925 = new BitSet( new long[] { 0x0000000000000002L } );
-    public static final BitSet FOLLOW_select_subject_in_select_expr929 =
-            new BitSet( new long[] { 0x0000000020000002L } );
-    public static final BitSet FOLLOW_29_in_select_expr932 = new BitSet( new long[] { 0x0000000000000010L } );
-    public static final BitSet FOLLOW_select_subject_in_select_expr934 =
-            new BitSet( new long[] { 0x0000000020000002L } );
-    public static final BitSet FOLLOW_35_in_select_expr941 = new BitSet( new long[] { 0x0000000000000010L } );
-    public static final BitSet FOLLOW_select_assign_in_select_expr943 =
-            new BitSet( new long[] { 0x0000001020000000L } );
-    public static final BitSet FOLLOW_29_in_select_expr946 = new BitSet( new long[] { 0x0000000000000010L } );
-    public static final BitSet FOLLOW_select_assign_in_select_expr948 =
-            new BitSet( new long[] { 0x0000001020000000L } );
-    public static final BitSet FOLLOW_36_in_select_expr953 = new BitSet( new long[] { 0x0000000000000002L } );
-    public static final BitSet FOLLOW_37_in_ql970 = new BitSet( new long[] { 0x0000000C00000010L } );
-    public static final BitSet FOLLOW_select_expr_in_ql972 = new BitSet( new long[] { 0x0000014000000002L } );
-    public static final BitSet FOLLOW_38_in_ql975 = new BitSet( new long[] { 0x0000000000000010L } );
-    public static final BitSet FOLLOW_where_in_ql977 = new BitSet( new long[] { 0x0000018000000002L } );
-    public static final BitSet FOLLOW_39_in_ql980 = new BitSet( new long[] { 0x0000000000000010L } );
-    public static final BitSet FOLLOW_where_in_ql982 = new BitSet( new long[] { 0x0000018000000002L } );
-    public static final BitSet FOLLOW_40_in_ql989 = new BitSet( new long[] { 0x0000000000000010L } );
-    public static final BitSet FOLLOW_order_in_ql991 = new BitSet( new long[] { 0x0000000020000002L } );
-    public static final BitSet FOLLOW_29_in_ql994 = new BitSet( new long[] { 0x0000000000000010L } );
-    public static final BitSet FOLLOW_order_in_ql996 = new BitSet( new long[] { 0x0000000020000002L } );
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/mq/QueryProcessor.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/mq/QueryProcessor.java b/stack/core/src/main/java/org/usergrid/mq/QueryProcessor.java
deleted file mode 100644
index 6cc805a..0000000
--- a/stack/core/src/main/java/org/usergrid/mq/QueryProcessor.java
+++ /dev/null
@@ -1,562 +0,0 @@
-package org.usergrid.mq;
-
-
-import java.nio.ByteBuffer;
-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.usergrid.mq.Query.FilterOperator;
-import org.usergrid.mq.Query.FilterPredicate;
-import org.usergrid.mq.Query.SortPredicate;
-import org.usergrid.persistence.Entity;
-import org.usergrid.persistence.EntityPropertyComparator;
-import org.usergrid.utils.ListUtils;
-import org.usergrid.utils.NumberUtils;
-import org.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.usergrid.mq.Query.SortDirection.DESCENDING;
-import static org.usergrid.persistence.cassandra.IndexUpdate.indexValueCode;
-import static org.usergrid.persistence.cassandra.IndexUpdate.toIndexableValue;
-
-
-public class QueryProcessor {
-
-    private static final Logger logger = LoggerFactory.getLogger( QueryProcessor.class );
-
-    Query query;
-
-    String cursor;
-    List<QuerySlice> slices;
-    List<FilterPredicate> filters;
-    List<SortPredicate> sorts;
-
-
-    public QueryProcessor( Query query ) {
-        this.query = query;
-        cursor = query.getCursor();
-        filters = query.getFilterPredicates();
-        sorts = query.getSortPredicates();
-        process();
-    }
-
-
-    public Query getQuery() {
-        return query;
-    }
-
-
-    public String getCursor() {
-        return cursor;
-    }
-
-
-    public List<QuerySlice> getSlices() {
-        return slices;
-    }
-
-
-    public List<FilterPredicate> getFilters() {
-        return filters;
-    }
-
-
-    public List<SortPredicate> getSorts() {
-        return sorts;
-    }
-
-
-    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 );
-                            }
-                        }
-                    }
-                }
-            }
-        }
-    }
-
-
-    @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;
-    }
-
-
-    private Set<String> getFilterPropertyNames() {
-        Set<String> names = new LinkedHashSet<String>();
-        for ( FilterPredicate f : filters ) {
-            names.add( f.getPropertyName() );
-        }
-        return names;
-    }
-
-
-    public QuerySlice getSliceForProperty( String name ) {
-        for ( QuerySlice s : slices ) {
-            if ( s.propertyName.equals( name ) ) {
-                return s;
-            }
-        }
-        return null;
-    }
-
-
-    public static class RangeValue {
-        byte code;
-        Object value;
-        boolean inclusive;
-
-
-        public RangeValue( byte code, Object value, boolean inclusive ) {
-            this.code = code;
-            this.value = value;
-            this.inclusive = inclusive;
-        }
-
-
-        public byte getCode() {
-            return code;
-        }
-
-
-        public void setCode( byte code ) {
-            this.code = code;
-        }
-
-
-        public Object getValue() {
-            return value;
-        }
-
-
-        public void setValue( Object value ) {
-            this.value = value;
-        }
-
-
-        public boolean isInclusive() {
-            return inclusive;
-        }
-
-
-        public void setInclusive( boolean inclusive ) {
-            this.inclusive = inclusive;
-        }
-
-
-        @Override
-        public int hashCode() {
-            final int prime = 31;
-            int result = 1;
-            result = prime * result + code;
-            result = prime * result + ( inclusive ? 1231 : 1237 );
-            result = prime * result + ( ( value == null ) ? 0 : value.hashCode() );
-            return result;
-        }
-
-
-        @Override
-        public boolean equals( Object obj ) {
-            if ( this == obj ) {
-                return true;
-            }
-            if ( obj == null ) {
-                return false;
-            }
-            if ( getClass() != obj.getClass() ) {
-                return false;
-            }
-            RangeValue other = ( RangeValue ) obj;
-            if ( code != other.code ) {
-                return false;
-            }
-            if ( inclusive != other.inclusive ) {
-                return false;
-            }
-            if ( value == null ) {
-                if ( other.value != null ) {
-                    return false;
-                }
-            }
-            else if ( !value.equals( other.value ) ) {
-                return false;
-            }
-            return true;
-        }
-
-
-        public int compareTo( RangeValue other, boolean finish ) {
-            if ( other == null ) {
-                return 1;
-            }
-            if ( code != other.code ) {
-                return NumberUtils.sign( code - other.code );
-            }
-            @SuppressWarnings({ "unchecked", "rawtypes" }) int c = ( ( Comparable ) value ).compareTo( other.value );
-            if ( c != 0 ) {
-                return c;
-            }
-            if ( finish ) {
-                // for finish values, inclusive means <= which is greater than <
-                if ( inclusive != other.inclusive ) {
-                    return inclusive ? 1 : -1;
-                }
-            }
-            else {
-                // for start values, inclusive means >= which is lest than >
-                if ( inclusive != other.inclusive ) {
-                    return inclusive ? -1 : 1;
-                }
-            }
-            return 0;
-        }
-
-
-        public static int compare( RangeValue v1, RangeValue v2, boolean finish ) {
-            if ( v1 == null ) {
-                if ( v2 == null ) {
-                    return 0;
-                }
-                return -1;
-            }
-            return v1.compareTo( v2, finish );
-        }
-    }
-
-
-    public static class RangePair {
-        RangeValue start;
-        RangeValue finish;
-
-
-        public RangePair( RangeValue start, RangeValue finish ) {
-            this.start = start;
-            this.finish = finish;
-        }
-
-
-        public RangeValue getStart() {
-            return start;
-        }
-
-
-        public void setStart( RangeValue start ) {
-            this.start = start;
-        }
-
-
-        public RangeValue getFinish() {
-            return finish;
-        }
-
-
-        public void setFinish( RangeValue finish ) {
-            this.finish = finish;
-        }
-
-
-        @Override
-        public int hashCode() {
-            final int prime = 31;
-            int result = 1;
-            result = prime * result + ( ( finish == null ) ? 0 : finish.hashCode() );
-            result = prime * result + ( ( start == null ) ? 0 : start.hashCode() );
-            return result;
-        }
-
-
-        @Override
-        public boolean equals( Object obj ) {
-            if ( this == obj ) {
-                return true;
-            }
-            if ( obj == null ) {
-                return false;
-            }
-            if ( getClass() != obj.getClass() ) {
-                return false;
-            }
-            RangePair other = ( RangePair ) obj;
-            if ( finish == null ) {
-                if ( other.finish != null ) {
-                    return false;
-                }
-            }
-            else if ( !finish.equals( other.finish ) ) {
-                return false;
-            }
-            if ( start == null ) {
-                if ( other.start != null ) {
-                    return false;
-                }
-            }
-            else if ( !start.equals( other.start ) ) {
-                return false;
-            }
-            return true;
-        }
-    }
-
-
-    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 {
-
-        String propertyName;
-        FilterOperator operator;
-        Object value;
-        RangeValue start;
-        RangeValue finish;
-        ByteBuffer cursor;
-        boolean reversed;
-
-
-        QuerySlice( String propertyName, FilterOperator operator, Object value, RangeValue start, RangeValue finish,
-                    ByteBuffer cursor, boolean reversed ) {
-            this.propertyName = propertyName;
-            this.operator = operator;
-            this.value = value;
-            this.start = start;
-            this.finish = finish;
-            this.cursor = cursor;
-            this.reversed = reversed;
-        }
-
-
-        public String getPropertyName() {
-            return propertyName;
-        }
-
-
-        public void setPropertyName( String propertyName ) {
-            this.propertyName = propertyName;
-        }
-
-
-        public RangeValue getStart() {
-            return start;
-        }
-
-
-        public void setStart( RangeValue start ) {
-            this.start = start;
-        }
-
-
-        public RangeValue getFinish() {
-            return finish;
-        }
-
-
-        public void setFinish( RangeValue finish ) {
-            this.finish = finish;
-        }
-
-
-        public Object getValue() {
-            return value;
-        }
-
-
-        public void setValue( Object value ) {
-            this.value = value;
-        }
-
-
-        public ByteBuffer getCursor() {
-            return cursor;
-        }
-
-
-        public void setCursor( ByteBuffer cursor ) {
-            this.cursor = cursor;
-        }
-
-
-        public boolean isReversed() {
-            return reversed;
-        }
-
-
-        public void setReversed( boolean reversed ) {
-            this.reversed = reversed;
-        }
-
-
-        @Override
-        public int hashCode() {
-            final int prime = 31;
-            int result = 1;
-            result = prime * result + ( ( finish == null ) ? 0 : finish.hashCode() );
-            result = prime * result + ( ( propertyName == null ) ? 0 : propertyName.hashCode() );
-            result = prime * result + ( ( start == null ) ? 0 : start.hashCode() );
-
-            //NOTE.  We have explicitly left out direction.  According to IndexTest:testCollectionOrdering,
-            // a cursor can be used and change direction
-            //of the ordering.
-            return result;
-        }
-
-
-        @Override
-        public boolean equals( Object obj ) {
-            if ( this == obj ) {
-                return true;
-            }
-            if ( obj == null ) {
-                return false;
-            }
-            if ( getClass() != obj.getClass() ) {
-                return false;
-            }
-            QuerySlice other = ( QuerySlice ) obj;
-            if ( finish == null ) {
-                if ( other.finish != null ) {
-                    return false;
-                }
-            }
-            else if ( !finish.equals( other.finish ) ) {
-                return false;
-            }
-            if ( propertyName == null ) {
-                if ( other.propertyName != null ) {
-                    return false;
-                }
-            }
-            else if ( !propertyName.equals( other.propertyName ) ) {
-                return false;
-            }
-
-            if ( start == null ) {
-                if ( other.start != null ) {
-                    return false;
-                }
-            }
-            else if ( !start.equals( other.start ) ) {
-                return false;
-            }
-            return true;
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/mq/Queue.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/mq/Queue.java b/stack/core/src/main/java/org/usergrid/mq/Queue.java
deleted file mode 100644
index deb5745..0000000
--- a/stack/core/src/main/java/org/usergrid/mq/Queue.java
+++ /dev/null
@@ -1,291 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.mq;
-
-
-import java.util.Map;
-import java.util.TreeMap;
-import java.util.UUID;
-
-import org.codehaus.jackson.annotate.JsonAnyGetter;
-import org.codehaus.jackson.annotate.JsonAnySetter;
-import org.codehaus.jackson.annotate.JsonIgnore;
-import org.usergrid.utils.UUIDUtils;
-
-import org.apache.commons.lang.StringUtils;
-
-import static java.util.UUID.nameUUIDFromBytes;
-
-import static org.apache.commons.collections.MapUtils.getBooleanValue;
-import static org.apache.commons.collections.MapUtils.getByteValue;
-import static org.apache.commons.collections.MapUtils.getDoubleValue;
-import static org.apache.commons.collections.MapUtils.getFloatValue;
-import static org.apache.commons.collections.MapUtils.getIntValue;
-import static org.apache.commons.collections.MapUtils.getLongValue;
-import static org.apache.commons.collections.MapUtils.getShortValue;
-import static org.apache.commons.collections.MapUtils.getString;
-import static org.usergrid.utils.MapUtils.hashMap;
-
-
-public class Queue {
-
-    public static final String QUEUE_ID = "uuid";
-    public static final String QUEUE_PATH = "path";
-    public static final String QUEUE_CREATED = "created";
-    public static final String QUEUE_MODIFIED = "modified";
-    public static final String QUEUE_NEWEST = "newest";
-    public static final String QUEUE_OLDEST = "oldest";
-
-    @SuppressWarnings("rawtypes")
-    public static final Map<String, Class> QUEUE_PROPERTIES =
-            hashMap( QUEUE_PATH, ( Class ) String.class ).map( QUEUE_ID, UUID.class ).map( QUEUE_CREATED, Long.class )
-                    .map( QUEUE_MODIFIED, Long.class ).map( QUEUE_NEWEST, UUID.class ).map( QUEUE_OLDEST, UUID.class );
-
-    protected Map<String, Object> properties = new TreeMap<String, Object>( String.CASE_INSENSITIVE_ORDER );
-
-
-    public Queue( String path ) {
-        setPath( path );
-    }
-
-
-    public Queue( Map<String, Object> properties ) {
-        this.properties.putAll( properties );
-    }
-
-
-    @Override
-    public String toString() {
-        return getPath();
-    }
-
-
-    @JsonIgnore
-    public String getPath() {
-        return getString( properties, QUEUE_PATH );
-    }
-
-
-    public void setPath( String path ) {
-        properties.put( QUEUE_PATH, path );
-    }
-
-
-    @JsonIgnore
-    public long getCreated() {
-        return getLongValue( properties, QUEUE_CREATED );
-    }
-
-
-    public void setCreated( long created ) {
-        properties.put( QUEUE_CREATED, created );
-    }
-
-
-    @JsonIgnore
-    public long getModified() {
-        return getLongValue( properties, QUEUE_MODIFIED );
-    }
-
-
-    public void setModified( long modified ) {
-        properties.put( QUEUE_MODIFIED, modified );
-    }
-
-
-    public static Queue getDestination( String path ) {
-        if ( path == null ) {
-            return null;
-        }
-        return new Queue( path );
-    }
-
-
-    @JsonAnySetter
-    public void setProperty( String key, Object value ) {
-        properties.put( key, value );
-    }
-
-
-    @JsonAnyGetter
-    public Map<String, Object> getProperties() {
-        return properties;
-    }
-
-
-    public static String[] getQueueParentPaths( String queuePath ) {
-        queuePath = queuePath.toLowerCase().trim();
-        String[] segments = StringUtils.split( queuePath, '/' );
-        String[] paths = new String[segments.length + 1];
-        paths[0] = "/";
-        for ( int i = 0; i < segments.length; i++ ) {
-            paths[i + 1] = "/" + StringUtils.join( segments, '/', 0, i + 1 ) + "/";
-        }
-        return paths;
-    }
-
-
-    public static String[] getQueuePathSegments( String queuePath ) {
-        queuePath = queuePath.toLowerCase().trim();
-        String[] segments = StringUtils.split( queuePath, '/' );
-        return segments;
-    }
-
-
-    public static String normalizeQueuePath( String queuePath ) {
-        if ( queuePath == null ) {
-            return null;
-        }
-        queuePath = queuePath.toLowerCase().trim();
-        if ( queuePath.length() == 0 ) {
-            return null;
-        }
-        queuePath = "/" + StringUtils.join( StringUtils.split( queuePath, '/' ), '/' );
-        if ( !queuePath.endsWith( "/" ) ) {
-            queuePath += "/";
-        }
-        return queuePath;
-    }
-
-
-    public static UUID getQueueId( String queuePath ) {
-        if ( queuePath == null ) {
-            return null;
-        }
-        // is the queuePath already a UUID?
-        UUID uuid = UUIDUtils.tryGetUUID( queuePath );
-        if ( uuid != null ) {
-            return uuid;
-        }
-        // UUID queuePath string might have been normalized
-        // look for /00000000-0000-0000-0000-000000000000/
-        // or /00000000-0000-0000-0000-000000000000
-        if ( ( queuePath.length() == 38 ) && queuePath.startsWith( "/" ) && queuePath.endsWith( "/" ) ) {
-            uuid = UUIDUtils.tryExtractUUID( queuePath, 1 );
-            if ( uuid != null ) {
-                return uuid;
-            }
-        }
-        else if ( ( queuePath.length() == 37 ) && queuePath.startsWith( "/" ) ) {
-            uuid = UUIDUtils.tryExtractUUID( queuePath, 1 );
-            if ( uuid != null ) {
-                return uuid;
-            }
-        }
-        queuePath = normalizeQueuePath( queuePath );
-        if ( queuePath == null ) {
-            return null;
-        }
-        uuid = nameUUIDFromBytes( queuePath.getBytes() );
-        return uuid;
-    }
-
-
-    @JsonIgnore
-    public UUID getUuid() {
-        return getQueueId( getPath() );
-    }
-
-
-    public float getFloatProperty( String name ) {
-        return getFloatValue( properties, name );
-    }
-
-
-    public void setFloatProperty( String name, float value ) {
-        properties.put( name, value );
-    }
-
-
-    public double getDoubleProperty( String name ) {
-        return getDoubleValue( properties, name );
-    }
-
-
-    public void setDoubleProperty( String name, double value ) {
-        properties.put( name, value );
-    }
-
-
-    public int getIntProperty( String name ) {
-        return getIntValue( properties, name );
-    }
-
-
-    public void setIntProperty( String name, int value ) {
-        properties.put( name, value );
-    }
-
-
-    public long getLongProperty( String name ) {
-        return getLongValue( properties, name );
-    }
-
-
-    public void setLongProperty( String name, long value ) {
-        properties.put( name, value );
-    }
-
-
-    public Object getObjectProperty( String name ) {
-        return properties.get( name );
-    }
-
-
-    public void setObjectProperty( String name, Object value ) {
-        properties.put( name, value );
-    }
-
-
-    public short getShortProperty( String name ) {
-        return getShortValue( properties, name );
-    }
-
-
-    public void setShortProperty( String name, short value ) {
-        properties.put( name, value );
-    }
-
-
-    public String getStringProperty( String name ) {
-        return getString( properties, name );
-    }
-
-
-    public void setStringProperty( String name, String value ) {
-        properties.put( name, value );
-    }
-
-
-    public boolean getBooleanProperty( String name ) {
-        return getBooleanValue( properties, name );
-    }
-
-
-    public void setBooleanProperty( String name, boolean value ) {
-        properties.put( name, value );
-    }
-
-
-    public byte getByteProperty( String name ) {
-        return getByteValue( properties, name );
-    }
-
-
-    public void setByteProperty( String name, byte value ) {
-        properties.put( name, value );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/mq/QueueManager.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/mq/QueueManager.java b/stack/core/src/main/java/org/usergrid/mq/QueueManager.java
deleted file mode 100644
index a656425..0000000
--- a/stack/core/src/main/java/org/usergrid/mq/QueueManager.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.mq;
-
-
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.UUID;
-
-import org.usergrid.persistence.CounterResolution;
-import org.usergrid.persistence.Results;
-import org.usergrid.persistence.exceptions.TransactionNotFoundException;
-
-
-public interface QueueManager {
-
-    public Queue getQueue( String queuePath );
-
-    public Queue updateQueue( String queuePath, Map<String, Object> properties );
-
-    public Queue updateQueue( String queuePath, Queue queue );
-
-    public Message postToQueue( String queuePath, Message message );
-
-    public List<Message> postToQueue( String queuePath, List<Message> messages );
-
-    public QueueResults getFromQueue( String queuePath, QueueQuery query );
-
-    public Message getMessage( UUID messageId );
-
-    public UUID getNewConsumerId();
-
-    public QueueSet getQueues( String firstQueuePath, int limit );
-
-    public QueueSet subscribeToQueue( String publisherQueuePath, String subscriberQueuePath );
-
-    public QueueSet unsubscribeFromQueue( String publisherQueuePath, String subscriberQueuePath );
-
-    public QueueSet addSubscribersToQueue( String publisherQueuePath, List<String> subscriberQueuePaths );
-
-    public QueueSet removeSubscribersFromQueue( String publisherQueuePath, List<String> subscriberQueuePaths );
-
-    public QueueSet subscribeToQueues( String subscriberQueuePath, List<String> publisherQueuePaths );
-
-    public QueueSet unsubscribeFromQueues( String subscriberQueuePath, List<String> publisherQueuePaths );
-
-    public QueueSet getSubscribers( String publisherQueuePath, String firstSubscriberQueuePath, int limit );
-
-    public QueueSet getSubscriptions( String subscriberQueuePath, String firstSubscriptionQueuePath, int limit );
-
-    public QueueSet searchSubscribers( String publisherQueuePath, Query query );
-
-    public QueueSet getChildQueues( String publisherQueuePath, String firstQueuePath, int count );
-
-    public void incrementAggregateQueueCounters( String queuePath, String category, String counterName, long value );
-
-    public Results getAggregateQueueCounters( String queuePath, String category, String counterName,
-                                              CounterResolution resolution, long start, long finish, boolean pad );
-
-    public Results getAggregateQueueCounters( String queuePath, CounterQuery query ) throws Exception;
-
-    public Set<String> getQueueCounterNames( String queuePath ) throws Exception;
-
-    public void incrementQueueCounters( String queuePath, Map<String, Long> counts );
-
-    public void incrementQueueCounter( String queuePath, String name, long value );
-
-    public Map<String, Long> getQueueCounters( String queuePath ) throws Exception;
-
-    /**
-     * Renew a transaction.  Will remove the current transaction and return a new one
-     *
-     * @param queuePath The path to the queue
-     * @param transactionId The transaction id
-     */
-    public UUID renewTransaction( String queuePath, UUID transactionId, QueueQuery query )
-            throws TransactionNotFoundException;
-
-    /**
-     * Deletes the transaction for the consumer. Synonymous with "commit."
-     *
-     * @param queuePath The path to the queue
-     * @param transactionId The transaction id
-     *
-     * @see #commitTransaction(String, java.util.UUID, QueueQuery)
-     */
-    public void deleteTransaction( String queuePath, UUID transactionId, QueueQuery query );
-
-    /**
-     * Commits the Transaction for the consumer.
-     *
-     * @param queuePath The path to the queue
-     * @param transactionId The transaction id
-     */
-    public void commitTransaction( String queuePath, UUID transactionId, QueueQuery query );
-
-    /**
-     * Determines if there are any outstanding transactions on a queue
-     *
-     * @param queuePath The path to the queue
-     * @param consumerId The consumer id
-     */
-    public boolean hasOutstandingTransactions( String queuePath, UUID consumerId );
-
-    /**
-     * Determines if there are any Messages to retrieve in a queue. DOES NOT INCLUDE TRANSACTIONS!  If you've tried and
-     * failed to process a transaction on the last message in the queue, this will return false
-     *
-     * @param queuePath The path to the queue
-     * @param consumerId The consumer id
-     */
-    public boolean hasMessagesInQueue( String queuePath, UUID consumerId );
-
-    /** Returns true if there are messages waiting to be consumed or pending transactions */
-    public boolean hasPendingReads( String queuePath, UUID consumerId );
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/mq/QueueManagerFactory.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/mq/QueueManagerFactory.java b/stack/core/src/main/java/org/usergrid/mq/QueueManagerFactory.java
deleted file mode 100644
index 7525415..0000000
--- a/stack/core/src/main/java/org/usergrid/mq/QueueManagerFactory.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.mq;
-
-
-import java.util.UUID;
-
-
-public interface QueueManagerFactory {
-
-    /**
-     * A string description provided by the implementing class.
-     *
-     * @return description text
-     *
-     * @throws Exception the exception
-     */
-    public abstract String getImpementationDescription() throws Exception;
-
-    /**
-     * Gets the entity manager.
-     *
-     * @param applicationId the application id
-     *
-     * @return EntityDao for the specfied parameters
-     */
-    public abstract QueueManager getQueueManager( UUID applicationId );
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/mq/QueuePosition.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/mq/QueuePosition.java b/stack/core/src/main/java/org/usergrid/mq/QueuePosition.java
deleted file mode 100644
index 4294112..0000000
--- a/stack/core/src/main/java/org/usergrid/mq/QueuePosition.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.mq;
-
-
-import java.util.EnumSet;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-
-public enum QueuePosition {
-    START( "start" ), END( "end" ), LAST( "last" ), CONSUMER( "consumer" );
-
-    private final String shortName;
-
-
-    QueuePosition( String shortName ) {
-        this.shortName = shortName;
-    }
-
-
-    static Map<String, QueuePosition> nameMap = new ConcurrentHashMap<String, QueuePosition>();
-
-
-    static {
-        for ( QueuePosition op : EnumSet.allOf( QueuePosition.class ) ) {
-            if ( op.shortName != null ) {
-                nameMap.put( op.shortName, op );
-            }
-        }
-    }
-
-
-    public static QueuePosition find( String s ) {
-        if ( s == null ) {
-            return null;
-        }
-        return nameMap.get( s.toLowerCase() );
-    }
-
-
-    @Override
-    public String toString() {
-        return shortName;
-    }
-}


[38/96] [abbrv] [partial] Change package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/ConnectionRefImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/ConnectionRefImpl.java b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/ConnectionRefImpl.java
new file mode 100644
index 0000000..ed257e6
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/ConnectionRefImpl.java
@@ -0,0 +1,627 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.cassandra;
+
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import java.util.UUID;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.apache.commons.codec.binary.Hex;
+import org.apache.commons.lang.StringUtils;
+import org.apache.usergrid.persistence.ConnectedEntityRef;
+import org.apache.usergrid.persistence.ConnectionRef;
+import org.apache.usergrid.persistence.EntityRef;
+import org.apache.usergrid.persistence.SimpleEntityRef;
+
+import static org.apache.usergrid.persistence.SimpleEntityRef.ref;
+import static org.apache.usergrid.utils.ConversionUtils.ascii;
+import static org.apache.usergrid.utils.ConversionUtils.uuidToBytesNullOk;
+
+
+/** @author edanuff */
+public class ConnectionRefImpl implements ConnectionRef {
+
+    public static final int MAX_LINKS = 1;
+
+    /**
+     *
+     */
+    public static final int ALL = 0;
+    /**
+     *
+     */
+    public static final int BY_CONNECTION_TYPE = 1;
+    /**
+     *
+     */
+    public static final int BY_ENTITY_TYPE = 2;
+    /**
+     *
+     */
+    public static final int BY_CONNECTION_AND_ENTITY_TYPE = 3;
+
+    /**
+     *
+     */
+    public static final String NULL_ENTITY_TYPE = "Null";
+    /**
+     *
+     */
+    public static final UUID NULL_ID = new UUID( 0, 0 );
+
+    private static final Logger logger = LoggerFactory.getLogger( ConnectionRefImpl.class );
+
+
+    public static final String CONNECTION_ENTITY_TYPE = "Connection";
+    public static final String CONNECTION_ENTITY_CONNECTION_TYPE = "connection";
+
+
+    private final EntityRef connectingEntity;
+
+    private final List<ConnectedEntityRef> pairedConnections;
+
+    private final ConnectedEntityRef connectedEntity;
+
+
+    /**
+     *
+     */
+    public ConnectionRefImpl() {
+        connectingEntity = SimpleEntityRef.ref();
+        pairedConnections = Collections.emptyList();
+        connectedEntity = new ConnectedEntityRefImpl();
+    }
+
+
+    /**
+     * @param connectingEntityType
+     * @param connectingEntityId
+     * @param connectionType
+     * @param connectedEntityType
+     * @param connectedEntityId
+     */
+    public ConnectionRefImpl( String connectingEntityType, UUID connectingEntityId, String connectionType,
+                              String connectedEntityType, UUID connectedEntityId ) {
+
+        connectingEntity = ref( connectingEntityType, connectingEntityId );
+
+        pairedConnections = Collections.emptyList();
+
+        connectedEntity = new ConnectedEntityRefImpl( connectionType, connectedEntityType, connectedEntityId );
+    }
+
+
+    /** Create a connection from the source to the target entity */
+    public ConnectionRefImpl( EntityRef source, String connectionType, EntityRef target ) {
+
+        this.connectingEntity = ref( source );
+
+        pairedConnections = Collections.emptyList();
+
+        this.connectedEntity = new ConnectedEntityRefImpl( connectionType, target );
+    }
+
+
+    public ConnectionRefImpl( ConnectionRef connection ) {
+
+        connectingEntity = connection.getConnectingEntity();
+
+        List<ConnectedEntityRef> pc = connection.getPairedConnections();
+        if ( pc == null ) {
+            pc = Collections.emptyList();
+        }
+        pairedConnections = pc;
+
+        connectedEntity = connection.getConnectedEntity();
+    }
+
+
+    public ConnectionRefImpl( EntityRef connectingEntity, ConnectedEntityRef... connections ) {
+
+        this.connectingEntity = ref( connectingEntity );
+
+        ConnectedEntityRef ce = new ConnectedEntityRefImpl();
+        List<ConnectedEntityRef> pc = Collections.emptyList();
+        if ( connections.length > 0 ) {
+
+            ce = connections[connections.length - 1];
+
+            if ( connections.length > 1 ) {
+                pc = Arrays.asList( Arrays.copyOfRange( connections, 0, connections.length - 2 ) );
+            }
+        }
+        pairedConnections = pc;
+        connectedEntity = ce;
+    }
+
+
+    public ConnectionRefImpl( ConnectionRef connection, ConnectedEntityRef... connections ) {
+
+        if ( connection == null ) {
+            throw new NullPointerException( "ConnectionImpl constructor \'connection\' cannot be null" );
+        }
+
+        connectingEntity = connection.getConnectingEntity();
+
+        if ( connections.length > 0 ) {
+
+            pairedConnections = new ArrayList<ConnectedEntityRef>();
+            pairedConnections.addAll( connection.getPairedConnections() );
+            pairedConnections.add( connection.getConnectedEntity() );
+
+            connectedEntity = connections[connections.length - 1];
+
+            if ( connections.length > 1 ) {
+                pairedConnections
+                        .addAll( Arrays.asList( Arrays.copyOfRange( connections, 0, connections.length - 2 ) ) );
+            }
+        }
+        else {
+            pairedConnections = new ArrayList<ConnectedEntityRef>();
+            connectedEntity = new ConnectedEntityRefImpl();
+        }
+    }
+
+
+    public ConnectionRefImpl( EntityRef connectingEntity, List<ConnectedEntityRef> pairedConnections,
+                              ConnectedEntityRef connectedEntity ) {
+        this.connectingEntity = connectingEntity;
+        this.pairedConnections = pairedConnections;
+        this.connectedEntity = connectedEntity;
+    }
+
+
+    public UUID getSearchIndexId() {
+        return null;
+    }
+
+
+    public String getSearchConnectionType() {
+        return null;
+    }
+
+
+    public String getSearchResultType() {
+        return null;
+    }
+
+
+    public String getSearchIndexName() {
+        return null;
+    }
+
+
+    @Override
+    public EntityRef getConnectingEntity() {
+        return connectingEntity;
+    }
+
+
+    /**
+     * @return
+     */
+    public String getConnectingEntityType() {
+        if ( connectingEntity == null ) {
+            return null;
+        }
+        return connectingEntity.getType();
+    }
+
+
+    /**
+     * @return
+     */
+    public UUID getConnectingEntityId() {
+        if ( connectingEntity == null ) {
+            return null;
+        }
+        return connectingEntity.getUuid();
+    }
+
+
+    @Override
+    public List<ConnectedEntityRef> getPairedConnections() {
+        return pairedConnections;
+    }
+
+
+    public ConnectedEntityRef getFirstPairedConnection() {
+        ConnectedEntityRef pairedConnection = null;
+
+        if ( ( pairedConnections != null ) && ( pairedConnections.size() > 0 ) ) {
+            pairedConnection = pairedConnections.get( 0 );
+        }
+
+        return pairedConnection;
+    }
+
+
+    public UUID getFirstPairedConnectedEntityId() {
+        ConnectedEntityRef pairedConnection = getFirstPairedConnection();
+        if ( pairedConnection != null ) {
+            return pairedConnection.getUuid();
+        }
+        return null;
+    }
+
+
+    public String getFirstPairedConnectedEntityType() {
+        ConnectedEntityRef pairedConnection = getFirstPairedConnection();
+        if ( pairedConnection != null ) {
+            return pairedConnection.getType();
+        }
+        return null;
+    }
+
+
+    public String getFirstPairedConnectionType() {
+        ConnectedEntityRef pairedConnection = getFirstPairedConnection();
+        if ( pairedConnection != null ) {
+            return pairedConnection.getConnectionType();
+        }
+        return null;
+    }
+
+
+    @Override
+    public ConnectedEntityRef getConnectedEntity() {
+        return connectedEntity;
+    }
+
+
+    /**
+     * @return
+     */
+    @Override
+    public String getConnectionType() {
+        if ( connectedEntity == null ) {
+            return null;
+        }
+        return connectedEntity.getConnectionType();
+    }
+
+
+    /**
+     * @return
+     */
+    public String getConnectedEntityType() {
+        if ( connectedEntity == null ) {
+            return null;
+        }
+        return connectedEntity.getType();
+    }
+
+
+    /**
+     * @return
+     */
+    public UUID getConnectedEntityId() {
+        return connectedEntity.getUuid();
+    }
+
+
+    private UUID id;
+
+
+    /** @return connection id */
+    @Override
+    public UUID getUuid() {
+        if ( id == null ) {
+            id = getId( getConnectingEntity(), getConnectedEntity(),
+                    getPairedConnections().toArray( new ConnectedEntityRef[0] ) );
+        }
+        return id;
+    }
+
+
+    @Override
+    public String getType() {
+        return CONNECTION_ENTITY_TYPE;
+    }
+
+
+    public UUID getIndexId() {
+        return getIndexId( getConnectingEntity(), getConnectionType(), getConnectedEntityType(),
+                pairedConnections.toArray( new ConnectedEntityRef[0] ) );
+    }
+
+
+    public UUID getConnectingIndexId() {
+        return getIndexId( getConnectingEntity(), getConnectionType(), null,
+                pairedConnections.toArray( new ConnectedEntityRef[0] ) );
+    }
+
+
+    public ConnectionRefImpl getConnectionToConnectionEntity() {
+        return new ConnectionRefImpl( getConnectingEntity(),
+                new ConnectedEntityRefImpl( CONNECTION_ENTITY_CONNECTION_TYPE, CONNECTION_ENTITY_TYPE, getUuid() ) );
+    }
+
+
+    /** @return index ids */
+    public UUID[] getIndexIds() {
+
+        return getIndexIds( getConnectingEntity(), getConnectedEntity().getConnectionType(),
+                getConnectedEntity().getType(), getPairedConnections().toArray( new ConnectedEntityRef[0] ) );
+    }
+
+
+    static String typeOrDefault( String type ) {
+        if ( ( type == null ) || ( type.length() == 0 ) ) {
+            return NULL_ENTITY_TYPE;
+        }
+        return type;
+    }
+
+
+    static UUID idOrDefault( UUID uuid ) {
+        if ( uuid == null ) {
+            return NULL_ID;
+        }
+        return uuid;
+    }
+
+
+    public static boolean connectionsNull( ConnectedEntityRef... pairedConnections ) {
+        if ( ( pairedConnections == null ) || ( pairedConnections.length == 0 ) ) {
+            return true;
+        }
+
+        for ( ConnectedEntityRef pairedConnection : pairedConnections ) {
+            if ( pairedConnection == null || pairedConnection.getUuid() == null || pairedConnection.getUuid().equals(
+                    NULL_ID ) ) {
+                return true;
+            }
+        }
+
+        return false;
+    }
+
+
+    public static ConnectedEntityRef[] getConnections( ConnectedEntityRef... connections ) {
+        return connections;
+    }
+
+
+    public static List<ConnectedEntityRef> getConnectionsList( ConnectedEntityRef... connections ) {
+        return Arrays.asList( connections );
+    }
+
+
+    /** @return connection id */
+    public static UUID getId( UUID connectingEntityId, String connectionType, UUID connectedEntityId ) {
+        return getId( connectingEntityId, null, null, connectionType, connectedEntityId );
+    }
+
+
+    /**
+     * Connection id is constructed from packed structure of properties strings are truncated to 16 ascii bytes.
+     * Connection id is now MD5'd into a UUID via UUID.nameUUIDFromBytes() so, technically string concatenation could be
+     * used prior to MD5
+     *
+     * @return connection id
+     */
+    public static UUID getId( UUID connectingEntityId, String pairedConnectionType, UUID pairedConnectingEntityId,
+                              String connectionType, UUID connectedEntityId ) {
+
+        EntityRef connectingEntity = ref( connectingEntityId );
+
+        ConnectedEntityRef[] pairedConnections =
+                getConnections( new ConnectedEntityRefImpl( pairedConnectionType, null, pairedConnectingEntityId ) );
+
+        ConnectedEntityRef connectedEntity = new ConnectedEntityRefImpl( connectionType, null, connectedEntityId );
+
+        return getId( connectingEntity, connectedEntity, pairedConnections );
+    }
+
+
+    public static UUID getId( EntityRef connectingEntity, ConnectedEntityRef connectedEntity,
+                              ConnectedEntityRef... pairedConnections ) {
+        UUID uuid = null;
+        try {
+
+            if ( connectionsNull( pairedConnections ) && connectionsNull( connectedEntity ) ) {
+                return connectingEntity.getUuid();
+            }
+
+            ByteArrayOutputStream byteStream = new ByteArrayOutputStream( 16 + ( 32 * pairedConnections.length ) );
+
+            byteStream.write( uuidToBytesNullOk( connectingEntity.getUuid() ) );
+
+            for ( ConnectedEntityRef connection : pairedConnections ) {
+                String connectionType = connection.getConnectionType();
+                UUID connectedEntityID = connection.getUuid();
+
+                byteStream.write( ascii( StringUtils.lowerCase( connectionType ) ) );
+                byteStream.write( uuidToBytesNullOk( connectedEntityID ) );
+            }
+
+            String connectionType = connectedEntity.getConnectionType();
+            if ( connectionType == null ) {
+                connectionType = NULL_ENTITY_TYPE;
+            }
+
+            UUID connectedEntityID = connectedEntity.getUuid();
+
+            byteStream.write( ascii( StringUtils.lowerCase( connectionType ) ) );
+            byteStream.write( uuidToBytesNullOk( connectedEntityID ) );
+
+            byte[] raw_id = byteStream.toByteArray();
+
+            // logger.info("raw connection index id: " +
+            // Hex.encodeHexString(raw_id));
+
+            uuid = UUID.nameUUIDFromBytes( raw_id );
+
+            // logger.info("connection index uuid: " + uuid);
+
+        }
+        catch ( IOException e ) {
+            logger.error( "Unable to create connection UUID", e );
+        }
+        return uuid;
+    }
+
+
+    /** @return connection index id */
+    public static UUID getIndexId( UUID connectingEntityId, String connectionType, String connectedEntityType ) {
+        return getIndexId( connectingEntityId, null, null, connectionType, connectedEntityType );
+    }
+
+
+    /** @return connection index id */
+    public static UUID getIndexId( UUID connectingEntityId, String pairedConnectionType, UUID pairedConnectingEntityId,
+                                   String connectionType, String connectedEntityType ) {
+
+        EntityRef connectingEntity = ref( connectingEntityId );
+
+        ConnectedEntityRef[] pairedConnections =
+                getConnections( new ConnectedEntityRefImpl( pairedConnectionType, null, pairedConnectingEntityId ) );
+
+        return getIndexId( connectingEntity, connectionType, connectedEntityType, pairedConnections );
+    }
+
+
+    public static UUID getIndexId( EntityRef connectingEntity, String connectionType, String connectedEntityType,
+                                   ConnectedEntityRef... pairedConnections ) {
+
+        UUID uuid = null;
+        try {
+
+            if ( connectionsNull( pairedConnections ) && ( ( connectionType == null ) && ( connectedEntityType
+                    == null ) ) ) {
+                return connectingEntity.getUuid();
+            }
+
+            ByteArrayOutputStream byteStream = new ByteArrayOutputStream( 16 + ( 32 * pairedConnections.length ) );
+
+            byteStream.write( uuidToBytesNullOk( connectingEntity.getUuid() ) );
+
+            for ( ConnectedEntityRef connection : pairedConnections ) {
+                String type = connection.getConnectionType();
+                UUID id = connection.getUuid();
+
+                byteStream.write( ascii( StringUtils.lowerCase( type ) ) );
+                byteStream.write( uuidToBytesNullOk( id ) );
+            }
+
+            if ( connectionType == null ) {
+                connectionType = NULL_ENTITY_TYPE;
+            }
+            if ( connectedEntityType == null ) {
+                connectedEntityType = NULL_ENTITY_TYPE;
+            }
+
+            byteStream.write( ascii( StringUtils.lowerCase( connectionType ) ) );
+            byteStream.write( ascii( StringUtils.lowerCase( connectedEntityType ) ) );
+
+            byte[] raw_id = byteStream.toByteArray();
+
+            logger.info( "raw connection index id: " + Hex.encodeHexString( raw_id ) );
+
+            uuid = UUID.nameUUIDFromBytes( raw_id );
+
+            logger.info( "connection index uuid: " + uuid );
+        }
+        catch ( IOException e ) {
+            logger.error( "Unable to create connection index UUID", e );
+        }
+        return uuid;
+    }
+
+
+    /** @return connection index id */
+    public static UUID getIndexId( int variant, UUID connectingEntityId, String pairedConnectionType,
+                                   UUID pairedConnectingEntityId, String connectionType, String connectedEntityType ) {
+
+        EntityRef connectingEntity = ref( connectingEntityId );
+
+        ConnectedEntityRef[] pairedConnections =
+                getConnections( new ConnectedEntityRefImpl( pairedConnectionType, null, pairedConnectingEntityId ) );
+
+        return getIndexId( variant, connectingEntity, connectionType, connectedEntityType, pairedConnections );
+    }
+
+
+    public static UUID getIndexId( int variant, EntityRef connectingEntity, String connectionType,
+                                   String connectedEntityType, ConnectedEntityRef... pairedConnections ) {
+
+        switch ( variant ) {
+
+            case ALL:
+                if ( connectionsNull( pairedConnections ) ) {
+                    return connectingEntity.getUuid();
+                }
+                else {
+                    return getIndexId( connectingEntity, null, null, pairedConnections );
+                }
+
+            case BY_ENTITY_TYPE:
+                return getIndexId( connectingEntity, null, connectedEntityType, pairedConnections );
+
+            case BY_CONNECTION_TYPE:
+                return getIndexId( connectingEntity, connectionType, null, pairedConnections );
+
+            case BY_CONNECTION_AND_ENTITY_TYPE:
+                return getIndexId( connectingEntity, connectionType, connectedEntityType, pairedConnections );
+        }
+
+        return connectingEntity.getUuid();
+    }
+
+
+    /** @return index ids */
+    public static UUID[] getIndexIds( UUID connectingEntityId, String connectionType, String connectedEntityType ) {
+        return getIndexIds( connectingEntityId, null, null, connectionType, connectedEntityType );
+    }
+
+
+    /** @return index ids */
+    public static UUID[] getIndexIds( UUID connectingEntityId, String pairedConnectionType,
+                                      UUID pairedConnectingEntityId, String connectionType,
+                                      String connectedEntityType ) {
+
+        UUID[] variants = new UUID[4];
+
+        for ( int i = 0; i < 4; i++ ) {
+            variants[i] =
+                    getIndexId( i, connectingEntityId, pairedConnectionType, pairedConnectingEntityId, connectionType,
+                            connectedEntityType );
+        }
+
+        return variants;
+    }
+
+
+    public static UUID[] getIndexIds( EntityRef connectingEntity, String connectionType, String connectedEntityType,
+                                      ConnectedEntityRef... pairedConnections ) {
+
+        UUID[] variants = new UUID[4];
+
+        for ( int i = 0; i < 4; i++ ) {
+            variants[i] = getIndexId( i, connectingEntity, connectionType, connectedEntityType, pairedConnections );
+        }
+
+        return variants;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/CounterUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/CounterUtils.java b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/CounterUtils.java
new file mode 100644
index 0000000..2de4f0d
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/CounterUtils.java
@@ -0,0 +1,397 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.cassandra;
+
+
+import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.UUID;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.apache.commons.lang.StringUtils;
+import org.apache.usergrid.count.Batcher;
+import org.apache.usergrid.count.common.Count;
+import org.apache.usergrid.mq.Message;
+import org.apache.usergrid.mq.cassandra.QueuesCF;
+import org.apache.usergrid.persistence.CounterResolution;
+import org.apache.usergrid.persistence.entities.Event;
+
+import me.prettyprint.cassandra.serializers.ByteBufferSerializer;
+import me.prettyprint.cassandra.serializers.LongSerializer;
+import me.prettyprint.cassandra.serializers.PrefixedSerializer;
+import me.prettyprint.cassandra.serializers.StringSerializer;
+import me.prettyprint.cassandra.serializers.UUIDSerializer;
+import me.prettyprint.hector.api.beans.HCounterColumn;
+import me.prettyprint.hector.api.mutation.Mutator;
+import static me.prettyprint.hector.api.factory.HFactory.createColumn;
+import static me.prettyprint.hector.api.factory.HFactory.createCounterColumn;
+import static org.apache.usergrid.persistence.Schema.DICTIONARY_COUNTERS;
+import static org.apache.usergrid.persistence.cassandra.ApplicationCF.APPLICATION_AGGREGATE_COUNTERS;
+import static org.apache.usergrid.persistence.cassandra.ApplicationCF.ENTITY_COUNTERS;
+import static org.apache.usergrid.persistence.cassandra.ApplicationCF.ENTITY_DICTIONARIES;
+import static org.apache.usergrid.persistence.cassandra.CassandraPersistenceUtils.addInsertToMutator;
+import static org.apache.usergrid.persistence.cassandra.CassandraPersistenceUtils.key;
+import static org.apache.usergrid.utils.ConversionUtils.bytebuffer;
+
+
+public class CounterUtils {
+
+    public static final Logger logger = LoggerFactory.getLogger( CounterUtils.class );
+
+    public static final LongSerializer le = new LongSerializer();
+    public static final StringSerializer se = new StringSerializer();
+    public static final ByteBufferSerializer be = new ByteBufferSerializer();
+    public static final UUIDSerializer ue = new UUIDSerializer();
+
+    private String counterType = "o";
+
+    private Batcher batcher;
+
+
+    public void setBatcher( Batcher batcher ) {
+        this.batcher = batcher;
+    }
+
+
+    /** Set the type to 'new' ("n"), 'parallel' ("p"), 'old' ("o" - the default) If not one of the above, do nothing */
+    public void setCounterType( String counterType ) {
+        if ( counterType == null ) {
+            return;
+        }
+        if ( "n".equals( counterType ) || "p".equals( counterType ) || "o".equals( counterType ) ) {
+            this.counterType = counterType;
+        }
+    }
+
+
+    public boolean getIsCounterBatched() {
+        return "n".equals( counterType );
+    }
+
+
+    public static class AggregateCounterSelection {
+        public static final String COLON = ":";
+        public static final String STAR = "*";
+        String name;
+        UUID userId;
+        UUID groupId;
+        UUID queueId;
+        String category;
+
+
+        public AggregateCounterSelection( String name, UUID userId, UUID groupId, UUID queueId, String category ) {
+            this.name = name.toLowerCase();
+            this.userId = userId;
+            this.groupId = groupId;
+            this.queueId = queueId;
+            this.category = category;
+        }
+
+
+        public void apply( String name, UUID userId, UUID groupId, UUID queueId, String category ) {
+            this.name = name.toLowerCase();
+            this.userId = userId;
+            this.groupId = groupId;
+            this.queueId = queueId;
+            this.category = category;
+        }
+
+
+        public String getName() {
+            return name;
+        }
+
+
+        public void setName( String name ) {
+            this.name = name;
+        }
+
+
+        public UUID getUserId() {
+            return userId;
+        }
+
+
+        public void setUserId( UUID userId ) {
+            this.userId = userId;
+        }
+
+
+        public UUID getGroupId() {
+            return groupId;
+        }
+
+
+        public void setGroupId( UUID groupId ) {
+            this.groupId = groupId;
+        }
+
+
+        public UUID getQueueId() {
+            return queueId;
+        }
+
+
+        public void setQueueId( UUID queueId ) {
+            this.queueId = queueId;
+        }
+
+
+        public String getCategory() {
+            return category;
+        }
+
+
+        public void setCategory( String category ) {
+            this.category = category;
+        }
+
+
+        public String getRow( CounterResolution resolution ) {
+            return rowBuilder( name, userId, groupId, queueId, category, resolution );
+        }
+
+
+        public static String rowBuilder( String name, UUID userId, UUID groupId, UUID queueId, String category,
+                                         CounterResolution resolution ) {
+            StringBuilder builder = new StringBuilder( name );
+            builder.append( COLON ).append( ( userId != null ? userId.toString() : STAR ) ).append( COLON )
+                   .append( groupId != null ? groupId.toString() : STAR ).append( COLON )
+                   .append( ( queueId != null ? queueId.toString() : STAR ) ).append( COLON )
+                   .append( ( category != null ? category : STAR ) ).append( COLON ).append( resolution.name() );
+            return builder.toString();
+        }
+    }
+
+
+    public void addEventCounterMutations( Mutator<ByteBuffer> m, UUID applicationId, Event event, long timestamp ) {
+        if ( event.getCounters() != null ) {
+            for ( Entry<String, Integer> value : event.getCounters().entrySet() ) {
+                batchIncrementAggregateCounters( m, applicationId, event.getUser(), event.getGroup(), null,
+                        event.getCategory(), value.getKey().toLowerCase(), value.getValue(), event.getTimestamp(),
+                        timestamp );
+            }
+        }
+    }
+
+
+    public void addMessageCounterMutations( Mutator<ByteBuffer> m, UUID applicationId, UUID queueId, Message msg,
+                                            long timestamp ) {
+        if ( msg.getCounters() != null ) {
+            for ( Entry<String, Integer> value : msg.getCounters().entrySet() ) {
+                batchIncrementAggregateCounters( m, applicationId, null, null, queueId, msg.getCategory(),
+                        value.getKey().toLowerCase(), value.getValue(), msg.getTimestamp(), timestamp );
+            }
+        }
+    }
+
+
+    public void batchIncrementAggregateCounters( Mutator<ByteBuffer> m, UUID applicationId, UUID userId, UUID groupId,
+                                                 UUID queueId, String category, Map<String, Long> counters,
+                                                 long timestamp ) {
+        if ( counters != null ) {
+            for ( Entry<String, Long> value : counters.entrySet() ) {
+                batchIncrementAggregateCounters( m, applicationId, userId, groupId, queueId, category,
+                        value.getKey().toLowerCase(), value.getValue(), timestamp );
+            }
+        }
+    }
+
+
+    public void batchIncrementAggregateCounters( Mutator<ByteBuffer> m, UUID applicationId, UUID userId, UUID groupId,
+                                                 UUID queueId, String category, String name, long value,
+                                                 long cassandraTimestamp ) {
+        batchIncrementAggregateCounters( m, applicationId, userId, groupId, queueId, category, name, value,
+                cassandraTimestamp / 1000, cassandraTimestamp );
+    }
+
+
+    public void batchIncrementAggregateCounters( Mutator<ByteBuffer> m, UUID applicationId, UUID userId, UUID groupId,
+                                                 UUID queueId, String category, String name, long value,
+                                                 long counterTimestamp, long cassandraTimestamp ) {
+        for ( CounterResolution resolution : CounterResolution.values() ) {
+            logger.debug( "BIAC for resolution {}", resolution );
+            batchIncrementAggregateCounters( m, userId, groupId, queueId, category, resolution, name, value,
+                    counterTimestamp, applicationId );
+            logger.debug( "DONE BIAC for resolution {}", resolution );
+        }
+        batchIncrementEntityCounter( m, applicationId, name, value, cassandraTimestamp, applicationId );
+        if ( userId != null ) {
+            batchIncrementEntityCounter( m, userId, name, value, cassandraTimestamp, applicationId );
+        }
+        if ( groupId != null ) {
+            batchIncrementEntityCounter( m, groupId, name, value, cassandraTimestamp, applicationId );
+        }
+    }
+
+
+    private void batchIncrementAggregateCounters( Mutator<ByteBuffer> m, UUID userId, UUID groupId, UUID queueId,
+                                                  String category, CounterResolution resolution, String name,
+                                                  long value, long counterTimestamp, UUID applicationId ) {
+
+        String[] segments = StringUtils.split( name, '.' );
+        for ( int j = 0; j < segments.length; j++ ) {
+            name = StringUtils.join( segments, '.', 0, j + 1 );
+            // skip system counter
+            if ( "system".equals( name ) ) {
+                continue;
+            }
+
+            // *:*:*:*
+            handleAggregateCounterRow( m,
+                    AggregateCounterSelection.rowBuilder( name, null, null, null, null, resolution ),
+                    resolution.round( counterTimestamp ), value, applicationId );
+            String currentRow = null;
+            HashSet<String> rowSet = new HashSet<String>( 16 );
+            for ( int i = 0; i < 16; i++ ) {
+
+                boolean include_user = ( i & 0x01 ) != 0;
+                boolean include_group = ( i & 0x02 ) != 0;
+                boolean include_queue = ( i & 0x04 ) != 0;
+                boolean include_category = ( i & 0x08 ) != 0;
+
+                Object[] parameters = {
+                        include_user ? userId : null, include_group ? groupId : null, include_queue ? queueId : null,
+                        include_category ? category : null
+                };
+                int non_null = 0;
+                for ( Object p : parameters ) {
+                    if ( p != null ) {
+                        non_null++;
+                    }
+                }
+                currentRow = AggregateCounterSelection
+                        .rowBuilder( name, ( UUID ) parameters[0], ( UUID ) parameters[1], ( UUID ) parameters[2],
+                                ( String ) parameters[3], resolution );
+
+                if ( non_null > 0 && !rowSet.contains( currentRow ) ) {
+                    rowSet.add( currentRow );
+                    handleAggregateCounterRow( m, currentRow, resolution.round( counterTimestamp ), value,
+                            applicationId );
+                }
+            }
+        }
+    }
+
+
+    private void handleAggregateCounterRow( Mutator<ByteBuffer> m, String key, long column, long value,
+                                            UUID applicationId ) {
+        if ( logger.isDebugEnabled() ) {
+            logger.info( "HACR: aggregateRow for app {} with key {} column {} and value {}",
+                    new Object[] { applicationId, key, column, value } );
+        }
+        if ( "o".equals( counterType ) || "p".equals( counterType ) ) {
+            if ( m != null ) {
+                HCounterColumn<Long> c = createCounterColumn( column, value, le );
+                m.addCounter( bytebuffer( key ), APPLICATION_AGGREGATE_COUNTERS.toString(), c );
+            }
+        }
+        if ( "n".equals( counterType ) || "p".equals( counterType ) ) {
+            // create and add Count
+            PrefixedSerializer ps =
+                    new PrefixedSerializer( applicationId, UUIDSerializer.get(), StringSerializer.get() );
+            batcher.add(
+                    new Count( APPLICATION_AGGREGATE_COUNTERS.toString(), ps.toByteBuffer( key ), column, value ) );
+        }
+    }
+
+
+    public AggregateCounterSelection getAggregateCounterSelection( String name, UUID userId, UUID groupId, UUID queueId,
+                                                                   String category ) {
+        return new AggregateCounterSelection( name, userId, groupId, queueId, category );
+    }
+
+
+    public String getAggregateCounterRow( String name, UUID userId, UUID groupId, UUID queueId, String category,
+                                          CounterResolution resolution ) {
+        return AggregateCounterSelection.rowBuilder( name, userId, groupId, queueId, category, resolution );
+    }
+
+
+    public List<String> getAggregateCounterRows( List<AggregateCounterSelection> selections,
+                                                 CounterResolution resolution ) {
+        List<String> keys = new ArrayList<String>();
+        for ( AggregateCounterSelection selection : selections ) {
+            keys.add( selection.getRow( resolution ) );
+        }
+        return keys;
+    }
+
+
+    private Mutator<ByteBuffer> batchIncrementEntityCounter( Mutator<ByteBuffer> m, UUID entityId, String name,
+                                                             Long value, long timestamp, UUID applicationId ) {
+        if ( logger.isDebugEnabled() ) {
+            logger.debug( "BIEC: Incrementing property {} of entity {} by value {}",
+                    new Object[] { name, entityId, value } );
+        }
+        addInsertToMutator( m, ENTITY_DICTIONARIES, key( entityId, DICTIONARY_COUNTERS ), name, null, timestamp );
+        if ( "o".equals( counterType ) || "p".equals( counterType ) ) {
+            HCounterColumn<String> c = createCounterColumn( name, value );
+            m.addCounter( bytebuffer( entityId ), ENTITY_COUNTERS.toString(), c );
+        }
+        if ( "n".equals( counterType ) || "p".equals( counterType ) ) {
+            PrefixedSerializer ps = new PrefixedSerializer( applicationId, UUIDSerializer.get(), UUIDSerializer.get() );
+            batcher.add( new Count( ENTITY_COUNTERS.toString(), ps.toByteBuffer( entityId ), name, value ) );
+        }
+        return m;
+    }
+
+
+    public Mutator<ByteBuffer> batchIncrementQueueCounter( Mutator<ByteBuffer> m, UUID queueId, String name, long value,
+                                                           long timestamp, UUID applicationId ) {
+        if ( logger.isDebugEnabled() ) {
+            logger.debug( "BIQC: Incrementing property {} of queue {} by value {}",
+                    new Object[] { name, queueId, value } );
+        }
+        m.addInsertion( bytebuffer( key( queueId, DICTIONARY_COUNTERS ).toString() ),
+                QueuesCF.QUEUE_DICTIONARIES.toString(),
+                createColumn( name, ByteBuffer.allocate( 0 ), timestamp, se, be ) );
+        if ( "o".equals( counterType ) || "p".equals( counterType ) ) {
+            HCounterColumn<String> c = createCounterColumn( name, value );
+            ByteBuffer keybytes = bytebuffer( queueId );
+            m.addCounter( keybytes, QueuesCF.COUNTERS.toString(), c );
+        }
+        if ( "n".equals( counterType ) || "p".equals( counterType ) ) {
+            PrefixedSerializer ps = new PrefixedSerializer( applicationId, UUIDSerializer.get(), UUIDSerializer.get() );
+            batcher.add( new Count( QueuesCF.COUNTERS.toString(), ps.toByteBuffer( queueId ), name, value ) );
+        }
+        return m;
+    }
+
+
+    public Mutator<ByteBuffer> batchIncrementQueueCounters( Mutator<ByteBuffer> m, UUID queueId,
+                                                            Map<String, Long> values, long timestamp,
+                                                            UUID applicationId ) {
+        for ( Entry<String, Long> entry : values.entrySet() ) {
+            batchIncrementQueueCounter( m, queueId, entry.getKey(), entry.getValue(), timestamp, applicationId );
+        }
+        return m;
+    }
+
+
+    public Mutator<ByteBuffer> batchIncrementQueueCounters( Mutator<ByteBuffer> m, Map<UUID, Map<String, Long>> values,
+                                                            long timestamp, UUID applicationId ) {
+        for ( Entry<UUID, Map<String, Long>> entry : values.entrySet() ) {
+            batchIncrementQueueCounters( m, entry.getKey(), entry.getValue(), timestamp, applicationId );
+        }
+        return m;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/CursorCache.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/CursorCache.java b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/CursorCache.java
new file mode 100644
index 0000000..b49f0fe
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/CursorCache.java
@@ -0,0 +1,120 @@
+package org.apache.usergrid.persistence.cassandra;
+
+
+import java.nio.ByteBuffer;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import static java.lang.Integer.parseInt;
+import static org.apache.commons.codec.binary.Base64.decodeBase64;
+import static org.apache.commons.codec.binary.Base64.encodeBase64URLSafeString;
+import static org.apache.commons.lang.StringUtils.split;
+import static org.apache.usergrid.utils.ConversionUtils.bytes;
+
+
+/**
+ * Internal cursor parsing
+ *
+ * @author tnine
+ */
+public class CursorCache {
+
+    private Map<Integer, ByteBuffer> cursors = new HashMap<Integer, ByteBuffer>();
+
+
+    public CursorCache() {
+
+    }
+
+
+    /** Create a new cursor cache from the string if passed */
+    public CursorCache( String cursorString ) {
+
+        if ( cursorString == null ) {
+            return;
+        }
+
+        String decoded = new String( decodeBase64( cursorString ) );
+
+        // nothing to do
+        if ( decoded.indexOf( ':' ) < 0 ) {
+            return;
+        }
+
+        String[] cursorTokens = split( decoded, '|' );
+
+        for ( String c : cursorTokens ) {
+
+            String[] parts = split( c, ':' );
+
+            if ( parts.length >= 1 ) {
+
+                int hashCode = parseInt( parts[0] );
+
+                ByteBuffer cursorBytes = null;
+
+                if ( parts.length == 2 ) {
+                    cursorBytes = ByteBuffer.wrap( decodeBase64( parts[1] ) );
+                }
+                else {
+                    cursorBytes = ByteBuffer.allocate( 0 );
+                }
+
+                cursors.put( hashCode, cursorBytes );
+            }
+        }
+    }
+
+
+    /** Set the cursor with the given hash and the new byte buffer */
+    public void setNextCursor( int sliceHash, ByteBuffer newCursor ) {
+        cursors.put( sliceHash, newCursor );
+    }
+
+
+    /** Get the cursor by the hashcode of the slice */
+    public ByteBuffer getCursorBytes( int sliceHash ) {
+        return cursors.get( sliceHash );
+    }
+
+
+    /** Turn the cursor cache into a string */
+    public String asString() {
+        /**
+         * No cursors to return
+         */
+        if ( cursors.size() == 0 ) {
+            return null;
+        }
+
+        StringBuffer buff = new StringBuffer();
+
+        int nullCount = 0;
+        ByteBuffer value = null;
+
+        for ( Entry<Integer, ByteBuffer> entry : cursors.entrySet() ) {
+            value = entry.getValue();
+
+            buff.append( entry.getKey() );
+            buff.append( ":" );
+            buff.append( encodeBase64URLSafeString( bytes( value ) ) );
+            buff.append( "|" );
+
+            // this range was empty, mark it as a null
+            if ( value == null || value.remaining() == 0 ) {
+                nullCount++;
+            }
+        }
+
+        // all cursors are complete, return null
+        if ( nullCount == cursors.size() ) {
+            return null;
+        }
+
+        // trim off the last pipe
+        buff.setLength( buff.length() - 1 );
+
+        return encodeBase64URLSafeString( buff.toString().getBytes() );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/EntityManagerFactoryImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/EntityManagerFactoryImpl.java b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/EntityManagerFactoryImpl.java
new file mode 100644
index 0000000..51dbc9e
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/EntityManagerFactoryImpl.java
@@ -0,0 +1,408 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.cassandra;
+
+
+import java.nio.ByteBuffer;
+import java.util.Map;
+import java.util.TreeMap;
+import java.util.UUID;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.BeansException;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.ApplicationContextAware;
+import org.apache.commons.lang.StringUtils;
+import org.apache.usergrid.persistence.DynamicEntity;
+import org.apache.usergrid.persistence.EntityManager;
+import org.apache.usergrid.persistence.EntityManagerFactory;
+import org.apache.usergrid.persistence.entities.Application;
+import org.apache.usergrid.persistence.exceptions.ApplicationAlreadyExistsException;
+import org.apache.usergrid.utils.UUIDUtils;
+
+import com.google.common.cache.CacheBuilder;
+import com.google.common.cache.CacheLoader;
+import com.google.common.cache.LoadingCache;
+import com.yammer.metrics.annotation.Metered;
+
+import me.prettyprint.cassandra.serializers.ByteBufferSerializer;
+import me.prettyprint.cassandra.serializers.BytesArraySerializer;
+import me.prettyprint.cassandra.serializers.DynamicCompositeSerializer;
+import me.prettyprint.cassandra.serializers.LongSerializer;
+import me.prettyprint.cassandra.serializers.StringSerializer;
+import me.prettyprint.cassandra.serializers.UUIDSerializer;
+import me.prettyprint.hector.api.Keyspace;
+import me.prettyprint.hector.api.beans.ColumnSlice;
+import me.prettyprint.hector.api.beans.HColumn;
+import me.prettyprint.hector.api.beans.OrderedRows;
+import me.prettyprint.hector.api.beans.Row;
+import me.prettyprint.hector.api.beans.Rows;
+import me.prettyprint.hector.api.mutation.Mutator;
+import me.prettyprint.hector.api.query.QueryResult;
+import me.prettyprint.hector.api.query.RangeSlicesQuery;
+import static java.lang.String.CASE_INSENSITIVE_ORDER;
+import static me.prettyprint.hector.api.factory.HFactory.createMutator;
+import static me.prettyprint.hector.api.factory.HFactory.createRangeSlicesQuery;
+import static org.apache.usergrid.persistence.Schema.PROPERTY_NAME;
+import static org.apache.usergrid.persistence.Schema.PROPERTY_UUID;
+import static org.apache.usergrid.persistence.Schema.TYPE_APPLICATION;
+import static org.apache.usergrid.persistence.cassandra.CassandraPersistenceUtils.addInsertToMutator;
+import static org.apache.usergrid.persistence.cassandra.CassandraPersistenceUtils.asMap;
+import static org.apache.usergrid.persistence.cassandra.CassandraPersistenceUtils.batchExecute;
+import static org.apache.usergrid.persistence.cassandra.CassandraService.APPLICATIONS_CF;
+import static org.apache.usergrid.persistence.cassandra.CassandraService.PROPERTIES_CF;
+import static org.apache.usergrid.persistence.cassandra.CassandraService.RETRY_COUNT;
+import static org.apache.usergrid.utils.ConversionUtils.uuid;
+
+
+/**
+ * Cassandra-specific implementation of Datastore
+ *
+ * @author edanuff
+ */
+public class EntityManagerFactoryImpl implements EntityManagerFactory, ApplicationContextAware {
+
+    private static final Logger logger = LoggerFactory.getLogger( EntityManagerFactoryImpl.class );
+
+    public static String IMPLEMENTATION_DESCRIPTION = "Cassandra Entity Manager Factory 1.0";
+
+    public static final Class<DynamicEntity> APPLICATION_ENTITY_CLASS = DynamicEntity.class;
+
+    public static final StringSerializer se = new StringSerializer();
+    public static final ByteBufferSerializer be = new ByteBufferSerializer();
+    public static final UUIDSerializer ue = new UUIDSerializer();
+    public static final BytesArraySerializer bae = new BytesArraySerializer();
+    public static final DynamicCompositeSerializer dce = new DynamicCompositeSerializer();
+    public static final LongSerializer le = new LongSerializer();
+
+    ApplicationContext applicationContext;
+
+    CassandraService cass;
+    CounterUtils counterUtils;
+
+    private boolean skipAggregateCounters;
+
+    private LoadingCache<UUID, EntityManager> entityManagers =
+            CacheBuilder.newBuilder().maximumSize( 100 ).build( new CacheLoader<UUID, EntityManager>() {
+                public EntityManager load( UUID appId ) { // no checked exception
+                    return _getEntityManager( appId );
+                }
+            } );
+
+
+    /**
+     * Must be constructed with a CassandraClientPool.
+     *
+     * @param cass the cassandraService instance
+     */
+    public EntityManagerFactoryImpl( CassandraService cass, CounterUtils counterUtils, boolean skipAggregateCounters ) {
+        this.cass = cass;
+        this.counterUtils = counterUtils;
+        this.skipAggregateCounters = skipAggregateCounters;
+        if ( skipAggregateCounters ) {
+            logger.warn( "NOTE: Counters have been disabled by configuration..." );
+        }
+    }
+
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.usergrid.core.Datastore#getImpementationDescription()
+     */
+    @Override
+    public String getImpementationDescription() {
+        return IMPLEMENTATION_DESCRIPTION;
+    }
+
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.usergrid.core.Datastore#getEntityDao(java.util.UUID,
+     * java.util.UUID)
+     */
+    @Override
+    public EntityManager getEntityManager( UUID applicationId ) {
+        try {
+            return entityManagers.get( applicationId );
+        }
+        catch ( Exception ex ) {
+            ex.printStackTrace();
+        }
+        return _getEntityManager( applicationId );
+    }
+
+
+    private EntityManager _getEntityManager( UUID applicationId ) {
+        //EntityManagerImpl em = new EntityManagerImpl();
+        EntityManager em = applicationContext.getBean( "entityManager", EntityManager.class );
+        //em.init(this,cass,counterUtils,applicationId, skipAggregateCounters);
+        em.setApplicationId( applicationId );
+        return em;
+    }
+
+
+    public ApplicationContext getApplicationContext() {
+        return applicationContext;
+    }
+
+
+    /**
+     * Gets the setup.
+     *
+     * @return Setup helper
+     */
+    public Setup getSetup() {
+        return new Setup( this, cass );
+    }
+
+
+    @Override
+    public void setup() throws Exception {
+        Setup setup = getSetup();
+
+        setup.setup();
+
+
+        if ( cass.getPropertiesMap() != null ) {
+            updateServiceProperties( cass.getPropertiesMap() );
+        }
+    }
+
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.usergrid.core.Datastore#createApplication(java.lang.String)
+     */
+    @Override
+    public UUID createApplication( String organization, String name ) throws Exception {
+        return createApplication( organization, name, null );
+    }
+
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.usergrid.core.Datastore#createApplication(java.lang.String,
+     * java.util.Map)
+     */
+    @Override
+    public UUID createApplication( String organizationName, String name, Map<String, Object> properties )
+            throws Exception {
+
+        String appName = buildAppName( organizationName, name );
+
+        HColumn<String, ByteBuffer> column =
+                cass.getColumn( cass.getSystemKeyspace(), APPLICATIONS_CF, appName, PROPERTY_UUID );
+        if ( column != null ) {
+            throw new ApplicationAlreadyExistsException( name );
+            // UUID uuid = uuid(column.getValue());
+            // return uuid;
+        }
+
+        UUID applicationId = UUIDUtils.newTimeUUID();
+        logger.info( "New application id " + applicationId.toString() );
+
+        initializeApplication( organizationName, applicationId, appName, properties );
+
+        return applicationId;
+    }
+
+
+    private String buildAppName( String organizationName, String name ) {
+        return StringUtils.lowerCase( name.contains( "/" ) ? name : organizationName + "/" + name );
+    }
+
+
+    public UUID initializeApplication( String organizationName, UUID applicationId, String name,
+                                       Map<String, Object> properties ) throws Exception {
+
+        String appName = buildAppName( organizationName, name );
+        // check for pre-existing
+        if ( lookupApplication( appName ) != null ) {
+            throw new ApplicationAlreadyExistsException( appName );
+        }
+        if ( properties == null ) {
+            properties = new TreeMap<String, Object>( CASE_INSENSITIVE_ORDER );
+        }
+
+        properties.put( PROPERTY_NAME, appName );
+
+        getSetup().setupApplicationKeyspace( applicationId, appName );
+
+
+        Keyspace ko = cass.getSystemKeyspace();
+        Mutator<ByteBuffer> m = createMutator( ko, be );
+
+        long timestamp = cass.createTimestamp();
+
+        addInsertToMutator( m, APPLICATIONS_CF, appName, PROPERTY_UUID, applicationId, timestamp );
+        addInsertToMutator( m, APPLICATIONS_CF, appName, PROPERTY_NAME, appName, timestamp );
+
+        batchExecute( m, RETRY_COUNT );
+
+        EntityManager em = getEntityManager( applicationId );
+        em.create( TYPE_APPLICATION, APPLICATION_ENTITY_CLASS, properties );
+
+        em.resetRoles();
+
+        return applicationId;
+    }
+
+
+    @Override
+    public UUID importApplication( String organizationName, UUID applicationId, String name,
+                                   Map<String, Object> properties ) throws Exception {
+
+        name = buildAppName( organizationName, name );
+
+        HColumn<String, ByteBuffer> column =
+                cass.getColumn( cass.getSystemKeyspace(), APPLICATIONS_CF, name, PROPERTY_UUID );
+        if ( column != null ) {
+            throw new ApplicationAlreadyExistsException( name );
+            // UUID uuid = uuid(column.getValue());
+            // return uuid;
+        }
+
+        return initializeApplication( organizationName, applicationId, name, properties );
+    }
+
+
+    @Override
+    @Metered(group = "core", name = "EntityManagerFactory_lookupApplication_byName")
+    public UUID lookupApplication( String name ) throws Exception {
+        name = name.toLowerCase();
+        HColumn<String, ByteBuffer> column =
+                cass.getColumn( cass.getSystemKeyspace(), APPLICATIONS_CF, name, PROPERTY_UUID );
+        if ( column != null ) {
+            UUID uuid = uuid( column.getValue() );
+            return uuid;
+        }
+        return null;
+    }
+
+
+    /**
+     * Gets the application.
+     *
+     * @param name the name
+     *
+     * @return application for name
+     *
+     * @throws Exception the exception
+     */
+    @Metered(group = "core", name = "EntityManagerFactory_getApplication")
+    public Application getApplication( String name ) throws Exception {
+        name = name.toLowerCase();
+        HColumn<String, ByteBuffer> column =
+                cass.getColumn( cass.getSystemKeyspace(), APPLICATIONS_CF, name, PROPERTY_UUID );
+        if ( column == null ) {
+            return null;
+        }
+
+        UUID applicationId = uuid( column.getValue() );
+
+        EntityManager em = getEntityManager( applicationId );
+        return ( ( EntityManagerImpl ) em ).getEntity( applicationId, Application.class );
+    }
+
+
+    @Override
+    public Map<String, UUID> getApplications() throws Exception {
+        Map<String, UUID> applications = new TreeMap<String, UUID>( CASE_INSENSITIVE_ORDER );
+        Keyspace ko = cass.getSystemKeyspace();
+        RangeSlicesQuery<String, String, UUID> q = createRangeSlicesQuery( ko, se, se, ue );
+        q.setKeys( "", "\uFFFF" );
+        q.setColumnFamily( APPLICATIONS_CF );
+        q.setColumnNames( PROPERTY_UUID );
+        q.setRowCount( 10000 );
+        QueryResult<OrderedRows<String, String, UUID>> r = q.execute();
+        Rows<String, String, UUID> rows = r.get();
+        for ( Row<String, String, UUID> row : rows ) {
+            ColumnSlice<String, UUID> slice = row.getColumnSlice();
+            HColumn<String, UUID> column = slice.getColumnByName( PROPERTY_UUID );
+            applications.put( row.getKey(), column.getValue() );
+        }
+        return applications;
+    }
+
+
+    @Override
+    public boolean setServiceProperty( String name, String value ) {
+        try {
+            cass.setColumn( cass.getSystemKeyspace(), PROPERTIES_CF, PROPERTIES_CF, name, value );
+            return true;
+        }
+        catch ( Exception e ) {
+            logger.error( "Unable to set property " + name + ": " + e.getMessage() );
+        }
+        return false;
+    }
+
+
+    @Override
+    public boolean deleteServiceProperty( String name ) {
+        try {
+            cass.deleteColumn( cass.getSystemKeyspace(), PROPERTIES_CF, PROPERTIES_CF, name );
+            return true;
+        }
+        catch ( Exception e ) {
+            logger.error( "Unable to delete property " + name + ": " + e.getMessage() );
+        }
+        return false;
+    }
+
+
+    @Override
+    public boolean updateServiceProperties( Map<String, String> properties ) {
+        try {
+            cass.setColumns( cass.getSystemKeyspace(), PROPERTIES_CF, PROPERTIES_CF.getBytes(), properties );
+            return true;
+        }
+        catch ( Exception e ) {
+            logger.error( "Unable to update properties: " + e.getMessage() );
+        }
+        return false;
+    }
+
+
+    @Override
+    public Map<String, String> getServiceProperties() {
+        Map<String, String> properties = null;
+        try {
+            properties = asMap( cass.getAllColumns( cass.getSystemKeyspace(), PROPERTIES_CF, PROPERTIES_CF, se, se ) );
+            return properties;
+        }
+        catch ( Exception e ) {
+            logger.error( "Unable to load properties: " + e.getMessage() );
+        }
+        return null;
+    }
+
+
+    @Override
+    public void setApplicationContext( ApplicationContext applicationContext ) throws BeansException {
+        this.applicationContext = applicationContext;
+    }
+
+
+    public void setCounterUtils( CounterUtils counterUtils ) {
+        this.counterUtils = counterUtils;
+    }
+}


[77/96] [abbrv] USERGRID-2 package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Activity.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Activity.java b/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Activity.java
new file mode 100644
index 0000000..f2b77bd
--- /dev/null
+++ b/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Activity.java
@@ -0,0 +1,627 @@
+/*******************************************************************************
+ * Copyright (c) 2010, 2011 Ed Anuff and Usergrid, all rights reserved.
+ * http://www.usergrid.com
+ * 
+ * This file is part of Usergrid Core.
+ * 
+ * Usergrid Core is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version.
+ * 
+ * Usergrid Core is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License along with
+ * Usergrid Core. If not, see <http://www.gnu.org/licenses/>.
+ ******************************************************************************/
+package org.apache.usergrid.java.client.entities;
+
+
+import static org.apache.usergrid.java.client.utils.JsonUtils.getStringProperty;
+
+import java.util.Arrays;
+import java.util.Date;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.UUID;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion;
+
+/**
+ * An entity type for representing activity stream actions. These are similar to
+ * the more generic message entity type except provide the necessary properties
+ * for supporting activity stream implementations.
+ * 
+ * @see http://activitystrea.ms/specs/json/1.0/
+ */
+public class Activity extends Entity {
+
+    public static final String ENTITY_TYPE = "activity";
+
+    public static final String PROP_ACTOR = "actor";
+
+    public static final String VERB_ADD = "add";
+    public static final String VERB_CANCEL = "cancel";
+    public static final String VERB_CHECKIN = "checkin";
+    public static final String VERB_DELETE = "delete";
+    public static final String VERB_FAVORITE = "favorite";
+    public static final String VERB_FOLLOW = "follow";
+    public static final String VERB_GIVE = "give";
+    public static final String VERB_IGNORE = "ignore";
+    public static final String VERB_INVITE = "invite";
+    public static final String VERB_JOIN = "join";
+    public static final String VERB_LEAVE = "leave";
+    public static final String VERB_LIKE = "like";
+    public static final String VERB_MAKE_FRIEND = "make-friend";
+    public static final String VERB_PLAY = "play";
+    public static final String VERB_POST = "post";
+    public static final String VERB_RECEIVE = "receive";
+    public static final String VERB_REMOVE = "remove";
+    public static final String VERB_REMOVE_FRIEND = "remove-friend";
+    public static final String VERB_REQUEST_FRIEND = "request-friend";
+    public static final String VERB_RSVP_MAYBE = "rsvp-maybe";
+    public static final String VERB_RSVP_NO = "rsvp-no";
+    public static final String VERB_RSVP_YES = "rsvp-yes";
+    public static final String VERB_SAVE = "save";
+    public static final String VERB_SHARE = "share";
+    public static final String VERB_STOP_FOLLOWING = "stop-following";
+    public static final String VERB_TAG = "tag";
+    public static final String VERB_UNFAVORITE = "unfavorite";
+    public static final String VERB_UNLIKE = "unlike";
+    public static final String VERB_UNSAVE = "unsave";
+    public static final String VERB_UPDATE = "update";
+
+    public static final String OBJECT_TYPE_ARTICLE = "article";
+    public static final String OBJECT_TYPE_AUDIO = "audio";
+    public static final String OBJECT_TYPE_BADGE = "badge";
+    public static final String OBJECT_TYPE_BOOKMARK = "bookmark";
+    public static final String OBJECT_TYPE_COLLECTION = "collection";
+    public static final String OBJECT_TYPE_COMMENT = "comment";
+    public static final String OBJECT_TYPE_EVENT = "event";
+    public static final String OBJECT_TYPE_FILE = "file";
+    public static final String OBJECT_TYPE_GROUP = "group";
+    public static final String OBJECT_TYPE_IMAGE = "image";
+    public static final String OBJECT_TYPE_NOTE = "note";
+    public static final String OBJECT_TYPE_PERSON = "person";
+    public static final String OBJECT_TYPE_PLACE = "place";
+    public static final String OBJECT_TYPE_PRODUCT = "product";
+    public static final String OBJECT_TYPE_QUESTION = "question";
+    public static final String OBJECT_TYPE_REVIEW = "review";
+    public static final String OBJECT_TYPE_SERVICE = "service";
+    public static final String OBJECT_TYPE_VIDEO = "video";
+
+    protected ActivityObject actor;
+
+    protected String content;
+
+    protected ActivityObject generator;
+
+    protected MediaLink icon;
+
+    protected String category;
+
+    protected String verb;
+
+    protected Long published;
+
+    protected ActivityObject object;
+
+    // protected
+    // String objectType;
+
+    // protected
+    // String objectEntityType;
+
+    // protected
+    // String objectName;
+
+    protected String title;
+
+    protected Set<String> connections;
+
+    public Activity() {
+        setType("activity");
+    }
+
+    public Activity(UUID id) {
+        this();
+        setUuid(id);
+    }
+
+    public static Activity newActivity(String verb, String title,
+            String content, String category, Entity user, Entity object,
+            String objectType, String objectName, String objectContent){
+
+        Activity activity = new Activity();
+        activity.setVerb(verb);
+        activity.setCategory(category);
+        activity.setContent(content);
+        activity.setTitle(title);
+        
+        ActivityObject actor = new ActivityObject();
+        actor.setObjectType("person");
+        
+        if (user != null) {
+            actor.setDisplayName(getStringProperty(user.properties, "name"));
+            actor.setEntityType(user.getType());
+            actor.setUuid(user.getUuid());
+        }
+        
+        activity.setActor(actor);
+
+        ActivityObject obj = new ActivityObject();
+        obj.setDisplayName(objectName);
+        obj.setObjectType(objectType);
+        if (object != null) {
+            obj.setEntityType(object.getType());
+            obj.setUuid(object.getUuid());
+        }
+        if (objectContent != null) {
+            obj.setContent(objectContent);
+        } else {
+            obj.setContent(content);
+        }
+        activity.setObject(obj);
+
+        return activity;
+    }
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public ActivityObject getActor() {
+        return actor;
+    }
+
+    public void setActor(ActivityObject actor) {
+        this.actor = actor;
+    }
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public ActivityObject getGenerator() {
+        return generator;
+    }
+
+    public void setGenerator(ActivityObject generator) {
+        this.generator = generator;
+    }
+
+    /*
+     * @JsonSerialize(include = Inclusion.NON_NULL) public String getActorName()
+     * { return actorName; }
+     * 
+     * public void setActorName(String actorName) { this.actorName = actorName;
+     * }
+     */
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public String getCategory() {
+        return category;
+    }
+
+    public void setCategory(String category) {
+        this.category = category;
+    }
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public String getVerb() {
+        return verb;
+    }
+
+    public void setVerb(String verb) {
+        this.verb = verb;
+    }
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public Long getPublished() {
+        return published;
+    }
+
+    public void setPublished(Long published) {
+        this.published = published;
+    }
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public ActivityObject getObject() {
+        return object;
+    }
+
+    public void setObject(ActivityObject object) {
+        this.object = object;
+    }
+
+    /*
+     * @JsonSerialize(include = Inclusion.NON_NULL) public String
+     * getObjectType() { return objectType; }
+     * 
+     * public void setObjectType(String objectType) { this.objectType =
+     * objectType; }
+     * 
+     * @JsonSerialize(include = Inclusion.NON_NULL) public String
+     * getObjectEntityType() { return objectEntityType; }
+     * 
+     * public void setObjectEntityType(String objectEntityType) {
+     * this.objectEntityType = objectEntityType; }
+     * 
+     * @JsonSerialize(include = Inclusion.NON_NULL) public String
+     * getObjectName() { return objectName; }
+     * 
+     * public void setObjectName(String objectName) { this.objectName =
+     * objectName; }
+     */
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public MediaLink getIcon() {
+        return icon;
+    }
+
+    public void setIcon(MediaLink icon) {
+        this.icon = icon;
+    }
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public Set<String> getConnections() {
+        return connections;
+    }
+
+    public void setConnections(Set<String> connections) {
+        this.connections = connections;
+    }
+
+    @XmlRootElement
+    static public class MediaLink {
+
+        int duration;
+
+        int height;
+
+        String url;
+
+        int width;
+
+        protected Map<String, Object> dynamic_properties = new TreeMap<String, Object>(
+                String.CASE_INSENSITIVE_ORDER);
+
+        public MediaLink() {
+        }
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public int getDuration() {
+            return duration;
+        }
+
+        public void setDuration(int duration) {
+            this.duration = duration;
+        }
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public int getHeight() {
+            return height;
+        }
+
+        public void setHeight(int height) {
+            this.height = height;
+        }
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public String getUrl() {
+            return url;
+        }
+
+        public void setUrl(String url) {
+            this.url = url;
+        }
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public int getWidth() {
+            return width;
+        }
+
+        public void setWidth(int width) {
+            this.width = width;
+        }
+
+        @JsonAnySetter
+        public void setDynamicProperty(String key, Object value) {
+            dynamic_properties.put(key, value);
+        }
+
+        @JsonAnyGetter
+        public Map<String, Object> getDynamicProperties() {
+            return dynamic_properties;
+        }
+
+        @Override
+        public String toString() {
+            return "MediaLink [duration=" + duration + ", height=" + height
+                    + ", url=" + url + ", width=" + width
+                    + ", dynamic_properties=" + dynamic_properties + "]";
+        }
+
+    }
+
+    @XmlRootElement
+    static public class ActivityObject {
+
+        ActivityObject[] attachments;
+
+        ActivityObject author;
+
+        String content;
+
+        String displayName;
+
+        String[] downstreamDuplicates;
+
+        String id;
+
+        MediaLink image;
+
+        String objectType;
+
+        Date published;
+
+        String summary;
+
+        String updated;
+
+        String upstreamDuplicates;
+
+        String url;
+
+        UUID uuid;
+
+        String entityType;
+
+        protected Map<String, Object> dynamic_properties = new TreeMap<String, Object>(
+                String.CASE_INSENSITIVE_ORDER);
+
+        public ActivityObject() {
+        }
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public ActivityObject[] getAttachments() {
+            return attachments;
+        }
+
+        public void setAttachments(ActivityObject[] attachments) {
+            this.attachments = attachments;
+        }
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public ActivityObject getAuthor() {
+            return author;
+        }
+
+        public void setAuthor(ActivityObject author) {
+            this.author = author;
+        }
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public String getContent() {
+            return content;
+        }
+
+        public void setContent(String content) {
+            this.content = content;
+        }
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public String getDisplayName() {
+            return displayName;
+        }
+
+        public void setDisplayName(String displayName) {
+            this.displayName = displayName;
+        }
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public String[] getDownstreamDuplicates() {
+            return downstreamDuplicates;
+        }
+
+        public void setDownstreamDuplicates(String[] downstreamDuplicates) {
+            this.downstreamDuplicates = downstreamDuplicates;
+        }
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public String getId() {
+            return id;
+        }
+
+        public void setId(String id) {
+            this.id = id;
+        }
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public MediaLink getImage() {
+            return image;
+        }
+
+        public void setImage(MediaLink image) {
+            this.image = image;
+        }
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public String getObjectType() {
+            return objectType;
+        }
+
+        public void setObjectType(String objectType) {
+            this.objectType = objectType;
+        }
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public Date getPublished() {
+            return published;
+        }
+
+        public void setPublished(Date published) {
+            this.published = published;
+        }
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public String getSummary() {
+            return summary;
+        }
+
+        public void setSummary(String summary) {
+            this.summary = summary;
+        }
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public String getUpdated() {
+            return updated;
+        }
+
+        public void setUpdated(String updated) {
+            this.updated = updated;
+        }
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public String getUpstreamDuplicates() {
+            return upstreamDuplicates;
+        }
+
+        public void setUpstreamDuplicates(String upstreamDuplicates) {
+            this.upstreamDuplicates = upstreamDuplicates;
+        }
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public String getUrl() {
+            return url;
+        }
+
+        public void setUrl(String url) {
+            this.url = url;
+        }
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public UUID getUuid() {
+            return uuid;
+        }
+
+        public void setUuid(UUID uuid) {
+            this.uuid = uuid;
+        }
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public String getEntityType() {
+            return entityType;
+        }
+
+        public void setEntityType(String entityType) {
+            this.entityType = entityType;
+        }
+
+        @JsonAnySetter
+        public void setDynamicProperty(String key, Object value) {
+            dynamic_properties.put(key, value);
+        }
+
+        @JsonAnyGetter
+        public Map<String, Object> getDynamicProperties() {
+            return dynamic_properties;
+        }
+
+        @Override
+        public String toString() {
+            return "ActivityObject [attachments="
+                    + Arrays.toString(attachments) + ", author=" + author
+                    + ", content=" + content + ", displayName=" + displayName
+                    + ", downstreamDuplicates="
+                    + Arrays.toString(downstreamDuplicates) + ", id=" + id
+                    + ", image=" + image + ", objectType=" + objectType
+                    + ", published=" + published + ", summary=" + summary
+                    + ", updated=" + updated + ", upstreamDuplicates="
+                    + upstreamDuplicates + ", url=" + url + ", uuid=" + uuid
+                    + ", entityType=" + entityType + ", dynamic_properties="
+                    + dynamic_properties + "]";
+        }
+
+    }
+
+    @XmlRootElement
+    static public class ActivityCollection {
+
+        int totalItems;
+
+        ActivityObject[] items;
+
+        String url;
+
+        protected Map<String, Object> dynamic_properties = new TreeMap<String, Object>(
+                String.CASE_INSENSITIVE_ORDER);
+
+        public ActivityCollection() {
+        }
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public int getTotalItems() {
+            return totalItems;
+        }
+
+        public void setTotalItems(int totalItems) {
+            this.totalItems = totalItems;
+        }
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public ActivityObject[] getItems() {
+            return items;
+        }
+
+        public void setItems(ActivityObject[] items) {
+            this.items = items;
+        }
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public String getUrl() {
+            return url;
+        }
+
+        public void setUrl(String url) {
+            this.url = url;
+        }
+
+        @JsonAnySetter
+        public void setDynamicProperty(String key, Object value) {
+            dynamic_properties.put(key, value);
+        }
+
+        @JsonAnyGetter
+        public Map<String, Object> getDynamicProperties() {
+            return dynamic_properties;
+        }
+
+        @Override
+        public String toString() {
+            return "ActivityCollection [totalItems=" + totalItems + ", items="
+                    + Arrays.toString(items) + ", url=" + url
+                    + ", dynamic_properties=" + dynamic_properties + "]";
+        }
+
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Device.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Device.java b/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Device.java
new file mode 100644
index 0000000..62947c2
--- /dev/null
+++ b/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Device.java
@@ -0,0 +1,52 @@
+package org.apache.usergrid.java.client.entities;
+
+import static com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL;
+import static org.apache.usergrid.java.client.utils.JsonUtils.getStringProperty;
+import static org.apache.usergrid.java.client.utils.JsonUtils.setStringProperty;
+
+import java.util.List;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+
+public class Device extends Entity {
+
+	public final static String ENTITY_TYPE = "device";
+
+	public final static String PROPERTY_NAME = "name";
+
+	public Device() {
+		super();
+		setType(ENTITY_TYPE);
+	}
+
+	public Device(Entity entity) {
+		super();
+		properties = entity.properties;
+		setType(ENTITY_TYPE);
+	}
+
+	@Override
+	@JsonIgnore
+	public String getNativeType() {
+		return ENTITY_TYPE;
+	}
+
+	@Override
+	@JsonIgnore
+	public List<String> getPropertyNames() {
+		List<String> properties = super.getPropertyNames();
+		properties.add(PROPERTY_NAME);
+		return properties;
+	}
+
+	@JsonSerialize(include = NON_NULL)
+	public String getName() {
+		return getStringProperty(properties, PROPERTY_NAME);
+	}
+
+	public void setName(String name) {
+		setStringProperty(properties, PROPERTY_NAME, name);
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Entity.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Entity.java b/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Entity.java
new file mode 100644
index 0000000..a306db5
--- /dev/null
+++ b/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Entity.java
@@ -0,0 +1,172 @@
+package org.apache.usergrid.java.client.entities;
+
+import static org.apache.usergrid.java.client.utils.JsonUtils.*;
+import static org.apache.usergrid.java.client.utils.MapUtils.newMapWithoutKeys;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public class Entity {
+
+    public final static String PROPERTY_UUID = "uuid";
+    public final static String PROPERTY_TYPE = "type";
+
+    protected Map<String, JsonNode> properties = new HashMap<String, JsonNode>();
+
+    public static Map<String, Class<? extends Entity>> CLASS_FOR_ENTITY_TYPE = new HashMap<String, Class<? extends Entity>>();
+    static {
+        CLASS_FOR_ENTITY_TYPE.put(User.ENTITY_TYPE, User.class);
+    }
+
+    public Entity() {
+    }
+
+    public Entity(String type) {
+        setType(type);
+    }
+
+    @JsonIgnore
+    public String getNativeType() {
+        return getType();
+    }
+
+    @JsonIgnore
+    public List<String> getPropertyNames() {
+        List<String> properties = new ArrayList<String>();
+        properties.add(PROPERTY_TYPE);
+        properties.add(PROPERTY_UUID);
+        return properties;
+    }
+
+    public String getType() {
+        return getStringProperty(properties, PROPERTY_TYPE);
+    }
+
+    public void setType(String type) {
+        setStringProperty(properties, PROPERTY_TYPE, type);
+    }
+
+    public UUID getUuid() {
+        return getUUIDProperty(properties, PROPERTY_UUID);
+    }
+
+    public void setUuid(UUID uuid) {
+        setUUIDProperty(properties, PROPERTY_UUID, uuid);
+    }
+
+    @JsonAnyGetter
+    public Map<String, JsonNode> getProperties() {
+        return newMapWithoutKeys(properties, getPropertyNames());
+    }
+
+    @JsonAnySetter
+    public void setProperty(String name, JsonNode value) {
+        if (value == null) {
+            properties.remove(name);
+        } else {
+            properties.put(name, value);
+        }
+    }
+
+  
+    /**
+     * Set the property
+     * 
+     * @param name
+     * @param value
+     */
+    public void setProperty(String name, String value) {
+        setStringProperty(properties, name, value);
+    }
+
+    /**
+     * Set the property
+     * 
+     * @param name
+     * @param value
+     */
+    public void setProperty(String name, boolean value) {
+        setBooleanProperty(properties, name, value);
+    }
+
+    /**
+     * Set the property
+     * 
+     * @param name
+     * @param value
+     */
+    public void setProperty(String name, long value) {
+        setLongProperty(properties, name, value);
+    }
+
+    /**
+     * Set the property
+     * 
+     * @param name
+     * @param value
+     */
+    public void setProperty(String name, int value) {
+        setProperty(name, (long) value);
+    }
+
+    /**
+     * Set the property
+     * 
+     * @param name
+     * @param value
+     */
+    public void setProperty(String name, float value) {
+        setFloatProperty(properties, name, value);
+    }
+
+    @Override
+    public String toString() {
+        return toJsonString(this);
+    }
+
+    public <T extends Entity> T toType(Class<T> t) {
+        return toType(this, t);
+    }
+
+    public static <T extends Entity> T toType(Entity entity, Class<T> t) {
+        if (entity == null) {
+            return null;
+        }
+        T newEntity = null;
+        if (entity.getClass().isAssignableFrom(t)) {
+            try {
+                newEntity = (t.newInstance());
+                if ((newEntity.getNativeType() != null)
+                        && newEntity.getNativeType().equals(entity.getType())) {
+                    newEntity.properties = entity.properties;
+                }
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+        }
+        return newEntity;
+    }
+
+    public static <T extends Entity> List<T> toType(List<Entity> entities,
+            Class<T> t) {
+        List<T> l = new ArrayList<T>(entities != null ? entities.size() : 0);
+        if (entities != null) {
+            for (Entity entity : entities) {
+                T newEntity = entity.toType(t);
+                if (newEntity != null) {
+                    l.add(newEntity);
+                }
+            }
+        }
+        return l;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Group.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Group.java b/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Group.java
new file mode 100644
index 0000000..12c8dff
--- /dev/null
+++ b/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Group.java
@@ -0,0 +1,63 @@
+package org.apache.usergrid.java.client.entities;
+
+import static com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL;
+import static org.apache.usergrid.java.client.utils.JsonUtils.getStringProperty;
+import static org.apache.usergrid.java.client.utils.JsonUtils.setStringProperty;
+
+import java.util.List;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+
+public class Group extends Entity {
+
+	public final static String ENTITY_TYPE = "group";
+
+	public final static String PROPERTY_PATH = "path";
+	public final static String PROPERTY_TITLE = "title";
+
+	public Group() {
+		super();
+		setType(ENTITY_TYPE);
+	}
+
+	public Group(Entity entity) {
+		super();
+		properties = entity.properties;
+		setType(ENTITY_TYPE);
+	}
+
+	@Override
+	@JsonIgnore
+	public String getNativeType() {
+		return ENTITY_TYPE;
+	}
+
+	@Override
+	@JsonIgnore
+	public List<String> getPropertyNames() {
+		List<String> properties = super.getPropertyNames();
+		properties.add(PROPERTY_PATH);
+		properties.add(PROPERTY_TITLE);
+		return properties;
+	}
+
+	@JsonSerialize(include = NON_NULL)
+	public String getPath() {
+		return getStringProperty(properties, PROPERTY_PATH);
+	}
+
+	public void setPath(String path) {
+		setStringProperty(properties, PROPERTY_PATH, path);
+	}
+
+	@JsonSerialize(include = NON_NULL)
+	public String getTitle() {
+		return getStringProperty(properties, PROPERTY_TITLE);
+	}
+
+	public void setTitle(String title) {
+		setStringProperty(properties, PROPERTY_TITLE, title);
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Message.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Message.java b/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Message.java
new file mode 100644
index 0000000..70ee86e
--- /dev/null
+++ b/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Message.java
@@ -0,0 +1,132 @@
+package org.apache.usergrid.java.client.entities;
+
+import static com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL;
+import static org.apache.usergrid.java.client.utils.JsonUtils.getBooleanProperty;
+import static org.apache.usergrid.java.client.utils.JsonUtils.getLongProperty;
+import static org.apache.usergrid.java.client.utils.JsonUtils.getStringProperty;
+import static org.apache.usergrid.java.client.utils.JsonUtils.getUUIDProperty;
+import static org.apache.usergrid.java.client.utils.JsonUtils.setBooleanProperty;
+import static org.apache.usergrid.java.client.utils.JsonUtils.setLongProperty;
+import static org.apache.usergrid.java.client.utils.JsonUtils.setStringProperty;
+import static org.apache.usergrid.java.client.utils.JsonUtils.setUUIDProperty;
+
+import java.util.List;
+import java.util.UUID;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion;
+
+public class Message extends Entity {
+
+	public static final String ENTITY_TYPE = "message";
+
+	public static final String PROPERTY_CORRELATION_ID = "correlation_id";
+	public static final String PROPERTY_DESTINATION = "destination";
+	public static final String PROPERTY_REPLY_TO = "reply_to";
+	public static final String PROPERTY_TIMESTAMP = "timestamp";
+	public static final String PROPERTY_TYPE = "type";
+	public static final String PROPERTY_CATEGORY = "category";
+	public static final String PROPERTY_INDEXED = "indexed";
+	public static final String PROPERTY_PERSISTENT = "persistent";
+
+	public Message() {
+		super();
+		setType(ENTITY_TYPE);
+	}
+
+	public Message(Entity entity) {
+		super();
+		properties = entity.properties;
+		setType(ENTITY_TYPE);
+	}
+
+	@Override
+	@JsonIgnore
+	public String getNativeType() {
+		return ENTITY_TYPE;
+	}
+
+	@Override
+	@JsonIgnore
+	public List<String> getPropertyNames() {
+		List<String> properties = super.getPropertyNames();
+		properties.add(PROPERTY_CORRELATION_ID);
+		properties.add(PROPERTY_DESTINATION);
+		properties.add(PROPERTY_REPLY_TO);
+		properties.add(PROPERTY_TIMESTAMP);
+		properties.add(PROPERTY_CATEGORY);
+		properties.add(PROPERTY_INDEXED);
+		properties.add(PROPERTY_PERSISTENT);
+		return properties;
+	}
+
+	@JsonSerialize(include = NON_NULL)
+	@JsonProperty(PROPERTY_CORRELATION_ID)
+	public UUID getCorrelationId() {
+		return getUUIDProperty(properties, PROPERTY_CORRELATION_ID);
+	}
+
+	@JsonProperty(PROPERTY_CORRELATION_ID)
+	public void setCorrelationId(UUID uuid) {
+		setUUIDProperty(properties, PROPERTY_CORRELATION_ID, uuid);
+	}
+
+	@JsonSerialize(include = NON_NULL)
+	public String getDestination() {
+		return getStringProperty(properties, PROPERTY_DESTINATION);
+	}
+
+	public void setDestination(String destination) {
+		setStringProperty(properties, PROPERTY_DESTINATION, destination);
+	}
+
+	@JsonSerialize(include = NON_NULL)
+	@JsonProperty(PROPERTY_REPLY_TO)
+	public String getReplyTo() {
+		return getStringProperty(properties, PROPERTY_DESTINATION);
+	}
+
+	@JsonProperty(PROPERTY_REPLY_TO)
+	public void setReplyTo(String replyTo) {
+		setStringProperty(properties, PROPERTY_DESTINATION, replyTo);
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public Long getTimestamp() {
+		return getLongProperty(properties, PROPERTY_TIMESTAMP);
+	}
+
+	public void setTimestamp(Long timestamp) {
+		setLongProperty(properties, PROPERTY_TIMESTAMP, timestamp);
+	}
+
+	@JsonSerialize(include = NON_NULL)
+	public String getCategory() {
+		return getStringProperty(properties, PROPERTY_CATEGORY);
+	}
+
+	public void setCategory(String category) {
+		setStringProperty(properties, PROPERTY_CATEGORY, category);
+	}
+
+	@JsonSerialize(include = NON_NULL)
+	public Boolean isIndexed() {
+		return getBooleanProperty(properties, PROPERTY_INDEXED);
+	}
+
+	public void setIndexed(Boolean indexed) {
+		setBooleanProperty(properties, PROPERTY_INDEXED, indexed);
+	}
+
+	@JsonSerialize(include = NON_NULL)
+	public Boolean isPersistent() {
+		return getBooleanProperty(properties, PROPERTY_INDEXED);
+	}
+
+	public void setPersistent(Boolean persistent) {
+		setBooleanProperty(properties, PROPERTY_INDEXED, persistent);
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/User.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/User.java b/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/User.java
new file mode 100644
index 0000000..e249896
--- /dev/null
+++ b/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/User.java
@@ -0,0 +1,142 @@
+package org.apache.usergrid.java.client.entities;
+
+import static com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL;
+import static org.apache.usergrid.java.client.utils.JsonUtils.getBooleanProperty;
+import static org.apache.usergrid.java.client.utils.JsonUtils.getStringProperty;
+import static org.apache.usergrid.java.client.utils.JsonUtils.setBooleanProperty;
+import static org.apache.usergrid.java.client.utils.JsonUtils.setStringProperty;
+
+import java.util.List;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+
+public class User extends Entity {
+
+	public final static String ENTITY_TYPE = "user";
+
+	public final static String PROPERTY_USERNAME = "username";
+	public final static String PROPERTY_EMAIL = "email";
+	public final static String PROPERTY_NAME = "name";
+	public final static String PROPERTY_FIRSTNAME = "firstname";
+	public final static String PROPERTY_MIDDLENAME = "middlename";
+	public final static String PROPERTY_LASTNAME = "lastname";
+	public final static String PROPERTY_ACTIVATED = "activated";
+	public final static String PROPERTY_PICTURE = "picture";
+	public final static String PROPERTY_DISABLED = "disabled";
+
+	public User() {
+		super();
+		setType(ENTITY_TYPE);
+	}
+
+	public User(Entity entity) {
+		super();
+		properties = entity.properties;
+		setType(ENTITY_TYPE);
+	}
+
+	@Override
+	@JsonIgnore
+	public String getNativeType() {
+		return ENTITY_TYPE;
+	}
+
+	@Override
+	@JsonIgnore
+	public List<String> getPropertyNames() {
+		List<String> properties = super.getPropertyNames();
+		properties.add(PROPERTY_USERNAME);
+		properties.add(PROPERTY_EMAIL);
+		properties.add(PROPERTY_NAME);
+		properties.add(PROPERTY_FIRSTNAME);
+		properties.add(PROPERTY_MIDDLENAME);
+		properties.add(PROPERTY_LASTNAME);
+		properties.add(PROPERTY_ACTIVATED);
+		properties.add(PROPERTY_PICTURE);
+		properties.add(PROPERTY_DISABLED);
+		return properties;
+	}
+
+	@JsonSerialize(include = NON_NULL)
+	public String getUsername() {
+		return getStringProperty(properties, PROPERTY_USERNAME);
+	}
+
+	public void setUsername(String username) {
+		setStringProperty(properties, PROPERTY_USERNAME, username);
+	}
+
+	@JsonSerialize(include = NON_NULL)
+	public String getName() {
+		return getStringProperty(properties, PROPERTY_NAME);
+	}
+
+	public void setName(String name) {
+		setStringProperty(properties, PROPERTY_NAME, name);
+	}
+
+	@JsonSerialize(include = NON_NULL)
+	public String getEmail() {
+		return getStringProperty(properties, PROPERTY_EMAIL);
+	}
+
+	public void setEmail(String email) {
+		setStringProperty(properties, PROPERTY_EMAIL, email);
+	}
+
+	@JsonSerialize(include = NON_NULL)
+	public Boolean isActivated() {
+		return getBooleanProperty(properties, PROPERTY_ACTIVATED);
+	}
+
+	public void setActivated(Boolean activated) {
+		setBooleanProperty(properties, PROPERTY_ACTIVATED, activated);
+	}
+
+	@JsonSerialize(include = NON_NULL)
+	public Boolean isDisabled() {
+		return getBooleanProperty(properties, PROPERTY_DISABLED);
+	}
+
+	public void setDisabled(Boolean disabled) {
+		setBooleanProperty(properties, PROPERTY_DISABLED, disabled);
+	}
+
+	@JsonSerialize(include = NON_NULL)
+	public String getFirstname() {
+		return getStringProperty(properties, PROPERTY_FIRSTNAME);
+	}
+
+	public void setFirstname(String firstname) {
+		setStringProperty(properties, PROPERTY_FIRSTNAME, firstname);
+	}
+
+	@JsonSerialize(include = NON_NULL)
+	public String getMiddlename() {
+		return getStringProperty(properties, PROPERTY_MIDDLENAME);
+	}
+
+	public void setMiddlename(String middlename) {
+		setStringProperty(properties, PROPERTY_MIDDLENAME, middlename);
+	}
+
+	@JsonSerialize(include = NON_NULL)
+	public String getLastname() {
+		return getStringProperty(properties, PROPERTY_LASTNAME);
+	}
+
+	public void setLastname(String lastname) {
+		setStringProperty(properties, PROPERTY_LASTNAME, lastname);
+	}
+
+	@JsonSerialize(include = NON_NULL)
+	public String getPicture() {
+		return getStringProperty(properties, PROPERTY_PICTURE);
+	}
+
+	public void setPicture(String picture) {
+		setStringProperty(properties, PROPERTY_PICTURE, picture);
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/apache/usergrid/java/client/exception/ClientException.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/apache/usergrid/java/client/exception/ClientException.java b/sdks/java/src/main/java/org/apache/usergrid/java/client/exception/ClientException.java
new file mode 100644
index 0000000..f85e2fe
--- /dev/null
+++ b/sdks/java/src/main/java/org/apache/usergrid/java/client/exception/ClientException.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ * 
+ * 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.java.client.exception;
+
+/**
+ * Simple wrapper for client exceptions
+ * @author tnine
+ *
+ */
+public class ClientException extends RuntimeException{
+
+    /**
+     * 
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * @param message
+     * @param cause
+     */
+    public ClientException(String message, Throwable cause) {
+        super(message, cause);
+    }
+    
+    
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/apache/usergrid/java/client/response/AggregateCounter.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/apache/usergrid/java/client/response/AggregateCounter.java b/sdks/java/src/main/java/org/apache/usergrid/java/client/response/AggregateCounter.java
new file mode 100644
index 0000000..b0ba4ec
--- /dev/null
+++ b/sdks/java/src/main/java/org/apache/usergrid/java/client/response/AggregateCounter.java
@@ -0,0 +1,36 @@
+package org.apache.usergrid.java.client.response;
+
+import static org.apache.usergrid.java.client.utils.JsonUtils.toJsonString;
+
+public class AggregateCounter {
+
+	private long timestamp;
+	private long value;
+
+	public AggregateCounter(long timestamp, long value) {
+		this.timestamp = timestamp;
+		this.value = value;
+	}
+
+	public long getTimestamp() {
+		return timestamp;
+	}
+
+	public void setTimestamp(long timestamp) {
+		this.timestamp = timestamp;
+	}
+
+	public long getValue() {
+		return value;
+	}
+
+	public void setValue(long value) {
+		this.value = value;
+	}
+
+	@Override
+	public String toString() {
+		return toJsonString(this);
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/apache/usergrid/java/client/response/AggregateCounterSet.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/apache/usergrid/java/client/response/AggregateCounterSet.java b/sdks/java/src/main/java/org/apache/usergrid/java/client/response/AggregateCounterSet.java
new file mode 100644
index 0000000..a392b5f
--- /dev/null
+++ b/sdks/java/src/main/java/org/apache/usergrid/java/client/response/AggregateCounterSet.java
@@ -0,0 +1,95 @@
+package org.apache.usergrid.java.client.response;
+
+import static org.apache.usergrid.java.client.utils.JsonUtils.toJsonString;
+
+import java.util.List;
+import java.util.UUID;
+
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion;
+
+public class AggregateCounterSet {
+	private String name;
+	private UUID user;
+	private UUID group;
+	private UUID queue;
+	private String category;
+	private List<AggregateCounter> values;
+
+	public AggregateCounterSet(String name, UUID user, UUID group,
+			String category, List<AggregateCounter> values) {
+		this.name = name;
+		this.user = user;
+		this.group = group;
+		this.category = category;
+		this.values = values;
+	}
+
+	public AggregateCounterSet(String name, UUID queue, String category,
+			List<AggregateCounter> values) {
+		this.name = name;
+		setQueue(queue);
+		this.category = category;
+		this.values = values;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public UUID getUser() {
+		return user;
+	}
+
+	public void setUser(UUID user) {
+		this.user = user;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public UUID getGroup() {
+		return group;
+	}
+
+	public void setGroup(UUID group) {
+		this.group = group;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public String getCategory() {
+		return category;
+	}
+
+	public void setCategory(String category) {
+		this.category = category;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public List<AggregateCounter> getValues() {
+		return values;
+	}
+
+	public void setValues(List<AggregateCounter> values) {
+		this.values = values;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public UUID getQueue() {
+		return queue;
+	}
+
+	public void setQueue(UUID queue) {
+		this.queue = queue;
+	}
+
+	@Override
+	public String toString() {
+		return toJsonString(this);
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/apache/usergrid/java/client/response/ApiResponse.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/apache/usergrid/java/client/response/ApiResponse.java b/sdks/java/src/main/java/org/apache/usergrid/java/client/response/ApiResponse.java
new file mode 100644
index 0000000..188ccef
--- /dev/null
+++ b/sdks/java/src/main/java/org/apache/usergrid/java/client/response/ApiResponse.java
@@ -0,0 +1,406 @@
+package org.apache.usergrid.java.client.response;
+
+import static org.apache.usergrid.java.client.utils.JsonUtils.toJsonString;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion;
+
+import org.apache.usergrid.java.client.entities.Entity;
+import org.apache.usergrid.java.client.entities.Message;
+import org.apache.usergrid.java.client.entities.User;
+
+public class ApiResponse {
+
+	private String accessToken;
+
+	private String error;
+	private String errorDescription;
+	private String errorUri;
+	private String exception;
+
+	private String path;
+	private String uri;
+	private String status;
+	private long timestamp;
+	private UUID application;
+	private List<Entity> entities;
+	private UUID next;
+	private String cursor;
+	private String action;
+	private List<Object> list;
+	private Object data;
+	private Map<String, UUID> applications;
+	private Map<String, JsonNode> metadata;
+	private Map<String, List<String>> params;
+	private List<AggregateCounterSet> counters;
+	private ClientCredentialsInfo credentials;
+
+	private List<Message> messages;
+	private List<QueueInfo> queues;
+	private UUID last;
+	private UUID queue;
+	private UUID consumer;
+
+	private User user;
+
+	private final Map<String, JsonNode> properties = new HashMap<String, JsonNode>();
+
+	public ApiResponse() {
+	}
+
+	@JsonAnyGetter
+	public Map<String, JsonNode> getProperties() {
+		return properties;
+	}
+
+	@JsonAnySetter
+	public void setProperty(String key, JsonNode value) {
+		properties.put(key, value);
+	}
+
+	@JsonProperty("access_token")
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public String getAccessToken() {
+		return accessToken;
+	}
+
+	@JsonProperty("access_token")
+	public void setAccessToken(String accessToken) {
+		this.accessToken = accessToken;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public String getError() {
+		return error;
+	}
+
+	public void setError(String error) {
+		this.error = error;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	@JsonProperty("error_description")
+	public String getErrorDescription() {
+		return errorDescription;
+	}
+
+	@JsonProperty("error_description")
+	public void setErrorDescription(String errorDescription) {
+		this.errorDescription = errorDescription;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	@JsonProperty("error_uri")
+	public String getErrorUri() {
+		return errorUri;
+	}
+
+	@JsonProperty("error_uri")
+	public void setErrorUri(String errorUri) {
+		this.errorUri = errorUri;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public String getException() {
+		return exception;
+	}
+
+	public void setException(String exception) {
+		this.exception = exception;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public String getPath() {
+		return path;
+	}
+
+	public void setPath(String path) {
+		this.path = path;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public String getUri() {
+		return uri;
+	}
+
+	public void setUri(String uri) {
+		this.uri = uri;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public String getStatus() {
+		return status;
+	}
+
+	public void setStatus(String status) {
+		this.status = status;
+	}
+
+	public long getTimestamp() {
+		return timestamp;
+	}
+
+	public void setTimestamp(long timestamp) {
+		this.timestamp = timestamp;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public UUID getApplication() {
+		return application;
+	}
+
+	public void setApplication(UUID application) {
+		this.application = application;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public List<Entity> getEntities() {
+		return entities;
+	}
+
+	public void setEntities(List<Entity> entities) {
+		this.entities = entities;
+	}
+
+	public int getEntityCount() {
+		if (entities == null) {
+			return 0;
+		}
+		return entities.size();
+	}
+
+	public Entity getFirstEntity() {
+		if ((entities != null) && (entities.size() > 0)) {
+			return entities.get(0);
+		}
+		return null;
+	}
+
+	public <T extends Entity> T getFirstEntity(Class<T> t) {
+		return Entity.toType(getFirstEntity(), t);
+	}
+
+	public Entity getLastEntity() {
+		if ((entities != null) && (entities.size() > 0)) {
+			return entities.get(entities.size() - 1);
+		}
+		return null;
+	}
+
+	public <T extends Entity> T getLastEntity(Class<T> t) {
+		return Entity.toType(getLastEntity(), t);
+	}
+
+	public <T extends Entity> List<T> getEntities(Class<T> t) {
+		return Entity.toType(entities, t);
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public UUID getNext() {
+		return next;
+	}
+
+	public void setNext(UUID next) {
+		this.next = next;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public String getCursor() {
+		return cursor;
+	}
+
+	public void setCursor(String cursor) {
+		this.cursor = cursor;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public String getAction() {
+		return action;
+	}
+
+	public void setAction(String action) {
+		this.action = action;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public List<Object> getList() {
+		return list;
+	}
+
+	public void setList(List<Object> list) {
+		this.list = list;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public Object getData() {
+		return data;
+	}
+
+	public void setData(Object data) {
+		this.data = data;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public Map<String, UUID> getApplications() {
+		return applications;
+	}
+
+	public void setApplications(Map<String, UUID> applications) {
+		this.applications = applications;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public Map<String, JsonNode> getMetadata() {
+		return metadata;
+	}
+
+	public void setMetadata(Map<String, JsonNode> metadata) {
+		this.metadata = metadata;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public Map<String, List<String>> getParams() {
+		return params;
+	}
+
+	public void setParams(Map<String, List<String>> params) {
+		this.params = params;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public List<AggregateCounterSet> getCounters() {
+		return counters;
+	}
+
+	public void setCounters(List<AggregateCounterSet> counters) {
+		this.counters = counters;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public ClientCredentialsInfo getCredentials() {
+		return credentials;
+	}
+
+	public void setCredentials(ClientCredentialsInfo credentials) {
+		this.credentials = credentials;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public User getUser() {
+		return user;
+	}
+
+	public void setUser(User user) {
+		this.user = user;
+	}
+
+	@Override
+	public String toString() {
+		return toJsonString(this);
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public List<Message> getMessages() {
+		return messages;
+	}
+
+	public void setMessages(List<Message> messages) {
+		this.messages = messages;
+	}
+
+	@JsonIgnore
+	public int getMessageCount() {
+		if (messages == null) {
+			return 0;
+		}
+		return messages.size();
+	}
+
+	@JsonIgnore
+	public Message getFirstMessage() {
+		if ((messages != null) && (messages.size() > 0)) {
+			return messages.get(0);
+		}
+		return null;
+	}
+
+	@JsonIgnore
+	public Entity getLastMessage() {
+		if ((messages != null) && (messages.size() > 0)) {
+			return messages.get(messages.size() - 1);
+		}
+		return null;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public UUID getLast() {
+		return last;
+	}
+
+	public void setLast(UUID last) {
+		this.last = last;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public List<QueueInfo> getQueues() {
+		return queues;
+	}
+
+	public void setQueues(List<QueueInfo> queues) {
+		this.queues = queues;
+	}
+
+	@JsonIgnore
+	public QueueInfo getFirstQueue() {
+		if ((queues != null) && (queues.size() > 0)) {
+			return queues.get(0);
+		}
+		return null;
+	}
+
+	@JsonIgnore
+	public QueueInfo getLastQueue() {
+		if ((queues != null) && (queues.size() > 0)) {
+			return queues.get(queues.size() - 1);
+		}
+		return null;
+	}
+
+	@JsonIgnore
+	public UUID getLastQueueId() {
+		QueueInfo q = getLastQueue();
+		if (q != null) {
+			return q.getQueue();
+		}
+		return null;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public UUID getQueue() {
+		return queue;
+	}
+
+	public void setQueue(UUID queue) {
+		this.queue = queue;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public UUID getConsumer() {
+		return consumer;
+	}
+
+	public void setConsumer(UUID consumer) {
+		this.consumer = consumer;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/apache/usergrid/java/client/response/ClientCredentialsInfo.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/apache/usergrid/java/client/response/ClientCredentialsInfo.java b/sdks/java/src/main/java/org/apache/usergrid/java/client/response/ClientCredentialsInfo.java
new file mode 100644
index 0000000..d23414b
--- /dev/null
+++ b/sdks/java/src/main/java/org/apache/usergrid/java/client/response/ClientCredentialsInfo.java
@@ -0,0 +1,42 @@
+package org.apache.usergrid.java.client.response;
+
+import static org.apache.usergrid.java.client.utils.JsonUtils.toJsonString;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class ClientCredentialsInfo {
+
+	private String id;
+	private String secret;
+
+	public ClientCredentialsInfo(String id, String secret) {
+		this.id = id;
+		this.secret = secret;
+	}
+
+	@JsonProperty("client_id")
+	public String getId() {
+		return id;
+	}
+
+	@JsonProperty("client_id")
+	public void setId(String id) {
+		this.id = id;
+	}
+
+	@JsonProperty("client_secret")
+	public String getSecret() {
+		return secret;
+	}
+
+	@JsonProperty("client_secret")
+	public void setSecret(String secret) {
+		this.secret = secret;
+	}
+
+	@Override
+	public String toString() {
+		return toJsonString(this);
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/apache/usergrid/java/client/response/QueueInfo.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/apache/usergrid/java/client/response/QueueInfo.java b/sdks/java/src/main/java/org/apache/usergrid/java/client/response/QueueInfo.java
new file mode 100644
index 0000000..c0072bc
--- /dev/null
+++ b/sdks/java/src/main/java/org/apache/usergrid/java/client/response/QueueInfo.java
@@ -0,0 +1,28 @@
+package org.apache.usergrid.java.client.response;
+
+import java.util.UUID;
+
+public class QueueInfo {
+
+	String path;
+	UUID queue;
+
+	public QueueInfo() {
+	}
+
+	public String getPath() {
+		return path;
+	}
+
+	public void setPath(String path) {
+		this.path = path;
+	}
+
+	public UUID getQueue() {
+		return queue;
+	}
+
+	public void setQueue(UUID queue) {
+		this.queue = queue;
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/apache/usergrid/java/client/utils/JsonUtils.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/apache/usergrid/java/client/utils/JsonUtils.java b/sdks/java/src/main/java/org/apache/usergrid/java/client/utils/JsonUtils.java
new file mode 100644
index 0000000..81f287d
--- /dev/null
+++ b/sdks/java/src/main/java/org/apache/usergrid/java/client/utils/JsonUtils.java
@@ -0,0 +1,167 @@
+package org.apache.usergrid.java.client.utils;
+
+import java.io.IOException;
+import java.util.Map;
+import java.util.UUID;
+
+import com.fasterxml.jackson.core.JsonGenerationException;
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.JsonMappingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.JsonNodeFactory;
+
+import org.apache.usergrid.java.client.exception.ClientException;
+
+public class JsonUtils {
+
+
+	static ObjectMapper mapper = new ObjectMapper();
+
+	public static String getStringProperty(Map<String, JsonNode> properties,
+			String name) {
+		JsonNode value = properties.get(name);
+		if (value != null) {
+			return value.asText();
+		}
+		return null;
+	}
+
+	public static void setStringProperty(Map<String, JsonNode> properties,
+			String name, String value) {
+		if (value == null) {
+			properties.remove(name);
+		} else {
+			properties.put(name, JsonNodeFactory.instance.textNode(value));
+		}
+	}
+
+	public static Long getLongProperty(Map<String, JsonNode> properties,
+			String name) {
+		JsonNode value = properties.get(name);
+		if (value != null) {
+			return value.asLong(0);
+		}
+		return null;
+	}
+
+	public static void setLongProperty(Map<String, JsonNode> properties,
+			String name, Long value) {
+		if (value == null) {
+			properties.remove(name);
+		} else {
+			properties.put(name, JsonNodeFactory.instance.numberNode(value));
+		}
+	}
+
+	public static void setFloatProperty(Map<String, JsonNode> properties, String name, Float value){
+	    if(value == null){
+	        properties.remove(name);
+	    }else{
+	        properties.put(name, JsonNodeFactory.instance.numberNode(value));
+	    }
+	}
+	
+	public static Boolean getBooleanProperty(Map<String, JsonNode> properties,
+			String name) {
+		JsonNode value = properties.get(name);
+		if (value != null) {
+			return value.asBoolean();
+		}
+		return false;
+	}
+
+	public static void setBooleanProperty(Map<String, JsonNode> properties,
+			String name, Boolean value) {
+		if (value == null) {
+			properties.remove(name);
+		} else {
+			properties.put(name, JsonNodeFactory.instance.booleanNode(value));
+		}
+	}
+
+	public static UUID getUUIDProperty(Map<String, JsonNode> properties,
+			String name) {
+		JsonNode value = properties.get(name);
+		if (value != null) {
+			UUID uuid = null;
+			try {
+				uuid = UUID.fromString(value.asText());
+			} catch (Exception e) {
+			}
+			return uuid;
+		}
+		return null;
+	}
+
+	public static void setUUIDProperty(Map<String, JsonNode> properties,
+			String name, UUID value) {
+		if (value == null) {
+			properties.remove(name);
+		} else {
+			properties.put(name,
+					JsonNodeFactory.instance.textNode(value.toString()));
+		}
+	}
+
+	public static String toJsonString(Object obj) {
+		try {
+			return mapper.writeValueAsString(obj);
+		} catch (JsonGenerationException e) {
+			throw new ClientException("Unable to generate json", e);
+		} catch (JsonMappingException e) {
+		    throw new ClientException("Unable to map json", e);
+		} catch (IOException e) {
+		    throw new ClientException("IO error", e);
+		}
+	}
+
+	public static <T> T parse(String json, Class<T> c) {
+		try {
+			return mapper.readValue(json, c);
+		} catch (JsonGenerationException e) {
+            throw new ClientException("Unable to generate json", e);
+        } catch (JsonMappingException e) {
+            throw new ClientException("Unable to map json", e);
+        } catch (IOException e) {
+            throw new ClientException("IO error", e);
+        }
+	}
+
+	public static JsonNode toJsonNode(Object obj) {
+		return mapper.convertValue(obj, JsonNode.class);
+	}
+
+	public static <T> T fromJsonNode(JsonNode json, Class<T> c) {
+		try {
+			JsonParser jp = json.traverse();
+			return mapper.readValue(jp, c);
+		} catch (JsonGenerationException e) {
+            throw new ClientException("Unable to generate json", e);
+        } catch (JsonMappingException e) {
+            throw new ClientException("Unable to map json", e);
+        } catch (IOException e) {
+            throw new ClientException("IO error", e);
+        }
+	}
+
+	public static <T> T getObjectProperty(Map<String, JsonNode> properties,
+			String name, Class<T> c) {
+		JsonNode value = properties.get(name);
+		if (value != null) {
+			return fromJsonNode(value, c);
+		}
+		return null;
+	}
+
+	public static void setObjectProperty(Map<String, JsonNode> properties,
+			String name, Object value) {
+		if (value == null) {
+			properties.remove(name);
+		} else {
+			properties.put(name,
+					JsonNodeFactory.instance.textNode(value.toString()));
+		}
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/apache/usergrid/java/client/utils/MapUtils.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/apache/usergrid/java/client/utils/MapUtils.java b/sdks/java/src/main/java/org/apache/usergrid/java/client/utils/MapUtils.java
new file mode 100644
index 0000000..f7e4a1c
--- /dev/null
+++ b/sdks/java/src/main/java/org/apache/usergrid/java/client/utils/MapUtils.java
@@ -0,0 +1,23 @@
+package org.apache.usergrid.java.client.utils;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class MapUtils {
+
+	public static <T> Map<String, T> newMapWithoutKeys(Map<String, T> map,
+			List<String> keys) {
+		Map<String, T> newMap = null;
+		if (map != null) {
+			newMap = new HashMap<String, T>(map);
+		} else {
+			newMap = new HashMap<String, T>();
+		}
+		for (String key : keys) {
+			newMap.remove(key);
+		}
+		return newMap;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/apache/usergrid/java/client/utils/ObjectUtils.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/apache/usergrid/java/client/utils/ObjectUtils.java b/sdks/java/src/main/java/org/apache/usergrid/java/client/utils/ObjectUtils.java
new file mode 100644
index 0000000..c47002b
--- /dev/null
+++ b/sdks/java/src/main/java/org/apache/usergrid/java/client/utils/ObjectUtils.java
@@ -0,0 +1,20 @@
+package org.apache.usergrid.java.client.utils;
+
+import java.util.Map;
+
+public class ObjectUtils {
+
+	public static boolean isEmpty(Object s) {
+		if (s == null) {
+			return true;
+		}
+		if ((s instanceof String) && (((String) s).trim().length() == 0)) {
+			return true;
+		}
+		if (s instanceof Map) {
+			return ((Map<?, ?>) s).isEmpty();
+		}
+		return false;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/apache/usergrid/java/client/utils/UrlUtils.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/apache/usergrid/java/client/utils/UrlUtils.java b/sdks/java/src/main/java/org/apache/usergrid/java/client/utils/UrlUtils.java
new file mode 100644
index 0000000..e2d101e
--- /dev/null
+++ b/sdks/java/src/main/java/org/apache/usergrid/java/client/utils/UrlUtils.java
@@ -0,0 +1,108 @@
+package org.apache.usergrid.java.client.utils;
+
+import static java.net.URLEncoder.encode;
+import static org.apache.usergrid.java.client.utils.ObjectUtils.isEmpty;
+
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.apache.usergrid.java.client.exception.ClientException;
+
+public class UrlUtils {
+
+   
+    public static URL url(String s) {
+        try {
+            return new URL(s);
+        } catch (MalformedURLException e) {
+            throw new ClientException("Incorrect URL format", e);
+        }
+    }
+
+    public static URL url(URL u, String s) {
+        try {
+            return new URL(u, s);
+        } catch (MalformedURLException e) {
+            throw new ClientException("Incorrect URL format", e);
+        }
+    }
+
+    public static String path(Object... segments) {
+        String path = "";
+        boolean first = true;
+        for (Object segment : segments) {
+            if (segment instanceof Object[]) {
+                segment = path((Object[]) segment);
+            }
+            if (!isEmpty(segment)) {
+                if (first) {
+                    path = segment.toString();
+                    first = false;
+                } else {
+                    if (!path.endsWith("/")) {
+                        path += "/";
+                    }
+                    path += segment.toString();
+                }
+            }
+        }
+        return path;
+    }
+
+    @SuppressWarnings("rawtypes")
+    public static String encodeParams(Map<String, Object> params) {
+        if (params == null) {
+            return "";
+        }
+        boolean first = true;
+        StringBuilder results = new StringBuilder();
+        for (Entry<String, Object> entry : params.entrySet()) {
+            if (entry.getValue() instanceof List) {
+                for (Object o : (List) entry.getValue()) {
+                    if (!isEmpty(o)) {
+                        if (!first) {
+                            results.append('&');
+                        }
+                        first = false;
+                        results.append(entry.getKey());
+                        results.append("=");
+                        try {
+                            results.append(encode(o.toString(), "UTF-8"));
+                        } catch (UnsupportedEncodingException e) {
+                            throw new ClientException("Unknown encoding", e);
+                        }
+                    }
+                }
+            } else if (!isEmpty(entry.getValue())) {
+                if (!first) {
+                    results.append('&');
+                }
+                first = false;
+                results.append(entry.getKey());
+                results.append("=");
+                try {
+                    results.append(encode(entry.getValue().toString(), "UTF-8"));
+                } catch (UnsupportedEncodingException e) {
+                    throw new ClientException("Unsupported string encoding", e);
+                }
+            }
+        }
+        return results.toString();
+    }
+
+    public static String addQueryParams(String url, Map<String, Object> params) {
+        if (params == null) {
+            return url;
+        }
+        if (!url.contains("?")) {
+            url += "?";
+        }
+        url += encodeParams(params);
+        return url;
+    }
+
+}


[56/96] [abbrv] USERGRID-2 package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Activity.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Activity.java b/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Activity.java
new file mode 100644
index 0000000..f2b77bd
--- /dev/null
+++ b/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Activity.java
@@ -0,0 +1,627 @@
+/*******************************************************************************
+ * Copyright (c) 2010, 2011 Ed Anuff and Usergrid, all rights reserved.
+ * http://www.usergrid.com
+ * 
+ * This file is part of Usergrid Core.
+ * 
+ * Usergrid Core is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version.
+ * 
+ * Usergrid Core is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License along with
+ * Usergrid Core. If not, see <http://www.gnu.org/licenses/>.
+ ******************************************************************************/
+package org.apache.usergrid.java.client.entities;
+
+
+import static org.apache.usergrid.java.client.utils.JsonUtils.getStringProperty;
+
+import java.util.Arrays;
+import java.util.Date;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.UUID;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion;
+
+/**
+ * An entity type for representing activity stream actions. These are similar to
+ * the more generic message entity type except provide the necessary properties
+ * for supporting activity stream implementations.
+ * 
+ * @see http://activitystrea.ms/specs/json/1.0/
+ */
+public class Activity extends Entity {
+
+    public static final String ENTITY_TYPE = "activity";
+
+    public static final String PROP_ACTOR = "actor";
+
+    public static final String VERB_ADD = "add";
+    public static final String VERB_CANCEL = "cancel";
+    public static final String VERB_CHECKIN = "checkin";
+    public static final String VERB_DELETE = "delete";
+    public static final String VERB_FAVORITE = "favorite";
+    public static final String VERB_FOLLOW = "follow";
+    public static final String VERB_GIVE = "give";
+    public static final String VERB_IGNORE = "ignore";
+    public static final String VERB_INVITE = "invite";
+    public static final String VERB_JOIN = "join";
+    public static final String VERB_LEAVE = "leave";
+    public static final String VERB_LIKE = "like";
+    public static final String VERB_MAKE_FRIEND = "make-friend";
+    public static final String VERB_PLAY = "play";
+    public static final String VERB_POST = "post";
+    public static final String VERB_RECEIVE = "receive";
+    public static final String VERB_REMOVE = "remove";
+    public static final String VERB_REMOVE_FRIEND = "remove-friend";
+    public static final String VERB_REQUEST_FRIEND = "request-friend";
+    public static final String VERB_RSVP_MAYBE = "rsvp-maybe";
+    public static final String VERB_RSVP_NO = "rsvp-no";
+    public static final String VERB_RSVP_YES = "rsvp-yes";
+    public static final String VERB_SAVE = "save";
+    public static final String VERB_SHARE = "share";
+    public static final String VERB_STOP_FOLLOWING = "stop-following";
+    public static final String VERB_TAG = "tag";
+    public static final String VERB_UNFAVORITE = "unfavorite";
+    public static final String VERB_UNLIKE = "unlike";
+    public static final String VERB_UNSAVE = "unsave";
+    public static final String VERB_UPDATE = "update";
+
+    public static final String OBJECT_TYPE_ARTICLE = "article";
+    public static final String OBJECT_TYPE_AUDIO = "audio";
+    public static final String OBJECT_TYPE_BADGE = "badge";
+    public static final String OBJECT_TYPE_BOOKMARK = "bookmark";
+    public static final String OBJECT_TYPE_COLLECTION = "collection";
+    public static final String OBJECT_TYPE_COMMENT = "comment";
+    public static final String OBJECT_TYPE_EVENT = "event";
+    public static final String OBJECT_TYPE_FILE = "file";
+    public static final String OBJECT_TYPE_GROUP = "group";
+    public static final String OBJECT_TYPE_IMAGE = "image";
+    public static final String OBJECT_TYPE_NOTE = "note";
+    public static final String OBJECT_TYPE_PERSON = "person";
+    public static final String OBJECT_TYPE_PLACE = "place";
+    public static final String OBJECT_TYPE_PRODUCT = "product";
+    public static final String OBJECT_TYPE_QUESTION = "question";
+    public static final String OBJECT_TYPE_REVIEW = "review";
+    public static final String OBJECT_TYPE_SERVICE = "service";
+    public static final String OBJECT_TYPE_VIDEO = "video";
+
+    protected ActivityObject actor;
+
+    protected String content;
+
+    protected ActivityObject generator;
+
+    protected MediaLink icon;
+
+    protected String category;
+
+    protected String verb;
+
+    protected Long published;
+
+    protected ActivityObject object;
+
+    // protected
+    // String objectType;
+
+    // protected
+    // String objectEntityType;
+
+    // protected
+    // String objectName;
+
+    protected String title;
+
+    protected Set<String> connections;
+
+    public Activity() {
+        setType("activity");
+    }
+
+    public Activity(UUID id) {
+        this();
+        setUuid(id);
+    }
+
+    public static Activity newActivity(String verb, String title,
+            String content, String category, Entity user, Entity object,
+            String objectType, String objectName, String objectContent){
+
+        Activity activity = new Activity();
+        activity.setVerb(verb);
+        activity.setCategory(category);
+        activity.setContent(content);
+        activity.setTitle(title);
+        
+        ActivityObject actor = new ActivityObject();
+        actor.setObjectType("person");
+        
+        if (user != null) {
+            actor.setDisplayName(getStringProperty(user.properties, "name"));
+            actor.setEntityType(user.getType());
+            actor.setUuid(user.getUuid());
+        }
+        
+        activity.setActor(actor);
+
+        ActivityObject obj = new ActivityObject();
+        obj.setDisplayName(objectName);
+        obj.setObjectType(objectType);
+        if (object != null) {
+            obj.setEntityType(object.getType());
+            obj.setUuid(object.getUuid());
+        }
+        if (objectContent != null) {
+            obj.setContent(objectContent);
+        } else {
+            obj.setContent(content);
+        }
+        activity.setObject(obj);
+
+        return activity;
+    }
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public ActivityObject getActor() {
+        return actor;
+    }
+
+    public void setActor(ActivityObject actor) {
+        this.actor = actor;
+    }
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public ActivityObject getGenerator() {
+        return generator;
+    }
+
+    public void setGenerator(ActivityObject generator) {
+        this.generator = generator;
+    }
+
+    /*
+     * @JsonSerialize(include = Inclusion.NON_NULL) public String getActorName()
+     * { return actorName; }
+     * 
+     * public void setActorName(String actorName) { this.actorName = actorName;
+     * }
+     */
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public String getCategory() {
+        return category;
+    }
+
+    public void setCategory(String category) {
+        this.category = category;
+    }
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public String getVerb() {
+        return verb;
+    }
+
+    public void setVerb(String verb) {
+        this.verb = verb;
+    }
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public Long getPublished() {
+        return published;
+    }
+
+    public void setPublished(Long published) {
+        this.published = published;
+    }
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public ActivityObject getObject() {
+        return object;
+    }
+
+    public void setObject(ActivityObject object) {
+        this.object = object;
+    }
+
+    /*
+     * @JsonSerialize(include = Inclusion.NON_NULL) public String
+     * getObjectType() { return objectType; }
+     * 
+     * public void setObjectType(String objectType) { this.objectType =
+     * objectType; }
+     * 
+     * @JsonSerialize(include = Inclusion.NON_NULL) public String
+     * getObjectEntityType() { return objectEntityType; }
+     * 
+     * public void setObjectEntityType(String objectEntityType) {
+     * this.objectEntityType = objectEntityType; }
+     * 
+     * @JsonSerialize(include = Inclusion.NON_NULL) public String
+     * getObjectName() { return objectName; }
+     * 
+     * public void setObjectName(String objectName) { this.objectName =
+     * objectName; }
+     */
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public MediaLink getIcon() {
+        return icon;
+    }
+
+    public void setIcon(MediaLink icon) {
+        this.icon = icon;
+    }
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public Set<String> getConnections() {
+        return connections;
+    }
+
+    public void setConnections(Set<String> connections) {
+        this.connections = connections;
+    }
+
+    @XmlRootElement
+    static public class MediaLink {
+
+        int duration;
+
+        int height;
+
+        String url;
+
+        int width;
+
+        protected Map<String, Object> dynamic_properties = new TreeMap<String, Object>(
+                String.CASE_INSENSITIVE_ORDER);
+
+        public MediaLink() {
+        }
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public int getDuration() {
+            return duration;
+        }
+
+        public void setDuration(int duration) {
+            this.duration = duration;
+        }
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public int getHeight() {
+            return height;
+        }
+
+        public void setHeight(int height) {
+            this.height = height;
+        }
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public String getUrl() {
+            return url;
+        }
+
+        public void setUrl(String url) {
+            this.url = url;
+        }
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public int getWidth() {
+            return width;
+        }
+
+        public void setWidth(int width) {
+            this.width = width;
+        }
+
+        @JsonAnySetter
+        public void setDynamicProperty(String key, Object value) {
+            dynamic_properties.put(key, value);
+        }
+
+        @JsonAnyGetter
+        public Map<String, Object> getDynamicProperties() {
+            return dynamic_properties;
+        }
+
+        @Override
+        public String toString() {
+            return "MediaLink [duration=" + duration + ", height=" + height
+                    + ", url=" + url + ", width=" + width
+                    + ", dynamic_properties=" + dynamic_properties + "]";
+        }
+
+    }
+
+    @XmlRootElement
+    static public class ActivityObject {
+
+        ActivityObject[] attachments;
+
+        ActivityObject author;
+
+        String content;
+
+        String displayName;
+
+        String[] downstreamDuplicates;
+
+        String id;
+
+        MediaLink image;
+
+        String objectType;
+
+        Date published;
+
+        String summary;
+
+        String updated;
+
+        String upstreamDuplicates;
+
+        String url;
+
+        UUID uuid;
+
+        String entityType;
+
+        protected Map<String, Object> dynamic_properties = new TreeMap<String, Object>(
+                String.CASE_INSENSITIVE_ORDER);
+
+        public ActivityObject() {
+        }
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public ActivityObject[] getAttachments() {
+            return attachments;
+        }
+
+        public void setAttachments(ActivityObject[] attachments) {
+            this.attachments = attachments;
+        }
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public ActivityObject getAuthor() {
+            return author;
+        }
+
+        public void setAuthor(ActivityObject author) {
+            this.author = author;
+        }
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public String getContent() {
+            return content;
+        }
+
+        public void setContent(String content) {
+            this.content = content;
+        }
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public String getDisplayName() {
+            return displayName;
+        }
+
+        public void setDisplayName(String displayName) {
+            this.displayName = displayName;
+        }
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public String[] getDownstreamDuplicates() {
+            return downstreamDuplicates;
+        }
+
+        public void setDownstreamDuplicates(String[] downstreamDuplicates) {
+            this.downstreamDuplicates = downstreamDuplicates;
+        }
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public String getId() {
+            return id;
+        }
+
+        public void setId(String id) {
+            this.id = id;
+        }
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public MediaLink getImage() {
+            return image;
+        }
+
+        public void setImage(MediaLink image) {
+            this.image = image;
+        }
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public String getObjectType() {
+            return objectType;
+        }
+
+        public void setObjectType(String objectType) {
+            this.objectType = objectType;
+        }
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public Date getPublished() {
+            return published;
+        }
+
+        public void setPublished(Date published) {
+            this.published = published;
+        }
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public String getSummary() {
+            return summary;
+        }
+
+        public void setSummary(String summary) {
+            this.summary = summary;
+        }
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public String getUpdated() {
+            return updated;
+        }
+
+        public void setUpdated(String updated) {
+            this.updated = updated;
+        }
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public String getUpstreamDuplicates() {
+            return upstreamDuplicates;
+        }
+
+        public void setUpstreamDuplicates(String upstreamDuplicates) {
+            this.upstreamDuplicates = upstreamDuplicates;
+        }
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public String getUrl() {
+            return url;
+        }
+
+        public void setUrl(String url) {
+            this.url = url;
+        }
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public UUID getUuid() {
+            return uuid;
+        }
+
+        public void setUuid(UUID uuid) {
+            this.uuid = uuid;
+        }
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public String getEntityType() {
+            return entityType;
+        }
+
+        public void setEntityType(String entityType) {
+            this.entityType = entityType;
+        }
+
+        @JsonAnySetter
+        public void setDynamicProperty(String key, Object value) {
+            dynamic_properties.put(key, value);
+        }
+
+        @JsonAnyGetter
+        public Map<String, Object> getDynamicProperties() {
+            return dynamic_properties;
+        }
+
+        @Override
+        public String toString() {
+            return "ActivityObject [attachments="
+                    + Arrays.toString(attachments) + ", author=" + author
+                    + ", content=" + content + ", displayName=" + displayName
+                    + ", downstreamDuplicates="
+                    + Arrays.toString(downstreamDuplicates) + ", id=" + id
+                    + ", image=" + image + ", objectType=" + objectType
+                    + ", published=" + published + ", summary=" + summary
+                    + ", updated=" + updated + ", upstreamDuplicates="
+                    + upstreamDuplicates + ", url=" + url + ", uuid=" + uuid
+                    + ", entityType=" + entityType + ", dynamic_properties="
+                    + dynamic_properties + "]";
+        }
+
+    }
+
+    @XmlRootElement
+    static public class ActivityCollection {
+
+        int totalItems;
+
+        ActivityObject[] items;
+
+        String url;
+
+        protected Map<String, Object> dynamic_properties = new TreeMap<String, Object>(
+                String.CASE_INSENSITIVE_ORDER);
+
+        public ActivityCollection() {
+        }
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public int getTotalItems() {
+            return totalItems;
+        }
+
+        public void setTotalItems(int totalItems) {
+            this.totalItems = totalItems;
+        }
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public ActivityObject[] getItems() {
+            return items;
+        }
+
+        public void setItems(ActivityObject[] items) {
+            this.items = items;
+        }
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public String getUrl() {
+            return url;
+        }
+
+        public void setUrl(String url) {
+            this.url = url;
+        }
+
+        @JsonAnySetter
+        public void setDynamicProperty(String key, Object value) {
+            dynamic_properties.put(key, value);
+        }
+
+        @JsonAnyGetter
+        public Map<String, Object> getDynamicProperties() {
+            return dynamic_properties;
+        }
+
+        @Override
+        public String toString() {
+            return "ActivityCollection [totalItems=" + totalItems + ", items="
+                    + Arrays.toString(items) + ", url=" + url
+                    + ", dynamic_properties=" + dynamic_properties + "]";
+        }
+
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Device.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Device.java b/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Device.java
new file mode 100644
index 0000000..62947c2
--- /dev/null
+++ b/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Device.java
@@ -0,0 +1,52 @@
+package org.apache.usergrid.java.client.entities;
+
+import static com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL;
+import static org.apache.usergrid.java.client.utils.JsonUtils.getStringProperty;
+import static org.apache.usergrid.java.client.utils.JsonUtils.setStringProperty;
+
+import java.util.List;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+
+public class Device extends Entity {
+
+	public final static String ENTITY_TYPE = "device";
+
+	public final static String PROPERTY_NAME = "name";
+
+	public Device() {
+		super();
+		setType(ENTITY_TYPE);
+	}
+
+	public Device(Entity entity) {
+		super();
+		properties = entity.properties;
+		setType(ENTITY_TYPE);
+	}
+
+	@Override
+	@JsonIgnore
+	public String getNativeType() {
+		return ENTITY_TYPE;
+	}
+
+	@Override
+	@JsonIgnore
+	public List<String> getPropertyNames() {
+		List<String> properties = super.getPropertyNames();
+		properties.add(PROPERTY_NAME);
+		return properties;
+	}
+
+	@JsonSerialize(include = NON_NULL)
+	public String getName() {
+		return getStringProperty(properties, PROPERTY_NAME);
+	}
+
+	public void setName(String name) {
+		setStringProperty(properties, PROPERTY_NAME, name);
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Entity.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Entity.java b/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Entity.java
new file mode 100644
index 0000000..a306db5
--- /dev/null
+++ b/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Entity.java
@@ -0,0 +1,172 @@
+package org.apache.usergrid.java.client.entities;
+
+import static org.apache.usergrid.java.client.utils.JsonUtils.*;
+import static org.apache.usergrid.java.client.utils.MapUtils.newMapWithoutKeys;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public class Entity {
+
+    public final static String PROPERTY_UUID = "uuid";
+    public final static String PROPERTY_TYPE = "type";
+
+    protected Map<String, JsonNode> properties = new HashMap<String, JsonNode>();
+
+    public static Map<String, Class<? extends Entity>> CLASS_FOR_ENTITY_TYPE = new HashMap<String, Class<? extends Entity>>();
+    static {
+        CLASS_FOR_ENTITY_TYPE.put(User.ENTITY_TYPE, User.class);
+    }
+
+    public Entity() {
+    }
+
+    public Entity(String type) {
+        setType(type);
+    }
+
+    @JsonIgnore
+    public String getNativeType() {
+        return getType();
+    }
+
+    @JsonIgnore
+    public List<String> getPropertyNames() {
+        List<String> properties = new ArrayList<String>();
+        properties.add(PROPERTY_TYPE);
+        properties.add(PROPERTY_UUID);
+        return properties;
+    }
+
+    public String getType() {
+        return getStringProperty(properties, PROPERTY_TYPE);
+    }
+
+    public void setType(String type) {
+        setStringProperty(properties, PROPERTY_TYPE, type);
+    }
+
+    public UUID getUuid() {
+        return getUUIDProperty(properties, PROPERTY_UUID);
+    }
+
+    public void setUuid(UUID uuid) {
+        setUUIDProperty(properties, PROPERTY_UUID, uuid);
+    }
+
+    @JsonAnyGetter
+    public Map<String, JsonNode> getProperties() {
+        return newMapWithoutKeys(properties, getPropertyNames());
+    }
+
+    @JsonAnySetter
+    public void setProperty(String name, JsonNode value) {
+        if (value == null) {
+            properties.remove(name);
+        } else {
+            properties.put(name, value);
+        }
+    }
+
+  
+    /**
+     * Set the property
+     * 
+     * @param name
+     * @param value
+     */
+    public void setProperty(String name, String value) {
+        setStringProperty(properties, name, value);
+    }
+
+    /**
+     * Set the property
+     * 
+     * @param name
+     * @param value
+     */
+    public void setProperty(String name, boolean value) {
+        setBooleanProperty(properties, name, value);
+    }
+
+    /**
+     * Set the property
+     * 
+     * @param name
+     * @param value
+     */
+    public void setProperty(String name, long value) {
+        setLongProperty(properties, name, value);
+    }
+
+    /**
+     * Set the property
+     * 
+     * @param name
+     * @param value
+     */
+    public void setProperty(String name, int value) {
+        setProperty(name, (long) value);
+    }
+
+    /**
+     * Set the property
+     * 
+     * @param name
+     * @param value
+     */
+    public void setProperty(String name, float value) {
+        setFloatProperty(properties, name, value);
+    }
+
+    @Override
+    public String toString() {
+        return toJsonString(this);
+    }
+
+    public <T extends Entity> T toType(Class<T> t) {
+        return toType(this, t);
+    }
+
+    public static <T extends Entity> T toType(Entity entity, Class<T> t) {
+        if (entity == null) {
+            return null;
+        }
+        T newEntity = null;
+        if (entity.getClass().isAssignableFrom(t)) {
+            try {
+                newEntity = (t.newInstance());
+                if ((newEntity.getNativeType() != null)
+                        && newEntity.getNativeType().equals(entity.getType())) {
+                    newEntity.properties = entity.properties;
+                }
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+        }
+        return newEntity;
+    }
+
+    public static <T extends Entity> List<T> toType(List<Entity> entities,
+            Class<T> t) {
+        List<T> l = new ArrayList<T>(entities != null ? entities.size() : 0);
+        if (entities != null) {
+            for (Entity entity : entities) {
+                T newEntity = entity.toType(t);
+                if (newEntity != null) {
+                    l.add(newEntity);
+                }
+            }
+        }
+        return l;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Group.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Group.java b/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Group.java
new file mode 100644
index 0000000..12c8dff
--- /dev/null
+++ b/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Group.java
@@ -0,0 +1,63 @@
+package org.apache.usergrid.java.client.entities;
+
+import static com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL;
+import static org.apache.usergrid.java.client.utils.JsonUtils.getStringProperty;
+import static org.apache.usergrid.java.client.utils.JsonUtils.setStringProperty;
+
+import java.util.List;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+
+public class Group extends Entity {
+
+	public final static String ENTITY_TYPE = "group";
+
+	public final static String PROPERTY_PATH = "path";
+	public final static String PROPERTY_TITLE = "title";
+
+	public Group() {
+		super();
+		setType(ENTITY_TYPE);
+	}
+
+	public Group(Entity entity) {
+		super();
+		properties = entity.properties;
+		setType(ENTITY_TYPE);
+	}
+
+	@Override
+	@JsonIgnore
+	public String getNativeType() {
+		return ENTITY_TYPE;
+	}
+
+	@Override
+	@JsonIgnore
+	public List<String> getPropertyNames() {
+		List<String> properties = super.getPropertyNames();
+		properties.add(PROPERTY_PATH);
+		properties.add(PROPERTY_TITLE);
+		return properties;
+	}
+
+	@JsonSerialize(include = NON_NULL)
+	public String getPath() {
+		return getStringProperty(properties, PROPERTY_PATH);
+	}
+
+	public void setPath(String path) {
+		setStringProperty(properties, PROPERTY_PATH, path);
+	}
+
+	@JsonSerialize(include = NON_NULL)
+	public String getTitle() {
+		return getStringProperty(properties, PROPERTY_TITLE);
+	}
+
+	public void setTitle(String title) {
+		setStringProperty(properties, PROPERTY_TITLE, title);
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Message.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Message.java b/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Message.java
new file mode 100644
index 0000000..70ee86e
--- /dev/null
+++ b/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/Message.java
@@ -0,0 +1,132 @@
+package org.apache.usergrid.java.client.entities;
+
+import static com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL;
+import static org.apache.usergrid.java.client.utils.JsonUtils.getBooleanProperty;
+import static org.apache.usergrid.java.client.utils.JsonUtils.getLongProperty;
+import static org.apache.usergrid.java.client.utils.JsonUtils.getStringProperty;
+import static org.apache.usergrid.java.client.utils.JsonUtils.getUUIDProperty;
+import static org.apache.usergrid.java.client.utils.JsonUtils.setBooleanProperty;
+import static org.apache.usergrid.java.client.utils.JsonUtils.setLongProperty;
+import static org.apache.usergrid.java.client.utils.JsonUtils.setStringProperty;
+import static org.apache.usergrid.java.client.utils.JsonUtils.setUUIDProperty;
+
+import java.util.List;
+import java.util.UUID;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion;
+
+public class Message extends Entity {
+
+	public static final String ENTITY_TYPE = "message";
+
+	public static final String PROPERTY_CORRELATION_ID = "correlation_id";
+	public static final String PROPERTY_DESTINATION = "destination";
+	public static final String PROPERTY_REPLY_TO = "reply_to";
+	public static final String PROPERTY_TIMESTAMP = "timestamp";
+	public static final String PROPERTY_TYPE = "type";
+	public static final String PROPERTY_CATEGORY = "category";
+	public static final String PROPERTY_INDEXED = "indexed";
+	public static final String PROPERTY_PERSISTENT = "persistent";
+
+	public Message() {
+		super();
+		setType(ENTITY_TYPE);
+	}
+
+	public Message(Entity entity) {
+		super();
+		properties = entity.properties;
+		setType(ENTITY_TYPE);
+	}
+
+	@Override
+	@JsonIgnore
+	public String getNativeType() {
+		return ENTITY_TYPE;
+	}
+
+	@Override
+	@JsonIgnore
+	public List<String> getPropertyNames() {
+		List<String> properties = super.getPropertyNames();
+		properties.add(PROPERTY_CORRELATION_ID);
+		properties.add(PROPERTY_DESTINATION);
+		properties.add(PROPERTY_REPLY_TO);
+		properties.add(PROPERTY_TIMESTAMP);
+		properties.add(PROPERTY_CATEGORY);
+		properties.add(PROPERTY_INDEXED);
+		properties.add(PROPERTY_PERSISTENT);
+		return properties;
+	}
+
+	@JsonSerialize(include = NON_NULL)
+	@JsonProperty(PROPERTY_CORRELATION_ID)
+	public UUID getCorrelationId() {
+		return getUUIDProperty(properties, PROPERTY_CORRELATION_ID);
+	}
+
+	@JsonProperty(PROPERTY_CORRELATION_ID)
+	public void setCorrelationId(UUID uuid) {
+		setUUIDProperty(properties, PROPERTY_CORRELATION_ID, uuid);
+	}
+
+	@JsonSerialize(include = NON_NULL)
+	public String getDestination() {
+		return getStringProperty(properties, PROPERTY_DESTINATION);
+	}
+
+	public void setDestination(String destination) {
+		setStringProperty(properties, PROPERTY_DESTINATION, destination);
+	}
+
+	@JsonSerialize(include = NON_NULL)
+	@JsonProperty(PROPERTY_REPLY_TO)
+	public String getReplyTo() {
+		return getStringProperty(properties, PROPERTY_DESTINATION);
+	}
+
+	@JsonProperty(PROPERTY_REPLY_TO)
+	public void setReplyTo(String replyTo) {
+		setStringProperty(properties, PROPERTY_DESTINATION, replyTo);
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public Long getTimestamp() {
+		return getLongProperty(properties, PROPERTY_TIMESTAMP);
+	}
+
+	public void setTimestamp(Long timestamp) {
+		setLongProperty(properties, PROPERTY_TIMESTAMP, timestamp);
+	}
+
+	@JsonSerialize(include = NON_NULL)
+	public String getCategory() {
+		return getStringProperty(properties, PROPERTY_CATEGORY);
+	}
+
+	public void setCategory(String category) {
+		setStringProperty(properties, PROPERTY_CATEGORY, category);
+	}
+
+	@JsonSerialize(include = NON_NULL)
+	public Boolean isIndexed() {
+		return getBooleanProperty(properties, PROPERTY_INDEXED);
+	}
+
+	public void setIndexed(Boolean indexed) {
+		setBooleanProperty(properties, PROPERTY_INDEXED, indexed);
+	}
+
+	@JsonSerialize(include = NON_NULL)
+	public Boolean isPersistent() {
+		return getBooleanProperty(properties, PROPERTY_INDEXED);
+	}
+
+	public void setPersistent(Boolean persistent) {
+		setBooleanProperty(properties, PROPERTY_INDEXED, persistent);
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/User.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/User.java b/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/User.java
new file mode 100644
index 0000000..e249896
--- /dev/null
+++ b/sdks/java/src/main/java/org/apache/usergrid/java/client/entities/User.java
@@ -0,0 +1,142 @@
+package org.apache.usergrid.java.client.entities;
+
+import static com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL;
+import static org.apache.usergrid.java.client.utils.JsonUtils.getBooleanProperty;
+import static org.apache.usergrid.java.client.utils.JsonUtils.getStringProperty;
+import static org.apache.usergrid.java.client.utils.JsonUtils.setBooleanProperty;
+import static org.apache.usergrid.java.client.utils.JsonUtils.setStringProperty;
+
+import java.util.List;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+
+public class User extends Entity {
+
+	public final static String ENTITY_TYPE = "user";
+
+	public final static String PROPERTY_USERNAME = "username";
+	public final static String PROPERTY_EMAIL = "email";
+	public final static String PROPERTY_NAME = "name";
+	public final static String PROPERTY_FIRSTNAME = "firstname";
+	public final static String PROPERTY_MIDDLENAME = "middlename";
+	public final static String PROPERTY_LASTNAME = "lastname";
+	public final static String PROPERTY_ACTIVATED = "activated";
+	public final static String PROPERTY_PICTURE = "picture";
+	public final static String PROPERTY_DISABLED = "disabled";
+
+	public User() {
+		super();
+		setType(ENTITY_TYPE);
+	}
+
+	public User(Entity entity) {
+		super();
+		properties = entity.properties;
+		setType(ENTITY_TYPE);
+	}
+
+	@Override
+	@JsonIgnore
+	public String getNativeType() {
+		return ENTITY_TYPE;
+	}
+
+	@Override
+	@JsonIgnore
+	public List<String> getPropertyNames() {
+		List<String> properties = super.getPropertyNames();
+		properties.add(PROPERTY_USERNAME);
+		properties.add(PROPERTY_EMAIL);
+		properties.add(PROPERTY_NAME);
+		properties.add(PROPERTY_FIRSTNAME);
+		properties.add(PROPERTY_MIDDLENAME);
+		properties.add(PROPERTY_LASTNAME);
+		properties.add(PROPERTY_ACTIVATED);
+		properties.add(PROPERTY_PICTURE);
+		properties.add(PROPERTY_DISABLED);
+		return properties;
+	}
+
+	@JsonSerialize(include = NON_NULL)
+	public String getUsername() {
+		return getStringProperty(properties, PROPERTY_USERNAME);
+	}
+
+	public void setUsername(String username) {
+		setStringProperty(properties, PROPERTY_USERNAME, username);
+	}
+
+	@JsonSerialize(include = NON_NULL)
+	public String getName() {
+		return getStringProperty(properties, PROPERTY_NAME);
+	}
+
+	public void setName(String name) {
+		setStringProperty(properties, PROPERTY_NAME, name);
+	}
+
+	@JsonSerialize(include = NON_NULL)
+	public String getEmail() {
+		return getStringProperty(properties, PROPERTY_EMAIL);
+	}
+
+	public void setEmail(String email) {
+		setStringProperty(properties, PROPERTY_EMAIL, email);
+	}
+
+	@JsonSerialize(include = NON_NULL)
+	public Boolean isActivated() {
+		return getBooleanProperty(properties, PROPERTY_ACTIVATED);
+	}
+
+	public void setActivated(Boolean activated) {
+		setBooleanProperty(properties, PROPERTY_ACTIVATED, activated);
+	}
+
+	@JsonSerialize(include = NON_NULL)
+	public Boolean isDisabled() {
+		return getBooleanProperty(properties, PROPERTY_DISABLED);
+	}
+
+	public void setDisabled(Boolean disabled) {
+		setBooleanProperty(properties, PROPERTY_DISABLED, disabled);
+	}
+
+	@JsonSerialize(include = NON_NULL)
+	public String getFirstname() {
+		return getStringProperty(properties, PROPERTY_FIRSTNAME);
+	}
+
+	public void setFirstname(String firstname) {
+		setStringProperty(properties, PROPERTY_FIRSTNAME, firstname);
+	}
+
+	@JsonSerialize(include = NON_NULL)
+	public String getMiddlename() {
+		return getStringProperty(properties, PROPERTY_MIDDLENAME);
+	}
+
+	public void setMiddlename(String middlename) {
+		setStringProperty(properties, PROPERTY_MIDDLENAME, middlename);
+	}
+
+	@JsonSerialize(include = NON_NULL)
+	public String getLastname() {
+		return getStringProperty(properties, PROPERTY_LASTNAME);
+	}
+
+	public void setLastname(String lastname) {
+		setStringProperty(properties, PROPERTY_LASTNAME, lastname);
+	}
+
+	@JsonSerialize(include = NON_NULL)
+	public String getPicture() {
+		return getStringProperty(properties, PROPERTY_PICTURE);
+	}
+
+	public void setPicture(String picture) {
+		setStringProperty(properties, PROPERTY_PICTURE, picture);
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/apache/usergrid/java/client/exception/ClientException.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/apache/usergrid/java/client/exception/ClientException.java b/sdks/java/src/main/java/org/apache/usergrid/java/client/exception/ClientException.java
new file mode 100644
index 0000000..f85e2fe
--- /dev/null
+++ b/sdks/java/src/main/java/org/apache/usergrid/java/client/exception/ClientException.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ * 
+ * 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.java.client.exception;
+
+/**
+ * Simple wrapper for client exceptions
+ * @author tnine
+ *
+ */
+public class ClientException extends RuntimeException{
+
+    /**
+     * 
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * @param message
+     * @param cause
+     */
+    public ClientException(String message, Throwable cause) {
+        super(message, cause);
+    }
+    
+    
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/apache/usergrid/java/client/response/AggregateCounter.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/apache/usergrid/java/client/response/AggregateCounter.java b/sdks/java/src/main/java/org/apache/usergrid/java/client/response/AggregateCounter.java
new file mode 100644
index 0000000..b0ba4ec
--- /dev/null
+++ b/sdks/java/src/main/java/org/apache/usergrid/java/client/response/AggregateCounter.java
@@ -0,0 +1,36 @@
+package org.apache.usergrid.java.client.response;
+
+import static org.apache.usergrid.java.client.utils.JsonUtils.toJsonString;
+
+public class AggregateCounter {
+
+	private long timestamp;
+	private long value;
+
+	public AggregateCounter(long timestamp, long value) {
+		this.timestamp = timestamp;
+		this.value = value;
+	}
+
+	public long getTimestamp() {
+		return timestamp;
+	}
+
+	public void setTimestamp(long timestamp) {
+		this.timestamp = timestamp;
+	}
+
+	public long getValue() {
+		return value;
+	}
+
+	public void setValue(long value) {
+		this.value = value;
+	}
+
+	@Override
+	public String toString() {
+		return toJsonString(this);
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/apache/usergrid/java/client/response/AggregateCounterSet.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/apache/usergrid/java/client/response/AggregateCounterSet.java b/sdks/java/src/main/java/org/apache/usergrid/java/client/response/AggregateCounterSet.java
new file mode 100644
index 0000000..a392b5f
--- /dev/null
+++ b/sdks/java/src/main/java/org/apache/usergrid/java/client/response/AggregateCounterSet.java
@@ -0,0 +1,95 @@
+package org.apache.usergrid.java.client.response;
+
+import static org.apache.usergrid.java.client.utils.JsonUtils.toJsonString;
+
+import java.util.List;
+import java.util.UUID;
+
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion;
+
+public class AggregateCounterSet {
+	private String name;
+	private UUID user;
+	private UUID group;
+	private UUID queue;
+	private String category;
+	private List<AggregateCounter> values;
+
+	public AggregateCounterSet(String name, UUID user, UUID group,
+			String category, List<AggregateCounter> values) {
+		this.name = name;
+		this.user = user;
+		this.group = group;
+		this.category = category;
+		this.values = values;
+	}
+
+	public AggregateCounterSet(String name, UUID queue, String category,
+			List<AggregateCounter> values) {
+		this.name = name;
+		setQueue(queue);
+		this.category = category;
+		this.values = values;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public UUID getUser() {
+		return user;
+	}
+
+	public void setUser(UUID user) {
+		this.user = user;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public UUID getGroup() {
+		return group;
+	}
+
+	public void setGroup(UUID group) {
+		this.group = group;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public String getCategory() {
+		return category;
+	}
+
+	public void setCategory(String category) {
+		this.category = category;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public List<AggregateCounter> getValues() {
+		return values;
+	}
+
+	public void setValues(List<AggregateCounter> values) {
+		this.values = values;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public UUID getQueue() {
+		return queue;
+	}
+
+	public void setQueue(UUID queue) {
+		this.queue = queue;
+	}
+
+	@Override
+	public String toString() {
+		return toJsonString(this);
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/apache/usergrid/java/client/response/ApiResponse.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/apache/usergrid/java/client/response/ApiResponse.java b/sdks/java/src/main/java/org/apache/usergrid/java/client/response/ApiResponse.java
new file mode 100644
index 0000000..188ccef
--- /dev/null
+++ b/sdks/java/src/main/java/org/apache/usergrid/java/client/response/ApiResponse.java
@@ -0,0 +1,406 @@
+package org.apache.usergrid.java.client.response;
+
+import static org.apache.usergrid.java.client.utils.JsonUtils.toJsonString;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion;
+
+import org.apache.usergrid.java.client.entities.Entity;
+import org.apache.usergrid.java.client.entities.Message;
+import org.apache.usergrid.java.client.entities.User;
+
+public class ApiResponse {
+
+	private String accessToken;
+
+	private String error;
+	private String errorDescription;
+	private String errorUri;
+	private String exception;
+
+	private String path;
+	private String uri;
+	private String status;
+	private long timestamp;
+	private UUID application;
+	private List<Entity> entities;
+	private UUID next;
+	private String cursor;
+	private String action;
+	private List<Object> list;
+	private Object data;
+	private Map<String, UUID> applications;
+	private Map<String, JsonNode> metadata;
+	private Map<String, List<String>> params;
+	private List<AggregateCounterSet> counters;
+	private ClientCredentialsInfo credentials;
+
+	private List<Message> messages;
+	private List<QueueInfo> queues;
+	private UUID last;
+	private UUID queue;
+	private UUID consumer;
+
+	private User user;
+
+	private final Map<String, JsonNode> properties = new HashMap<String, JsonNode>();
+
+	public ApiResponse() {
+	}
+
+	@JsonAnyGetter
+	public Map<String, JsonNode> getProperties() {
+		return properties;
+	}
+
+	@JsonAnySetter
+	public void setProperty(String key, JsonNode value) {
+		properties.put(key, value);
+	}
+
+	@JsonProperty("access_token")
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public String getAccessToken() {
+		return accessToken;
+	}
+
+	@JsonProperty("access_token")
+	public void setAccessToken(String accessToken) {
+		this.accessToken = accessToken;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public String getError() {
+		return error;
+	}
+
+	public void setError(String error) {
+		this.error = error;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	@JsonProperty("error_description")
+	public String getErrorDescription() {
+		return errorDescription;
+	}
+
+	@JsonProperty("error_description")
+	public void setErrorDescription(String errorDescription) {
+		this.errorDescription = errorDescription;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	@JsonProperty("error_uri")
+	public String getErrorUri() {
+		return errorUri;
+	}
+
+	@JsonProperty("error_uri")
+	public void setErrorUri(String errorUri) {
+		this.errorUri = errorUri;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public String getException() {
+		return exception;
+	}
+
+	public void setException(String exception) {
+		this.exception = exception;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public String getPath() {
+		return path;
+	}
+
+	public void setPath(String path) {
+		this.path = path;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public String getUri() {
+		return uri;
+	}
+
+	public void setUri(String uri) {
+		this.uri = uri;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public String getStatus() {
+		return status;
+	}
+
+	public void setStatus(String status) {
+		this.status = status;
+	}
+
+	public long getTimestamp() {
+		return timestamp;
+	}
+
+	public void setTimestamp(long timestamp) {
+		this.timestamp = timestamp;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public UUID getApplication() {
+		return application;
+	}
+
+	public void setApplication(UUID application) {
+		this.application = application;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public List<Entity> getEntities() {
+		return entities;
+	}
+
+	public void setEntities(List<Entity> entities) {
+		this.entities = entities;
+	}
+
+	public int getEntityCount() {
+		if (entities == null) {
+			return 0;
+		}
+		return entities.size();
+	}
+
+	public Entity getFirstEntity() {
+		if ((entities != null) && (entities.size() > 0)) {
+			return entities.get(0);
+		}
+		return null;
+	}
+
+	public <T extends Entity> T getFirstEntity(Class<T> t) {
+		return Entity.toType(getFirstEntity(), t);
+	}
+
+	public Entity getLastEntity() {
+		if ((entities != null) && (entities.size() > 0)) {
+			return entities.get(entities.size() - 1);
+		}
+		return null;
+	}
+
+	public <T extends Entity> T getLastEntity(Class<T> t) {
+		return Entity.toType(getLastEntity(), t);
+	}
+
+	public <T extends Entity> List<T> getEntities(Class<T> t) {
+		return Entity.toType(entities, t);
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public UUID getNext() {
+		return next;
+	}
+
+	public void setNext(UUID next) {
+		this.next = next;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public String getCursor() {
+		return cursor;
+	}
+
+	public void setCursor(String cursor) {
+		this.cursor = cursor;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public String getAction() {
+		return action;
+	}
+
+	public void setAction(String action) {
+		this.action = action;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public List<Object> getList() {
+		return list;
+	}
+
+	public void setList(List<Object> list) {
+		this.list = list;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public Object getData() {
+		return data;
+	}
+
+	public void setData(Object data) {
+		this.data = data;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public Map<String, UUID> getApplications() {
+		return applications;
+	}
+
+	public void setApplications(Map<String, UUID> applications) {
+		this.applications = applications;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public Map<String, JsonNode> getMetadata() {
+		return metadata;
+	}
+
+	public void setMetadata(Map<String, JsonNode> metadata) {
+		this.metadata = metadata;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public Map<String, List<String>> getParams() {
+		return params;
+	}
+
+	public void setParams(Map<String, List<String>> params) {
+		this.params = params;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public List<AggregateCounterSet> getCounters() {
+		return counters;
+	}
+
+	public void setCounters(List<AggregateCounterSet> counters) {
+		this.counters = counters;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public ClientCredentialsInfo getCredentials() {
+		return credentials;
+	}
+
+	public void setCredentials(ClientCredentialsInfo credentials) {
+		this.credentials = credentials;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public User getUser() {
+		return user;
+	}
+
+	public void setUser(User user) {
+		this.user = user;
+	}
+
+	@Override
+	public String toString() {
+		return toJsonString(this);
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public List<Message> getMessages() {
+		return messages;
+	}
+
+	public void setMessages(List<Message> messages) {
+		this.messages = messages;
+	}
+
+	@JsonIgnore
+	public int getMessageCount() {
+		if (messages == null) {
+			return 0;
+		}
+		return messages.size();
+	}
+
+	@JsonIgnore
+	public Message getFirstMessage() {
+		if ((messages != null) && (messages.size() > 0)) {
+			return messages.get(0);
+		}
+		return null;
+	}
+
+	@JsonIgnore
+	public Entity getLastMessage() {
+		if ((messages != null) && (messages.size() > 0)) {
+			return messages.get(messages.size() - 1);
+		}
+		return null;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public UUID getLast() {
+		return last;
+	}
+
+	public void setLast(UUID last) {
+		this.last = last;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public List<QueueInfo> getQueues() {
+		return queues;
+	}
+
+	public void setQueues(List<QueueInfo> queues) {
+		this.queues = queues;
+	}
+
+	@JsonIgnore
+	public QueueInfo getFirstQueue() {
+		if ((queues != null) && (queues.size() > 0)) {
+			return queues.get(0);
+		}
+		return null;
+	}
+
+	@JsonIgnore
+	public QueueInfo getLastQueue() {
+		if ((queues != null) && (queues.size() > 0)) {
+			return queues.get(queues.size() - 1);
+		}
+		return null;
+	}
+
+	@JsonIgnore
+	public UUID getLastQueueId() {
+		QueueInfo q = getLastQueue();
+		if (q != null) {
+			return q.getQueue();
+		}
+		return null;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public UUID getQueue() {
+		return queue;
+	}
+
+	public void setQueue(UUID queue) {
+		this.queue = queue;
+	}
+
+	@JsonSerialize(include = Inclusion.NON_NULL)
+	public UUID getConsumer() {
+		return consumer;
+	}
+
+	public void setConsumer(UUID consumer) {
+		this.consumer = consumer;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/apache/usergrid/java/client/response/ClientCredentialsInfo.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/apache/usergrid/java/client/response/ClientCredentialsInfo.java b/sdks/java/src/main/java/org/apache/usergrid/java/client/response/ClientCredentialsInfo.java
new file mode 100644
index 0000000..d23414b
--- /dev/null
+++ b/sdks/java/src/main/java/org/apache/usergrid/java/client/response/ClientCredentialsInfo.java
@@ -0,0 +1,42 @@
+package org.apache.usergrid.java.client.response;
+
+import static org.apache.usergrid.java.client.utils.JsonUtils.toJsonString;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class ClientCredentialsInfo {
+
+	private String id;
+	private String secret;
+
+	public ClientCredentialsInfo(String id, String secret) {
+		this.id = id;
+		this.secret = secret;
+	}
+
+	@JsonProperty("client_id")
+	public String getId() {
+		return id;
+	}
+
+	@JsonProperty("client_id")
+	public void setId(String id) {
+		this.id = id;
+	}
+
+	@JsonProperty("client_secret")
+	public String getSecret() {
+		return secret;
+	}
+
+	@JsonProperty("client_secret")
+	public void setSecret(String secret) {
+		this.secret = secret;
+	}
+
+	@Override
+	public String toString() {
+		return toJsonString(this);
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/apache/usergrid/java/client/response/QueueInfo.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/apache/usergrid/java/client/response/QueueInfo.java b/sdks/java/src/main/java/org/apache/usergrid/java/client/response/QueueInfo.java
new file mode 100644
index 0000000..c0072bc
--- /dev/null
+++ b/sdks/java/src/main/java/org/apache/usergrid/java/client/response/QueueInfo.java
@@ -0,0 +1,28 @@
+package org.apache.usergrid.java.client.response;
+
+import java.util.UUID;
+
+public class QueueInfo {
+
+	String path;
+	UUID queue;
+
+	public QueueInfo() {
+	}
+
+	public String getPath() {
+		return path;
+	}
+
+	public void setPath(String path) {
+		this.path = path;
+	}
+
+	public UUID getQueue() {
+		return queue;
+	}
+
+	public void setQueue(UUID queue) {
+		this.queue = queue;
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/apache/usergrid/java/client/utils/JsonUtils.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/apache/usergrid/java/client/utils/JsonUtils.java b/sdks/java/src/main/java/org/apache/usergrid/java/client/utils/JsonUtils.java
new file mode 100644
index 0000000..81f287d
--- /dev/null
+++ b/sdks/java/src/main/java/org/apache/usergrid/java/client/utils/JsonUtils.java
@@ -0,0 +1,167 @@
+package org.apache.usergrid.java.client.utils;
+
+import java.io.IOException;
+import java.util.Map;
+import java.util.UUID;
+
+import com.fasterxml.jackson.core.JsonGenerationException;
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.JsonMappingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.JsonNodeFactory;
+
+import org.apache.usergrid.java.client.exception.ClientException;
+
+public class JsonUtils {
+
+
+	static ObjectMapper mapper = new ObjectMapper();
+
+	public static String getStringProperty(Map<String, JsonNode> properties,
+			String name) {
+		JsonNode value = properties.get(name);
+		if (value != null) {
+			return value.asText();
+		}
+		return null;
+	}
+
+	public static void setStringProperty(Map<String, JsonNode> properties,
+			String name, String value) {
+		if (value == null) {
+			properties.remove(name);
+		} else {
+			properties.put(name, JsonNodeFactory.instance.textNode(value));
+		}
+	}
+
+	public static Long getLongProperty(Map<String, JsonNode> properties,
+			String name) {
+		JsonNode value = properties.get(name);
+		if (value != null) {
+			return value.asLong(0);
+		}
+		return null;
+	}
+
+	public static void setLongProperty(Map<String, JsonNode> properties,
+			String name, Long value) {
+		if (value == null) {
+			properties.remove(name);
+		} else {
+			properties.put(name, JsonNodeFactory.instance.numberNode(value));
+		}
+	}
+
+	public static void setFloatProperty(Map<String, JsonNode> properties, String name, Float value){
+	    if(value == null){
+	        properties.remove(name);
+	    }else{
+	        properties.put(name, JsonNodeFactory.instance.numberNode(value));
+	    }
+	}
+	
+	public static Boolean getBooleanProperty(Map<String, JsonNode> properties,
+			String name) {
+		JsonNode value = properties.get(name);
+		if (value != null) {
+			return value.asBoolean();
+		}
+		return false;
+	}
+
+	public static void setBooleanProperty(Map<String, JsonNode> properties,
+			String name, Boolean value) {
+		if (value == null) {
+			properties.remove(name);
+		} else {
+			properties.put(name, JsonNodeFactory.instance.booleanNode(value));
+		}
+	}
+
+	public static UUID getUUIDProperty(Map<String, JsonNode> properties,
+			String name) {
+		JsonNode value = properties.get(name);
+		if (value != null) {
+			UUID uuid = null;
+			try {
+				uuid = UUID.fromString(value.asText());
+			} catch (Exception e) {
+			}
+			return uuid;
+		}
+		return null;
+	}
+
+	public static void setUUIDProperty(Map<String, JsonNode> properties,
+			String name, UUID value) {
+		if (value == null) {
+			properties.remove(name);
+		} else {
+			properties.put(name,
+					JsonNodeFactory.instance.textNode(value.toString()));
+		}
+	}
+
+	public static String toJsonString(Object obj) {
+		try {
+			return mapper.writeValueAsString(obj);
+		} catch (JsonGenerationException e) {
+			throw new ClientException("Unable to generate json", e);
+		} catch (JsonMappingException e) {
+		    throw new ClientException("Unable to map json", e);
+		} catch (IOException e) {
+		    throw new ClientException("IO error", e);
+		}
+	}
+
+	public static <T> T parse(String json, Class<T> c) {
+		try {
+			return mapper.readValue(json, c);
+		} catch (JsonGenerationException e) {
+            throw new ClientException("Unable to generate json", e);
+        } catch (JsonMappingException e) {
+            throw new ClientException("Unable to map json", e);
+        } catch (IOException e) {
+            throw new ClientException("IO error", e);
+        }
+	}
+
+	public static JsonNode toJsonNode(Object obj) {
+		return mapper.convertValue(obj, JsonNode.class);
+	}
+
+	public static <T> T fromJsonNode(JsonNode json, Class<T> c) {
+		try {
+			JsonParser jp = json.traverse();
+			return mapper.readValue(jp, c);
+		} catch (JsonGenerationException e) {
+            throw new ClientException("Unable to generate json", e);
+        } catch (JsonMappingException e) {
+            throw new ClientException("Unable to map json", e);
+        } catch (IOException e) {
+            throw new ClientException("IO error", e);
+        }
+	}
+
+	public static <T> T getObjectProperty(Map<String, JsonNode> properties,
+			String name, Class<T> c) {
+		JsonNode value = properties.get(name);
+		if (value != null) {
+			return fromJsonNode(value, c);
+		}
+		return null;
+	}
+
+	public static void setObjectProperty(Map<String, JsonNode> properties,
+			String name, Object value) {
+		if (value == null) {
+			properties.remove(name);
+		} else {
+			properties.put(name,
+					JsonNodeFactory.instance.textNode(value.toString()));
+		}
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/apache/usergrid/java/client/utils/MapUtils.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/apache/usergrid/java/client/utils/MapUtils.java b/sdks/java/src/main/java/org/apache/usergrid/java/client/utils/MapUtils.java
new file mode 100644
index 0000000..f7e4a1c
--- /dev/null
+++ b/sdks/java/src/main/java/org/apache/usergrid/java/client/utils/MapUtils.java
@@ -0,0 +1,23 @@
+package org.apache.usergrid.java.client.utils;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class MapUtils {
+
+	public static <T> Map<String, T> newMapWithoutKeys(Map<String, T> map,
+			List<String> keys) {
+		Map<String, T> newMap = null;
+		if (map != null) {
+			newMap = new HashMap<String, T>(map);
+		} else {
+			newMap = new HashMap<String, T>();
+		}
+		for (String key : keys) {
+			newMap.remove(key);
+		}
+		return newMap;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/apache/usergrid/java/client/utils/ObjectUtils.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/apache/usergrid/java/client/utils/ObjectUtils.java b/sdks/java/src/main/java/org/apache/usergrid/java/client/utils/ObjectUtils.java
new file mode 100644
index 0000000..c47002b
--- /dev/null
+++ b/sdks/java/src/main/java/org/apache/usergrid/java/client/utils/ObjectUtils.java
@@ -0,0 +1,20 @@
+package org.apache.usergrid.java.client.utils;
+
+import java.util.Map;
+
+public class ObjectUtils {
+
+	public static boolean isEmpty(Object s) {
+		if (s == null) {
+			return true;
+		}
+		if ((s instanceof String) && (((String) s).trim().length() == 0)) {
+			return true;
+		}
+		if (s instanceof Map) {
+			return ((Map<?, ?>) s).isEmpty();
+		}
+		return false;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/apache/usergrid/java/client/utils/UrlUtils.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/apache/usergrid/java/client/utils/UrlUtils.java b/sdks/java/src/main/java/org/apache/usergrid/java/client/utils/UrlUtils.java
new file mode 100644
index 0000000..e2d101e
--- /dev/null
+++ b/sdks/java/src/main/java/org/apache/usergrid/java/client/utils/UrlUtils.java
@@ -0,0 +1,108 @@
+package org.apache.usergrid.java.client.utils;
+
+import static java.net.URLEncoder.encode;
+import static org.apache.usergrid.java.client.utils.ObjectUtils.isEmpty;
+
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.apache.usergrid.java.client.exception.ClientException;
+
+public class UrlUtils {
+
+   
+    public static URL url(String s) {
+        try {
+            return new URL(s);
+        } catch (MalformedURLException e) {
+            throw new ClientException("Incorrect URL format", e);
+        }
+    }
+
+    public static URL url(URL u, String s) {
+        try {
+            return new URL(u, s);
+        } catch (MalformedURLException e) {
+            throw new ClientException("Incorrect URL format", e);
+        }
+    }
+
+    public static String path(Object... segments) {
+        String path = "";
+        boolean first = true;
+        for (Object segment : segments) {
+            if (segment instanceof Object[]) {
+                segment = path((Object[]) segment);
+            }
+            if (!isEmpty(segment)) {
+                if (first) {
+                    path = segment.toString();
+                    first = false;
+                } else {
+                    if (!path.endsWith("/")) {
+                        path += "/";
+                    }
+                    path += segment.toString();
+                }
+            }
+        }
+        return path;
+    }
+
+    @SuppressWarnings("rawtypes")
+    public static String encodeParams(Map<String, Object> params) {
+        if (params == null) {
+            return "";
+        }
+        boolean first = true;
+        StringBuilder results = new StringBuilder();
+        for (Entry<String, Object> entry : params.entrySet()) {
+            if (entry.getValue() instanceof List) {
+                for (Object o : (List) entry.getValue()) {
+                    if (!isEmpty(o)) {
+                        if (!first) {
+                            results.append('&');
+                        }
+                        first = false;
+                        results.append(entry.getKey());
+                        results.append("=");
+                        try {
+                            results.append(encode(o.toString(), "UTF-8"));
+                        } catch (UnsupportedEncodingException e) {
+                            throw new ClientException("Unknown encoding", e);
+                        }
+                    }
+                }
+            } else if (!isEmpty(entry.getValue())) {
+                if (!first) {
+                    results.append('&');
+                }
+                first = false;
+                results.append(entry.getKey());
+                results.append("=");
+                try {
+                    results.append(encode(entry.getValue().toString(), "UTF-8"));
+                } catch (UnsupportedEncodingException e) {
+                    throw new ClientException("Unsupported string encoding", e);
+                }
+            }
+        }
+        return results.toString();
+    }
+
+    public static String addQueryParams(String url, Map<String, Object> params) {
+        if (params == null) {
+            return url;
+        }
+        if (!url.contains("?")) {
+            url += "?";
+        }
+        url += encodeParams(params);
+        return url;
+    }
+
+}


[61/96] [abbrv] USERGRID-2 package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/entities/class-use/Message.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/entities/class-use/Message.html b/sdks/android/doc/org/usergrid/android/client/entities/class-use/Message.html
index 4f98dd8..86e7380 100644
--- a/sdks/android/doc/org/usergrid/android/client/entities/class-use/Message.html
+++ b/sdks/android/doc/org/usergrid/android/client/entities/class-use/Message.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Class org.usergrid.android.client.entities.Message
+Uses of Class org.apache.usergrid.android.client.entities.Message
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Class org.usergrid.android.client.entities.Message
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Class org.usergrid.android.client.entities.Message";
+        parent.document.title="Uses of Class org.apache.usergrid.android.client.entities.Message";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,26 +81,26 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Class<br>org.usergrid.android.client.entities.Message</B></H2>
+<B>Uses of Class<br>org.apache.usergrid.android.client.entities.Message</B></H2>
 </CENTER>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Packages that use <A HREF="../../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A></FONT></TH>
+Packages that use <A HREF="../../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client.response"><B>org.usergrid.android.client.response</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client.response"><B>org.apache.usergrid.android.client.response</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client.response"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client.response"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A> in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A></FONT></TH>
+Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A> in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -108,11 +108,11 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Message.
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A> that return <A HREF="../../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A> that return <A HREF="../../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A></CODE></FONT></TD>
 <TD><CODE><B>ApiResponse.</B><B><A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html#getFirstMessage()">getFirstMessage</A></B>()</CODE>
 
 <BR>
@@ -124,11 +124,11 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Message.
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A> that return types with arguments of type <A HREF="../../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A> that return types with arguments of type <A HREF="../../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>&gt;</CODE></FONT></TD>
+<CODE>&nbsp;java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>&gt;</CODE></FONT></TD>
 <TD><CODE><B>ApiResponse.</B><B><A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html#getMessages()">getMessages</A></B>()</CODE>
 
 <BR>
@@ -140,12 +140,12 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Message.
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Method parameters in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A> with type arguments of type <A HREF="../../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Method parameters in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A> with type arguments of type <A HREF="../../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>ApiResponse.</B><B><A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html#setMessages(java.util.List)">setMessages</A></B>(java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>&gt;&nbsp;messages)</CODE>
+<TD><CODE><B>ApiResponse.</B><B><A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html#setMessages(java.util.List)">setMessages</A></B>(java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>&gt;&nbsp;messages)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -167,7 +167,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Message.
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/entities/class-use/User.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/entities/class-use/User.html b/sdks/android/doc/org/usergrid/android/client/entities/class-use/User.html
index cc76117..26b30c2 100644
--- a/sdks/android/doc/org/usergrid/android/client/entities/class-use/User.html
+++ b/sdks/android/doc/org/usergrid/android/client/entities/class-use/User.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Class org.usergrid.android.client.entities.User
+Uses of Class org.apache.usergrid.android.client.entities.User
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Class org.usergrid.android.client.entities.User
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Class org.usergrid.android.client.entities.User";
+        parent.document.title="Uses of Class org.apache.usergrid.android.client.entities.User";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,34 +81,34 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Class<br>org.usergrid.android.client.entities.User</B></H2>
+<B>Uses of Class<br>org.apache.usergrid.android.client.entities.User</B></H2>
 </CENTER>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Packages that use <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A></FONT></TH>
+Packages that use <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client"><B>org.usergrid.android.client</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client"><B>org.apache.usergrid.android.client</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client.entities"><B>org.usergrid.android.client.entities</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client.entities"><B>org.apache.usergrid.android.client.entities</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client.response"><B>org.usergrid.android.client.response</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client.response"><B>org.apache.usergrid.android.client.response</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A> in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A></FONT></TH>
+Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A> in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -116,11 +116,11 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/User.htm
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A> that return <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A> that return <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#getLoggedInUser()">getLoggedInUser</A></B>()</CODE>
 
 <BR>
@@ -132,17 +132,17 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/User.htm
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postGroupActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.entities.User, org.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)">postGroupActivity</A></B>(java.lang.String&nbsp;verb,
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postGroupActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.entities.User, org.apache.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)">postGroupActivity</A></B>(java.lang.String&nbsp;verb,
                   java.lang.String&nbsp;title,
                   java.lang.String&nbsp;content,
                   java.lang.String&nbsp;category,
-                  <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>&nbsp;user,
-                  <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;object,
+                  <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>&nbsp;user,
+                  <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;object,
                   java.lang.String&nbsp;objectType,
                   java.lang.String&nbsp;objectName,
                   java.lang.String&nbsp;objectContent)</CODE>
@@ -153,29 +153,29 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/User.htm
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postGroupActivityAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.entities.User, org.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">postGroupActivityAsync</A></B>(java.lang.String&nbsp;verb,
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postGroupActivityAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.entities.User, org.apache.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">postGroupActivityAsync</A></B>(java.lang.String&nbsp;verb,
                        java.lang.String&nbsp;title,
                        java.lang.String&nbsp;content,
                        java.lang.String&nbsp;category,
-                       <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>&nbsp;user,
-                       <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;object,
+                       <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>&nbsp;user,
+                       <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;object,
                        java.lang.String&nbsp;objectType,
                        java.lang.String&nbsp;objectName,
                        java.lang.String&nbsp;objectContent,
-                       <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+                       <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates and posts an activity to a group.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postUserActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.entities.User, org.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)">postUserActivity</A></B>(java.lang.String&nbsp;verb,
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postUserActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.entities.User, org.apache.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)">postUserActivity</A></B>(java.lang.String&nbsp;verb,
                  java.lang.String&nbsp;title,
                  java.lang.String&nbsp;content,
                  java.lang.String&nbsp;category,
-                 <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>&nbsp;user,
-                 <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;object,
+                 <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>&nbsp;user,
+                 <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;object,
                  java.lang.String&nbsp;objectType,
                  java.lang.String&nbsp;objectName,
                  java.lang.String&nbsp;objectContent)</CODE>
@@ -186,16 +186,16 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/User.htm
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postUserActivityAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.entities.User, org.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">postUserActivityAsync</A></B>(java.lang.String&nbsp;verb,
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postUserActivityAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.entities.User, org.apache.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">postUserActivityAsync</A></B>(java.lang.String&nbsp;verb,
                       java.lang.String&nbsp;title,
                       java.lang.String&nbsp;content,
                       java.lang.String&nbsp;category,
-                      <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>&nbsp;user,
-                      <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;object,
+                      <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>&nbsp;user,
+                      <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;object,
                       java.lang.String&nbsp;objectType,
                       java.lang.String&nbsp;objectName,
                       java.lang.String&nbsp;objectContent,
-                      <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+                      <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates and posts an activity to a user.</TD>
@@ -203,7 +203,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/User.htm
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#setLoggedInUser(org.usergrid.android.client.entities.User)">setLoggedInUser</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>&nbsp;loggedInUser)</CODE>
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#setLoggedInUser(org.apache.usergrid.android.client.entities.User)">setLoggedInUser</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>&nbsp;loggedInUser)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -211,11 +211,11 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/User.htm
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client.entities"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client.entities"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A> in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A></FONT></TH>
+Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A> in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -223,17 +223,17 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/User.htm
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>static&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A></CODE></FONT></TD>
-<TD><CODE><B>Activity.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html#newActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.entities.User, org.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)">newActivity</A></B>(java.lang.String&nbsp;verb,
+<CODE>static&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A></CODE></FONT></TD>
+<TD><CODE><B>Activity.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html#newActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.entities.User, org.apache.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)">newActivity</A></B>(java.lang.String&nbsp;verb,
             java.lang.String&nbsp;title,
             java.lang.String&nbsp;content,
             java.lang.String&nbsp;category,
-            <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>&nbsp;user,
-            <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;object,
+            <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>&nbsp;user,
+            <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;object,
             java.lang.String&nbsp;objectType,
             java.lang.String&nbsp;objectName,
             java.lang.String&nbsp;objectContent)</CODE>
@@ -244,11 +244,11 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/User.htm
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client.response"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client.response"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A> in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A></FONT></TH>
+Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A> in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -256,11 +256,11 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/User.htm
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A> that return <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A> that return <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A></CODE></FONT></TD>
 <TD><CODE><B>ApiResponse.</B><B><A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html#getUser()">getUser</A></B>()</CODE>
 
 <BR>
@@ -272,12 +272,12 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/User.htm
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>ApiResponse.</B><B><A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html#setUser(org.usergrid.android.client.entities.User)">setUser</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>&nbsp;user)</CODE>
+<TD><CODE><B>ApiResponse.</B><B><A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html#setUser(org.apache.usergrid.android.client.entities.User)">setUser</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>&nbsp;user)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -299,7 +299,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/User.htm
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/entities/package-frame.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/entities/package-frame.html b/sdks/android/doc/org/usergrid/android/client/entities/package-frame.html
index 61d42d0..78698db 100644
--- a/sdks/android/doc/org/usergrid/android/client/entities/package-frame.html
+++ b/sdks/android/doc/org/usergrid/android/client/entities/package-frame.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-org.usergrid.android.client.entities
+org.apache.usergrid.android.client.entities
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -16,30 +16,30 @@ org.usergrid.android.client.entities
 
 <BODY BGCOLOR="white">
 <FONT size="+1" CLASS="FrameTitleFont">
-<A HREF="../../../../../org/usergrid/android/client/entities/package-summary.html" target="classFrame">org.usergrid.android.client.entities</A></FONT>
+<A HREF="../../../../../org/usergrid/android/client/entities/package-summary.html" target="classFrame">org.apache.usergrid.android.client.entities</A></FONT>
 <TABLE BORDER="0" WIDTH="100%" SUMMARY="">
 <TR>
 <TD NOWRAP><FONT size="+1" CLASS="FrameHeadingFont">
 Classes</FONT>&nbsp;
 <FONT CLASS="FrameItemFont">
 <BR>
-<A HREF="Activity.html" title="class in org.usergrid.android.client.entities" target="classFrame">Activity</A>
+<A HREF="Activity.html" title="class in org.apache.usergrid.android.client.entities" target="classFrame">Activity</A>
 <BR>
-<A HREF="Activity.ActivityCollection.html" title="class in org.usergrid.android.client.entities" target="classFrame">Activity.ActivityCollection</A>
+<A HREF="Activity.ActivityCollection.html" title="class in org.apache.usergrid.android.client.entities" target="classFrame">Activity.ActivityCollection</A>
 <BR>
-<A HREF="Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities" target="classFrame">Activity.ActivityObject</A>
+<A HREF="Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities" target="classFrame">Activity.ActivityObject</A>
 <BR>
-<A HREF="Activity.MediaLink.html" title="class in org.usergrid.android.client.entities" target="classFrame">Activity.MediaLink</A>
+<A HREF="Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities" target="classFrame">Activity.MediaLink</A>
 <BR>
-<A HREF="Device.html" title="class in org.usergrid.android.client.entities" target="classFrame">Device</A>
+<A HREF="Device.html" title="class in org.apache.usergrid.android.client.entities" target="classFrame">Device</A>
 <BR>
-<A HREF="Entity.html" title="class in org.usergrid.android.client.entities" target="classFrame">Entity</A>
+<A HREF="Entity.html" title="class in org.apache.usergrid.android.client.entities" target="classFrame">Entity</A>
 <BR>
-<A HREF="Group.html" title="class in org.usergrid.android.client.entities" target="classFrame">Group</A>
+<A HREF="Group.html" title="class in org.apache.usergrid.android.client.entities" target="classFrame">Group</A>
 <BR>
-<A HREF="Message.html" title="class in org.usergrid.android.client.entities" target="classFrame">Message</A>
+<A HREF="Message.html" title="class in org.apache.usergrid.android.client.entities" target="classFrame">Message</A>
 <BR>
-<A HREF="User.html" title="class in org.usergrid.android.client.entities" target="classFrame">User</A></FONT></TD>
+<A HREF="User.html" title="class in org.apache.usergrid.android.client.entities" target="classFrame">User</A></FONT></TD>
 </TR>
 </TABLE>
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/entities/package-summary.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/entities/package-summary.html b/sdks/android/doc/org/usergrid/android/client/entities/package-summary.html
index e8bcd33..0ea9132 100644
--- a/sdks/android/doc/org/usergrid/android/client/entities/package-summary.html
+++ b/sdks/android/doc/org/usergrid/android/client/entities/package-summary.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-org.usergrid.android.client.entities
+org.apache.usergrid.android.client.entities
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ org.usergrid.android.client.entities
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="org.usergrid.android.client.entities";
+        parent.document.title="org.apache.usergrid.android.client.entities";
     }
 }
 </SCRIPT>
@@ -80,7 +80,7 @@ function windowTitle()
 
 <HR>
 <H2>
-Package org.usergrid.android.client.entities
+Package org.apache.usergrid.android.client.entities
 </H2>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
@@ -89,39 +89,39 @@ Package org.usergrid.android.client.entities
 <B>Class Summary</B></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A></B></TD>
 <TD>An entity type for representing activity stream actions.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.usergrid.android.client.entities">Activity.ActivityCollection</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityCollection</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities">Device</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities">Device</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 </TABLE>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/entities/package-tree.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/entities/package-tree.html b/sdks/android/doc/org/usergrid/android/client/entities/package-tree.html
index 6b1ddf2..defc550 100644
--- a/sdks/android/doc/org/usergrid/android/client/entities/package-tree.html
+++ b/sdks/android/doc/org/usergrid/android/client/entities/package-tree.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-org.usergrid.android.client.entities Class Hierarchy
+org.apache.usergrid.android.client.entities Class Hierarchy
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ org.usergrid.android.client.entities Class Hierarchy
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="org.usergrid.android.client.entities Class Hierarchy";
+        parent.document.title="org.apache.usergrid.android.client.entities Class Hierarchy";
     }
 }
 </SCRIPT>
@@ -81,7 +81,7 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-Hierarchy For Package org.usergrid.android.client.entities
+Hierarchy For Package org.apache.usergrid.android.client.entities
 </H2>
 </CENTER>
 <DL>
@@ -92,8 +92,8 @@ Class Hierarchy
 </H2>
 <UL>
 <LI TYPE="circle">java.lang.Object<UL>
-<LI TYPE="circle">org.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.usergrid.android.client.entities"><B>Activity.ActivityCollection</B></A><LI TYPE="circle">org.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities"><B>Activity.ActivityObject</B></A><LI TYPE="circle">org.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities"><B>Activity.MediaLink</B></A><LI TYPE="circle">org.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities"><B>Entity</B></A><UL>
-<LI TYPE="circle">org.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities"><B>Activity</B></A><LI TYPE="circle">org.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities"><B>Device</B></A><LI TYPE="circle">org.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities"><B>Group</B></A><LI TYPE="circle">org.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities"><B>Message</B></A><LI TYPE="circle">org.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities"><B>User</B><
 /A></UL>
+<LI TYPE="circle">org.apache.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.apache.usergrid.android.client.entities"><B>Activity.ActivityCollection</B></A><LI TYPE="circle">org.apache.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities"><B>Activity.ActivityObject</B></A><LI TYPE="circle">org.apache.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities"><B>Activity.MediaLink</B></A><LI TYPE="circle">org.apache.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities"><B>Entity</B></A><UL>
+<LI TYPE="circle">org.apache.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities"><B>Activity</B></A><LI TYPE="circle">org.apache.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities"><B>Device</B></A><LI TYPE="circle">org.apache.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities"><B>Group</B></A><LI TYPE="circle">org.apache.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities"><B>Message</B></A><LI TYPE="circle">org.apache.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/User.html" tit
 le="class in org.apache.usergrid.android.client.entities"><B>User</B></A></UL>
 </UL>
 </UL>
 <HR>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/entities/package-use.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/entities/package-use.html b/sdks/android/doc/org/usergrid/android/client/entities/package-use.html
index ff2d200..1551186 100644
--- a/sdks/android/doc/org/usergrid/android/client/entities/package-use.html
+++ b/sdks/android/doc/org/usergrid/android/client/entities/package-use.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Package org.usergrid.android.client.entities
+Uses of Package org.apache.usergrid.android.client.entities
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Package org.usergrid.android.client.entities
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Package org.usergrid.android.client.entities";
+        parent.document.title="Uses of Package org.apache.usergrid.android.client.entities";
     }
 }
 </SCRIPT>
@@ -81,65 +81,65 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Package<br>org.usergrid.android.client.entities</B></H2>
+<B>Uses of Package<br>org.apache.usergrid.android.client.entities</B></H2>
 </CENTER>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Packages that use <A HREF="../../../../../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A></FONT></TH>
+Packages that use <A HREF="../../../../../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client"><B>org.usergrid.android.client</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client"><B>org.apache.usergrid.android.client</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client.callbacks"><B>org.usergrid.android.client.callbacks</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client.callbacks"><B>org.apache.usergrid.android.client.callbacks</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client.entities"><B>org.usergrid.android.client.entities</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client.entities"><B>org.apache.usergrid.android.client.entities</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client.response"><B>org.usergrid.android.client.response</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client.response"><B>org.apache.usergrid.android.client.response</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Classes in <A HREF="../../../../../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A> used by <A HREF="../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A></FONT></TH>
+Classes in <A HREF="../../../../../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A> used by <A HREF="../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/Activity.html#org.usergrid.android.client"><B>Activity</B></A></B>
+<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/Activity.html#org.apache.usergrid.android.client"><B>Activity</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;An entity type for representing activity stream actions.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/Device.html#org.usergrid.android.client"><B>Device</B></A></B>
+<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/Device.html#org.apache.usergrid.android.client"><B>Device</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/Entity.html#org.usergrid.android.client"><B>Entity</B></A></B>
+<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/Entity.html#org.apache.usergrid.android.client"><B>Entity</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/Group.html#org.usergrid.android.client"><B>Group</B></A></B>
+<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/Group.html#org.apache.usergrid.android.client"><B>Group</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/User.html#org.usergrid.android.client"><B>User</B></A></B>
+<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/User.html#org.apache.usergrid.android.client"><B>User</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -147,20 +147,20 @@ Classes in <A HREF="../../../../../org/usergrid/android/client/entities/package-
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client.callbacks"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client.callbacks"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Classes in <A HREF="../../../../../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A> used by <A HREF="../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.usergrid.android.client.callbacks</A></FONT></TH>
+Classes in <A HREF="../../../../../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A> used by <A HREF="../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.apache.usergrid.android.client.callbacks</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/Device.html#org.usergrid.android.client.callbacks"><B>Device</B></A></B>
+<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/Device.html#org.apache.usergrid.android.client.callbacks"><B>Device</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/Group.html#org.usergrid.android.client.callbacks"><B>Group</B></A></B>
+<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/Group.html#org.apache.usergrid.android.client.callbacks"><B>Group</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -168,38 +168,38 @@ Classes in <A HREF="../../../../../org/usergrid/android/client/entities/package-
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client.entities"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client.entities"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Classes in <A HREF="../../../../../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A> used by <A HREF="../../../../../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A></FONT></TH>
+Classes in <A HREF="../../../../../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A> used by <A HREF="../../../../../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/Activity.html#org.usergrid.android.client.entities"><B>Activity</B></A></B>
+<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/Activity.html#org.apache.usergrid.android.client.entities"><B>Activity</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;An entity type for representing activity stream actions.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/Activity.ActivityObject.html#org.usergrid.android.client.entities"><B>Activity.ActivityObject</B></A></B>
+<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/Activity.ActivityObject.html#org.apache.usergrid.android.client.entities"><B>Activity.ActivityObject</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/Activity.MediaLink.html#org.usergrid.android.client.entities"><B>Activity.MediaLink</B></A></B>
+<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/Activity.MediaLink.html#org.apache.usergrid.android.client.entities"><B>Activity.MediaLink</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/Entity.html#org.usergrid.android.client.entities"><B>Entity</B></A></B>
+<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/Entity.html#org.apache.usergrid.android.client.entities"><B>Entity</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/User.html#org.usergrid.android.client.entities"><B>User</B></A></B>
+<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/User.html#org.apache.usergrid.android.client.entities"><B>User</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -207,26 +207,26 @@ Classes in <A HREF="../../../../../org/usergrid/android/client/entities/package-
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client.response"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client.response"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Classes in <A HREF="../../../../../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A> used by <A HREF="../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A></FONT></TH>
+Classes in <A HREF="../../../../../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A> used by <A HREF="../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/Entity.html#org.usergrid.android.client.response"><B>Entity</B></A></B>
+<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/Entity.html#org.apache.usergrid.android.client.response"><B>Entity</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/Message.html#org.usergrid.android.client.response"><B>Message</B></A></B>
+<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/Message.html#org.apache.usergrid.android.client.response"><B>Message</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/User.html#org.usergrid.android.client.response"><B>User</B></A></B>
+<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/User.html#org.apache.usergrid.android.client.response"><B>User</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/package-frame.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/package-frame.html b/sdks/android/doc/org/usergrid/android/client/package-frame.html
index 0ec29f8..9df588e 100644
--- a/sdks/android/doc/org/usergrid/android/client/package-frame.html
+++ b/sdks/android/doc/org/usergrid/android/client/package-frame.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-org.usergrid.android.client
+org.apache.usergrid.android.client
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -16,14 +16,14 @@ org.usergrid.android.client
 
 <BODY BGCOLOR="white">
 <FONT size="+1" CLASS="FrameTitleFont">
-<A HREF="../../../../org/usergrid/android/client/package-summary.html" target="classFrame">org.usergrid.android.client</A></FONT>
+<A HREF="../../../../org/usergrid/android/client/package-summary.html" target="classFrame">org.apache.usergrid.android.client</A></FONT>
 <TABLE BORDER="0" WIDTH="100%" SUMMARY="">
 <TR>
 <TD NOWRAP><FONT size="+1" CLASS="FrameHeadingFont">
 Interfaces</FONT>&nbsp;
 <FONT CLASS="FrameItemFont">
 <BR>
-<A HREF="Client.Query.html" title="interface in org.usergrid.android.client" target="classFrame"><I>Client.Query</I></A></FONT></TD>
+<A HREF="Client.Query.html" title="interface in org.apache.usergrid.android.client" target="classFrame"><I>Client.Query</I></A></FONT></TD>
 </TR>
 </TABLE>
 
@@ -34,7 +34,7 @@ Interfaces</FONT>&nbsp;
 Classes</FONT>&nbsp;
 <FONT CLASS="FrameItemFont">
 <BR>
-<A HREF="Client.html" title="class in org.usergrid.android.client" target="classFrame">Client</A></FONT></TD>
+<A HREF="Client.html" title="class in org.apache.usergrid.android.client" target="classFrame">Client</A></FONT></TD>
 </TR>
 </TABLE>
 
@@ -45,7 +45,7 @@ Classes</FONT>&nbsp;
 Enums</FONT>&nbsp;
 <FONT CLASS="FrameItemFont">
 <BR>
-<A HREF="Client.QueuePosition.html" title="enum in org.usergrid.android.client" target="classFrame">Client.QueuePosition</A></FONT></TD>
+<A HREF="Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client" target="classFrame">Client.QueuePosition</A></FONT></TD>
 </TR>
 </TABLE>
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/package-summary.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/package-summary.html b/sdks/android/doc/org/usergrid/android/client/package-summary.html
index 6e20d78..f1d48a2 100644
--- a/sdks/android/doc/org/usergrid/android/client/package-summary.html
+++ b/sdks/android/doc/org/usergrid/android/client/package-summary.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-org.usergrid.android.client
+org.apache.usergrid.android.client
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ org.usergrid.android.client
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="org.usergrid.android.client";
+        parent.document.title="org.apache.usergrid.android.client";
     }
 }
 </SCRIPT>
@@ -80,7 +80,7 @@ function windowTitle()
 
 <HR>
 <H2>
-Package org.usergrid.android.client
+Package org.apache.usergrid.android.client
 </H2>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
@@ -89,7 +89,7 @@ Package org.usergrid.android.client
 <B>Interface Summary</B></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 </TABLE>
@@ -103,7 +103,7 @@ Package org.usergrid.android.client
 <B>Class Summary</B></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A></B></TD>
 <TD>The Client class for accessing the Usergrid API.</TD>
 </TR>
 </TABLE>
@@ -117,7 +117,7 @@ Package org.usergrid.android.client
 <B>Enum Summary</B></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 </TABLE>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/package-tree.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/package-tree.html b/sdks/android/doc/org/usergrid/android/client/package-tree.html
index e6bc752..092eb73 100644
--- a/sdks/android/doc/org/usergrid/android/client/package-tree.html
+++ b/sdks/android/doc/org/usergrid/android/client/package-tree.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-org.usergrid.android.client Class Hierarchy
+org.apache.usergrid.android.client Class Hierarchy
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ org.usergrid.android.client Class Hierarchy
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="org.usergrid.android.client Class Hierarchy";
+        parent.document.title="org.apache.usergrid.android.client Class Hierarchy";
     }
 }
 </SCRIPT>
@@ -81,7 +81,7 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-Hierarchy For Package org.usergrid.android.client
+Hierarchy For Package org.apache.usergrid.android.client
 </H2>
 </CENTER>
 <DL>
@@ -92,13 +92,13 @@ Class Hierarchy
 </H2>
 <UL>
 <LI TYPE="circle">java.lang.Object<UL>
-<LI TYPE="circle">org.usergrid.android.client.<A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client"><B>Client</B></A></UL>
+<LI TYPE="circle">org.apache.usergrid.android.client.<A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client"><B>Client</B></A></UL>
 </UL>
 <H2>
 Interface Hierarchy
 </H2>
 <UL>
-<LI TYPE="circle">org.usergrid.android.client.<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client"><B>Client.Query</B></A></UL>
+<LI TYPE="circle">org.apache.usergrid.android.client.<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client"><B>Client.Query</B></A></UL>
 <H2>
 Enum Hierarchy
 </H2>
@@ -106,7 +106,7 @@ Enum Hierarchy
 <LI TYPE="circle">java.lang.Object<UL>
 <LI TYPE="circle">java.lang.Enum&lt;E&gt; (implements java.lang.Comparable&lt;T&gt;, java.io.Serializable)
 <UL>
-<LI TYPE="circle">org.usergrid.android.client.<A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client"><B>Client.QueuePosition</B></A></UL>
+<LI TYPE="circle">org.apache.usergrid.android.client.<A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client"><B>Client.QueuePosition</B></A></UL>
 </UL>
 </UL>
 <HR>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/package-use.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/package-use.html b/sdks/android/doc/org/usergrid/android/client/package-use.html
index 631ed79..4a8661d 100644
--- a/sdks/android/doc/org/usergrid/android/client/package-use.html
+++ b/sdks/android/doc/org/usergrid/android/client/package-use.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Package org.usergrid.android.client
+Uses of Package org.apache.usergrid.android.client
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Package org.usergrid.android.client
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Package org.usergrid.android.client";
+        parent.document.title="Uses of Package org.apache.usergrid.android.client";
     }
 }
 </SCRIPT>
@@ -81,45 +81,45 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Package<br>org.usergrid.android.client</B></H2>
+<B>Uses of Package<br>org.apache.usergrid.android.client</B></H2>
 </CENTER>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Packages that use <A HREF="../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A></FONT></TH>
+Packages that use <A HREF="../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client"><B>org.usergrid.android.client</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client"><B>org.apache.usergrid.android.client</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client.callbacks"><B>org.usergrid.android.client.callbacks</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client.callbacks"><B>org.apache.usergrid.android.client.callbacks</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Classes in <A HREF="../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A> used by <A HREF="../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A></FONT></TH>
+Classes in <A HREF="../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A> used by <A HREF="../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../org/usergrid/android/client/class-use/Client.html#org.usergrid.android.client"><B>Client</B></A></B>
+<TD><B><A HREF="../../../../org/usergrid/android/client/class-use/Client.html#org.apache.usergrid.android.client"><B>Client</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The Client class for accessing the Usergrid API.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../org/usergrid/android/client/class-use/Client.Query.html#org.usergrid.android.client"><B>Client.Query</B></A></B>
+<TD><B><A HREF="../../../../org/usergrid/android/client/class-use/Client.Query.html#org.apache.usergrid.android.client"><B>Client.Query</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../org/usergrid/android/client/class-use/Client.QueuePosition.html#org.usergrid.android.client"><B>Client.QueuePosition</B></A></B>
+<TD><B><A HREF="../../../../org/usergrid/android/client/class-use/Client.QueuePosition.html#org.apache.usergrid.android.client"><B>Client.QueuePosition</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -127,14 +127,14 @@ Classes in <A HREF="../../../../org/usergrid/android/client/package-summary.html
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client.callbacks"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client.callbacks"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Classes in <A HREF="../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A> used by <A HREF="../../../../org/usergrid/android/client/callbacks/package-summary.html">org.usergrid.android.client.callbacks</A></FONT></TH>
+Classes in <A HREF="../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A> used by <A HREF="../../../../org/usergrid/android/client/callbacks/package-summary.html">org.apache.usergrid.android.client.callbacks</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../org/usergrid/android/client/class-use/Client.Query.html#org.usergrid.android.client.callbacks"><B>Client.Query</B></A></B>
+<TD><B><A HREF="../../../../org/usergrid/android/client/class-use/Client.Query.html#org.apache.usergrid.android.client.callbacks"><B>Client.Query</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/response/AggregateCounter.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/response/AggregateCounter.html b/sdks/android/doc/org/usergrid/android/client/response/AggregateCounter.html
index 151df80..5971298 100644
--- a/sdks/android/doc/org/usergrid/android/client/response/AggregateCounter.html
+++ b/sdks/android/doc/org/usergrid/android/client/response/AggregateCounter.html
@@ -56,7 +56,7 @@ function windowTitle()
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 &nbsp;PREV CLASS&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/response/AggregateCounter.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="AggregateCounter.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
@@ -88,12 +88,12 @@ DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&n
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client.response</FONT>
+org.apache.usergrid.android.client.response</FONT>
 <BR>
 Class AggregateCounter</H2>
 <PRE>
 java.lang.Object
-  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.usergrid.android.client.response.AggregateCounter</B>
+  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.usergrid.android.client.response.AggregateCounter</B>
 </PRE>
 <HR>
 <DL>
@@ -299,7 +299,7 @@ public java.lang.String <B>toString</B>()</PRE>
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 &nbsp;PREV CLASS&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/response/AggregateCounter.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="AggregateCounter.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;


[65/96] [abbrv] USERGRID-2 package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/class-use/Client.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/class-use/Client.html b/sdks/android/doc/org/usergrid/android/client/class-use/Client.html
index 6e8b3c1..52f8d0a 100644
--- a/sdks/android/doc/org/usergrid/android/client/class-use/Client.html
+++ b/sdks/android/doc/org/usergrid/android/client/class-use/Client.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Class org.usergrid.android.client.Client
+Uses of Class org.apache.usergrid.android.client.Client
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Class org.usergrid.android.client.Client
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Class org.usergrid.android.client.Client";
+        parent.document.title="Uses of Class org.apache.usergrid.android.client.Client";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,26 +81,26 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Class<br>org.usergrid.android.client.Client</B></H2>
+<B>Uses of Class<br>org.apache.usergrid.android.client.Client</B></H2>
 </CENTER>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Packages that use <A HREF="../../../../../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A></FONT></TH>
+Packages that use <A HREF="../../../../../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client"><B>org.usergrid.android.client</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client"><B>org.apache.usergrid.android.client</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A> in <A HREF="../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A></FONT></TH>
+Uses of <A HREF="../../../../../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A> in <A HREF="../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -108,11 +108,11 @@ Uses of <A HREF="../../../../../org/usergrid/android/client/Client.html" title="
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A> that return <A HREF="../../../../../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A> that return <A HREF="../../../../../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../org/usergrid/android/client/Client.html#withApiUrl(java.lang.String)">withApiUrl</A></B>(java.lang.String&nbsp;apiUrl)</CODE>
 
 <BR>
@@ -120,7 +120,7 @@ Uses of <A HREF="../../../../../org/usergrid/android/client/Client.html" title="
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../org/usergrid/android/client/Client.html#withApplicationId(java.lang.String)">withApplicationId</A></B>(java.lang.String&nbsp;applicationId)</CODE>
 
 <BR>
@@ -128,7 +128,7 @@ Uses of <A HREF="../../../../../org/usergrid/android/client/Client.html" title="
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../org/usergrid/android/client/Client.html#withClientId(java.lang.String)">withClientId</A></B>(java.lang.String&nbsp;clientId)</CODE>
 
 <BR>
@@ -136,7 +136,7 @@ Uses of <A HREF="../../../../../org/usergrid/android/client/Client.html" title="
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../org/usergrid/android/client/Client.html#withClientSecret(java.lang.String)">withClientSecret</A></B>(java.lang.String&nbsp;clientSecret)</CODE>
 
 <BR>
@@ -159,7 +159,7 @@ Uses of <A HREF="../../../../../org/usergrid/android/client/Client.html" title="
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/entities/Activity.ActivityCollection.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/entities/Activity.ActivityCollection.html b/sdks/android/doc/org/usergrid/android/client/entities/Activity.ActivityCollection.html
index 71fa6e4..25ba3ef 100644
--- a/sdks/android/doc/org/usergrid/android/client/entities/Activity.ActivityCollection.html
+++ b/sdks/android/doc/org/usergrid/android/client/entities/Activity.ActivityCollection.html
@@ -55,8 +55,8 @@ function windowTitle()
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/entities/Activity.ActivityCollection.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="Activity.ActivityCollection.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
@@ -88,15 +88,15 @@ DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&n
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client.entities</FONT>
+org.apache.usergrid.android.client.entities</FONT>
 <BR>
 Class Activity.ActivityCollection</H2>
 <PRE>
 java.lang.Object
-  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.usergrid.android.client.entities.Activity.ActivityCollection</B>
+  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.usergrid.android.client.entities.Activity.ActivityCollection</B>
 </PRE>
 <DL>
-<DT><B>Enclosing class:</B><DD><A HREF="../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A></DD>
+<DT><B>Enclosing class:</B><DD><A HREF="../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A></DD>
 </DL>
 <HR>
 <DL>
@@ -142,7 +142,7 @@ java.lang.Object
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>[]</CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>[]</CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityCollection.html#getItems()">getItems</A></B>()</CODE>
 
 <BR>
@@ -176,7 +176,7 @@ java.lang.Object
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityCollection.html#setItems(org.usergrid.android.client.entities.Activity.ActivityObject[])">setItems</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>[]&nbsp;items)</CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityCollection.html#setItems(org.apache.usergrid.android.client.entities.Activity.ActivityObject[])">setItems</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>[]&nbsp;items)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -270,7 +270,7 @@ public void <B>setTotalItems</B>(int&nbsp;totalItems)</PRE>
 <A NAME="getItems()"><!-- --></A><H3>
 getItems</H3>
 <PRE>
-public <A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>[] <B>getItems</B>()</PRE>
+public <A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>[] <B>getItems</B>()</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -278,10 +278,10 @@ public <A HREF="../../../../../org/usergrid/android/client/entities/Activity.Act
 </DL>
 <HR>
 
-<A NAME="setItems(org.usergrid.android.client.entities.Activity.ActivityObject[])"><!-- --></A><H3>
+<A NAME="setItems(org.apache.usergrid.android.client.entities.Activity.ActivityObject[])"><!-- --></A><H3>
 setItems</H3>
 <PRE>
-public void <B>setItems</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>[]&nbsp;items)</PRE>
+public void <B>setItems</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>[]&nbsp;items)</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -377,8 +377,8 @@ public java.lang.String <B>toString</B>()</PRE>
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/entities/Activity.ActivityCollection.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="Activity.ActivityCollection.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/entities/Activity.ActivityObject.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/entities/Activity.ActivityObject.html b/sdks/android/doc/org/usergrid/android/client/entities/Activity.ActivityObject.html
index f637c9d..8064315 100644
--- a/sdks/android/doc/org/usergrid/android/client/entities/Activity.ActivityObject.html
+++ b/sdks/android/doc/org/usergrid/android/client/entities/Activity.ActivityObject.html
@@ -55,8 +55,8 @@ function windowTitle()
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.apache.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/entities/Activity.ActivityObject.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="Activity.ActivityObject.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
@@ -88,15 +88,15 @@ DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&n
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client.entities</FONT>
+org.apache.usergrid.android.client.entities</FONT>
 <BR>
 Class Activity.ActivityObject</H2>
 <PRE>
 java.lang.Object
-  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.usergrid.android.client.entities.Activity.ActivityObject</B>
+  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.usergrid.android.client.entities.Activity.ActivityObject</B>
 </PRE>
 <DL>
-<DT><B>Enclosing class:</B><DD><A HREF="../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A></DD>
+<DT><B>Enclosing class:</B><DD><A HREF="../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A></DD>
 </DL>
 <HR>
 <DL>
@@ -134,7 +134,7 @@ java.lang.Object
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>[]</CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>[]</CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html#getAttachments()">getAttachments</A></B>()</CODE>
 
 <BR>
@@ -142,7 +142,7 @@ java.lang.Object
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html#getAuthor()">getAuthor</A></B>()</CODE>
 
 <BR>
@@ -198,7 +198,7 @@ java.lang.Object
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html#getImage()">getImage</A></B>()</CODE>
 
 <BR>
@@ -263,7 +263,7 @@ java.lang.Object
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html#setAttachments(org.usergrid.android.client.entities.Activity.ActivityObject[])">setAttachments</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>[]&nbsp;attachments)</CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html#setAttachments(org.apache.usergrid.android.client.entities.Activity.ActivityObject[])">setAttachments</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>[]&nbsp;attachments)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -271,7 +271,7 @@ java.lang.Object
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html#setAuthor(org.usergrid.android.client.entities.Activity.ActivityObject)">setAuthor</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>&nbsp;author)</CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html#setAuthor(org.apache.usergrid.android.client.entities.Activity.ActivityObject)">setAuthor</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>&nbsp;author)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -328,7 +328,7 @@ java.lang.Object
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html#setImage(org.usergrid.android.client.entities.Activity.MediaLink)">setImage</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A>&nbsp;image)</CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html#setImage(org.apache.usergrid.android.client.entities.Activity.MediaLink)">setImage</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A>&nbsp;image)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -440,7 +440,7 @@ public <B>Activity.ActivityObject</B>()</PRE>
 <A NAME="getAttachments()"><!-- --></A><H3>
 getAttachments</H3>
 <PRE>
-public <A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>[] <B>getAttachments</B>()</PRE>
+public <A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>[] <B>getAttachments</B>()</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -448,10 +448,10 @@ public <A HREF="../../../../../org/usergrid/android/client/entities/Activity.Act
 </DL>
 <HR>
 
-<A NAME="setAttachments(org.usergrid.android.client.entities.Activity.ActivityObject[])"><!-- --></A><H3>
+<A NAME="setAttachments(org.apache.usergrid.android.client.entities.Activity.ActivityObject[])"><!-- --></A><H3>
 setAttachments</H3>
 <PRE>
-public void <B>setAttachments</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>[]&nbsp;attachments)</PRE>
+public void <B>setAttachments</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>[]&nbsp;attachments)</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -462,7 +462,7 @@ public void <B>setAttachments</B>(<A HREF="../../../../../org/usergrid/android/c
 <A NAME="getAuthor()"><!-- --></A><H3>
 getAuthor</H3>
 <PRE>
-public <A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A> <B>getAuthor</B>()</PRE>
+public <A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A> <B>getAuthor</B>()</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -470,10 +470,10 @@ public <A HREF="../../../../../org/usergrid/android/client/entities/Activity.Act
 </DL>
 <HR>
 
-<A NAME="setAuthor(org.usergrid.android.client.entities.Activity.ActivityObject)"><!-- --></A><H3>
+<A NAME="setAuthor(org.apache.usergrid.android.client.entities.Activity.ActivityObject)"><!-- --></A><H3>
 setAuthor</H3>
 <PRE>
-public void <B>setAuthor</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>&nbsp;author)</PRE>
+public void <B>setAuthor</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>&nbsp;author)</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -572,7 +572,7 @@ public void <B>setId</B>(java.lang.String&nbsp;id)</PRE>
 <A NAME="getImage()"><!-- --></A><H3>
 getImage</H3>
 <PRE>
-public <A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A> <B>getImage</B>()</PRE>
+public <A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A> <B>getImage</B>()</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -580,10 +580,10 @@ public <A HREF="../../../../../org/usergrid/android/client/entities/Activity.Med
 </DL>
 <HR>
 
-<A NAME="setImage(org.usergrid.android.client.entities.Activity.MediaLink)"><!-- --></A><H3>
+<A NAME="setImage(org.apache.usergrid.android.client.entities.Activity.MediaLink)"><!-- --></A><H3>
 setImage</H3>
 <PRE>
-public void <B>setImage</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A>&nbsp;image)</PRE>
+public void <B>setImage</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A>&nbsp;image)</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -833,8 +833,8 @@ public java.lang.String <B>toString</B>()</PRE>
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.apache.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/entities/Activity.ActivityObject.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="Activity.ActivityObject.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/entities/Activity.MediaLink.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/entities/Activity.MediaLink.html b/sdks/android/doc/org/usergrid/android/client/entities/Activity.MediaLink.html
index 1d6b4ba..a8139b5 100644
--- a/sdks/android/doc/org/usergrid/android/client/entities/Activity.MediaLink.html
+++ b/sdks/android/doc/org/usergrid/android/client/entities/Activity.MediaLink.html
@@ -55,8 +55,8 @@ function windowTitle()
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/entities/Activity.MediaLink.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="Activity.MediaLink.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
@@ -88,15 +88,15 @@ DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&n
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client.entities</FONT>
+org.apache.usergrid.android.client.entities</FONT>
 <BR>
 Class Activity.MediaLink</H2>
 <PRE>
 java.lang.Object
-  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.usergrid.android.client.entities.Activity.MediaLink</B>
+  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.usergrid.android.client.entities.Activity.MediaLink</B>
 </PRE>
 <DL>
-<DT><B>Enclosing class:</B><DD><A HREF="../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A></DD>
+<DT><B>Enclosing class:</B><DD><A HREF="../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A></DD>
 </DL>
 <HR>
 <DL>
@@ -415,8 +415,8 @@ public java.lang.String <B>toString</B>()</PRE>
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/entities/Activity.MediaLink.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="Activity.MediaLink.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;


[20/96] [abbrv] [partial] Change package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/mq/cassandra/QueueManagerImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/mq/cassandra/QueueManagerImpl.java b/stack/core/src/main/java/org/usergrid/mq/cassandra/QueueManagerImpl.java
deleted file mode 100644
index fd18e55..0000000
--- a/stack/core/src/main/java/org/usergrid/mq/cassandra/QueueManagerImpl.java
+++ /dev/null
@@ -1,1391 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.mq.cassandra;
-
-
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeSet;
-import java.util.UUID;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.usergrid.locking.LockManager;
-import org.usergrid.mq.CounterQuery;
-import org.usergrid.mq.Message;
-import org.usergrid.mq.Query;
-import org.usergrid.mq.Query.CounterFilterPredicate;
-import org.usergrid.mq.QueryProcessor;
-import org.usergrid.mq.QueryProcessor.QuerySlice;
-import org.usergrid.mq.Queue;
-import org.usergrid.mq.QueueManager;
-import org.usergrid.mq.QueueQuery;
-import org.usergrid.mq.QueueResults;
-import org.usergrid.mq.QueueSet;
-import org.usergrid.mq.QueueSet.QueueInfo;
-import org.usergrid.mq.cassandra.QueueIndexUpdate.QueueIndexEntry;
-import org.usergrid.mq.cassandra.io.ConsumerTransaction;
-import org.usergrid.mq.cassandra.io.EndSearch;
-import org.usergrid.mq.cassandra.io.FilterSearch;
-import org.usergrid.mq.cassandra.io.NoTransactionSearch;
-import org.usergrid.mq.cassandra.io.QueueBounds;
-import org.usergrid.mq.cassandra.io.QueueSearch;
-import org.usergrid.mq.cassandra.io.StartSearch;
-import org.usergrid.persistence.AggregateCounter;
-import org.usergrid.persistence.AggregateCounterSet;
-import org.usergrid.persistence.CounterResolution;
-import org.usergrid.persistence.Results;
-import org.usergrid.persistence.cassandra.CassandraPersistenceUtils;
-import org.usergrid.persistence.cassandra.CassandraService;
-import org.usergrid.persistence.cassandra.CounterUtils;
-import org.usergrid.persistence.cassandra.CounterUtils.AggregateCounterSelection;
-import org.usergrid.persistence.exceptions.TransactionNotFoundException;
-import org.usergrid.utils.UUIDUtils;
-
-import com.fasterxml.uuid.UUIDComparator;
-
-import me.prettyprint.cassandra.serializers.ByteBufferSerializer;
-import me.prettyprint.cassandra.serializers.BytesArraySerializer;
-import me.prettyprint.cassandra.serializers.DynamicCompositeSerializer;
-import me.prettyprint.cassandra.serializers.LongSerializer;
-import me.prettyprint.cassandra.serializers.StringSerializer;
-import me.prettyprint.cassandra.serializers.UUIDSerializer;
-import me.prettyprint.hector.api.Keyspace;
-import me.prettyprint.hector.api.beans.AbstractComposite.ComponentEquality;
-import me.prettyprint.hector.api.beans.ColumnSlice;
-import me.prettyprint.hector.api.beans.CounterRow;
-import me.prettyprint.hector.api.beans.CounterRows;
-import me.prettyprint.hector.api.beans.CounterSlice;
-import me.prettyprint.hector.api.beans.DynamicComposite;
-import me.prettyprint.hector.api.beans.HColumn;
-import me.prettyprint.hector.api.beans.HCounterColumn;
-import me.prettyprint.hector.api.factory.HFactory;
-import me.prettyprint.hector.api.mutation.Mutator;
-import me.prettyprint.hector.api.query.MultigetSliceCounterQuery;
-import me.prettyprint.hector.api.query.QueryResult;
-import me.prettyprint.hector.api.query.SliceCounterQuery;
-import me.prettyprint.hector.api.query.SliceQuery;
-
-import static me.prettyprint.hector.api.factory.HFactory.createColumn;
-import static me.prettyprint.hector.api.factory.HFactory.createCounterSliceQuery;
-import static me.prettyprint.hector.api.factory.HFactory.createMutator;
-import static me.prettyprint.hector.api.factory.HFactory.createSliceQuery;
-import static org.usergrid.mq.Queue.QUEUE_CREATED;
-import static org.usergrid.mq.Queue.QUEUE_MODIFIED;
-import static org.usergrid.mq.Queue.QUEUE_NEWEST;
-import static org.usergrid.mq.Queue.QUEUE_OLDEST;
-import static org.usergrid.mq.Queue.getQueueId;
-import static org.usergrid.mq.Queue.normalizeQueuePath;
-import static org.usergrid.mq.QueuePosition.CONSUMER;
-import static org.usergrid.mq.QueuePosition.END;
-import static org.usergrid.mq.QueuePosition.LAST;
-import static org.usergrid.mq.QueuePosition.START;
-import static org.usergrid.mq.cassandra.CassandraMQUtils.addMessageToMutator;
-import static org.usergrid.mq.cassandra.CassandraMQUtils.addQueueToMutator;
-import static org.usergrid.mq.cassandra.CassandraMQUtils.deserializeMessage;
-import static org.usergrid.mq.cassandra.CassandraMQUtils.deserializeQueue;
-import static org.usergrid.mq.cassandra.CassandraMQUtils.getQueueShardRowKey;
-import static org.usergrid.mq.cassandra.QueueIndexUpdate.indexValueCode;
-import static org.usergrid.mq.cassandra.QueueIndexUpdate.toIndexableValue;
-import static org.usergrid.mq.cassandra.QueueIndexUpdate.validIndexableValue;
-import static org.usergrid.mq.cassandra.QueueIndexUpdate.validIndexableValueOrJson;
-import static org.usergrid.mq.cassandra.QueuesCF.COUNTERS;
-import static org.usergrid.mq.cassandra.QueuesCF.MESSAGE_PROPERTIES;
-import static org.usergrid.mq.cassandra.QueuesCF.PROPERTY_INDEX;
-import static org.usergrid.mq.cassandra.QueuesCF.PROPERTY_INDEX_ENTRIES;
-import static org.usergrid.mq.cassandra.QueuesCF.QUEUE_DICTIONARIES;
-import static org.usergrid.mq.cassandra.QueuesCF.QUEUE_INBOX;
-import static org.usergrid.mq.cassandra.QueuesCF.QUEUE_PROPERTIES;
-import static org.usergrid.mq.cassandra.QueuesCF.QUEUE_SUBSCRIBERS;
-import static org.usergrid.mq.cassandra.QueuesCF.QUEUE_SUBSCRIPTIONS;
-import static org.usergrid.persistence.Schema.DICTIONARY_COUNTERS;
-import static org.usergrid.persistence.cassandra.ApplicationCF.APPLICATION_AGGREGATE_COUNTERS;
-import static org.usergrid.persistence.cassandra.CassandraPersistenceUtils.batchExecute;
-import static org.usergrid.persistence.cassandra.CassandraPersistenceUtils.key;
-import static org.usergrid.persistence.cassandra.CassandraService.RETRY_COUNT;
-import static org.usergrid.utils.CompositeUtils.setEqualityFlag;
-import static org.usergrid.utils.CompositeUtils.setGreaterThanEqualityFlag;
-import static org.usergrid.utils.ConversionUtils.bytebuffer;
-import static org.usergrid.utils.IndexUtils.getKeyValueList;
-import static org.usergrid.utils.MapUtils.emptyMapWithKeys;
-import static org.usergrid.utils.NumberUtils.roundLong;
-import static org.usergrid.utils.UUIDUtils.getTimestampInMicros;
-import static org.usergrid.utils.UUIDUtils.newTimeUUID;
-
-
-public class QueueManagerImpl implements QueueManager {
-
-    public static final Logger logger = LoggerFactory.getLogger( QueueManagerImpl.class );
-
-    public static final String DICTIONARY_SUBSCRIBER_INDEXES = "subscriber_indexes";
-    public static final String DICTIONARY_MESSAGE_INDEXES = "message_indexes";
-
-    public static final int QUEUE_SHARD_INTERVAL = 1000 * 60 * 60 * 24;
-    public static final int INDEX_ENTRY_LIST_COUNT = 1000;
-
-    public static final int DEFAULT_SEARCH_COUNT = 10000;
-    public static final int ALL_COUNT = 100000000;
-
-    private UUID applicationId;
-    private CassandraService cass;
-    private CounterUtils counterUtils;
-    private LockManager lockManager;
-    private int lockTimeout;
-
-    public static final StringSerializer se = new StringSerializer();
-    public static final ByteBufferSerializer be = new ByteBufferSerializer();
-    public static final UUIDSerializer ue = new UUIDSerializer();
-    public static final BytesArraySerializer bae = new BytesArraySerializer();
-    public static final DynamicCompositeSerializer dce = new DynamicCompositeSerializer();
-    public static final LongSerializer le = new LongSerializer();
-
-
-    public QueueManagerImpl() {
-    }
-
-
-    public QueueManagerImpl init( CassandraService cass, CounterUtils counterUtils, LockManager lockManager,
-                                  UUID applicationId, int lockTimeout ) {
-        this.cass = cass;
-        this.counterUtils = counterUtils;
-        this.applicationId = applicationId;
-        this.lockManager = lockManager;
-        this.lockTimeout = lockTimeout;
-        return this;
-    }
-
-
-    @Override
-    public Message getMessage( UUID messageId ) {
-        SliceQuery<UUID, String, ByteBuffer> q =
-                createSliceQuery( cass.getApplicationKeyspace( applicationId ), ue, se, be );
-        q.setColumnFamily( MESSAGE_PROPERTIES.getColumnFamily() );
-        q.setKey( messageId );
-        q.setRange( null, null, false, ALL_COUNT );
-        QueryResult<ColumnSlice<String, ByteBuffer>> r = q.execute();
-        ColumnSlice<String, ByteBuffer> slice = r.get();
-        List<HColumn<String, ByteBuffer>> results = slice.getColumns();
-        return deserializeMessage( results );
-    }
-
-
-    public Message batchPostToQueue( Mutator<ByteBuffer> batch, String queuePath, Message message,
-                                     MessageIndexUpdate indexUpdate, long timestamp ) {
-
-        queuePath = normalizeQueuePath( queuePath );
-        UUID queueId = getQueueId( queuePath );
-
-        message.sync();
-
-        addMessageToMutator( batch, message, timestamp );
-
-        long shard_ts = roundLong( message.getTimestamp(), QUEUE_SHARD_INTERVAL );
-
-        logger.debug( "Adding message with id '{}' to queue '{}'", message.getUuid(), queueId );
-
-        batch.addInsertion( getQueueShardRowKey( queueId, shard_ts ), QUEUE_INBOX.getColumnFamily(),
-                createColumn( message.getUuid(), ByteBuffer.allocate( 0 ), timestamp, ue, be ) );
-
-        long oldest_ts = Long.MAX_VALUE - getTimestampInMicros( message.getUuid() );
-        batch.addInsertion( bytebuffer( queueId ), QUEUE_PROPERTIES.getColumnFamily(),
-                createColumn( QUEUE_OLDEST, message.getUuid(), oldest_ts, se, ue ) );
-
-        long newest_ts = getTimestampInMicros( message.getUuid() );
-        batch.addInsertion( bytebuffer( queueId ), QUEUE_PROPERTIES.getColumnFamily(),
-                createColumn( QUEUE_NEWEST, message.getUuid(), newest_ts, se, ue ) );
-
-        batch.addInsertion( bytebuffer( getQueueId( "/" ) ), QUEUE_SUBSCRIBERS.getColumnFamily(),
-                createColumn( queuePath, queueId, timestamp, se, ue ) );
-
-        counterUtils.batchIncrementQueueCounter( batch, getQueueId( "/" ), queuePath, 1L, timestamp, applicationId );
-
-        if ( indexUpdate == null ) {
-            indexUpdate = new MessageIndexUpdate( message );
-        }
-        indexUpdate.addToMutation( batch, queueId, shard_ts, timestamp );
-
-        counterUtils.addMessageCounterMutations( batch, applicationId, queueId, message, timestamp );
-
-        batch.addInsertion( bytebuffer( queueId ), QUEUE_PROPERTIES.getColumnFamily(),
-                createColumn( QUEUE_CREATED, timestamp / 1000, Long.MAX_VALUE - timestamp, se, le ) );
-
-        batch.addInsertion( bytebuffer( queueId ), QUEUE_PROPERTIES.getColumnFamily(),
-                createColumn( QUEUE_MODIFIED, timestamp / 1000, timestamp, se, le ) );
-
-        return message;
-    }
-
-
-    @Override
-    public Message postToQueue( String queuePath, Message message ) {
-        long timestamp = cass.createTimestamp();
-        Mutator<ByteBuffer> batch = createMutator( cass.getApplicationKeyspace( applicationId ), be );
-
-        queuePath = normalizeQueuePath( queuePath );
-
-        MessageIndexUpdate indexUpdate = new MessageIndexUpdate( message );
-
-        batchPostToQueue( batch, queuePath, message, indexUpdate, timestamp );
-
-        batchExecute( batch, RETRY_COUNT );
-
-        String firstSubscriberQueuePath = null;
-        while ( true ) {
-
-            QueueSet subscribers = getSubscribers( queuePath, firstSubscriberQueuePath, 1000 );
-
-            if ( subscribers.getQueues().isEmpty() ) {
-                break;
-            }
-
-            batch = createMutator( cass.getApplicationKeyspace( applicationId ), be );
-            for ( QueueInfo q : subscribers.getQueues() ) {
-                batchPostToQueue( batch, q.getPath(), message, indexUpdate, timestamp );
-
-                firstSubscriberQueuePath = q.getPath();
-            }
-            batchExecute( batch, RETRY_COUNT );
-
-            if ( !subscribers.hasMore() ) {
-                break;
-            }
-        }
-
-        return message;
-    }
-
-
-    @Override
-    public List<Message> postToQueue( String queuePath, List<Message> messages ) {
-
-        // Can't do this as one big batch operation because it will
-        // time out
-
-        for ( Message message : messages ) {
-            postToQueue( queuePath, message );
-        }
-
-        return messages;
-    }
-
-
-    static TreeSet<UUID> add( TreeSet<UUID> a, UUID uuid, boolean reversed, int limit ) {
-
-        if ( a == null ) {
-            a = new TreeSet<UUID>( new UUIDComparator() );
-        }
-
-        if ( uuid == null ) {
-            return a;
-        }
-
-        // if we have less than the limit, just add it
-        if ( a.size() < limit ) {
-            a.add( uuid );
-        }
-        else if ( reversed ) {
-            // if reversed, we want to add more recent messages
-            // and eject the oldest
-            if ( UUIDComparator.staticCompare( uuid, a.first() ) > 0 ) {
-                a.pollFirst();
-                a.add( uuid );
-            }
-        }
-        else {
-            // add older messages and eject the newset
-            if ( UUIDComparator.staticCompare( uuid, a.last() ) < 0 ) {
-                a.pollLast();
-                a.add( uuid );
-            }
-        }
-
-        return a;
-    }
-
-
-    static TreeSet<UUID> add( TreeSet<UUID> a, TreeSet<UUID> b, boolean reversed, int limit ) {
-
-        if ( b == null ) {
-            return a;
-        }
-
-        for ( UUID uuid : b ) {
-            a = add( a, uuid, reversed, limit );
-        }
-
-        return a;
-    }
-
-
-    static TreeSet<UUID> mergeOr( TreeSet<UUID> a, TreeSet<UUID> b, boolean reversed, int limit ) {
-        TreeSet<UUID> mergeSet = new TreeSet<UUID>( new UUIDComparator() );
-
-        if ( ( a == null ) && ( b == null ) ) {
-            return mergeSet;
-        }
-        else if ( a == null ) {
-            return b;
-        }
-        else if ( b == null ) {
-            return a;
-        }
-
-        add( mergeSet, a, reversed, limit );
-        add( mergeSet, b, reversed, limit );
-
-        return mergeSet;
-    }
-
-
-    static TreeSet<UUID> mergeAnd( TreeSet<UUID> a, TreeSet<UUID> b, boolean reversed, int limit ) {
-        TreeSet<UUID> mergeSet = new TreeSet<UUID>( new UUIDComparator() );
-
-        if ( a == null ) {
-            return mergeSet;
-        }
-        if ( b == null ) {
-            return mergeSet;
-        }
-
-        for ( UUID uuid : b ) {
-            if ( a.contains( b ) ) {
-                add( mergeSet, uuid, reversed, limit );
-            }
-        }
-
-        return mergeSet;
-    }
-
-
-    @Override
-    public QueueResults getFromQueue( String queuePath, QueueQuery query ) {
-
-        if ( query == null ) {
-            query = new QueueQuery();
-        }
-
-        Keyspace ko = cass.getApplicationKeyspace( applicationId );
-
-        QueueSearch search = null;
-
-        if ( query.hasFilterPredicates() ) {
-            search = new FilterSearch( ko );
-        }
-
-        else if ( query.getPosition() == LAST || query.getPosition() == CONSUMER ) {
-            if ( query.getTimeout() > 0 ) {
-                search = new ConsumerTransaction( applicationId, ko, lockManager, cass, lockTimeout );
-            }
-            else {
-                search = new NoTransactionSearch( ko );
-            }
-        }
-        else if ( query.getPosition() == START ) {
-
-            search = new StartSearch( ko );
-        }
-        else if ( query.getPosition() == END ) {
-            search = new EndSearch( ko );
-        }
-        else {
-            throw new IllegalArgumentException( "You must specify a valid position or query" );
-        }
-
-        return search.getResults( queuePath, query );
-    }
-
-
-    public void batchSubscribeToQueue( Mutator<ByteBuffer> batch, String publisherQueuePath, UUID publisherQueueId,
-                                       String subscriberQueuePath, UUID subscriberQueueId, long timestamp ) {
-
-        batch.addInsertion( bytebuffer( publisherQueueId ), QUEUE_SUBSCRIBERS.getColumnFamily(),
-                createColumn( subscriberQueuePath, subscriberQueueId, timestamp, se, ue ) );
-
-        batch.addInsertion( bytebuffer( subscriberQueueId ), QUEUE_SUBSCRIPTIONS.getColumnFamily(),
-                createColumn( publisherQueuePath, publisherQueueId, timestamp, se, ue ) );
-    }
-
-
-    @Override
-    public QueueSet subscribeToQueue( String publisherQueuePath, String subscriberQueuePath ) {
-
-        publisherQueuePath = normalizeQueuePath( publisherQueuePath );
-        UUID publisherQueueId = getQueueId( publisherQueuePath );
-
-        subscriberQueuePath = normalizeQueuePath( subscriberQueuePath );
-        UUID subscriberQueueId = getQueueId( subscriberQueuePath );
-
-        UUID timestampUuid = newTimeUUID();
-        long timestamp = getTimestampInMicros( timestampUuid );
-
-        Mutator<ByteBuffer> batch = createMutator( cass.getApplicationKeyspace( applicationId ), be );
-
-        batchSubscribeToQueue( batch, publisherQueuePath, publisherQueueId, subscriberQueuePath, subscriberQueueId,
-                timestamp );
-
-        try {
-            Queue queue = getQueue( subscriberQueuePath, subscriberQueueId );
-            if ( queue != null ) {
-                batchUpdateQueuePropertiesIndexes( batch, publisherQueueId, subscriberQueuePath, subscriberQueueId,
-                        queue.getProperties(), timestampUuid );
-            }
-        }
-        catch ( Exception e ) {
-            logger.error( "Unable to update index", e );
-        }
-
-        batchExecute( batch, RETRY_COUNT );
-
-        return new QueueSet().addQueue( subscriberQueuePath, subscriberQueueId );
-    }
-
-
-    public void batchUnsubscribeFromQueue( Mutator<ByteBuffer> batch, String publisherQueuePath, UUID publisherQueueId,
-                                           String subscriberQueuePath, UUID subscriberQueueId, long timestamp ) {
-
-        batch.addDeletion( bytebuffer( publisherQueueId ), QUEUE_SUBSCRIBERS.getColumnFamily(), subscriberQueuePath, se,
-                timestamp );
-
-        batch.addDeletion( bytebuffer( subscriberQueueId ), QUEUE_SUBSCRIPTIONS.getColumnFamily(), publisherQueuePath,
-                se, timestamp );
-    }
-
-
-    @Override
-    public QueueSet unsubscribeFromQueue( String publisherQueuePath, String subscriberQueuePath ) {
-
-        publisherQueuePath = normalizeQueuePath( publisherQueuePath );
-        UUID publisherQueueId = getQueueId( publisherQueuePath );
-
-        subscriberQueuePath = normalizeQueuePath( subscriberQueuePath );
-        UUID subscriberQueueId = getQueueId( subscriberQueuePath );
-
-        UUID timestampUuid = newTimeUUID();
-        long timestamp = getTimestampInMicros( timestampUuid );
-
-        Mutator<ByteBuffer> batch = createMutator( cass.getApplicationKeyspace( applicationId ), be );
-
-        batchUnsubscribeFromQueue( batch, publisherQueuePath, publisherQueueId, subscriberQueuePath, subscriberQueueId,
-                timestamp );
-
-        try {
-            Queue queue = getQueue( subscriberQueuePath, subscriberQueueId );
-
-            batchUpdateQueuePropertiesIndexes( batch, publisherQueueId, subscriberQueuePath, subscriberQueueId,
-                    emptyMapWithKeys( queue.getProperties() ), timestampUuid );
-        }
-        catch ( Exception e ) {
-            logger.error( "Unable to update index", e );
-        }
-
-        batchExecute( batch, RETRY_COUNT );
-
-        return new QueueSet().addQueue( subscriberQueuePath, subscriberQueueId );
-    }
-
-
-    @Override
-    public QueueSet getSubscribers( String publisherQueuePath, String firstSubscriberQueuePath, int limit ) {
-
-        UUID publisherQueueId = getQueueId( publisherQueuePath );
-
-        Keyspace ko = cass.getApplicationKeyspace( applicationId );
-
-        if ( firstSubscriberQueuePath != null ) {
-            limit += 1;
-        }
-
-        List<HColumn<String, UUID>> columns = createSliceQuery( ko, ue, se, ue ).setKey( publisherQueueId )
-                .setColumnFamily( QUEUE_SUBSCRIBERS.getColumnFamily() )
-                .setRange( normalizeQueuePath( firstSubscriberQueuePath ), null, false, limit + 1 ).execute().get()
-                .getColumns();
-
-        QueueSet queues = new QueueSet();
-
-        int count = Math.min( limit, columns.size() );
-        if ( columns != null ) {
-            for ( int i = firstSubscriberQueuePath != null ? 1 : 0; i < count; i++ ) {
-                HColumn<String, UUID> column = columns.get( i );
-                queues.addQueue( column.getName(), column.getValue() );
-            }
-        }
-        if ( columns.size() > limit ) {
-            queues.setMore( true );
-        }
-        return queues;
-    }
-
-
-    @Override
-    public QueueSet getSubscriptions( String subscriberQueuePath, String firstSubscriptionQueuePath, int limit ) {
-
-        UUID subscriberQueueId = getQueueId( subscriberQueuePath );
-
-        Keyspace ko = cass.getApplicationKeyspace( applicationId );
-
-        if ( firstSubscriptionQueuePath != null ) {
-            limit += 1;
-        }
-
-        List<HColumn<String, UUID>> columns = createSliceQuery( ko, ue, se, ue ).setKey( subscriberQueueId )
-                .setColumnFamily( QUEUE_SUBSCRIPTIONS.getColumnFamily() )
-                .setRange( normalizeQueuePath( firstSubscriptionQueuePath ), null, false, limit + 1 ).execute().get()
-                .getColumns();
-
-        QueueSet queues = new QueueSet();
-
-        int count = Math.min( limit, columns.size() );
-        if ( columns != null ) {
-            for ( int i = firstSubscriptionQueuePath != null ? 1 : 0; i < count; i++ ) {
-                HColumn<String, UUID> column = columns.get( i );
-                queues.addQueue( column.getName(), column.getValue() );
-            }
-        }
-        if ( columns.size() > limit ) {
-            queues.setMore( true );
-        }
-        return queues;
-    }
-
-
-    @Override
-    public QueueSet addSubscribersToQueue( String publisherQueuePath, List<String> subscriberQueuePaths ) {
-
-        publisherQueuePath = normalizeQueuePath( publisherQueuePath );
-        UUID publisherQueueId = getQueueId( publisherQueuePath );
-
-        UUID timestampUuid = newTimeUUID();
-        long timestamp = getTimestampInMicros( timestampUuid );
-
-        Mutator<ByteBuffer> batch = createMutator( cass.getApplicationKeyspace( applicationId ), be );
-
-        QueueSet queues = new QueueSet();
-
-        for ( String subscriberQueuePath : subscriberQueuePaths ) {
-
-            subscriberQueuePath = normalizeQueuePath( subscriberQueuePath );
-            UUID subscriberQueueId = getQueueId( subscriberQueuePath );
-
-            batchSubscribeToQueue( batch, publisherQueuePath, publisherQueueId, subscriberQueuePath, subscriberQueueId,
-                    timestamp );
-
-            try {
-                Queue queue = getQueue( subscriberQueuePath, subscriberQueueId );
-
-                batchUpdateQueuePropertiesIndexes( batch, publisherQueueId, subscriberQueuePath, subscriberQueueId,
-                        queue.getProperties(), timestampUuid );
-            }
-            catch ( Exception e ) {
-                logger.error( "Unable to update index", e );
-            }
-
-            queues.addQueue( subscriberQueuePath, subscriberQueueId );
-        }
-
-        batchExecute( batch, RETRY_COUNT );
-
-        return queues;
-    }
-
-
-    @Override
-    public QueueSet removeSubscribersFromQueue( String publisherQueuePath, List<String> subscriberQueuePaths ) {
-
-        publisherQueuePath = normalizeQueuePath( publisherQueuePath );
-        UUID publisherQueueId = getQueueId( publisherQueuePath );
-
-        UUID timestampUuid = newTimeUUID();
-        long timestamp = getTimestampInMicros( timestampUuid );
-
-        Mutator<ByteBuffer> batch = createMutator( cass.getApplicationKeyspace( applicationId ), be );
-
-        QueueSet queues = new QueueSet();
-
-        for ( String subscriberQueuePath : subscriberQueuePaths ) {
-
-            subscriberQueuePath = normalizeQueuePath( subscriberQueuePath );
-            UUID subscriberQueueId = getQueueId( subscriberQueuePath );
-
-            batchUnsubscribeFromQueue( batch, publisherQueuePath, publisherQueueId, subscriberQueuePath,
-                    subscriberQueueId, timestamp );
-
-            try {
-                Queue queue = getQueue( subscriberQueuePath, subscriberQueueId );
-
-                batchUpdateQueuePropertiesIndexes( batch, publisherQueueId, subscriberQueuePath, subscriberQueueId,
-                        emptyMapWithKeys( queue.getProperties() ), timestampUuid );
-            }
-            catch ( Exception e ) {
-                logger.error( "Unable to update index", e );
-            }
-
-            queues.addQueue( subscriberQueuePath, subscriberQueueId );
-        }
-
-        batchExecute( batch, RETRY_COUNT );
-
-        return queues;
-    }
-
-
-    @Override
-    public QueueSet subscribeToQueues( String subscriberQueuePath, List<String> publisherQueuePaths ) {
-
-        subscriberQueuePath = normalizeQueuePath( subscriberQueuePath );
-        UUID subscriberQueueId = getQueueId( subscriberQueuePath );
-
-        UUID timestampUuid = newTimeUUID();
-        long timestamp = getTimestampInMicros( timestampUuid );
-
-        Mutator<ByteBuffer> batch = createMutator( cass.getApplicationKeyspace( applicationId ), be );
-
-        QueueSet queues = new QueueSet();
-
-        for ( String publisherQueuePath : publisherQueuePaths ) {
-
-            publisherQueuePath = normalizeQueuePath( publisherQueuePath );
-            UUID publisherQueueId = getQueueId( publisherQueuePath );
-
-            batchSubscribeToQueue( batch, publisherQueuePath, publisherQueueId, subscriberQueuePath, subscriberQueueId,
-                    timestamp );
-
-            try {
-                Queue queue = getQueue( subscriberQueuePath, subscriberQueueId );
-
-                batchUpdateQueuePropertiesIndexes( batch, publisherQueueId, subscriberQueuePath, subscriberQueueId,
-                        queue.getProperties(), timestampUuid );
-            }
-            catch ( Exception e ) {
-                logger.error( "Unable to update index", e );
-            }
-
-            queues.addQueue( publisherQueuePath, publisherQueueId );
-        }
-
-        batchExecute( batch, RETRY_COUNT );
-
-        return queues;
-    }
-
-
-    @Override
-    public QueueSet unsubscribeFromQueues( String subscriberQueuePath, List<String> publisherQueuePaths ) {
-
-        subscriberQueuePath = normalizeQueuePath( subscriberQueuePath );
-        UUID subscriberQueueId = getQueueId( subscriberQueuePath );
-
-        UUID timestampUuid = newTimeUUID();
-        long timestamp = getTimestampInMicros( timestampUuid );
-
-        Mutator<ByteBuffer> batch = createMutator( cass.getApplicationKeyspace( applicationId ), be );
-
-        QueueSet queues = new QueueSet();
-
-        for ( String publisherQueuePath : publisherQueuePaths ) {
-
-            publisherQueuePath = normalizeQueuePath( publisherQueuePath );
-            UUID publisherQueueId = getQueueId( publisherQueuePath );
-
-            batchUnsubscribeFromQueue( batch, publisherQueuePath, publisherQueueId, subscriberQueuePath,
-                    subscriberQueueId, timestamp );
-
-            try {
-                Queue queue = getQueue( subscriberQueuePath, subscriberQueueId );
-
-                batchUpdateQueuePropertiesIndexes( batch, publisherQueueId, subscriberQueuePath, subscriberQueueId,
-                        emptyMapWithKeys( queue.getProperties() ), timestampUuid );
-            }
-            catch ( Exception e ) {
-                logger.error( "Unable to update index", e );
-            }
-
-            queues.addQueue( publisherQueuePath, publisherQueueId );
-        }
-
-        batchExecute( batch, RETRY_COUNT );
-
-        return queues;
-    }
-
-
-    @Override
-    public void incrementAggregateQueueCounters( String queuePath, String category, String counterName, long value ) {
-        long timestamp = cass.createTimestamp();
-        Mutator<ByteBuffer> m = createMutator( cass.getApplicationKeyspace( applicationId ), be );
-        counterUtils.batchIncrementAggregateCounters( m, applicationId, null, null, getQueueId( queuePath ), category,
-                counterName, value, timestamp );
-        batchExecute( m, CassandraService.RETRY_COUNT );
-    }
-
-
-    public AggregateCounterSet getAggregateCounters( UUID queueId, String category, String counterName,
-                                                     CounterResolution resolution, long start, long finish,
-                                                     boolean pad ) {
-
-        start = resolution.round( start );
-        finish = resolution.round( finish );
-        long expected_time = start;
-        Keyspace ko = cass.getApplicationKeyspace( applicationId );
-        SliceCounterQuery<String, Long> q = createCounterSliceQuery( ko, se, le );
-        q.setColumnFamily( APPLICATION_AGGREGATE_COUNTERS.getColumnFamily() );
-        q.setRange( start, finish, false, ALL_COUNT );
-        QueryResult<CounterSlice<Long>> r = q.setKey(
-                counterUtils.getAggregateCounterRow( counterName, null, null, queueId, category, resolution ) )
-                                             .execute();
-        List<AggregateCounter> counters = new ArrayList<AggregateCounter>();
-        for ( HCounterColumn<Long> column : r.get().getColumns() ) {
-            AggregateCounter count = new AggregateCounter( column.getName(), column.getValue() );
-            if ( pad && !( resolution == CounterResolution.ALL ) ) {
-                while ( count.getTimestamp() != expected_time ) {
-                    counters.add( new AggregateCounter( expected_time, 0 ) );
-                    expected_time = resolution.next( expected_time );
-                }
-                expected_time = resolution.next( expected_time );
-            }
-            counters.add( count );
-        }
-        if ( pad && !( resolution == CounterResolution.ALL ) ) {
-            while ( expected_time <= finish ) {
-                counters.add( new AggregateCounter( expected_time, 0 ) );
-                expected_time = resolution.next( expected_time );
-            }
-        }
-        return new AggregateCounterSet( counterName, queueId, category, counters );
-    }
-
-
-    public List<AggregateCounterSet> getAggregateCounters( UUID queueId, CounterQuery query ) throws Exception {
-
-        CounterResolution resolution = query.getResolution();
-        if ( resolution == null ) {
-            resolution = CounterResolution.ALL;
-        }
-        long start = query.getStartTime() != null ? query.getStartTime() : 0;
-        long finish = query.getFinishTime() != null ? query.getFinishTime() : 0;
-        boolean pad = query.isPad();
-        if ( start <= 0 ) {
-            start = 0;
-        }
-        if ( ( finish <= 0 ) || ( finish < start ) ) {
-            finish = System.currentTimeMillis();
-        }
-        start = resolution.round( start );
-        finish = resolution.round( finish );
-        long expected_time = start;
-
-        if ( pad && ( resolution != CounterResolution.ALL ) ) {
-            long max_counters = ( finish - start ) / resolution.interval();
-            if ( max_counters > 1000 ) {
-                finish = resolution.round( start + ( resolution.interval() * 1000 ) );
-            }
-        }
-
-        List<CounterFilterPredicate> filters = query.getCounterFilters();
-        if ( filters == null ) {
-            return null;
-        }
-        Map<String, org.usergrid.persistence.cassandra.CounterUtils.AggregateCounterSelection> selections =
-                new HashMap<String, AggregateCounterSelection>();
-        Keyspace ko = cass.getApplicationKeyspace( applicationId );
-
-        for ( CounterFilterPredicate filter : filters ) {
-            AggregateCounterSelection selection =
-                    new AggregateCounterSelection( filter.getName(), null, null, queueId, filter.getCategory() );
-            selections.put( selection.getRow( resolution ), selection );
-        }
-
-        MultigetSliceCounterQuery<String, Long> q = HFactory.createMultigetSliceCounterQuery( ko, se, le );
-        q.setColumnFamily( APPLICATION_AGGREGATE_COUNTERS.getColumnFamily() );
-        q.setRange( start, finish, false, ALL_COUNT );
-        QueryResult<CounterRows<String, Long>> rows = q.setKeys( selections.keySet() ).execute();
-
-        List<AggregateCounterSet> countSets = new ArrayList<AggregateCounterSet>();
-        for ( CounterRow<String, Long> r : rows.get() ) {
-            expected_time = start;
-            List<AggregateCounter> counters = new ArrayList<AggregateCounter>();
-            for ( HCounterColumn<Long> column : r.getColumnSlice().getColumns() ) {
-                AggregateCounter count = new AggregateCounter( column.getName(), column.getValue() );
-                if ( pad && ( resolution != CounterResolution.ALL ) ) {
-                    while ( count.getTimestamp() != expected_time ) {
-                        counters.add( new AggregateCounter( expected_time, 0 ) );
-                        expected_time = resolution.next( expected_time );
-                    }
-                    expected_time = resolution.next( expected_time );
-                }
-                counters.add( count );
-            }
-            if ( pad && ( resolution != CounterResolution.ALL ) ) {
-                while ( expected_time <= finish ) {
-                    counters.add( new AggregateCounter( expected_time, 0 ) );
-                    expected_time = resolution.next( expected_time );
-                }
-            }
-            AggregateCounterSelection selection = selections.get( r.getKey() );
-            countSets.add( new AggregateCounterSet( selection.getName(), queueId, selection.getCategory(), counters ) );
-        }
-
-        Collections.sort( countSets, new Comparator<AggregateCounterSet>() {
-            @Override
-            public int compare( AggregateCounterSet o1, AggregateCounterSet o2 ) {
-                String s1 = o1.getName();
-                String s2 = o2.getName();
-                return s1.compareTo( s2 );
-            }
-        } );
-        return countSets;
-    }
-
-
-    @Override
-    public Results getAggregateQueueCounters( String queuePath, String category, String counterName,
-                                              CounterResolution resolution, long start, long finish, boolean pad ) {
-        return Results.fromCounters(
-                getAggregateCounters( getQueueId( queuePath ), category, counterName, resolution, start, finish,
-                        pad ) );
-    }
-
-
-    @Override
-    public Results getAggregateQueueCounters( String queuePath, CounterQuery query ) throws Exception {
-        return Results.fromCounters( getAggregateCounters( getQueueId( queuePath ), query ) );
-    }
-
-
-    @Override
-    public void incrementQueueCounters( String queuePath, Map<String, Long> counts ) {
-        long timestamp = cass.createTimestamp();
-        Mutator<ByteBuffer> m = createMutator( cass.getApplicationKeyspace( applicationId ), be );
-        counterUtils.batchIncrementQueueCounters( m, getQueueId( queuePath ), counts, timestamp, applicationId );
-        batchExecute( m, CassandraService.RETRY_COUNT );
-    }
-
-
-    @Override
-    public void incrementQueueCounter( String queuePath, String name, long value ) {
-        long timestamp = cass.createTimestamp();
-        Mutator<ByteBuffer> m = createMutator( cass.getApplicationKeyspace( applicationId ), be );
-        counterUtils.batchIncrementQueueCounter( m, getQueueId( queuePath ), name, value, timestamp, applicationId );
-        batchExecute( m, CassandraService.RETRY_COUNT );
-    }
-
-
-    public Map<String, Long> getQueueCounters( UUID queueId ) throws Exception {
-
-        Map<String, Long> counters = new HashMap<String, Long>();
-        Keyspace ko = cass.getApplicationKeyspace( applicationId );
-        SliceCounterQuery<UUID, String> q = createCounterSliceQuery( ko, ue, se );
-        q.setColumnFamily( COUNTERS.getColumnFamily() );
-        q.setRange( null, null, false, ALL_COUNT );
-        QueryResult<CounterSlice<String>> r = q.setKey( queueId ).execute();
-        for ( HCounterColumn<String> column : r.get().getColumns() ) {
-            counters.put( column.getName(), column.getValue() );
-        }
-        return counters;
-    }
-
-
-    @Override
-    public Map<String, Long> getQueueCounters( String queuePath ) throws Exception {
-        return getQueueCounters( getQueueId( queuePath ) );
-    }
-
-
-    @Override
-    public Set<String> getQueueCounterNames( String queuePath ) throws Exception {
-        Set<String> names = new HashSet<String>();
-        Keyspace ko = cass.getApplicationKeyspace( applicationId );
-        SliceQuery<String, String, ByteBuffer> q = createSliceQuery( ko, se, se, be );
-        q.setColumnFamily( QueuesCF.QUEUE_DICTIONARIES.toString() );
-        q.setKey( CassandraPersistenceUtils.key( getQueueId( queuePath ), DICTIONARY_COUNTERS ).toString() );
-        q.setRange( null, null, false, ALL_COUNT );
-
-        List<HColumn<String, ByteBuffer>> columns = q.execute().get().getColumns();
-        for ( HColumn<String, ByteBuffer> column : columns ) {
-            names.add( column.getName() );
-        }
-        return names;
-    }
-
-
-    public Queue getQueue( String queuePath, UUID queueId ) {
-        SliceQuery<UUID, String, ByteBuffer> q =
-                createSliceQuery( cass.getApplicationKeyspace( applicationId ), ue, se, be );
-        q.setColumnFamily( QUEUE_PROPERTIES.getColumnFamily() );
-        q.setKey( queueId );
-        q.setRange( null, null, false, ALL_COUNT );
-        QueryResult<ColumnSlice<String, ByteBuffer>> r = q.execute();
-        ColumnSlice<String, ByteBuffer> slice = r.get();
-        List<HColumn<String, ByteBuffer>> results = slice.getColumns();
-        return deserializeQueue( results );
-    }
-
-
-    @Override
-    public Queue getQueue( String queuePath ) {
-        return getQueue( queuePath, getQueueId( queuePath ) );
-    }
-
-
-    @Override
-    public Queue updateQueue( String queuePath, Queue queue ) {
-        queue.setPath( queuePath );
-
-        UUID timestampUuid = newTimeUUID();
-        long timestamp = getTimestampInMicros( timestampUuid );
-
-        Mutator<ByteBuffer> batch = createMutator( cass.getApplicationKeyspace( applicationId ), be );
-
-        addQueueToMutator( batch, queue, timestamp );
-
-        try {
-            batchUpdateQueuePropertiesIndexes( batch, queuePath, queue.getUuid(), queue.getProperties(),
-                    timestampUuid );
-        }
-        catch ( Exception e ) {
-            logger.error( "Unable to update queue", e );
-        }
-
-        batch.addInsertion( bytebuffer( queue.getUuid() ), QUEUE_PROPERTIES.getColumnFamily(),
-                createColumn( QUEUE_CREATED, timestamp / 1000, Long.MAX_VALUE - timestamp, se, le ) );
-
-        batch.addInsertion( bytebuffer( queue.getUuid() ), QUEUE_PROPERTIES.getColumnFamily(),
-                createColumn( QUEUE_MODIFIED, timestamp / 1000, timestamp, se, le ) );
-
-        batchExecute( batch, RETRY_COUNT );
-
-        return queue;
-    }
-
-
-    @Override
-    public Queue updateQueue( String queuePath, Map<String, Object> properties ) {
-        return updateQueue( queuePath, new Queue( properties ) );
-    }
-
-
-    public void batchUpdateQueuePropertiesIndexes( Mutator<ByteBuffer> batch, String subscriberQueuePath,
-                                                   UUID subscriberQueueId, Map<String, Object> properties,
-                                                   UUID timestampUuid ) throws Exception {
-
-        QueueSet subscriptions = getSubscriptions( subscriberQueuePath, null, ALL_COUNT );
-
-        if ( subscriptions != null ) {
-
-            for ( Map.Entry<String, Object> property : properties.entrySet() ) {
-
-                if ( !Queue.QUEUE_PROPERTIES.containsKey( property.getKey() ) ) {
-
-                    QueueIndexUpdate indexUpdate =
-                            batchStartQueueIndexUpdate( batch, subscriberQueuePath, subscriberQueueId,
-                                    property.getKey(), property.getValue(), timestampUuid );
-
-                    for ( QueueInfo subscription : subscriptions.getQueues() ) {
-                        batchUpdateQueueIndex( indexUpdate, subscription.getUuid() );
-                    }
-                }
-            }
-        }
-    }
-
-
-    public void batchUpdateQueuePropertiesIndexes( Mutator<ByteBuffer> batch, UUID publisherQueueId,
-                                                   String subscriberQueuePath, UUID subscriberQueueId,
-                                                   Map<String, Object> properties, UUID timestampUuid )
-            throws Exception {
-
-        for ( Map.Entry<String, Object> property : properties.entrySet() ) {
-
-            if ( !Queue.QUEUE_PROPERTIES.containsKey( property.getKey() ) ) {
-
-                QueueIndexUpdate indexUpdate =
-                        batchStartQueueIndexUpdate( batch, subscriberQueuePath, subscriberQueueId, property.getKey(),
-                                property.getValue(), timestampUuid );
-
-                batchUpdateQueueIndex( indexUpdate, publisherQueueId );
-            }
-        }
-    }
-
-
-    public QueueIndexUpdate batchUpdateQueueIndex( QueueIndexUpdate indexUpdate, UUID subcriptionQueueId )
-            throws Exception {
-
-        logger.info( "batchUpdateQueueIndex" );
-
-        Mutator<ByteBuffer> batch = indexUpdate.getBatch();
-
-        // queue_id,prop_name
-        Object index_key = key( subcriptionQueueId, indexUpdate.getEntryName() );
-
-        // subscription_queue_id,subscriber_queue_id,prop_name
-
-        for ( QueueIndexEntry entry : indexUpdate.getPrevEntries() ) {
-
-            if ( entry.getValue() != null ) {
-
-                index_key = key( subcriptionQueueId, entry.getPath() );
-
-                batch.addDeletion( bytebuffer( index_key ), PROPERTY_INDEX.getColumnFamily(), entry.getIndexComposite(),
-                        dce, indexUpdate.getTimestamp() );
-            }
-            else {
-                logger.error( "Unexpected condition - deserialized property value is null" );
-            }
-        }
-
-        if ( indexUpdate.getNewEntries().size() > 0 ) {
-
-            for ( QueueIndexEntry indexEntry : indexUpdate.getNewEntries() ) {
-
-                index_key = key( subcriptionQueueId, indexEntry.getPath() );
-
-                batch.addInsertion( bytebuffer( index_key ), PROPERTY_INDEX.getColumnFamily(),
-                        createColumn( indexEntry.getIndexComposite(), ByteBuffer.allocate( 0 ),
-                                indexUpdate.getTimestamp(), dce, be ) );
-            }
-        }
-
-        for ( String index : indexUpdate.getIndexesSet() ) {
-            batch.addInsertion( bytebuffer( key( subcriptionQueueId, DICTIONARY_SUBSCRIBER_INDEXES ) ),
-                    QUEUE_DICTIONARIES.getColumnFamily(),
-                    createColumn( index, ByteBuffer.allocate( 0 ), indexUpdate.getTimestamp(), se, be ) );
-        }
-
-        return indexUpdate;
-    }
-
-
-    public QueueIndexUpdate batchStartQueueIndexUpdate( Mutator<ByteBuffer> batch, String queuePath, UUID queueId,
-                                                        String entryName, Object entryValue, UUID timestampUuid )
-            throws Exception {
-
-        long timestamp = getTimestampInMicros( timestampUuid );
-
-        QueueIndexUpdate indexUpdate =
-                new QueueIndexUpdate( batch, queuePath, queueId, entryName, entryValue, timestampUuid );
-
-        List<HColumn<ByteBuffer, ByteBuffer>> entries = null;
-
-        entries = createSliceQuery( cass.getApplicationKeyspace( applicationId ), ue, be, be )
-                .setColumnFamily( PROPERTY_INDEX_ENTRIES.getColumnFamily() ).setKey( queueId )
-                .setRange( DynamicComposite.toByteBuffer( entryName ),
-                        setGreaterThanEqualityFlag( new DynamicComposite( entryName ) ).serialize(), false,
-                        INDEX_ENTRY_LIST_COUNT ).execute().get().getColumns();
-
-        if ( logger.isInfoEnabled() ) {
-            logger.info( "Found {} previous index entries for {} of entity {}", new Object[] {
-                    entries.size(), entryName, queueId
-            } );
-        }
-
-        // Delete all matching entries from entry list
-        for ( HColumn<ByteBuffer, ByteBuffer> entry : entries ) {
-            UUID prev_timestamp = null;
-            Object prev_value = null;
-            String prev_obj_path = null;
-
-            // new format:
-            // composite(entryName,
-            // value_code,prev_value,prev_timestamp,prev_obj_path) = null
-            DynamicComposite composite = DynamicComposite.fromByteBuffer( entry.getName().duplicate() );
-            prev_value = composite.get( 2 );
-            prev_timestamp = ( UUID ) composite.get( 3 );
-            if ( composite.size() > 4 ) {
-                prev_obj_path = ( String ) composite.get( 4 );
-            }
-
-            if ( prev_value != null ) {
-
-                String entryPath = entryName;
-                if ( ( prev_obj_path != null ) && ( prev_obj_path.length() > 0 ) ) {
-                    entryPath = entryName + "." + prev_obj_path;
-                }
-
-                indexUpdate.addPrevEntry( entryPath, prev_value, prev_timestamp );
-
-                // composite(property_value,subscriber_id,entry_timestamp)
-                batch.addDeletion( bytebuffer( queueId ), PROPERTY_INDEX_ENTRIES.getColumnFamily(),
-                        entry.getName().duplicate(), be, timestamp );
-            }
-            else {
-                logger.error( "Unexpected condition - deserialized property value is null" );
-            }
-        }
-
-        if ( validIndexableValueOrJson( entryValue ) ) {
-
-            List<Map.Entry<String, Object>> list = getKeyValueList( entryName, entryValue, false );
-
-            for ( Map.Entry<String, Object> indexEntry : list ) {
-
-                if ( validIndexableValue( indexEntry.getValue() ) ) {
-                    indexUpdate.addNewEntry( indexEntry.getKey(), toIndexableValue( indexEntry.getValue() ) );
-                }
-            }
-
-            for ( Map.Entry<String, Object> indexEntry : list ) {
-
-                String name = indexEntry.getKey();
-                if ( name.startsWith( entryName + "." ) ) {
-                    name = name.substring( entryName.length() + 1 );
-                }
-                else if ( name.startsWith( entryName ) ) {
-                    name = name.substring( entryName.length() );
-                }
-
-                batch.addInsertion( bytebuffer( queueId ), PROPERTY_INDEX_ENTRIES.getColumnFamily(), createColumn(
-                        DynamicComposite
-                                .toByteBuffer( entryName, indexValueCode( entryValue ), toIndexableValue( entryValue ),
-                                        indexUpdate.getTimestampUuid(), name ), ByteBuffer.allocate( 0 ), timestamp, be,
-                        be ) );
-
-                indexUpdate.addIndex( indexEntry.getKey() );
-            }
-
-            indexUpdate.addIndex( entryName );
-        }
-
-        return indexUpdate;
-    }
-
-
-    public QueueSet searchQueueIndex( UUID publisherQueueId, QuerySlice slice, int count ) throws Exception {
-
-        ByteBuffer start = null;
-        if ( slice.getCursor() != null ) {
-            start = slice.getCursor();
-        }
-        else if ( slice.getStart() != null ) {
-            DynamicComposite s = new DynamicComposite( slice.getStart().getCode(), slice.getStart().getValue() );
-            if ( !slice.getStart().isInclusive() ) {
-                setEqualityFlag( s, ComponentEquality.GREATER_THAN_EQUAL );
-            }
-            start = s.serialize();
-        }
-
-        ByteBuffer finish = null;
-        if ( slice.getFinish() != null ) {
-            DynamicComposite f = new DynamicComposite( slice.getFinish().getCode(), slice.getFinish().getValue() );
-            if ( slice.getFinish().isInclusive() ) {
-                setEqualityFlag( f, ComponentEquality.GREATER_THAN_EQUAL );
-            }
-            finish = f.serialize();
-        }
-
-        if ( slice.isReversed() && ( start != null ) && ( finish != null ) ) {
-            ByteBuffer temp = start;
-            start = finish;
-            finish = temp;
-        }
-
-        List<HColumn<ByteBuffer, ByteBuffer>> results =
-                createSliceQuery( cass.getApplicationKeyspace( applicationId ), be, be, be )
-                        .setColumnFamily( PROPERTY_INDEX.getColumnFamily() )
-                        .setKey( bytebuffer( key( publisherQueueId, slice.getPropertyName() ) ) )
-                        .setRange( start, finish, slice.isReversed(), count ).execute().get().getColumns();
-
-        QueueSet queues = new QueueSet();
-        for ( HColumn<ByteBuffer, ByteBuffer> column : results ) {
-            DynamicComposite c = DynamicComposite.fromByteBuffer( column.getName() );
-            queues.addQueue( c.get( 3, se ), c.get( 2, ue ) );
-        }
-        return queues;
-    }
-
-
-    @Override
-    public QueueSet searchSubscribers( String publisherQueuePath, Query query ) {
-
-        if ( query == null ) {
-            query = new Query();
-        }
-
-        publisherQueuePath = normalizeQueuePath( publisherQueuePath );
-        UUID publisherQueueId = getQueueId( publisherQueuePath );
-
-        if ( !query.hasFilterPredicates() && !query.hasSortPredicates() ) {
-
-            return getSubscribers( publisherQueuePath, null, query.getLimit() );
-        }
-
-        QueueSet results = null;
-        String composite_cursor = null;
-
-        QueryProcessor qp = new QueryProcessor( query );
-        List<QuerySlice> slices = qp.getSlices();
-        int search_count = query.getLimit() + 1;
-        if ( slices.size() > 1 ) {
-            search_count = DEFAULT_SEARCH_COUNT;
-        }
-        for ( QuerySlice slice : slices ) {
-
-            QueueSet r = null;
-            try {
-                r = searchQueueIndex( publisherQueueId, slice, search_count );
-            }
-            catch ( Exception e ) {
-                logger.error( "Error during search", e );
-            }
-
-            if ( r == null ) {
-                continue;
-            }
-
-            if ( r.size() > query.getLimit() ) {
-                r.setCursorToLastResult();
-            }
-
-            if ( r.getCursor() != null ) {
-                if ( composite_cursor != null ) {
-                    composite_cursor += "|";
-                }
-                else {
-                    composite_cursor = "";
-                }
-                int hashCode = slice.hashCode();
-                logger.info( "Cursor hash code: {} ", hashCode );
-                composite_cursor += hashCode + ":" + r.getCursor();
-            }
-
-            if ( results != null ) {
-                results.and( r );
-            }
-            else {
-                results = r;
-            }
-        }
-
-        return results;
-    }
-
-
-    @Override
-    public QueueSet getQueues( String firstQueuePath, int limit ) {
-        return getSubscribers( "/", firstQueuePath, limit );
-    }
-
-
-    @Override
-    public QueueSet getChildQueues( String publisherQueuePath, String firstQueuePath, int count ) {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-
-    @Override
-    public UUID getNewConsumerId() {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see org.usergrid.mq.QueueManager#renewTransaction(java.lang.String,
-     * java.lang.String, org.usergrid.mq.QueueQuery)
-     */
-    @Override
-    public UUID renewTransaction( String queuePath, UUID transactionId, QueueQuery query )
-            throws TransactionNotFoundException {
-        Keyspace ko = cass.getApplicationKeyspace( applicationId );
-        return new ConsumerTransaction( applicationId, ko, lockManager, cass, lockTimeout )
-                .renewTransaction( queuePath, transactionId, query );
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see org.usergrid.mq.QueueManager#deleteTransaction(java.lang.String,
-     * java.lang.String, org.usergrid.mq.QueueQuery)
-     */
-    @Override
-    public void deleteTransaction( String queuePath, UUID transactionId, QueueQuery query ) {
-        this.commitTransaction( queuePath, transactionId, query );
-    }
-
-
-    @Override
-    public void commitTransaction( String queuePath, UUID transactionId, QueueQuery query ) {
-        Keyspace ko = cass.getApplicationKeyspace( applicationId );
-        new ConsumerTransaction( applicationId, ko, lockManager, cass, lockTimeout )
-                .deleteTransaction( queuePath, transactionId, query );
-    }
-
-
-    @Override
-    public boolean hasOutstandingTransactions( String queuePath, UUID consumerId ) {
-        UUID queueId = CassandraMQUtils.getQueueId( queuePath );
-
-        //no consumer id set, use the same one as the overall queue
-        if ( consumerId == null ) {
-            consumerId = queueId;
-        }
-
-        Keyspace ko = cass.getApplicationKeyspace( applicationId );
-
-        return new ConsumerTransaction( applicationId, ko, lockManager, cass , lockTimeout)
-                .hasOutstandingTransactions( queueId, consumerId );
-    }
-
-
-    @Override
-    public boolean hasMessagesInQueue( String queuePath, UUID consumerId ) {
-
-        Keyspace ko = cass.getApplicationKeyspace( applicationId );
-        UUID queueId = CassandraMQUtils.getQueueId( queuePath );
-
-        if ( consumerId == null ) {
-            consumerId = queueId;
-        }
-
-        NoTransactionSearch search = new NoTransactionSearch( ko );
-
-        QueueBounds bounds = search.getQueueBounds( queueId );
-
-        //Queue doesn't exist
-        if ( bounds == null ) {
-            return false;
-        }
-
-        UUID consumerPosition = search.getConsumerQueuePosition( queueId, consumerId );
-
-        //queue exists, but the consumer does not, meaning it's never read from the Q
-        if ( consumerPosition == null ) {
-            return true;
-        }
-
-        //check our consumer position against the newest message.  If it's equal or larger,
-        // we're read to the end of the queue
-        //note that this does not take transactions into consideration, just the client pointer relative to the largest
-        //message in the queue
-        return UUIDUtils.compare( consumerPosition, bounds.getNewest() ) < 0;
-    }
-
-
-    @Override
-    public boolean hasPendingReads( String queuePath, UUID consumerId ) {
-        return hasOutstandingTransactions( queuePath, consumerId ) || hasMessagesInQueue( queuePath, consumerId );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/mq/cassandra/QueuesCF.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/mq/cassandra/QueuesCF.java b/stack/core/src/main/java/org/usergrid/mq/cassandra/QueuesCF.java
deleted file mode 100644
index 96e25e3..0000000
--- a/stack/core/src/main/java/org/usergrid/mq/cassandra/QueuesCF.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.mq.cassandra;
-
-
-import java.util.List;
-
-import org.usergrid.persistence.cassandra.CFEnum;
-
-import me.prettyprint.hector.api.ddl.ColumnDefinition;
-
-import static me.prettyprint.hector.api.ddl.ComparatorType.COUNTERTYPE;
-import static org.usergrid.persistence.cassandra.CassandraPersistenceUtils.getIndexMetadata;
-
-// Auto-generated by ApplicationCFGenerator
-
-
-public enum QueuesCF implements CFEnum {
-
-    MESSAGE_PROPERTIES( "Entity_Properties", "BytesType", false ),
-
-    QUEUE_PROPERTIES( "Queue_Properties", "BytesType" ),
-
-    QUEUE_INBOX( "Queue_Inbox", "UUIDType" ),
-
-    QUEUE_DICTIONARIES( "Queue_Dictionaries", "BytesType" ),
-
-    QUEUE_SUBSCRIBERS( "Queue_Subscribers", "BytesType" ),
-
-    QUEUE_SUBSCRIPTIONS( "Queue_Subscriptions", "BytesType" ),
-
-    /**
-     * Time based UUID list of future timeouts for messages. The UUID value is a pointer to the original message in the
-     * topic
-     */
-    CONSUMER_QUEUE_TIMEOUTS( "MQ_Consumers_Timeout", "UUIDType" ),
-
-    CONSUMERS( "MQ_Consumers", "BytesType" ),
-
-    CONSUMER_QUEUE_MESSAGES_PROPERTIES( "Consumer_Queue_Messages_Properties", "BytesType" ),
-
-    COUNTERS( "MQ_Counters", "BytesType", COUNTERTYPE.getClassName() ),
-
-    PROPERTY_INDEX( "MQ_Property_Index",
-            "DynamicCompositeType(a=>AsciiType,b=>BytesType,i=>IntegerType,x=>LexicalUUIDType,l=>LongType," +
-                    "t=>TimeUUIDType,s=>UTF8Type,u=>UUIDType,A=>AsciiType(reversed=true),B=>BytesType(reversed=true)," +
-                    "I=>IntegerType(reversed=true),X=>LexicalUUIDType(reversed=true),L=>LongType(reversed=true)," +
-                    "T=>TimeUUIDType(reversed=true),S=>UTF8Type(reversed=true),U=>UUIDType(reversed=true))" ),
-
-    PROPERTY_INDEX_ENTRIES( "MQ_Property_Index_Entries",
-            "DynamicCompositeType(a=>AsciiType,b=>BytesType,i=>IntegerType,x=>LexicalUUIDType,l=>LongType," +
-                    "t=>TimeUUIDType,s=>UTF8Type,u=>UUIDType,A=>AsciiType(reversed=true),B=>BytesType(reversed=true)," +
-                    "I=>IntegerType(reversed=true),X=>LexicalUUIDType(reversed=true),L=>LongType(reversed=true)," +
-                    "T=>TimeUUIDType(reversed=true),S=>UTF8Type(reversed=true),U=>UUIDType(reversed=true))" ),;
-
-    public final static String STATIC_MESSAGES_KEYSPACE = "Usergrid_Messages";
-    public final static String APPLICATION_MESSAGES_KEYSPACE_SUFFIX = "_messages";
-
-    private final String cf;
-    private final String comparator;
-    private final String validator;
-    private final String indexes;
-    private final boolean create;
-
-
-    QueuesCF( String cf, String comparator ) {
-        this.cf = cf;
-        this.comparator = comparator;
-        validator = null;
-        indexes = null;
-        create = true;
-    }
-
-
-    QueuesCF( String cf, String comparator, boolean create ) {
-        this.cf = cf;
-        this.comparator = comparator;
-        validator = null;
-        indexes = null;
-        this.create = create;
-    }
-
-
-    QueuesCF( String cf, String comparator, String validator ) {
-        this.cf = cf;
-        this.comparator = comparator;
-        this.validator = validator;
-        indexes = null;
-        create = true;
-    }
-
-
-    QueuesCF( String cf, String comparator, String validator, String indexes ) {
-        this.cf = cf;
-        this.comparator = comparator;
-        this.validator = validator;
-        this.indexes = indexes;
-        create = true;
-    }
-
-
-    @Override
-    public String toString() {
-        return cf;
-    }
-
-
-    @Override
-    public String getColumnFamily() {
-        return cf;
-    }
-
-
-    @Override
-    public String getComparator() {
-        return comparator;
-    }
-
-
-    @Override
-    public String getValidator() {
-        return validator;
-    }
-
-
-    @Override
-    public boolean isComposite() {
-        return comparator.startsWith( "DynamicCompositeType" );
-    }
-
-
-    @Override
-    public List<ColumnDefinition> getMetadata() {
-        return getIndexMetadata( indexes );
-    }
-
-
-    @Override
-    public boolean create() {
-        return create;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/mq/cassandra/io/AbstractSearch.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/mq/cassandra/io/AbstractSearch.java b/stack/core/src/main/java/org/usergrid/mq/cassandra/io/AbstractSearch.java
deleted file mode 100644
index 089d025..0000000
--- a/stack/core/src/main/java/org/usergrid/mq/cassandra/io/AbstractSearch.java
+++ /dev/null
@@ -1,358 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.mq.cassandra.io;
-
-
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.usergrid.mq.Message;
-import org.usergrid.mq.QueueResults;
-import org.usergrid.mq.cassandra.io.NoTransactionSearch.SearchParam;
-import org.usergrid.persistence.exceptions.QueueException;
-import org.usergrid.utils.UUIDUtils;
-
-import me.prettyprint.cassandra.serializers.ByteBufferSerializer;
-import me.prettyprint.cassandra.serializers.UUIDSerializer;
-import me.prettyprint.hector.api.Keyspace;
-import me.prettyprint.hector.api.beans.ColumnSlice;
-import me.prettyprint.hector.api.beans.HColumn;
-import me.prettyprint.hector.api.beans.Row;
-import me.prettyprint.hector.api.beans.Rows;
-import me.prettyprint.hector.api.factory.HFactory;
-import me.prettyprint.hector.api.mutation.Mutator;
-import me.prettyprint.hector.api.query.SliceQuery;
-
-import static me.prettyprint.hector.api.factory.HFactory.createColumn;
-import static me.prettyprint.hector.api.factory.HFactory.createMultigetSliceQuery;
-import static me.prettyprint.hector.api.factory.HFactory.createMutator;
-import static me.prettyprint.hector.api.factory.HFactory.createSliceQuery;
-import static org.usergrid.mq.Queue.QUEUE_NEWEST;
-import static org.usergrid.mq.Queue.QUEUE_OLDEST;
-import static org.usergrid.mq.cassandra.CassandraMQUtils.deserializeMessage;
-import static org.usergrid.mq.cassandra.CassandraMQUtils.getQueueShardRowKey;
-import static org.usergrid.mq.cassandra.QueueManagerImpl.ALL_COUNT;
-import static org.usergrid.mq.cassandra.QueueManagerImpl.QUEUE_SHARD_INTERVAL;
-import static org.usergrid.mq.cassandra.QueueManagerImpl.se;
-import static org.usergrid.mq.cassandra.QueuesCF.CONSUMERS;
-import static org.usergrid.mq.cassandra.QueuesCF.MESSAGE_PROPERTIES;
-import static org.usergrid.mq.cassandra.QueuesCF.QUEUE_INBOX;
-import static org.usergrid.mq.cassandra.QueuesCF.QUEUE_PROPERTIES;
-import static org.usergrid.utils.NumberUtils.roundLong;
-import static org.usergrid.utils.UUIDUtils.MAX_TIME_UUID;
-import static org.usergrid.utils.UUIDUtils.MIN_TIME_UUID;
-import static org.usergrid.utils.UUIDUtils.getTimestampInMillis;
-
-
-/** @author tnine */
-public abstract class AbstractSearch implements QueueSearch
-{
-
-    private static final Logger logger = LoggerFactory.getLogger( AbstractSearch.class );
-
-    protected static final UUIDSerializer ue = new UUIDSerializer();
-
-    protected static final ByteBufferSerializer be = new ByteBufferSerializer();
-
-    protected Keyspace ko;
-
-
-    /**
-     *
-     */
-    public AbstractSearch( Keyspace ko )
-    {
-        this.ko = ko;
-    }
-
-
-    /**
-     * Get the position in the queue for the given appId, consumer and queu
-     *
-     * @param queueId The queueId
-     * @param consumerId The consumerId
-     */
-    public UUID getConsumerQueuePosition( UUID queueId, UUID consumerId )
-    {
-        HColumn<UUID, UUID> result =
-                HFactory.createColumnQuery( ko, ue, ue, ue ).setKey( consumerId ).setName( queueId )
-                        .setColumnFamily( CONSUMERS.getColumnFamily() ).execute().get();
-        if ( result != null )
-        {
-            return result.getValue();
-        }
-
-        return null;
-    }
-
-
-    /** Load the messages into an array list */
-    protected List<Message> loadMessages( Collection<UUID> messageIds, boolean reversed )
-    {
-
-        Rows<UUID, String, ByteBuffer> messageResults =
-                createMultigetSliceQuery( ko, ue, se, be ).setColumnFamily( MESSAGE_PROPERTIES.getColumnFamily() )
-                        .setKeys( messageIds ).setRange( null, null, false, ALL_COUNT ).execute().get();
-
-        List<Message> messages = new ArrayList<Message>( messageIds.size() );
-
-        for ( Row<UUID, String, ByteBuffer> row : messageResults )
-        {
-            Message message = deserializeMessage( row.getColumnSlice().getColumns() );
-
-            if ( message != null )
-            {
-                messages.add( message );
-            }
-        }
-
-        Collections.sort( messages, new RequestedOrderComparator( messageIds ) );
-
-        return messages;
-    }
-
-
-    /** Create the results to return from the given messages */
-    protected QueueResults createResults( List<Message> messages, String queuePath, UUID queueId, UUID consumerId )
-    {
-
-        UUID lastId = null;
-
-        if ( messages != null && messages.size() > 0 )
-        {
-            lastId = messages.get( messages.size() - 1 ).getUuid();
-        }
-
-        return new QueueResults( queuePath, queueId, messages, lastId, consumerId );
-    }
-
-
-    /**
-     * Get a list of UUIDs that can be read for the client. This comes directly from the queue inbox, and DOES NOT take
-     * into account client messages
-     *
-     * @param queueId The queue id to read
-     * @param bounds The bounds to use when reading
-     */
-    protected List<UUID> getQueueRange( UUID queueId, QueueBounds bounds, SearchParam params )
-    {
-
-        if ( bounds == null )
-        {
-            logger.error( "Necessary queue bounds not found" );
-            throw new QueueException( "Neccessary queue bounds not found" );
-        }
-
-        UUID finish_uuid = params.reversed ? bounds.getOldest() : bounds.getNewest();
-
-        List<UUID> results = new ArrayList<UUID>( params.limit );
-
-        UUID start = params.startId;
-
-        if ( start == null )
-        {
-            start = params.reversed ? bounds.getNewest() : bounds.getOldest();
-        }
-
-        if ( start == null )
-        {
-            logger.error( "No first message in queue" );
-            return results;
-        }
-
-        if ( finish_uuid == null )
-        {
-            logger.error( "No last message in queue" );
-            return results;
-        }
-
-        long start_ts_shard = roundLong( getTimestampInMillis( start ), QUEUE_SHARD_INTERVAL );
-
-        long finish_ts_shard = roundLong( getTimestampInMillis( finish_uuid ), QUEUE_SHARD_INTERVAL );
-
-        long current_ts_shard = start_ts_shard;
-        if ( params.reversed )
-        {
-            current_ts_shard = finish_ts_shard;
-        }
-
-        while ( ( current_ts_shard >= start_ts_shard ) && ( current_ts_shard <= finish_ts_shard ) )
-        {
-
-            UUID slice_start = MIN_TIME_UUID;
-            UUID slice_end = MAX_TIME_UUID;
-
-            if ( current_ts_shard == start_ts_shard )
-            {
-                slice_start = start;
-            }
-
-            if ( current_ts_shard == finish_ts_shard )
-            {
-                slice_end = finish_uuid;
-            }
-
-            SliceQuery<ByteBuffer, UUID, ByteBuffer> q = createSliceQuery( ko, be, ue, be );
-            q.setColumnFamily( QUEUE_INBOX.getColumnFamily() );
-            q.setKey( getQueueShardRowKey( queueId, current_ts_shard ) );
-            q.setRange( slice_start, slice_end, params.reversed, params.limit + 1 );
-
-            List<HColumn<UUID, ByteBuffer>> cassResults = q.execute().get().getColumns();
-
-            for ( int i = 0; i < cassResults.size(); i++ )
-            {
-                HColumn<UUID, ByteBuffer> column = cassResults.get( i );
-
-                // skip the first one, we've already read it
-                if ( i == 0 && params.skipFirst && params.startId.equals( column.getName() ) )
-                {
-                    continue;
-                }
-
-                UUID id = column.getName();
-
-                results.add( id );
-
-                logger.debug( "Added id '{}' to result set for queue id '{}'", id, queueId );
-
-                if ( results.size() >= params.limit )
-                {
-                    return results;
-                }
-            }
-
-            if ( params.reversed )
-            {
-                current_ts_shard -= QUEUE_SHARD_INTERVAL;
-            }
-            else
-            {
-                current_ts_shard += QUEUE_SHARD_INTERVAL;
-            }
-        }
-
-        return results;
-    }
-
-
-    /**
-     * Get the bounds for the queue
-     *
-     * @return The bounds for the queue
-     */
-    public QueueBounds getQueueBounds( UUID queueId )
-    {
-        try
-        {
-            ColumnSlice<String, UUID> result = HFactory.createSliceQuery( ko, ue, se, ue ).setKey( queueId )
-                                                       .setColumnNames( QUEUE_NEWEST, QUEUE_OLDEST )
-                                                       .setColumnFamily( QUEUE_PROPERTIES.getColumnFamily() ).execute()
-                                                       .get();
-            if ( result != null && result.getColumnByName( QUEUE_OLDEST ) != null
-                    && result.getColumnByName( QUEUE_NEWEST ) != null )
-            {
-                return new QueueBounds( result.getColumnByName( QUEUE_OLDEST ).getValue(),
-                        result.getColumnByName( QUEUE_NEWEST ).getValue() );
-            }
-        }
-        catch ( Exception e )
-        {
-            logger.error( "Error getting oldest queue message ID", e );
-        }
-        return null;
-    }
-
-
-    /**
-     * Write the updated client pointer
-     *
-     * @param lastReturnedId This is a null safe parameter. If it's null, this won't be written since it means we didn't
-     * read any messages
-     */
-    protected void writeClientPointer( UUID queueId, UUID consumerId, UUID lastReturnedId )
-    {
-        // nothing to do
-        if ( lastReturnedId == null )
-        {
-            return;
-        }
-
-        // we want to set the timestamp to the value from the time uuid. If this is
-        // not the max time uuid to ever be written
-        // for this consumer, we want this to be discarded to avoid internode race
-        // conditions with clock drift.
-        long colTimestamp = UUIDUtils.getTimestampInMicros( lastReturnedId );
-
-        Mutator<UUID> mutator = createMutator( ko, ue );
-
-        if ( logger.isDebugEnabled() )
-        {
-            logger.debug( "Writing last client id pointer of '{}' for queue '{}' and consumer '{}' with timestamp '{}",
-                    new Object[] {
-                            lastReturnedId, queueId, consumerId, colTimestamp
-                    } );
-        }
-
-        mutator.addInsertion( consumerId, CONSUMERS.getColumnFamily(),
-                createColumn( queueId, lastReturnedId, colTimestamp, ue, ue ) );
-
-        mutator.execute();
-    }
-
-
-    private class RequestedOrderComparator implements Comparator<Message>
-    {
-
-        private Map<UUID, Integer> indexCache = new HashMap<UUID, Integer>();
-
-
-        private RequestedOrderComparator( Collection<UUID> ids )
-        {
-            int i = 0;
-
-            for ( UUID id : ids )
-            {
-                indexCache.put( id, i );
-                i++;
-            }
-        }
-
-
-        /*
-         * (non-Javadoc)
-         *
-         * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
-         */
-        @Override
-        public int compare( Message o1, Message o2 )
-        {
-            int o1Idx = indexCache.get( o1.getUuid() );
-
-            int o2Idx = indexCache.get( o2.getUuid() );
-
-            return o1Idx - o2Idx;
-        }
-    }
-}


[66/96] [abbrv] USERGRID-2 package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/DeviceRegistrationCallback.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/DeviceRegistrationCallback.html b/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/DeviceRegistrationCallback.html
index f6bef2a..b072d3d 100644
--- a/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/DeviceRegistrationCallback.html
+++ b/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/DeviceRegistrationCallback.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Interface org.usergrid.android.client.callbacks.DeviceRegistrationCallback
+Uses of Interface org.apache.usergrid.android.client.callbacks.DeviceRegistrationCallback
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Interface org.usergrid.android.client.callbacks.DeviceRegistrationCallba
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Interface org.usergrid.android.client.callbacks.DeviceRegistrationCallback";
+        parent.document.title="Uses of Interface org.apache.usergrid.android.client.callbacks.DeviceRegistrationCallback";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.usergrid.android.client.callbacks"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,26 +81,26 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Interface<br>org.usergrid.android.client.callbacks.DeviceRegistrationCallback</B></H2>
+<B>Uses of Interface<br>org.apache.usergrid.android.client.callbacks.DeviceRegistrationCallback</B></H2>
 </CENTER>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Packages that use <A HREF="../../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.usergrid.android.client.callbacks">DeviceRegistrationCallback</A></FONT></TH>
+Packages that use <A HREF="../../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">DeviceRegistrationCallback</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client"><B>org.usergrid.android.client</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client"><B>org.apache.usergrid.android.client</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.usergrid.android.client.callbacks">DeviceRegistrationCallback</A> in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A></FONT></TH>
+Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">DeviceRegistrationCallback</A> in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -108,14 +108,14 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/DeviceR
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.usergrid.android.client.callbacks">DeviceRegistrationCallback</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">DeviceRegistrationCallback</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#registerDeviceAsync(android.content.Context, java.util.Map, org.usergrid.android.client.callbacks.DeviceRegistrationCallback)">registerDeviceAsync</A></B>(android.content.Context&nbsp;context,
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#registerDeviceAsync(android.content.Context, java.util.Map, org.apache.usergrid.android.client.callbacks.DeviceRegistrationCallback)">registerDeviceAsync</A></B>(android.content.Context&nbsp;context,
                     java.util.Map&lt;java.lang.String,java.lang.Object&gt;&nbsp;properties,
-                    <A HREF="../../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.usergrid.android.client.callbacks">DeviceRegistrationCallback</A>&nbsp;callback)</CODE>
+                    <A HREF="../../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">DeviceRegistrationCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Registers a device using the device's unique device ID.</TD>
@@ -137,7 +137,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/DeviceR
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.usergrid.android.client.callbacks"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/GroupsRetrievedCallback.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/GroupsRetrievedCallback.html b/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/GroupsRetrievedCallback.html
index 695b885..c01a813 100644
--- a/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/GroupsRetrievedCallback.html
+++ b/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/GroupsRetrievedCallback.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Interface org.usergrid.android.client.callbacks.GroupsRetrievedCallback
+Uses of Interface org.apache.usergrid.android.client.callbacks.GroupsRetrievedCallback
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Interface org.usergrid.android.client.callbacks.GroupsRetrievedCallback
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Interface org.usergrid.android.client.callbacks.GroupsRetrievedCallback";
+        parent.document.title="Uses of Interface org.apache.usergrid.android.client.callbacks.GroupsRetrievedCallback";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.usergrid.android.client.callbacks"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,26 +81,26 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Interface<br>org.usergrid.android.client.callbacks.GroupsRetrievedCallback</B></H2>
+<B>Uses of Interface<br>org.apache.usergrid.android.client.callbacks.GroupsRetrievedCallback</B></H2>
 </CENTER>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Packages that use <A HREF="../../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.usergrid.android.client.callbacks">GroupsRetrievedCallback</A></FONT></TH>
+Packages that use <A HREF="../../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">GroupsRetrievedCallback</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client"><B>org.usergrid.android.client</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client"><B>org.apache.usergrid.android.client</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.usergrid.android.client.callbacks">GroupsRetrievedCallback</A> in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A></FONT></TH>
+Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">GroupsRetrievedCallback</A> in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -108,13 +108,13 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/GroupsR
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.usergrid.android.client.callbacks">GroupsRetrievedCallback</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">GroupsRetrievedCallback</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#getGroupsForUserAsync(java.lang.String, org.usergrid.android.client.callbacks.GroupsRetrievedCallback)">getGroupsForUserAsync</A></B>(java.lang.String&nbsp;userId,
-                      <A HREF="../../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.usergrid.android.client.callbacks">GroupsRetrievedCallback</A>&nbsp;callback)</CODE>
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#getGroupsForUserAsync(java.lang.String, org.apache.usergrid.android.client.callbacks.GroupsRetrievedCallback)">getGroupsForUserAsync</A></B>(java.lang.String&nbsp;userId,
+                      <A HREF="../../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">GroupsRetrievedCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the groups for the user.</TD>
@@ -136,7 +136,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/GroupsR
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.usergrid.android.client.callbacks"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/QueryResultsCallback.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/QueryResultsCallback.html b/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/QueryResultsCallback.html
index a524dee..30fb73a 100644
--- a/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/QueryResultsCallback.html
+++ b/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/QueryResultsCallback.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Interface org.usergrid.android.client.callbacks.QueryResultsCallback
+Uses of Interface org.apache.usergrid.android.client.callbacks.QueryResultsCallback
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Interface org.usergrid.android.client.callbacks.QueryResultsCallback
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Interface org.usergrid.android.client.callbacks.QueryResultsCallback";
+        parent.document.title="Uses of Interface org.apache.usergrid.android.client.callbacks.QueryResultsCallback";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,26 +81,26 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Interface<br>org.usergrid.android.client.callbacks.QueryResultsCallback</B></H2>
+<B>Uses of Interface<br>org.apache.usergrid.android.client.callbacks.QueryResultsCallback</B></H2>
 </CENTER>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Packages that use <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks">QueryResultsCallback</A></FONT></TH>
+Packages that use <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">QueryResultsCallback</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client"><B>org.usergrid.android.client</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client"><B>org.apache.usergrid.android.client</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks">QueryResultsCallback</A> in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A></FONT></TH>
+Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">QueryResultsCallback</A> in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -108,13 +108,13 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryRe
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks">QueryResultsCallback</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">QueryResultsCallback</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#queryActivityFeedForGroupAsync(java.lang.String, org.usergrid.android.client.callbacks.QueryResultsCallback)">queryActivityFeedForGroupAsync</A></B>(java.lang.String&nbsp;groupId,
-                               <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#queryActivityFeedForGroupAsync(java.lang.String, org.apache.usergrid.android.client.callbacks.QueryResultsCallback)">queryActivityFeedForGroupAsync</A></B>(java.lang.String&nbsp;groupId,
+                               <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get a group's activity feed.</TD>
@@ -122,8 +122,8 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryRe
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#queryActivityFeedForUserAsync(java.lang.String, org.usergrid.android.client.callbacks.QueryResultsCallback)">queryActivityFeedForUserAsync</A></B>(java.lang.String&nbsp;userId,
-                              <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#queryActivityFeedForUserAsync(java.lang.String, org.apache.usergrid.android.client.callbacks.QueryResultsCallback)">queryActivityFeedForUserAsync</A></B>(java.lang.String&nbsp;userId,
+                              <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get a user's activity feed.</TD>
@@ -131,7 +131,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryRe
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#queryEntitiesRequestAsync(org.usergrid.android.client.callbacks.QueryResultsCallback, org.springframework.http.HttpMethod, java.util.Map, java.lang.Object, java.lang.String...)">queryEntitiesRequestAsync</A></B>(<A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback,
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#queryEntitiesRequestAsync(org.apache.usergrid.android.client.callbacks.QueryResultsCallback, org.springframework.http.HttpMethod, java.util.Map, java.lang.Object, java.lang.String...)">queryEntitiesRequestAsync</A></B>(<A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback,
                           org.springframework.http.HttpMethod&nbsp;method,
                           java.util.Map&lt;java.lang.String,java.lang.Object&gt;&nbsp;params,
                           java.lang.Object&nbsp;data,
@@ -143,11 +143,11 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryRe
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#queryEntityConnectionsAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.QueryResultsCallback)">queryEntityConnectionsAsync</A></B>(java.lang.String&nbsp;connectingEntityType,
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#queryEntityConnectionsAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.QueryResultsCallback)">queryEntityConnectionsAsync</A></B>(java.lang.String&nbsp;connectingEntityType,
                             java.lang.String&nbsp;connectingEntityId,
                             java.lang.String&nbsp;connectionType,
                             java.lang.String&nbsp;ql,
-                            <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
+                            <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Query the connected entities.</TD>
@@ -155,13 +155,13 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryRe
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#queryEntityConnectionsWithinLocationAsync(java.lang.String, java.lang.String, java.lang.String, float, android.location.Location, java.lang.String, org.usergrid.android.client.callbacks.QueryResultsCallback)">queryEntityConnectionsWithinLocationAsync</A></B>(java.lang.String&nbsp;connectingEntityType,
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#queryEntityConnectionsWithinLocationAsync(java.lang.String, java.lang.String, java.lang.String, float, android.location.Location, java.lang.String, org.apache.usergrid.android.client.callbacks.QueryResultsCallback)">queryEntityConnectionsWithinLocationAsync</A></B>(java.lang.String&nbsp;connectingEntityType,
                                           java.lang.String&nbsp;connectingEntityId,
                                           java.lang.String&nbsp;connectionType,
                                           float&nbsp;distance,
                                           android.location.Location&nbsp;location,
                                           java.lang.String&nbsp;ql,
-                                          <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
+                                          <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Query the connected entities within distance of a specific point.</TD>
@@ -169,7 +169,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryRe
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#queryUsersAsync(org.usergrid.android.client.callbacks.QueryResultsCallback)">queryUsersAsync</A></B>(<A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#queryUsersAsync(org.apache.usergrid.android.client.callbacks.QueryResultsCallback)">queryUsersAsync</A></B>(<A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Perform a query of the users collection.</TD>
@@ -177,8 +177,8 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryRe
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#queryUsersAsync(java.lang.String, org.usergrid.android.client.callbacks.QueryResultsCallback)">queryUsersAsync</A></B>(java.lang.String&nbsp;ql,
-                <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#queryUsersAsync(java.lang.String, org.apache.usergrid.android.client.callbacks.QueryResultsCallback)">queryUsersAsync</A></B>(java.lang.String&nbsp;ql,
+                <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Perform a query of the users collection using the provided query command.</TD>
@@ -186,8 +186,8 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryRe
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#queryUsersForGroupAsync(java.lang.String, org.usergrid.android.client.callbacks.QueryResultsCallback)">queryUsersForGroupAsync</A></B>(java.lang.String&nbsp;groupId,
-                        <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#queryUsersForGroupAsync(java.lang.String, org.apache.usergrid.android.client.callbacks.QueryResultsCallback)">queryUsersForGroupAsync</A></B>(java.lang.String&nbsp;groupId,
+                        <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Queries the users for the specified group.</TD>
@@ -195,10 +195,10 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryRe
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#queryUsersNearLocation(float, android.location.Location, java.lang.String, org.usergrid.android.client.callbacks.QueryResultsCallback)">queryUsersNearLocation</A></B>(float&nbsp;distance,
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#queryUsersNearLocation(float, android.location.Location, java.lang.String, org.apache.usergrid.android.client.callbacks.QueryResultsCallback)">queryUsersNearLocation</A></B>(float&nbsp;distance,
                        android.location.Location&nbsp;location,
                        java.lang.String&nbsp;ql,
-                       <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
+                       <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Perform a query of the users collection within the specified distance of
@@ -221,7 +221,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryRe
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/callbacks/package-frame.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/callbacks/package-frame.html b/sdks/android/doc/org/usergrid/android/client/callbacks/package-frame.html
index bf0d2bd..eaf7446 100644
--- a/sdks/android/doc/org/usergrid/android/client/callbacks/package-frame.html
+++ b/sdks/android/doc/org/usergrid/android/client/callbacks/package-frame.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-org.usergrid.android.client.callbacks
+org.apache.usergrid.android.client.callbacks
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -16,22 +16,22 @@ org.usergrid.android.client.callbacks
 
 <BODY BGCOLOR="white">
 <FONT size="+1" CLASS="FrameTitleFont">
-<A HREF="../../../../../org/usergrid/android/client/callbacks/package-summary.html" target="classFrame">org.usergrid.android.client.callbacks</A></FONT>
+<A HREF="../../../../../org/usergrid/android/client/callbacks/package-summary.html" target="classFrame">org.apache.usergrid.android.client.callbacks</A></FONT>
 <TABLE BORDER="0" WIDTH="100%" SUMMARY="">
 <TR>
 <TD NOWRAP><FONT size="+1" CLASS="FrameHeadingFont">
 Interfaces</FONT>&nbsp;
 <FONT CLASS="FrameItemFont">
 <BR>
-<A HREF="ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks" target="classFrame"><I>ApiResponseCallback</I></A>
+<A HREF="ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks" target="classFrame"><I>ApiResponseCallback</I></A>
 <BR>
-<A HREF="ClientCallback.html" title="interface in org.usergrid.android.client.callbacks" target="classFrame"><I>ClientCallback</I></A>
+<A HREF="ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks" target="classFrame"><I>ClientCallback</I></A>
 <BR>
-<A HREF="DeviceRegistrationCallback.html" title="interface in org.usergrid.android.client.callbacks" target="classFrame"><I>DeviceRegistrationCallback</I></A>
+<A HREF="DeviceRegistrationCallback.html" title="interface in org.apache.usergrid.android.client.callbacks" target="classFrame"><I>DeviceRegistrationCallback</I></A>
 <BR>
-<A HREF="GroupsRetrievedCallback.html" title="interface in org.usergrid.android.client.callbacks" target="classFrame"><I>GroupsRetrievedCallback</I></A>
+<A HREF="GroupsRetrievedCallback.html" title="interface in org.apache.usergrid.android.client.callbacks" target="classFrame"><I>GroupsRetrievedCallback</I></A>
 <BR>
-<A HREF="QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks" target="classFrame"><I>QueryResultsCallback</I></A></FONT></TD>
+<A HREF="QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks" target="classFrame"><I>QueryResultsCallback</I></A></FONT></TD>
 </TR>
 </TABLE>
 
@@ -42,7 +42,7 @@ Interfaces</FONT>&nbsp;
 Classes</FONT>&nbsp;
 <FONT CLASS="FrameItemFont">
 <BR>
-<A HREF="ClientAsyncTask.html" title="class in org.usergrid.android.client.callbacks" target="classFrame">ClientAsyncTask</A></FONT></TD>
+<A HREF="ClientAsyncTask.html" title="class in org.apache.usergrid.android.client.callbacks" target="classFrame">ClientAsyncTask</A></FONT></TD>
 </TR>
 </TABLE>
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/callbacks/package-summary.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/callbacks/package-summary.html b/sdks/android/doc/org/usergrid/android/client/callbacks/package-summary.html
index 7401bd2..3db3926 100644
--- a/sdks/android/doc/org/usergrid/android/client/callbacks/package-summary.html
+++ b/sdks/android/doc/org/usergrid/android/client/callbacks/package-summary.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-org.usergrid.android.client.callbacks
+org.apache.usergrid.android.client.callbacks
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ org.usergrid.android.client.callbacks
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="org.usergrid.android.client.callbacks";
+        parent.document.title="org.apache.usergrid.android.client.callbacks";
     }
 }
 </SCRIPT>
@@ -80,7 +80,7 @@ function windowTitle()
 
 <HR>
 <H2>
-Package org.usergrid.android.client.callbacks
+Package org.apache.usergrid.android.client.callbacks
 </H2>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
@@ -89,23 +89,23 @@ Package org.usergrid.android.client.callbacks
 <B>Interface Summary</B></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks">ClientCallback&lt;T&gt;</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ClientCallback&lt;T&gt;</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.usergrid.android.client.callbacks">DeviceRegistrationCallback</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">DeviceRegistrationCallback</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.usergrid.android.client.callbacks">GroupsRetrievedCallback</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">GroupsRetrievedCallback</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks">QueryResultsCallback</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">QueryResultsCallback</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 </TABLE>
@@ -119,7 +119,7 @@ Package org.usergrid.android.client.callbacks
 <B>Class Summary</B></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.usergrid.android.client.callbacks">ClientAsyncTask&lt;T&gt;</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.apache.usergrid.android.client.callbacks">ClientAsyncTask&lt;T&gt;</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 </TABLE>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/callbacks/package-tree.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/callbacks/package-tree.html b/sdks/android/doc/org/usergrid/android/client/callbacks/package-tree.html
index 6bf1176..277ca12 100644
--- a/sdks/android/doc/org/usergrid/android/client/callbacks/package-tree.html
+++ b/sdks/android/doc/org/usergrid/android/client/callbacks/package-tree.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-org.usergrid.android.client.callbacks Class Hierarchy
+org.apache.usergrid.android.client.callbacks Class Hierarchy
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ org.usergrid.android.client.callbacks Class Hierarchy
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="org.usergrid.android.client.callbacks Class Hierarchy";
+        parent.document.title="org.apache.usergrid.android.client.callbacks Class Hierarchy";
     }
 }
 </SCRIPT>
@@ -81,7 +81,7 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-Hierarchy For Package org.usergrid.android.client.callbacks
+Hierarchy For Package org.apache.usergrid.android.client.callbacks
 </H2>
 </CENTER>
 <DL>
@@ -93,15 +93,15 @@ Class Hierarchy
 <UL>
 <LI TYPE="circle">java.lang.Object<UL>
 <LI TYPE="circle">android.os.AsyncTask&lt;Params,Progress,Result&gt;<UL>
-<LI TYPE="circle">org.usergrid.android.client.callbacks.<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.usergrid.android.client.callbacks"><B>ClientAsyncTask</B></A>&lt;T&gt;</UL>
+<LI TYPE="circle">org.apache.usergrid.android.client.callbacks.<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.apache.usergrid.android.client.callbacks"><B>ClientAsyncTask</B></A>&lt;T&gt;</UL>
 </UL>
 </UL>
 <H2>
 Interface Hierarchy
 </H2>
 <UL>
-<LI TYPE="circle">org.usergrid.android.client.callbacks.<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>ClientCallback</B></A>&lt;T&gt;<UL>
-<LI TYPE="circle">org.usergrid.android.client.callbacks.<A HREF="../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>ApiResponseCallback</B></A><LI TYPE="circle">org.usergrid.android.client.callbacks.<A HREF="../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>DeviceRegistrationCallback</B></A><LI TYPE="circle">org.usergrid.android.client.callbacks.<A HREF="../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>GroupsRetrievedCallback</B></A><LI TYPE="circle">org.usergrid.android.client.callbacks.<A HREF="../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>QueryResultsCallback</B></A></UL>
+<LI TYPE="circle">org.apache.usergrid.android.client.callbacks.<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>ClientCallback</B></A>&lt;T&gt;<UL>
+<LI TYPE="circle">org.apache.usergrid.android.client.callbacks.<A HREF="../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>ApiResponseCallback</B></A><LI TYPE="circle">org.apache.usergrid.android.client.callbacks.<A HREF="../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>DeviceRegistrationCallback</B></A><LI TYPE="circle">org.apache.usergrid.android.client.callbacks.<A HREF="../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>GroupsRetrievedCallback</B></A><LI TYPE="circle">org.apache.usergrid.android.client.callbacks.<A HREF="../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>QueryResultsC
 allback</B></A></UL>
 </UL>
 <HR>
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/callbacks/package-use.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/callbacks/package-use.html b/sdks/android/doc/org/usergrid/android/client/callbacks/package-use.html
index b4e8ad2..70ab906 100644
--- a/sdks/android/doc/org/usergrid/android/client/callbacks/package-use.html
+++ b/sdks/android/doc/org/usergrid/android/client/callbacks/package-use.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Package org.usergrid.android.client.callbacks
+Uses of Package org.apache.usergrid.android.client.callbacks
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Package org.usergrid.android.client.callbacks
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Package org.usergrid.android.client.callbacks";
+        parent.document.title="Uses of Package org.apache.usergrid.android.client.callbacks";
     }
 }
 </SCRIPT>
@@ -81,51 +81,51 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Package<br>org.usergrid.android.client.callbacks</B></H2>
+<B>Uses of Package<br>org.apache.usergrid.android.client.callbacks</B></H2>
 </CENTER>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Packages that use <A HREF="../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.usergrid.android.client.callbacks</A></FONT></TH>
+Packages that use <A HREF="../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.apache.usergrid.android.client.callbacks</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client"><B>org.usergrid.android.client</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client"><B>org.apache.usergrid.android.client</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client.callbacks"><B>org.usergrid.android.client.callbacks</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client.callbacks"><B>org.apache.usergrid.android.client.callbacks</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Classes in <A HREF="../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.usergrid.android.client.callbacks</A> used by <A HREF="../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A></FONT></TH>
+Classes in <A HREF="../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.apache.usergrid.android.client.callbacks</A> used by <A HREF="../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../../org/usergrid/android/client/callbacks/class-use/ApiResponseCallback.html#org.usergrid.android.client"><B>ApiResponseCallback</B></A></B>
+<TD><B><A HREF="../../../../../org/usergrid/android/client/callbacks/class-use/ApiResponseCallback.html#org.apache.usergrid.android.client"><B>ApiResponseCallback</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../../org/usergrid/android/client/callbacks/class-use/DeviceRegistrationCallback.html#org.usergrid.android.client"><B>DeviceRegistrationCallback</B></A></B>
+<TD><B><A HREF="../../../../../org/usergrid/android/client/callbacks/class-use/DeviceRegistrationCallback.html#org.apache.usergrid.android.client"><B>DeviceRegistrationCallback</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../../org/usergrid/android/client/callbacks/class-use/GroupsRetrievedCallback.html#org.usergrid.android.client"><B>GroupsRetrievedCallback</B></A></B>
+<TD><B><A HREF="../../../../../org/usergrid/android/client/callbacks/class-use/GroupsRetrievedCallback.html#org.apache.usergrid.android.client"><B>GroupsRetrievedCallback</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../../org/usergrid/android/client/callbacks/class-use/QueryResultsCallback.html#org.usergrid.android.client"><B>QueryResultsCallback</B></A></B>
+<TD><B><A HREF="../../../../../org/usergrid/android/client/callbacks/class-use/QueryResultsCallback.html#org.apache.usergrid.android.client"><B>QueryResultsCallback</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -133,14 +133,14 @@ Classes in <A HREF="../../../../../org/usergrid/android/client/callbacks/package
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client.callbacks"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client.callbacks"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Classes in <A HREF="../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.usergrid.android.client.callbacks</A> used by <A HREF="../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.usergrid.android.client.callbacks</A></FONT></TH>
+Classes in <A HREF="../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.apache.usergrid.android.client.callbacks</A> used by <A HREF="../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.apache.usergrid.android.client.callbacks</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../../org/usergrid/android/client/callbacks/class-use/ClientCallback.html#org.usergrid.android.client.callbacks"><B>ClientCallback</B></A></B>
+<TD><B><A HREF="../../../../../org/usergrid/android/client/callbacks/class-use/ClientCallback.html#org.apache.usergrid.android.client.callbacks"><B>ClientCallback</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/class-use/Client.Query.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/class-use/Client.Query.html b/sdks/android/doc/org/usergrid/android/client/class-use/Client.Query.html
index 4572371..1bf91e6 100644
--- a/sdks/android/doc/org/usergrid/android/client/class-use/Client.Query.html
+++ b/sdks/android/doc/org/usergrid/android/client/class-use/Client.Query.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Interface org.usergrid.android.client.Client.Query
+Uses of Interface org.apache.usergrid.android.client.Client.Query
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Interface org.usergrid.android.client.Client.Query
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Interface org.usergrid.android.client.Client.Query";
+        parent.document.title="Uses of Interface org.apache.usergrid.android.client.Client.Query";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,30 +81,30 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Interface<br>org.usergrid.android.client.Client.Query</B></H2>
+<B>Uses of Interface<br>org.apache.usergrid.android.client.Client.Query</B></H2>
 </CENTER>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Packages that use <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A></FONT></TH>
+Packages that use <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client"><B>org.usergrid.android.client</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client"><B>org.apache.usergrid.android.client</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client.callbacks"><B>org.usergrid.android.client.callbacks</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client.callbacks"><B>org.apache.usergrid.android.client.callbacks</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A> in <A HREF="../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A></FONT></TH>
+Uses of <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A> in <A HREF="../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -112,11 +112,11 @@ Uses of <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" t
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A> that return <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A> that return <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
 <TD><CODE><B>Client.Query.</B><B><A HREF="../../../../../org/usergrid/android/client/Client.Query.html#next()">next</A></B>()</CODE>
 
 <BR>
@@ -124,7 +124,7 @@ Uses of <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" t
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../org/usergrid/android/client/Client.html#queryActivityFeedForGroup(java.lang.String)">queryActivityFeedForGroup</A></B>(java.lang.String&nbsp;groupId)</CODE>
 
 <BR>
@@ -132,7 +132,7 @@ Uses of <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" t
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../org/usergrid/android/client/Client.html#queryActivityFeedForUser(java.lang.String)">queryActivityFeedForUser</A></B>(java.lang.String&nbsp;userId)</CODE>
 
 <BR>
@@ -140,7 +140,7 @@ Uses of <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" t
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../org/usergrid/android/client/Client.html#queryEntitiesRequest(org.springframework.http.HttpMethod, java.util.Map, java.lang.Object, java.lang.String...)">queryEntitiesRequest</A></B>(org.springframework.http.HttpMethod&nbsp;method,
                      java.util.Map&lt;java.lang.String,java.lang.Object&gt;&nbsp;params,
                      java.lang.Object&nbsp;data,
@@ -151,7 +151,7 @@ Uses of <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" t
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../org/usergrid/android/client/Client.html#queryEntityConnections(java.lang.String, java.lang.String, java.lang.String, java.lang.String)">queryEntityConnections</A></B>(java.lang.String&nbsp;connectingEntityType,
                        java.lang.String&nbsp;connectingEntityId,
                        java.lang.String&nbsp;connectionType,
@@ -162,7 +162,7 @@ Uses of <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" t
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../org/usergrid/android/client/Client.html#queryEntityConnectionsWithinLocation(java.lang.String, java.lang.String, java.lang.String, float, android.location.Location, java.lang.String)">queryEntityConnectionsWithinLocation</A></B>(java.lang.String&nbsp;connectingEntityType,
                                      java.lang.String&nbsp;connectingEntityId,
                                      java.lang.String&nbsp;connectionType,
@@ -175,7 +175,7 @@ Uses of <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" t
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../org/usergrid/android/client/Client.html#queryQueuesRequest(org.springframework.http.HttpMethod, java.util.Map, java.lang.Object, java.lang.String)">queryQueuesRequest</A></B>(org.springframework.http.HttpMethod&nbsp;method,
                    java.util.Map&lt;java.lang.String,java.lang.Object&gt;&nbsp;params,
                    java.lang.Object&nbsp;data,
@@ -186,7 +186,7 @@ Uses of <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" t
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../org/usergrid/android/client/Client.html#queryUsers()">queryUsers</A></B>()</CODE>
 
 <BR>
@@ -194,7 +194,7 @@ Uses of <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" t
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../org/usergrid/android/client/Client.html#queryUsers(java.lang.String)">queryUsers</A></B>(java.lang.String&nbsp;ql)</CODE>
 
 <BR>
@@ -202,7 +202,7 @@ Uses of <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" t
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../org/usergrid/android/client/Client.html#queryUsersForGroup(java.lang.String)">queryUsersForGroup</A></B>(java.lang.String&nbsp;groupId)</CODE>
 
 <BR>
@@ -210,7 +210,7 @@ Uses of <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" t
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../org/usergrid/android/client/Client.html#queryUsersWithinLocation(float, android.location.Location, java.lang.String)">queryUsersWithinLocation</A></B>(float&nbsp;distance,
                          android.location.Location&nbsp;location,
                          java.lang.String&nbsp;ql)</CODE>
@@ -222,11 +222,11 @@ Uses of <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" t
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client.callbacks"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client.callbacks"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A> in <A HREF="../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.usergrid.android.client.callbacks</A></FONT></TH>
+Uses of <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A> in <A HREF="../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.apache.usergrid.android.client.callbacks</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -234,12 +234,12 @@ Uses of <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" t
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.usergrid.android.client.callbacks</A> with parameters of type <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.apache.usergrid.android.client.callbacks</A> with parameters of type <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>QueryResultsCallback.</B><B><A HREF="../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html#onQueryResults(org.usergrid.android.client.Client.Query)">onQueryResults</A></B>(<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A>&nbsp;query)</CODE>
+<TD><CODE><B>QueryResultsCallback.</B><B><A HREF="../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html#onQueryResults(org.apache.usergrid.android.client.Client.Query)">onQueryResults</A></B>(<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A>&nbsp;query)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -261,7 +261,7 @@ Uses of <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" t
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/class-use/Client.QueuePosition.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/class-use/Client.QueuePosition.html b/sdks/android/doc/org/usergrid/android/client/class-use/Client.QueuePosition.html
index 4b81fd3..b790608 100644
--- a/sdks/android/doc/org/usergrid/android/client/class-use/Client.QueuePosition.html
+++ b/sdks/android/doc/org/usergrid/android/client/class-use/Client.QueuePosition.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Class org.usergrid.android.client.Client.QueuePosition
+Uses of Class org.apache.usergrid.android.client.Client.QueuePosition
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Class org.usergrid.android.client.Client.QueuePosition
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Class org.usergrid.android.client.Client.QueuePosition";
+        parent.document.title="Uses of Class org.apache.usergrid.android.client.Client.QueuePosition";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,26 +81,26 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Class<br>org.usergrid.android.client.Client.QueuePosition</B></H2>
+<B>Uses of Class<br>org.apache.usergrid.android.client.Client.QueuePosition</B></H2>
 </CENTER>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Packages that use <A HREF="../../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A></FONT></TH>
+Packages that use <A HREF="../../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client"><B>org.usergrid.android.client</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client"><B>org.apache.usergrid.android.client</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A> in <A HREF="../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A></FONT></TH>
+Uses of <A HREF="../../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A> in <A HREF="../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -108,11 +108,11 @@ Uses of <A HREF="../../../../../org/usergrid/android/client/Client.QueuePosition
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A> that return <A HREF="../../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A> that return <A HREF="../../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>static&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A></CODE></FONT></TD>
+<CODE>static&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A></CODE></FONT></TD>
 <TD><CODE><B>Client.QueuePosition.</B><B><A HREF="../../../../../org/usergrid/android/client/Client.QueuePosition.html#find(java.lang.String)">find</A></B>(java.lang.String&nbsp;s)</CODE>
 
 <BR>
@@ -120,7 +120,7 @@ Uses of <A HREF="../../../../../org/usergrid/android/client/Client.QueuePosition
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>static&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A></CODE></FONT></TD>
+<CODE>static&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A></CODE></FONT></TD>
 <TD><CODE><B>Client.QueuePosition.</B><B><A HREF="../../../../../org/usergrid/android/client/Client.QueuePosition.html#valueOf(java.lang.String)">valueOf</A></B>(java.lang.String&nbsp;name)</CODE>
 
 <BR>
@@ -128,7 +128,7 @@ Uses of <A HREF="../../../../../org/usergrid/android/client/Client.QueuePosition
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>static&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A>[]</CODE></FONT></TD>
+<CODE>static&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A>[]</CODE></FONT></TD>
 <TD><CODE><B>Client.QueuePosition.</B><B><A HREF="../../../../../org/usergrid/android/client/Client.QueuePosition.html#values()">values</A></B>()</CODE>
 
 <BR>
@@ -141,19 +141,19 @@ the order they are declared.</TD>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A> with parameters of type <A HREF="../../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A> with parameters of type <A HREF="../../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../org/usergrid/android/client/Client.html#getMessages(java.lang.String, java.lang.String, java.util.UUID, java.lang.Long, java.lang.Integer, java.lang.Integer, java.lang.Integer, org.usergrid.android.client.Client.QueuePosition, java.lang.Boolean, java.lang.Boolean)">getMessages</A></B>(java.lang.String&nbsp;path,
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../org/usergrid/android/client/Client.html#getMessages(java.lang.String, java.lang.String, java.util.UUID, java.lang.Long, java.lang.Integer, java.lang.Integer, java.lang.Integer, org.apache.usergrid.android.client.Client.QueuePosition, java.lang.Boolean, java.lang.Boolean)">getMessages</A></B>(java.lang.String&nbsp;path,
             java.lang.String&nbsp;consumer,
             java.util.UUID&nbsp;last,
             java.lang.Long&nbsp;time,
             java.lang.Integer&nbsp;prev,
             java.lang.Integer&nbsp;next,
             java.lang.Integer&nbsp;limit,
-            <A HREF="../../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A>&nbsp;pos,
+            <A HREF="../../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A>&nbsp;pos,
             java.lang.Boolean&nbsp;update,
             java.lang.Boolean&nbsp;sync)</CODE>
 
@@ -177,7 +177,7 @@ the order they are declared.</TD>
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>


[72/96] [abbrv] USERGRID-2 package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/index-files/index-16.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/index-files/index-16.html b/sdks/android/doc/index-files/index-16.html
index 33f052f..888e3d1 100644
--- a/sdks/android/doc/index-files/index-16.html
+++ b/sdks/android/doc/index-files/index-16.html
@@ -83,13 +83,13 @@ function windowTitle()
 <B>R</B></H2>
 <DL>
 <DT><A HREF="../org/usergrid/android/client/Client.html#registerDevice(android.content.Context, java.util.Map)"><B>registerDevice(Context, Map&lt;String, Object&gt;)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Registers a device using the device's unique device ID.
-<DT><A HREF="../org/usergrid/android/client/Client.html#registerDeviceAsync(android.content.Context, java.util.Map, org.usergrid.android.client.callbacks.DeviceRegistrationCallback)"><B>registerDeviceAsync(Context, Map&lt;String, Object&gt;, DeviceRegistrationCallback)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#registerDeviceAsync(android.content.Context, java.util.Map, org.apache.usergrid.android.client.callbacks.DeviceRegistrationCallback)"><B>registerDeviceAsync(Context, Map&lt;String, Object&gt;, DeviceRegistrationCallback)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Registers a device using the device's unique device ID.
 <DT><A HREF="../org/usergrid/android/client/Client.html#removeSubscriber(java.lang.String, java.lang.String)"><B>removeSubscriber(String, String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 </DL>
 <HR>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/index-files/index-17.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/index-files/index-17.html b/sdks/android/doc/index-files/index-17.html
index 6fc1cf0..aa3f7e1 100644
--- a/sdks/android/doc/index-files/index-17.html
+++ b/sdks/android/doc/index-files/index-17.html
@@ -83,328 +83,328 @@ function windowTitle()
 <B>S</B></H2>
 <DL>
 <DT><A HREF="../org/usergrid/android/client/Client.html#setAccessToken(java.lang.String)"><B>setAccessToken(String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setAccessToken(java.lang.String)"><B>setAccessToken(String)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setAction(java.lang.String)"><B>setAction(String)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#setActivated(java.lang.Boolean)"><B>setActivated(Boolean)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/entities/Activity.html#setActor(org.usergrid.android.client.entities.Activity.ActivityObject)"><B>setActor(Activity.ActivityObject)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+<DT><A HREF="../org/usergrid/android/client/entities/Activity.html#setActor(org.apache.usergrid.android.client.entities.Activity.ActivityObject)"><B>setActor(Activity.ActivityObject)</B></A> - 
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.html#setApiUrl(java.lang.String)"><B>setApiUrl(String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setApplication(java.util.UUID)"><B>setApplication(UUID)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.html#setApplicationId(java.lang.String)"><B>setApplicationId(String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setApplications(java.util.Map)"><B>setApplications(Map&lt;String, UUID&gt;)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#setAttachments(org.usergrid.android.client.entities.Activity.ActivityObject[])"><B>setAttachments(Activity.ActivityObject[])</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+<DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#setAttachments(org.apache.usergrid.android.client.entities.Activity.ActivityObject[])"><B>setAttachments(Activity.ActivityObject[])</B></A> - 
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#setAuthor(org.usergrid.android.client.entities.Activity.ActivityObject)"><B>setAuthor(Activity.ActivityObject)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+<DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#setAuthor(org.apache.usergrid.android.client.entities.Activity.ActivityObject)"><B>setAuthor(Activity.ActivityObject)</B></A> - 
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/utils/JsonUtils.html#setBooleanProperty(java.util.Map, java.lang.String, java.lang.Boolean)"><B>setBooleanProperty(Map&lt;String, JsonNode&gt;, String, Boolean)</B></A> - 
-Static method in class org.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.usergrid.android.client.utils">JsonUtils</A>
+Static method in class org.apache.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.apache.usergrid.android.client.utils">JsonUtils</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#setCategory(java.lang.String)"><B>setCategory(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Message.html#setCategory(java.lang.String)"><B>setCategory(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html#setCategory(java.lang.String)"><B>setCategory(String)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response">AggregateCounterSet</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response">AggregateCounterSet</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.html#setClientId(java.lang.String)"><B>setClientId(String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.html#setClientSecret(java.lang.String)"><B>setClientSecret(String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setConsumer(java.util.UUID)"><B>setConsumer(UUID)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#setContent(java.lang.String)"><B>setContent(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#setContent(java.lang.String)"><B>setContent(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Message.html#setCorrelationId(java.util.UUID)"><B>setCorrelationId(UUID)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setCounters(java.util.List)"><B>setCounters(List&lt;AggregateCounterSet&gt;)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setCredentials(org.usergrid.android.client.response.ClientCredentialsInfo)"><B>setCredentials(ClientCredentialsInfo)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+<DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setCredentials(org.apache.usergrid.android.client.response.ClientCredentialsInfo)"><B>setCredentials(ClientCredentialsInfo)</B></A> - 
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.html#setCurrentOrganization(java.lang.String)"><B>setCurrentOrganization(String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setCursor(java.lang.String)"><B>setCursor(String)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setData(java.lang.Object)"><B>setData(Object)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Message.html#setDestination(java.lang.String)"><B>setDestination(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#setDisabled(java.lang.Boolean)"><B>setDisabled(Boolean)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#setDisplayName(java.lang.String)"><B>setDisplayName(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#setDownstreamDuplicates(java.lang.String[])"><B>setDownstreamDuplicates(String[])</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html#setDuration(int)"><B>setDuration(int)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html#setDynamicProperty(java.lang.String, java.lang.Object)"><B>setDynamicProperty(String, Object)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.usergrid.android.client.entities">Activity.ActivityCollection</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityCollection</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#setDynamicProperty(java.lang.String, java.lang.Object)"><B>setDynamicProperty(String, Object)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html#setDynamicProperty(java.lang.String, java.lang.Object)"><B>setDynamicProperty(String, Object)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#setEmail(java.lang.String)"><B>setEmail(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setEntities(java.util.List)"><B>setEntities(List&lt;Entity&gt;)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#setEntityType(java.lang.String)"><B>setEntityType(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setError(java.lang.String)"><B>setError(String)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setErrorDescription(java.lang.String)"><B>setErrorDescription(String)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setErrorUri(java.lang.String)"><B>setErrorUri(String)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setException(java.lang.String)"><B>setException(String)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#setFirstname(java.lang.String)"><B>setFirstname(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/entities/Activity.html#setGenerator(org.usergrid.android.client.entities.Activity.ActivityObject)"><B>setGenerator(Activity.ActivityObject)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+<DT><A HREF="../org/usergrid/android/client/entities/Activity.html#setGenerator(org.apache.usergrid.android.client.entities.Activity.ActivityObject)"><B>setGenerator(Activity.ActivityObject)</B></A> - 
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html#setGroup(java.util.UUID)"><B>setGroup(UUID)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response">AggregateCounterSet</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response">AggregateCounterSet</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html#setHeight(int)"><B>setHeight(int)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/entities/Activity.html#setIcon(org.usergrid.android.client.entities.Activity.MediaLink)"><B>setIcon(Activity.MediaLink)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+<DT><A HREF="../org/usergrid/android/client/entities/Activity.html#setIcon(org.apache.usergrid.android.client.entities.Activity.MediaLink)"><B>setIcon(Activity.MediaLink)</B></A> - 
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#setId(java.lang.String)"><B>setId(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ClientCredentialsInfo.html#setId(java.lang.String)"><B>setId(String)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response">ClientCredentialsInfo</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response">ClientCredentialsInfo</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#setImage(org.usergrid.android.client.entities.Activity.MediaLink)"><B>setImage(Activity.MediaLink)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+<DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#setImage(org.apache.usergrid.android.client.entities.Activity.MediaLink)"><B>setImage(Activity.MediaLink)</B></A> - 
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Message.html#setIndexed(java.lang.Boolean)"><B>setIndexed(Boolean)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html#setItems(org.usergrid.android.client.entities.Activity.ActivityObject[])"><B>setItems(Activity.ActivityObject[])</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.usergrid.android.client.entities">Activity.ActivityCollection</A>
+<DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html#setItems(org.apache.usergrid.android.client.entities.Activity.ActivityObject[])"><B>setItems(Activity.ActivityObject[])</B></A> - 
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityCollection</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setLast(java.util.UUID)"><B>setLast(UUID)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#setLastname(java.lang.String)"><B>setLastname(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setList(java.util.List)"><B>setList(List&lt;Object&gt;)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/Client.html#setLoggedInUser(org.usergrid.android.client.entities.User)"><B>setLoggedInUser(User)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#setLoggedInUser(org.apache.usergrid.android.client.entities.User)"><B>setLoggedInUser(User)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/utils/JsonUtils.html#setLongProperty(java.util.Map, java.lang.String, java.lang.Long)"><B>setLongProperty(Map&lt;String, JsonNode&gt;, String, Long)</B></A> - 
-Static method in class org.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.usergrid.android.client.utils">JsonUtils</A>
+Static method in class org.apache.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.apache.usergrid.android.client.utils">JsonUtils</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setMessages(java.util.List)"><B>setMessages(List&lt;Message&gt;)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setMetadata(java.util.Map)"><B>setMetadata(Map&lt;String, JsonNode&gt;)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#setMiddlename(java.lang.String)"><B>setMiddlename(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Device.html#setName(java.lang.String)"><B>setName(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities">Device</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities">Device</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#setName(java.lang.String)"><B>setName(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html#setName(java.lang.String)"><B>setName(String)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response">AggregateCounterSet</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response">AggregateCounterSet</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setNext(java.util.UUID)"><B>setNext(UUID)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/entities/Activity.html#setObject(org.usergrid.android.client.entities.Activity.ActivityObject)"><B>setObject(Activity.ActivityObject)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+<DT><A HREF="../org/usergrid/android/client/entities/Activity.html#setObject(org.apache.usergrid.android.client.entities.Activity.ActivityObject)"><B>setObject(Activity.ActivityObject)</B></A> - 
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/utils/JsonUtils.html#setObjectProperty(java.util.Map, java.lang.String, java.lang.Object)"><B>setObjectProperty(Map&lt;String, JsonNode&gt;, String, Object)</B></A> - 
-Static method in class org.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.usergrid.android.client.utils">JsonUtils</A>
+Static method in class org.apache.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.apache.usergrid.android.client.utils">JsonUtils</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#setObjectType(java.lang.String)"><B>setObjectType(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setParams(java.util.Map)"><B>setParams(Map&lt;String, List&lt;String&gt;&gt;)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Group.html#setPath(java.lang.String)"><B>setPath(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setPath(java.lang.String)"><B>setPath(String)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/QueueInfo.html#setPath(java.lang.String)"><B>setPath(String)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response">QueueInfo</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response">QueueInfo</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Message.html#setPersistent(java.lang.Boolean)"><B>setPersistent(Boolean)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#setPicture(java.lang.String)"><B>setPicture(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Entity.html#setProperty(java.lang.String, org.codehaus.jackson.JsonNode)"><B>setProperty(String, JsonNode)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setProperty(java.lang.String, org.codehaus.jackson.JsonNode)"><B>setProperty(String, JsonNode)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#setPublished(java.util.Date)"><B>setPublished(Date)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#setPublished(java.lang.Long)"><B>setPublished(Long)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html#setQueue(java.util.UUID)"><B>setQueue(UUID)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response">AggregateCounterSet</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response">AggregateCounterSet</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setQueue(java.util.UUID)"><B>setQueue(UUID)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/QueueInfo.html#setQueue(java.util.UUID)"><B>setQueue(UUID)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response">QueueInfo</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response">QueueInfo</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setQueues(java.util.List)"><B>setQueues(List&lt;QueueInfo&gt;)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Message.html#setReplyTo(java.lang.String)"><B>setReplyTo(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ClientCredentialsInfo.html#setSecret(java.lang.String)"><B>setSecret(String)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response">ClientCredentialsInfo</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response">ClientCredentialsInfo</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setStatus(java.lang.String)"><B>setStatus(String)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/utils/JsonUtils.html#setStringProperty(java.util.Map, java.lang.String, java.lang.String)"><B>setStringProperty(Map&lt;String, JsonNode&gt;, String, String)</B></A> - 
-Static method in class org.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.usergrid.android.client.utils">JsonUtils</A>
+Static method in class org.apache.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.apache.usergrid.android.client.utils">JsonUtils</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#setSummary(java.lang.String)"><B>setSummary(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Message.html#setTimestamp(java.lang.Long)"><B>setTimestamp(Long)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/AggregateCounter.html#setTimestamp(long)"><B>setTimestamp(long)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response">AggregateCounter</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response">AggregateCounter</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setTimestamp(long)"><B>setTimestamp(long)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#setTitle(java.lang.String)"><B>setTitle(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Group.html#setTitle(java.lang.String)"><B>setTitle(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html#setTotalItems(int)"><B>setTotalItems(int)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.usergrid.android.client.entities">Activity.ActivityCollection</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityCollection</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Entity.html#setType(java.lang.String)"><B>setType(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#setUpdated(java.lang.String)"><B>setUpdated(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#setUpstreamDuplicates(java.lang.String)"><B>setUpstreamDuplicates(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setUri(java.lang.String)"><B>setUri(String)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html#setUrl(java.lang.String)"><B>setUrl(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.usergrid.android.client.entities">Activity.ActivityCollection</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityCollection</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#setUrl(java.lang.String)"><B>setUrl(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html#setUrl(java.lang.String)"><B>setUrl(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html#setUser(java.util.UUID)"><B>setUser(UUID)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response">AggregateCounterSet</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response">AggregateCounterSet</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setUser(org.usergrid.android.client.entities.User)"><B>setUser(User)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+<DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setUser(org.apache.usergrid.android.client.entities.User)"><B>setUser(User)</B></A> - 
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#setUsername(java.lang.String)"><B>setUsername(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#setUuid(java.util.UUID)"><B>setUuid(UUID)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Entity.html#setUuid(java.util.UUID)"><B>setUuid(UUID)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/utils/JsonUtils.html#setUUIDProperty(java.util.Map, java.lang.String, java.util.UUID)"><B>setUUIDProperty(Map&lt;String, JsonNode&gt;, String, UUID)</B></A> - 
-Static method in class org.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.usergrid.android.client.utils">JsonUtils</A>
+Static method in class org.apache.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.apache.usergrid.android.client.utils">JsonUtils</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/AggregateCounter.html#setValue(long)"><B>setValue(long)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response">AggregateCounter</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response">AggregateCounter</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html#setValues(java.util.List)"><B>setValues(List&lt;AggregateCounter&gt;)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response">AggregateCounterSet</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response">AggregateCounterSet</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#setVerb(java.lang.String)"><B>setVerb(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html#setWidth(int)"><B>setWidth(int)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A>
 <DD>&nbsp;
 </DL>
 <HR>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/index-files/index-18.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/index-files/index-18.html b/sdks/android/doc/index-files/index-18.html
index abc1393..b290771 100644
--- a/sdks/android/doc/index-files/index-18.html
+++ b/sdks/android/doc/index-files/index-18.html
@@ -83,46 +83,46 @@ function windowTitle()
 <B>T</B></H2>
 <DL>
 <DT><A HREF="../org/usergrid/android/client/utils/JsonUtils.html#toJsonNode(java.lang.Object)"><B>toJsonNode(Object)</B></A> - 
-Static method in class org.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.usergrid.android.client.utils">JsonUtils</A>
+Static method in class org.apache.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.apache.usergrid.android.client.utils">JsonUtils</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/utils/JsonUtils.html#toJsonString(java.lang.Object)"><B>toJsonString(Object)</B></A> - 
-Static method in class org.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.usergrid.android.client.utils">JsonUtils</A>
+Static method in class org.apache.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.apache.usergrid.android.client.utils">JsonUtils</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.QueuePosition.html#toString()"><B>toString()</B></A> - 
-Method in enum org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A>
+Method in enum org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html#toString()"><B>toString()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.usergrid.android.client.entities">Activity.ActivityCollection</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityCollection</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#toString()"><B>toString()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html#toString()"><B>toString()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Entity.html#toString()"><B>toString()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/AggregateCounter.html#toString()"><B>toString()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response">AggregateCounter</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response">AggregateCounter</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html#toString()"><B>toString()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response">AggregateCounterSet</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response">AggregateCounterSet</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#toString()"><B>toString()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ClientCredentialsInfo.html#toString()"><B>toString()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response">ClientCredentialsInfo</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response">ClientCredentialsInfo</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Entity.html#toType(java.lang.Class)"><B>toType(Class&lt;T&gt;)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/entities/Entity.html#toType(org.usergrid.android.client.entities.Entity, java.lang.Class)"><B>toType(Entity, Class&lt;T&gt;)</B></A> - 
-Static method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>
+<DT><A HREF="../org/usergrid/android/client/entities/Entity.html#toType(org.apache.usergrid.android.client.entities.Entity, java.lang.Class)"><B>toType(Entity, Class&lt;T&gt;)</B></A> - 
+Static method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Entity.html#toType(java.util.List, java.lang.Class)"><B>toType(List&lt;Entity&gt;, Class&lt;T&gt;)</B></A> - 
-Static method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>
+Static method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>
 <DD>&nbsp;
 </DL>
 <HR>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/index-files/index-19.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/index-files/index-19.html b/sdks/android/doc/index-files/index-19.html
index e2d2d0e..601621f 100644
--- a/sdks/android/doc/index-files/index-19.html
+++ b/sdks/android/doc/index-files/index-19.html
@@ -83,19 +83,19 @@ function windowTitle()
 <B>U</B></H2>
 <DL>
 <DT><A HREF="../org/usergrid/android/client/utils/UrlUtils.html#url(java.lang.String)"><B>url(String)</B></A> - 
-Static method in class org.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/UrlUtils.html" title="class in org.usergrid.android.client.utils">UrlUtils</A>
+Static method in class org.apache.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/UrlUtils.html" title="class in org.apache.usergrid.android.client.utils">UrlUtils</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/utils/UrlUtils.html#url(java.net.URL, java.lang.String)"><B>url(URL, String)</B></A> - 
-Static method in class org.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/UrlUtils.html" title="class in org.usergrid.android.client.utils">UrlUtils</A>
+Static method in class org.apache.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/UrlUtils.html" title="class in org.apache.usergrid.android.client.utils">UrlUtils</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/utils/UrlUtils.html" title="class in org.usergrid.android.client.utils"><B>UrlUtils</B></A> - Class in <A HREF="../org/usergrid/android/client/utils/package-summary.html">org.usergrid.android.client.utils</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/utils/UrlUtils.html#UrlUtils()"><B>UrlUtils()</B></A> - 
-Constructor for class org.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/UrlUtils.html" title="class in org.usergrid.android.client.utils">UrlUtils</A>
+<DT><A HREF="../org/usergrid/android/client/utils/UrlUtils.html" title="class in org.apache.usergrid.android.client.utils"><B>UrlUtils</B></A> - Class in <A HREF="../org/usergrid/android/client/utils/package-summary.html">org.apache.usergrid.android.client.utils</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/utils/UrlUtils.html#UrlUtils()"><B>UrlUtils()</B></A> - 
+Constructor for class org.apache.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/UrlUtils.html" title="class in org.apache.usergrid.android.client.utils">UrlUtils</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities"><B>User</B></A> - Class in <A HREF="../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/entities/User.html#User()"><B>User()</B></A> - 
-Constructor for class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+<DT><A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities"><B>User</B></A> - Class in <A HREF="../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/entities/User.html#User()"><B>User()</B></A> - 
+Constructor for class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/entities/User.html#User(org.usergrid.android.client.entities.Entity)"><B>User(Entity)</B></A> - 
-Constructor for class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+<DT><A HREF="../org/usergrid/android/client/entities/User.html#User(org.apache.usergrid.android.client.entities.Entity)"><B>User(Entity)</B></A> - 
+Constructor for class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 </DL>
 <HR>


[07/96] [abbrv] [partial] Change package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/ir/OrderByNode.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/ir/OrderByNode.java b/stack/core/src/main/java/org/usergrid/persistence/query/ir/OrderByNode.java
deleted file mode 100644
index 089e66f..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/ir/OrderByNode.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.query.ir;
-
-
-import java.util.List;
-
-import org.usergrid.persistence.Query.SortPredicate;
-
-
-/**
- * Intermediate representation of ordering operations
- *
- * @author tnine
- */
-public class OrderByNode extends QueryNode {
-
-
-    private final SliceNode firstPredicate;
-    private final List<SortPredicate> secondarySorts;
-    private final QueryNode queryOperations;
-
-
-    /**
-     * @param firstPredicate The first predicate that is in the order by statement
-     * @param secondarySorts Any subsequent terms
-     * @param queryOperations The subtree for boolean evaluation
-     */
-    public OrderByNode( SliceNode firstPredicate, List<SortPredicate> secondarySorts, QueryNode queryOperations ) {
-        this.firstPredicate = firstPredicate;
-        this.secondarySorts = secondarySorts;
-        this.queryOperations = queryOperations;
-    }
-
-
-    /** @return the sorts */
-    public List<SortPredicate> getSecondarySorts() {
-        return secondarySorts;
-    }
-
-
-    /** @return the firstPredicate */
-    public SliceNode getFirstPredicate() {
-        return firstPredicate;
-    }
-
-
-    public QueryNode getQueryOperations() {
-        return queryOperations;
-    }
-
-
-    /*
-       * (non-Javadoc)
-       *
-       * @see
-       * org.usergrid.persistence.query.ir.QueryNode#visit(org.usergrid.persistence
-       * .query.ir.NodeVisitor)
-       */
-    @Override
-    public void visit( NodeVisitor visitor ) throws Exception {
-        visitor.visit( this );
-    }
-
-
-    /** Return true if this order has secondary sorts */
-    public boolean hasSecondarySorts() {
-        return secondarySorts != null && secondarySorts.size() > 0;
-    }
-
-
-    /* (non-Javadoc)
-     * @see java.lang.Object#toString()
-     */
-    @Override
-    public String toString() {
-        return "OrderByNode [sorts=" + secondarySorts + "]";
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/ir/QueryNode.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/ir/QueryNode.java b/stack/core/src/main/java/org/usergrid/persistence/query/ir/QueryNode.java
deleted file mode 100644
index 4fbf418..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/ir/QueryNode.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.query.ir;
-
-
-/**
- * The visit the node
- *
- * @author tnine
- */
-public abstract class QueryNode {
-
-    /** Visit this node */
-    public abstract void visit( NodeVisitor visitor ) throws Exception;
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/ir/QuerySlice.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/ir/QuerySlice.java b/stack/core/src/main/java/org/usergrid/persistence/query/ir/QuerySlice.java
deleted file mode 100644
index da94494..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/ir/QuerySlice.java
+++ /dev/null
@@ -1,344 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.query.ir;
-
-
-import java.nio.ByteBuffer;
-
-import org.usergrid.utils.NumberUtils;
-
-import me.prettyprint.hector.api.beans.AbstractComposite.ComponentEquality;
-import me.prettyprint.hector.api.beans.DynamicComposite;
-
-import static org.usergrid.utils.CompositeUtils.setEqualityFlag;
-
-
-/**
- * Node that represents a query slice operation
- *
- * @author tnine
- */
-public class QuerySlice {
-
-    private final String propertyName;
-    private final int nodeId;
-    // Object value;
-    private RangeValue start;
-    private RangeValue finish;
-    private ByteBuffer cursor;
-    private boolean reversed;
-
-
-    /**
-     * @param propertyName
-     * @param nodeId
-     */
-    public QuerySlice( String propertyName, int nodeId ) {
-        this.propertyName = propertyName;
-        this.nodeId = nodeId;
-    }
-
-
-    /** Reverse this slice. Flips the reversed switch and correctly changes the start and finish */
-    public void reverse() {
-        reversed = !reversed;
-
-        RangeValue oldStart = start;
-
-        start = finish;
-
-        finish = oldStart;
-    }
-
-
-    public String getPropertyName() {
-        return propertyName;
-    }
-
-
-    public RangeValue getStart() {
-        return start;
-    }
-
-
-    public void setStart( RangeValue start ) {
-        this.start = start;
-    }
-
-
-    public RangeValue getFinish() {
-        return finish;
-    }
-
-
-    public void setFinish( RangeValue finish ) {
-        this.finish = finish;
-    }
-
-
-    public ByteBuffer getCursor() {
-        return hasCursor() ? cursor.duplicate() : null;
-    }
-
-
-    public void setCursor( ByteBuffer cursor ) {
-        this.cursor = cursor;
-    }
-
-
-    /** True if a cursor has been set */
-    public boolean hasCursor() {
-        return this.cursor != null;
-    }
-
-
-    public boolean isReversed() {
-        return reversed;
-    }
-
-
-    /**
-     * Return true if we have a cursor and it's empty. This means that we've already returned all possible values from
-     * this slice range with our existing data in a previous invocation of search
-     */
-    public boolean isComplete() {
-        return cursor != null && cursor.remaining() == 0;
-    }
-
-
-    /**
-     * Get the slice range to be used during querying
-     *
-     * @return An array of dynamic composites to use. Index 0 is the start, index 1 is the finish. One or more could be
-     *         null
-     */
-    public DynamicComposite[] getRange() {
-        DynamicComposite startComposite = null;
-        DynamicComposite finishComposite = null;
-
-        // calc
-        if ( hasCursor() ) {
-            startComposite = DynamicComposite.fromByteBuffer( cursor.duplicate() );
-        }
-
-        else if ( start != null ) {
-            startComposite = new DynamicComposite( start.getCode(), start.getValue() );
-
-            // forward scanning from a >= 100 OR //reverse scanning from MAX to >= 100
-            if ( ( !reversed && !start.isInclusive() ) || ( reversed && start.isInclusive() ) ) {
-                setEqualityFlag( startComposite, ComponentEquality.GREATER_THAN_EQUAL );
-            }
-        }
-
-        if ( finish != null ) {
-            finishComposite = new DynamicComposite( finish.getCode(), finish.getValue() );
-
-            // forward scan to <= 100 OR reverse scan ININITY to > 100
-            if ( ( !reversed && finish.isInclusive() ) || reversed && !finish.isInclusive() ) {
-                setEqualityFlag( finishComposite, ComponentEquality.GREATER_THAN_EQUAL );
-            }
-        }
-
-        return new DynamicComposite[] { startComposite, finishComposite };
-    }
-
-
-    @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + ( ( finish == null ) ? 0 : finish.hashCode() );
-        result = prime * result + ( ( propertyName == null ) ? 0 : propertyName.hashCode() );
-        result = prime * result + ( reversed ? 1231 : 1237 );
-        result = prime * result + ( ( start == null ) ? 0 : start.hashCode() );
-        result = prime * result + nodeId;
-        return result;
-    }
-
-
-    @Override
-    public boolean equals( Object obj ) {
-        if ( this == obj ) {
-            return true;
-        }
-        if ( obj == null ) {
-            return false;
-        }
-        if ( getClass() != obj.getClass() ) {
-            return false;
-        }
-        QuerySlice other = ( QuerySlice ) obj;
-        if ( finish == null ) {
-            if ( other.finish != null ) {
-                return false;
-            }
-        }
-        else if ( !finish.equals( other.finish ) ) {
-            return false;
-        }
-        if ( propertyName == null ) {
-            if ( other.propertyName != null ) {
-                return false;
-            }
-        }
-        else if ( !propertyName.equals( other.propertyName ) ) {
-            return false;
-        }
-        if ( reversed != other.reversed ) {
-            return false;
-        }
-        if ( start == null ) {
-            if ( other.start != null ) {
-                return false;
-            }
-        }
-        else if ( !start.equals( other.start ) ) {
-            return false;
-        }
-        return true;
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see java.lang.Object#toString()
-     */
-    @Override
-    public String toString() {
-        return "QuerySlice [propertyName=" + propertyName + ", start=" + start + ", finish=" + finish + ", cursor="
-                + cursor + ", reversed=" + reversed + ", nodeId=" + nodeId + "]";
-    }
-
-
-    public static class RangeValue {
-        final byte code;
-        final Object value;
-        final boolean inclusive;
-
-
-        public RangeValue( byte code, Object value, boolean inclusive ) {
-            this.code = code;
-            this.value = value;
-            this.inclusive = inclusive;
-        }
-
-
-        public byte getCode() {
-            return code;
-        }
-
-
-        public Object getValue() {
-            return value;
-        }
-
-
-        public boolean isInclusive() {
-            return inclusive;
-        }
-
-
-        @Override
-        public int hashCode() {
-            final int prime = 31;
-            int result = 1;
-            result = prime * result + code;
-            result = prime * result + ( inclusive ? 1231 : 1237 );
-            result = prime * result + ( ( value == null ) ? 0 : value.hashCode() );
-            return result;
-        }
-
-
-        @Override
-        public boolean equals( Object obj ) {
-            if ( this == obj ) {
-                return true;
-            }
-            if ( obj == null ) {
-                return false;
-            }
-            if ( getClass() != obj.getClass() ) {
-                return false;
-            }
-            RangeValue other = ( RangeValue ) obj;
-            if ( code != other.code ) {
-                return false;
-            }
-            if ( inclusive != other.inclusive ) {
-                return false;
-            }
-            if ( value == null ) {
-                if ( other.value != null ) {
-                    return false;
-                }
-            }
-            else if ( !value.equals( other.value ) ) {
-                return false;
-            }
-            return true;
-        }
-
-
-        public int compareTo( RangeValue other, boolean finish ) {
-            if ( other == null ) {
-                return 1;
-            }
-            if ( code != other.code ) {
-                return NumberUtils.sign( code - other.code );
-            }
-            @SuppressWarnings({ "unchecked", "rawtypes" }) int c = ( ( Comparable ) value ).compareTo( other.value );
-            if ( c != 0 ) {
-                return c;
-            }
-            if ( finish ) {
-                // for finish values, inclusive means <= which is greater than <
-                if ( inclusive != other.inclusive ) {
-                    return inclusive ? 1 : -1;
-                }
-            }
-            else {
-                // for start values, inclusive means >= which is lest than >
-                if ( inclusive != other.inclusive ) {
-                    return inclusive ? -1 : 1;
-                }
-            }
-            return 0;
-        }
-
-
-        /*
-         * (non-Javadoc)
-         *
-         * @see java.lang.Object#toString()
-         */
-        @Override
-        public String toString() {
-            return "RangeValue [code=" + code + ", value=" + value + ", inclusive=" + inclusive + "]";
-        }
-
-
-        public static int compare( RangeValue v1, RangeValue v2, boolean finish ) {
-            if ( v1 == null ) {
-                if ( v2 == null ) {
-                    return 0;
-                }
-                return -1;
-            }
-            return v1.compareTo( v2, finish );
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/ir/SearchVisitor.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/ir/SearchVisitor.java b/stack/core/src/main/java/org/usergrid/persistence/query/ir/SearchVisitor.java
deleted file mode 100644
index 665ddd2..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/ir/SearchVisitor.java
+++ /dev/null
@@ -1,255 +0,0 @@
-package org.usergrid.persistence.query.ir;
-
-
-import java.util.Stack;
-
-import org.usergrid.persistence.EntityManager;
-import org.usergrid.persistence.EntityRef;
-import org.usergrid.persistence.Query;
-import org.usergrid.persistence.cassandra.QueryProcessor;
-import org.usergrid.persistence.cassandra.index.IndexScanner;
-import org.usergrid.persistence.cassandra.index.NoOpIndexScanner;
-import org.usergrid.persistence.query.ir.result.EmptyIterator;
-import org.usergrid.persistence.query.ir.result.IntersectionIterator;
-import org.usergrid.persistence.query.ir.result.OrderByIterator;
-import org.usergrid.persistence.query.ir.result.ResultIterator;
-import org.usergrid.persistence.query.ir.result.SecondaryIndexSliceParser;
-import org.usergrid.persistence.query.ir.result.SliceIterator;
-import org.usergrid.persistence.query.ir.result.StaticIdIterator;
-import org.usergrid.persistence.query.ir.result.SubtractionIterator;
-import org.usergrid.persistence.query.ir.result.UnionIterator;
-
-
-/**
- * Simple search visitor that performs all the joining in memory for results.
- * <p/>
- * Subclasses will want to implement visiting SliceNode and WithinNode to actually perform the search on the Cassandra
- * indexes. This class can perform joins on all index entries that conform to the Results object
- *
- * @author tnine
- */
-public abstract class SearchVisitor implements NodeVisitor {
-
-    private static final SecondaryIndexSliceParser COLLECTION_PARSER = new SecondaryIndexSliceParser();
-
-    protected final Query query;
-
-    protected final QueryProcessor queryProcessor;
-
-    protected final EntityManager em;
-
-    protected final Stack<ResultIterator> results = new Stack<ResultIterator>();
-
-
-    /**
-     * @param queryProcessor
-     */
-    public SearchVisitor( QueryProcessor queryProcessor ) {
-        this.query = queryProcessor.getQuery();
-        this.queryProcessor = queryProcessor;
-        this.em = queryProcessor.getEntityManager();
-    }
-
-
-    /** Return the results if they exist, null otherwise */
-    public ResultIterator getResults() {
-        return results.isEmpty() ? null : results.pop();
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see org.usergrid.persistence.query.ir.NodeVisitor#visit(org.usergrid.
-     * persistence.query.ir.AndNode)
-     */
-    @Override
-    public void visit( AndNode node ) throws Exception {
-        node.getLeft().visit( this );
-        node.getRight().visit( this );
-
-        ResultIterator right = results.pop();
-        ResultIterator left = results.pop();
-
-        /**
-         * NOTE: TN We should always maintain post order traversal of the tree. It
-         * is required for sorting to work correctly
-         */
-        IntersectionIterator intersection = new IntersectionIterator( queryProcessor.getPageSizeHint( node ) );
-        intersection.addIterator( left );
-        intersection.addIterator( right );
-
-        results.push( intersection );
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see org.usergrid.persistence.query.ir.NodeVisitor#visit(org.usergrid.
-     * persistence.query.ir.NotNode)
-     */
-    @Override
-    public void visit( NotNode node ) throws Exception {
-        node.getSubtractNode().visit( this );
-        ResultIterator not = results.pop();
-
-        node.getKeepNode().visit( this );
-        ResultIterator keep = results.pop();
-
-        SubtractionIterator subtraction = new SubtractionIterator( queryProcessor.getPageSizeHint( node ) );
-        subtraction.setSubtractIterator( not );
-        subtraction.setKeepIterator( keep );
-
-        results.push( subtraction );
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see org.usergrid.persistence.query.ir.NodeVisitor#visit(org.usergrid.
-     * persistence.query.ir.OrNode)
-     */
-    @Override
-    public void visit( OrNode node ) throws Exception {
-        node.getLeft().visit( this );
-        node.getRight().visit( this );
-
-        ResultIterator right = results.pop();
-        ResultIterator left = results.pop();
-
-        final int nodeId = node.getId();
-
-        UnionIterator union = new UnionIterator( queryProcessor.getPageSizeHint( node ), nodeId, queryProcessor.getCursorCache(nodeId  ) );
-
-        if ( left != null ) {
-            union.addIterator( left );
-        }
-        if ( right != null ) {
-            union.addIterator( right );
-        }
-
-        results.push( union );
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see
-     * org.usergrid.persistence.query.ir.NodeVisitor#visit(org.usergrid.persistence
-     * .query.ir.OrderByNode)
-     */
-    @Override
-    public void visit( OrderByNode orderByNode ) throws Exception {
-
-        QuerySlice slice = orderByNode.getFirstPredicate().getAllSlices().iterator().next();
-
-        queryProcessor.applyCursorAndSort( slice );
-
-        QueryNode subOperations = orderByNode.getQueryOperations();
-
-        ResultIterator subResults = null;
-
-        if ( subOperations != null ) {
-            //visit our sub operation
-            subOperations.visit( this );
-
-            subResults = results.pop();
-        }
-
-        ResultIterator orderIterator;
-
-        /**
-         * We have secondary sorts, we need to evaluate the candidate results and sort them in memory
-         */
-        if ( orderByNode.hasSecondarySorts() ) {
-
-            //only order by with no query, start scanning the first field
-            if ( subResults == null ) {
-                QuerySlice firstFieldSlice = new QuerySlice( slice.getPropertyName(), -1 );
-                subResults =
-                        new SliceIterator( slice, secondaryIndexScan( orderByNode, firstFieldSlice ), COLLECTION_PARSER,
-                                slice.hasCursor() );
-            }
-
-            orderIterator = new OrderByIterator( slice, orderByNode.getSecondarySorts(), subResults, em,
-                    queryProcessor.getPageSizeHint( orderByNode ) );
-        }
-
-        //we don't have multi field sorting, we can simply do intersection with a single scan range
-        else {
-
-            IndexScanner scanner;
-
-            if ( slice.isComplete() ) {
-                scanner = new NoOpIndexScanner();
-            }
-            else {
-                scanner = secondaryIndexScan( orderByNode, slice );
-            }
-
-            SliceIterator joinSlice = new SliceIterator( slice, scanner, COLLECTION_PARSER, slice.hasCursor() );
-
-            IntersectionIterator union = new IntersectionIterator( queryProcessor.getPageSizeHint( orderByNode ) );
-            union.addIterator( joinSlice );
-
-            if ( subResults != null ) {
-                union.addIterator( subResults );
-            }
-
-            orderIterator = union;
-        }
-
-        // now create our intermediate iterator with our real results
-        results.push( orderIterator );
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see
-     * org.usergrid.persistence.query.ir.NodeVisitor#visit(org.usergrid.persistence
-     * .query.ir.SliceNode)
-     */
-    @Override
-    public void visit( SliceNode node ) throws Exception {
-        IntersectionIterator intersections = new IntersectionIterator( queryProcessor.getPageSizeHint( node ) );
-
-        for ( QuerySlice slice : node.getAllSlices() ) {
-            IndexScanner scanner = secondaryIndexScan( node, slice );
-
-            intersections.addIterator( new SliceIterator( slice, scanner, COLLECTION_PARSER, slice.hasCursor() ) );
-        }
-
-        results.push( intersections );
-    }
-
-
-    /**
-     * Create a secondary index scan for the given slice node. DOES NOT apply to the "all" case. This should only
-     * generate a slice for secondary property scanning
-     */
-    protected abstract IndexScanner secondaryIndexScan( QueryNode node, QuerySlice slice ) throws Exception;
-
-
-    @Override
-    public void visit( UuidIdentifierNode uuidIdentifierNode ) {
-        this.results.push( new StaticIdIterator( uuidIdentifierNode.getUuid() ) );
-    }
-
-
-    @Override
-    public void visit( EmailIdentifierNode emailIdentifierNode ) throws Exception {
-        EntityRef user = queryProcessor.getEntityManager().getUserByIdentifier( emailIdentifierNode.getIdentifier() );
-
-        if ( user == null ) {
-            this.results.push( new EmptyIterator() );
-            return;
-        }
-
-        this.results.push( new StaticIdIterator( user.getUuid() ) );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/ir/SliceNode.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/ir/SliceNode.java b/stack/core/src/main/java/org/usergrid/persistence/query/ir/SliceNode.java
deleted file mode 100644
index dd2a933..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/ir/SliceNode.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.query.ir;
-
-
-import java.util.Collection;
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-import org.usergrid.persistence.query.ir.QuerySlice.RangeValue;
-
-import static org.usergrid.persistence.cassandra.IndexUpdate.indexValueCode;
-import static org.usergrid.persistence.cassandra.IndexUpdate.toIndexableValue;
-
-
-/**
- * A node which has 1 or more query Slices that can be unioned together. I.E and && operation with either 1 or more
- * children
- *
- * @author tnine
- */
-public class SliceNode extends QueryNode {
-
-    /**
-     * A context within a tree to allow for operand and range scan optimizations. In the event that the user enters a
-     * query in the following way
-     * <p/>
-     * (x > 5 and x < 15 and z > 10 and z < 20) or (y > 10 and y < 20)
-     * <p/>
-     * You will have 2 contexts. The first is for (x > 5 and x < 15 and z > 10 and z < 20), the second is for (y > 10
-     * and y < 20). This allows us to compress these operations into a single range scan per context.
-     */
-    // private class TreeContext {
-
-    private Map<String, QuerySlice> pairs = new LinkedHashMap<String, QuerySlice>();
-
-    private int id;
-
-
-    /**
-     * Set the id for construction. Just a counter. Used for creating tokens and things like tokens where the same
-     * property can be used in 2 different subtrees
-     */
-    public SliceNode( int id ) {
-        this.id = id;
-    }
-
-
-    /**
-     * Set the start value. If the range pair doesn't exist, it's created
-     *
-     * @param start The start value. this will be processed and turned into an indexed value
-     */
-    public void setStart( String fieldName, Object start, boolean inclusive ) {
-        QuerySlice slice = getOrCreateSlice( fieldName );
-
-        // if the value is null don't set the range on the slice
-        if ( start == null ) {
-            return;
-        }
-
-        RangeValue existingStart = slice.getStart();
-
-        Object indexedValue = toIndexableValue( start );
-        byte code = indexValueCode( indexedValue );
-
-        RangeValue newStart = new RangeValue( code, indexedValue, inclusive );
-
-        if ( existingStart == null ) {
-            slice.setStart( newStart );
-            return;
-        }
-
-        // check if we're before the currently set start in this
-        // context. If so set the value to increase the range scan size;
-        if ( existingStart != null && newStart == null || ( existingStart != null
-                && existingStart.compareTo( newStart, false ) < 0 ) ) {
-            slice.setStart( newStart );
-        }
-    }
-
-
-    /** Set the finish. If finish value is greater than the existing, I.E. null or higher comparison, then */
-    public void setFinish( String fieldName, Object finish, boolean inclusive ) {
-        QuerySlice slice = getOrCreateSlice( fieldName );
-
-        // if the value is null don't set the range on the slice
-        if ( finish == null ) {
-            return;
-        }
-
-        RangeValue existingFinish = slice.getFinish();
-
-        Object indexedValue = toIndexableValue( finish );
-        byte code = indexValueCode( indexedValue );
-
-        RangeValue newFinish = new RangeValue( code, indexedValue, inclusive );
-
-        if ( existingFinish == null ) {
-            slice.setFinish( newFinish );
-            return;
-        }
-
-        // check if we're before the currently set start in this
-        // context. If so set the value to increase the range scan size;
-        if ( existingFinish != null && newFinish == null || ( existingFinish != null
-                && existingFinish.compareTo( newFinish, false ) < 0 ) ) {
-            slice.setFinish( newFinish );
-        }
-    }
-
-
-    /** Lazy instanciate a field pair if required. Otherwise return the existing pair */
-    private QuerySlice getOrCreateSlice( String fieldName ) {
-        QuerySlice pair = this.pairs.get( fieldName );
-
-        if ( pair == null ) {
-            pair = new QuerySlice( fieldName, id );
-            this.pairs.put( fieldName, pair );
-        }
-
-        return pair;
-    }
-
-
-    /** Get the slice by field name if it exists. Null otherwise */
-    public QuerySlice getSlice( String fieldName ) {
-        return this.pairs.get( fieldName );
-    }
-
-
-    /** Get all slices in our context */
-    public Collection<QuerySlice> getAllSlices() {
-        return this.pairs.values();
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see
-     * org.usergrid.persistence.query.ir.QueryNode#visit(org.usergrid.persistence
-     * .query.ir.NodeVisitor)
-     */
-    @Override
-    public void visit( NodeVisitor visitor ) throws Exception {
-        visitor.visit( this );
-    }
-
-
-    @Override
-    public String toString() {
-        return "SliceNode [pairs=" + pairs + ", id=" + id + "]";
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/ir/UuidIdentifierNode.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/ir/UuidIdentifierNode.java b/stack/core/src/main/java/org/usergrid/persistence/query/ir/UuidIdentifierNode.java
deleted file mode 100644
index 20aaaeb..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/ir/UuidIdentifierNode.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package org.usergrid.persistence.query.ir;
-
-
-import java.util.UUID;
-
-
-/**
- * Class to represent a UUID based Identifier query
- *
- * @author tnine
- */
-public class UuidIdentifierNode extends QueryNode {
-
-
-    private final UUID uuid;
-
-
-    public UuidIdentifierNode( UUID uuid ) {
-        this.uuid = uuid;
-    }
-
-
-    @Override
-    public void visit( NodeVisitor visitor ) throws Exception {
-        visitor.visit( this );
-    }
-
-
-    public UUID getUuid() {
-        return uuid;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/ir/WithinNode.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/ir/WithinNode.java b/stack/core/src/main/java/org/usergrid/persistence/query/ir/WithinNode.java
deleted file mode 100644
index c54c882..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/ir/WithinNode.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.query.ir;
-
-
-/**
- * Intermediate represnetation of the within operator
- *
- * @author tnine
- */
-public class WithinNode extends QueryNode {
-
-    private final String propertyName;
-    private final float distance;
-    private final float lattitude;
-    private final float longitude;
-    private final QuerySlice slice;
-
-
-    /**
-     * @param propertyName
-     * @param distance
-     * @param lattitude
-     * @param longitude
-     */
-    public WithinNode( String propertyName, float distance, float lattitude, float longitude, int nodeId ) {
-        this.propertyName = propertyName;
-        this.distance = distance;
-        this.lattitude = lattitude;
-        this.longitude = longitude;
-        this.slice = new QuerySlice( "location", nodeId );
-    }
-
-
-    /** @return the propertyName */
-    public String getPropertyName() {
-        return propertyName;
-    }
-
-
-    /** @return the distance */
-    public float getDistance() {
-        return distance;
-    }
-
-
-    /** @return the lattitude */
-    public float getLattitude() {
-        return lattitude;
-    }
-
-
-    /** @return the longitude */
-    public float getLongitude() {
-        return longitude;
-    }
-
-
-    /** @return the slice */
-    public QuerySlice getSlice() {
-        return slice;
-    }
-
-
-    /*
-       * (non-Javadoc)
-       *
-       * @see
-       * org.usergrid.persistence.query.ir.QueryNode#visit(org.usergrid.persistence
-       * .query.ir.NodeVisitor)
-       */
-    @Override
-    public void visit( NodeVisitor visitor ) throws Exception {
-        visitor.visit( this );
-    }
-
-
-    @Override
-    public String toString() {
-        return "WithinNode [propertyName=" + propertyName + ", distance=" + distance + ", lattitude=" + lattitude
-                + ", longitude=" + longitude + "]";
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/AbstractScanColumn.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/AbstractScanColumn.java b/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/AbstractScanColumn.java
deleted file mode 100644
index d05661b..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/AbstractScanColumn.java
+++ /dev/null
@@ -1,70 +0,0 @@
-package org.usergrid.persistence.query.ir.result;
-
-
-import java.nio.ByteBuffer;
-import java.util.UUID;
-import org.apache.cassandra.utils.ByteBufferUtil;
-
-
-/**
- *
- * @author: tnine
- *
- */
-public abstract class AbstractScanColumn implements ScanColumn {
-
-    private final UUID uuid;
-    private final ByteBuffer buffer;
-
-
-    protected AbstractScanColumn( UUID uuid, ByteBuffer buffer ) {
-        this.uuid = uuid;
-        this.buffer = buffer;
-    }
-
-
-    @Override
-    public UUID getUUID() {
-        return uuid;
-    }
-
-
-    @Override
-    public ByteBuffer getCursorValue() {
-        return buffer == null ? null :buffer.duplicate();
-    }
-
-
-    @Override
-    public boolean equals( Object o ) {
-        if ( this == o ) {
-            return true;
-        }
-        if ( !( o instanceof AbstractScanColumn ) ) {
-            return false;
-        }
-
-        AbstractScanColumn that = ( AbstractScanColumn ) o;
-
-        if ( !uuid.equals( that.uuid ) ) {
-            return false;
-        }
-
-        return true;
-    }
-
-
-    @Override
-    public int hashCode() {
-        return uuid.hashCode();
-    }
-
-
-    @Override
-    public String toString() {
-        return "AbstractScanColumn{" +
-                "uuid=" + uuid +
-                ", buffer=" + ByteBufferUtil.bytesToHex( buffer ) +
-                '}';
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/CollectionResultsLoaderFactory.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/CollectionResultsLoaderFactory.java b/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/CollectionResultsLoaderFactory.java
deleted file mode 100644
index 0002984..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/CollectionResultsLoaderFactory.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package org.usergrid.persistence.query.ir.result;
-
-
-import org.usergrid.persistence.EntityManager;
-import org.usergrid.persistence.Query;
-import org.usergrid.persistence.Results;
-
-
-/** Implementation for loading collection results */
-public class CollectionResultsLoaderFactory implements ResultsLoaderFactory {
-
-    @Override
-    public ResultsLoader getResultsLoader( EntityManager em, Query query, Results.Level level ) {
-        switch ( level ) {
-            case IDS:
-                return new IDLoader();
-            case REFS:
-                return new EntityRefLoader( query.getEntityType() );
-            default:
-                return new EntityResultsLoader( em );
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/ConnectionIndexSliceParser.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/ConnectionIndexSliceParser.java b/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/ConnectionIndexSliceParser.java
deleted file mode 100644
index 21e407b..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/ConnectionIndexSliceParser.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.query.ir.result;
-
-
-import java.nio.ByteBuffer;
-import java.util.UUID;
-
-import org.usergrid.persistence.Schema;
-
-import me.prettyprint.hector.api.beans.DynamicComposite;
-
-
-/**
- * Parser for reading uuid connections from ENTITY_COMPOSITE_DICTIONARIES and DICTIONARY_CONNECTED_ENTITIES type
- *
- * @author tnine
- */
-public class ConnectionIndexSliceParser implements SliceParser {
-
-    private final String connectedEntityType;
-
-
-    /** @param connectedEntityType Could be null if we want to return all types */
-    public ConnectionIndexSliceParser( String connectedEntityType ) {
-        this.connectedEntityType = connectedEntityType;
-    }
-
-
-    /* (non-Javadoc)
-     * @see org.usergrid.persistence.query.ir.result.SliceParser#parse(java.nio.ByteBuffer)
-     */
-    @Override
-    public ScanColumn parse( ByteBuffer buff ) {
-        DynamicComposite composite = DynamicComposite.fromByteBuffer( buff.duplicate() );
-
-        String connectedType = ( String ) composite.get( 1 );
-
-
-        //connection type has been defined and it doesn't match, skip it
-        if ( connectedEntityType != null && !connectedEntityType.equals( connectedType ) ) {
-            return null;
-        }
-
-        //we're checking a loopback and it wasn't specified, skip it
-        if ( ( connectedEntityType != null && !connectedEntityType.equalsIgnoreCase( connectedType ) ) || Schema
-                .TYPE_CONNECTION.equalsIgnoreCase( connectedType ) ) {
-            return null;
-        }
-
-        return new ConnectionColumn( ( UUID ) composite.get( 0 ), connectedType, buff );
-        //    return composite;
-        //    return null;
-    }
-
-
-    public static class ConnectionColumn extends AbstractScanColumn {
-
-        private final String connectedType;
-
-
-        public ConnectionColumn( UUID uuid, String connectedType, ByteBuffer column ) {
-            super( uuid, column );
-            this.connectedType = connectedType;
-        }
-
-
-        /** Get the target type from teh column */
-        public String getTargetType() {
-            return connectedType;
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/ConnectionRefLoader.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/ConnectionRefLoader.java b/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/ConnectionRefLoader.java
deleted file mode 100644
index 4466a53..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/ConnectionRefLoader.java
+++ /dev/null
@@ -1,65 +0,0 @@
-package org.usergrid.persistence.query.ir.result;
-
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.UUID;
-
-import org.usergrid.persistence.ConnectionRef;
-import org.usergrid.persistence.EntityRef;
-import org.usergrid.persistence.Results;
-import org.usergrid.persistence.SimpleEntityRef;
-import org.usergrid.persistence.cassandra.ConnectionRefImpl;
-
-
-/**
- *
- * @author: tnine
- *
- */
-public class ConnectionRefLoader implements ResultsLoader {
-
-    private final UUID sourceEntityId;
-    private final String sourceType;
-    private final String connectionType;
-    private final String targetEntityType;
-
-
-    public ConnectionRefLoader( ConnectionRef connectionRef ) {
-        this.sourceType = connectionRef.getConnectingEntity().getType();
-        this.sourceEntityId = connectionRef.getConnectingEntity().getUuid();
-        this.connectionType = connectionRef.getConnectionType();
-        this.targetEntityType = connectionRef.getConnectedEntity().getType();
-    }
-
-
-    @Override
-    public Results getResults( List<ScanColumn> entityIds ) throws Exception {
-
-
-        final EntityRef sourceRef = new SimpleEntityRef( sourceType, sourceEntityId );
-
-        List<ConnectionRef> refs = new ArrayList<ConnectionRef>( entityIds.size() );
-
-        for ( ScanColumn column : entityIds ) {
-
-            SimpleEntityRef targetRef;
-
-            if ( column instanceof ConnectionIndexSliceParser.ConnectionColumn ) {
-                final ConnectionIndexSliceParser.ConnectionColumn connectionColumn =
-                        ( ConnectionIndexSliceParser.ConnectionColumn ) column;
-                targetRef = new SimpleEntityRef( connectionColumn.getTargetType(), connectionColumn.getUUID() );
-            }
-
-            else {
-                targetRef = new SimpleEntityRef( targetEntityType, column.getUUID() );
-            }
-
-            final ConnectionRef ref = new ConnectionRefImpl( sourceRef, connectionType, targetRef );
-
-            refs.add( ref );
-        }
-
-        return Results.fromConnections( refs );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/ConnectionResultsLoaderFactory.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/ConnectionResultsLoaderFactory.java b/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/ConnectionResultsLoaderFactory.java
deleted file mode 100644
index 4f8fb2c..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/ConnectionResultsLoaderFactory.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package org.usergrid.persistence.query.ir.result;
-
-
-import org.usergrid.persistence.ConnectionRef;
-import org.usergrid.persistence.EntityManager;
-import org.usergrid.persistence.Query;
-import org.usergrid.persistence.Results;
-
-
-/** Implementation for loading connectionResults results */
-public class ConnectionResultsLoaderFactory implements ResultsLoaderFactory {
-
-    private final ConnectionRef connection;
-
-
-    public ConnectionResultsLoaderFactory( ConnectionRef connection ) {
-        this.connection = connection;
-    }
-
-
-    @Override
-    public ResultsLoader getResultsLoader( EntityManager em, Query query, Results.Level level ) {
-        switch ( level ) {
-            case IDS://Note that this is technically wrong.  However, to support backwards compatibility with the
-                // existing apis and usage, both ids and refs return a connection ref when dealing with connections
-            case REFS:
-                return new ConnectionRefLoader( connection );
-            default:
-                return new EntityResultsLoader( em );
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/ConnectionTypesIterator.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/ConnectionTypesIterator.java b/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/ConnectionTypesIterator.java
deleted file mode 100644
index 67cceb6..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/ConnectionTypesIterator.java
+++ /dev/null
@@ -1,179 +0,0 @@
-package org.usergrid.persistence.query.ir.result;
-
-
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.NoSuchElementException;
-import java.util.UUID;
-
-import org.usergrid.persistence.Schema;
-import org.usergrid.persistence.cassandra.CassandraService;
-
-import me.prettyprint.cassandra.serializers.StringSerializer;
-import me.prettyprint.hector.api.beans.HColumn;
-
-import static org.usergrid.persistence.Schema.DICTIONARY_CONNECTED_TYPES;
-import static org.usergrid.persistence.Schema.DICTIONARY_CONNECTING_TYPES;
-import static org.usergrid.persistence.cassandra.ApplicationCF.ENTITY_DICTIONARIES;
-import static org.usergrid.persistence.cassandra.CassandraPersistenceUtils.key;
-
-
-/** Iterator to iterate all types of connections the entity participates in */
-public class ConnectionTypesIterator implements Iterator<String>, Iterable<String> {
-
-
-    private static final StringSerializer STRING_SER = StringSerializer.get();
-
-
-    private final CassandraService cass;
-    private final UUID applicationId;
-    private final Object key;
-    //  private final UUID entityId;
-    private final int pageSize;
-    //  private static final String dictionaryName;
-
-
-    private boolean hasMore = true;
-    private Object start = null;
-
-    private Iterator<String> lastResults;
-
-
-    /**
-     * The connection types iterator.
-     *
-     * @param cass The cassandra service to use
-     * @param applicationId The application id to use
-     * @param entityId The entityId to use.  Can be a source for outgoing connections, or target for incoming
-     * connections
-     * @param outgoing True if this is a search from source->target on the edge, false if it is a search from
-     * target<-source
-     * @param pageSize The page size to use for batch fetching
-     */
-    public ConnectionTypesIterator( CassandraService cass, UUID applicationId, UUID entityId, boolean outgoing,
-                                    int pageSize ) {
-        this.cass = cass;
-        this.applicationId = applicationId;
-        this.pageSize = pageSize;
-
-        this.key =
-                outgoing ? key( entityId, DICTIONARY_CONNECTED_TYPES ) : key( entityId, DICTIONARY_CONNECTING_TYPES );
-    }
-
-
-    @Override
-    public Iterator<String> iterator() {
-        return this;
-    }
-
-
-    /*
-       * (non-Javadoc)
-       *
-       * @see java.util.Iterator#hasNext()
-       */
-    @Override
-    public boolean hasNext() {
-
-        // We've either 1) paged everything we should and have 1 left from our
-        // "next page" pointer
-        // Our currently buffered results don't exist or don't have a next. Try to
-        // load them again if they're less than the page size
-        if ( ( lastResults == null || !lastResults.hasNext() ) && hasMore ) {
-            try {
-                return load();
-            }
-            catch ( Exception e ) {
-                throw new RuntimeException( "Error loading next page of indexbucket scanner", e );
-            }
-        }
-
-        return lastResults.hasNext();
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see java.util.Iterator#next()
-     */
-    @Override
-    public String next() {
-
-        if ( !hasNext() ) {
-            throw new NoSuchElementException( "There are no elements left in this iterator" );
-        }
-
-        return lastResults.next();
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see java.util.Iterator#remove()
-     */
-    @Override
-    public void remove() {
-        throw new UnsupportedOperationException( "You can't remove from a result set, only advance" );
-    }
-
-
-    /**
-     * Search the collection index using all the buckets for the given collection. Load the next page. Return false if
-     * nothing was loaded, true otherwise
-     */
-
-    public boolean load() throws Exception {
-
-        // nothing left to load
-        if ( !hasMore ) {
-            return false;
-        }
-
-        // if we skip the first we need to set the load to page size +2, since we'll
-        // discard the first
-        // and start paging at the next entity, otherwise we'll just load the page
-        // size we need
-        int selectSize = pageSize + 1;
-
-
-        List<HColumn<ByteBuffer, ByteBuffer>> results =
-                cass.getColumns( cass.getApplicationKeyspace( applicationId ), ENTITY_DICTIONARIES, key, start, null,
-                        selectSize, false );
-
-        // we loaded a full page, there might be more
-        if ( results.size() == selectSize ) {
-            hasMore = true;
-
-            // set the bytebuffer for the next pass
-            start = results.get( results.size() - 1 ).getName();
-
-            results.remove( results.size() - 1 );
-        }
-        else {
-            hasMore = false;
-        }
-
-
-        List<String> stringResults = new ArrayList<String>( results.size() );
-
-        //do the parse here
-        for ( HColumn<ByteBuffer, ByteBuffer> col : results ) {
-            final String value = STRING_SER.fromByteBuffer( col.getName() );
-
-            //always ignore loopback, this is legacy data that needs cleaned up, and it doesn't belong here
-            if ( !Schema.TYPE_CONNECTION.equalsIgnoreCase( value ) ) {
-                stringResults.add( value );
-            }
-        }
-
-
-        lastResults = stringResults.iterator();
-
-
-        return stringResults.size() > 0;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/EmptyIterator.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/EmptyIterator.java b/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/EmptyIterator.java
deleted file mode 100644
index 8236043..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/EmptyIterator.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package org.usergrid.persistence.query.ir.result;
-
-
-import java.util.Iterator;
-import java.util.Set;
-import java.util.UUID;
-
-import org.usergrid.persistence.cassandra.CursorCache;
-
-
-/** Iterator that never returns results */
-public class EmptyIterator implements ResultIterator {
-    @Override
-    public void reset() {
-        //no op
-    }
-
-
-    @Override
-    public void finalizeCursor( CursorCache cache, UUID lastValue ) {
-        //no op
-    }
-
-
-    @Override
-    public Iterator<Set<ScanColumn>> iterator() {
-        return this;
-    }
-
-
-    @Override
-    public boolean hasNext() {
-        return false;
-    }
-
-
-    @Override
-    public Set<ScanColumn> next() {
-        return null;
-    }
-
-
-    @Override
-    public void remove() {
-        throw new UnsupportedOperationException( "Not supported" );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/EntityRefLoader.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/EntityRefLoader.java b/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/EntityRefLoader.java
deleted file mode 100644
index 68f521d..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/EntityRefLoader.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.query.ir.result;
-
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.usergrid.persistence.EntityRef;
-import org.usergrid.persistence.Results;
-import org.usergrid.persistence.SimpleEntityRef;
-
-
-public class EntityRefLoader implements ResultsLoader {
-
-    private String type;
-
-
-    public EntityRefLoader( String type ) {
-        this.type = type;
-    }
-
-
-    /* (non-Javadoc)
-     * @see org.usergrid.persistence.query.ir.result.ResultsLoader#getResults(java.util.List)
-     */
-    @Override
-    public Results getResults( List<ScanColumn> entityIds ) throws Exception {
-        Results r = new Results();
-        List<EntityRef> refs = new ArrayList<EntityRef>( entityIds.size() );
-        for ( ScanColumn id : entityIds ) {
-            refs.add( new SimpleEntityRef( type, id.getUUID() ) );
-        }
-        r.setRefs( refs );
-        return r;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/EntityResultsLoader.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/EntityResultsLoader.java b/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/EntityResultsLoader.java
deleted file mode 100644
index 6cbdbef..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/EntityResultsLoader.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.query.ir.result;
-
-
-import java.util.List;
-
-import org.usergrid.persistence.EntityManager;
-import org.usergrid.persistence.Results;
-
-
-/** @author tnine */
-public class EntityResultsLoader implements ResultsLoader {
-
-    private EntityManager em;
-
-
-    /**
-     *
-     */
-    public EntityResultsLoader( EntityManager em ) {
-        this.em = em;
-    }
-
-
-    /* (non-Javadoc)
-     * @see org.usergrid.persistence.query.ir.result.ResultsLoader#getResults(java.util.List)
-     */
-    @Override
-    public Results getResults( List<ScanColumn> entityIds ) throws Exception {
-        return em.get( ScanColumnTransformer.getIds( entityIds ) );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/GeoIterator.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/GeoIterator.java b/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/GeoIterator.java
deleted file mode 100644
index cf831c9..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/GeoIterator.java
+++ /dev/null
@@ -1,355 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.query.ir.result;
-
-
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.NoSuchElementException;
-import java.util.Set;
-import java.util.UUID;
-
-import org.usergrid.persistence.cassandra.CursorCache;
-import org.usergrid.persistence.geo.EntityLocationRef;
-import org.usergrid.persistence.geo.GeoIndexSearcher;
-import org.usergrid.persistence.geo.GeoIndexSearcher.SearchResults;
-import org.usergrid.persistence.geo.model.Point;
-import org.usergrid.persistence.query.ir.QuerySlice;
-
-import me.prettyprint.cassandra.serializers.StringSerializer;
-
-
-/**
- * Simple wrapper around list results until the geo library is updated so support iteration and set returns
- *
- * @author tnine
- */
-public class GeoIterator implements ResultIterator {
-
-    /**
-     *
-     */
-    private static final String DELIM = "+";
-    private static final String TILE_DELIM = "TILE";
-
-    private static final StringSerializer STR_SER = StringSerializer.get();
-
-
-    private final GeoIndexSearcher searcher;
-    private final int resultSize;
-    private final QuerySlice slice;
-    private final LinkedHashMap<UUID, LocationScanColumn> idOrder;
-    private final Point center;
-    private final double distance;
-    private final String propertyName;
-
-    private Set<ScanColumn> toReturn;
-    private Set<ScanColumn> lastLoaded;
-
-    // set when parsing cursor. If the cursor has gone to the end, this will be
-    // true, we should return no results
-    private boolean done = false;
-
-    /** Moved and used as part of cursors */
-    private EntityLocationRef last;
-    private List<String> lastCellsSearched;
-
-    /** counter that's incremented as we load pages. If pages loaded = 1 when reset,
-     * we don't have to reload from cass */
-    private int pagesLoaded = 0;
-
-
-    /**
-     *
-     */
-    public GeoIterator( GeoIndexSearcher searcher, int resultSize, QuerySlice slice, String propertyName, Point center,
-                        double distance ) {
-        this.searcher = searcher;
-        this.resultSize = resultSize;
-        this.slice = slice;
-        this.propertyName = propertyName;
-        this.center = center;
-        this.distance = distance;
-        this.idOrder = new LinkedHashMap<UUID, LocationScanColumn>( resultSize );
-        this.lastLoaded = new LinkedHashSet<ScanColumn>( resultSize );
-        parseCursor();
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see java.lang.Iterable#iterator()
-     */
-    @Override
-    public Iterator<Set<ScanColumn>> iterator() {
-        return this;
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see java.util.Iterator#hasNext()
-     */
-    @Override
-    public boolean hasNext() {
-        advance();
-        return !done || toReturn != null;
-    }
-
-
-    private void advance() {
-        // already loaded, do nothing
-        if ( done || toReturn != null ) {
-            return;
-        }
-
-        idOrder.clear();
-        lastLoaded.clear();
-
-
-        SearchResults results;
-
-        try {
-            results =
-                    searcher.proximitySearch( last, lastCellsSearched, center, propertyName, 0, distance, resultSize );
-        }
-        catch ( Exception e ) {
-            throw new RuntimeException( "Unable to search geo locations", e );
-        }
-
-        List<EntityLocationRef> locations = results.entityLocations;
-
-        lastCellsSearched = results.lastSearchedGeoCells;
-
-        for ( int i = 0; i < locations.size(); i++ ) {
-
-            final EntityLocationRef location = locations.get( i );
-            final UUID id = location.getUuid();
-
-            final LocationScanColumn locationScan = new LocationScanColumn( location );
-
-            idOrder.put( id, locationScan );
-            lastLoaded.add( locationScan );
-
-            last = location;
-        }
-
-        if ( locations.size() < resultSize ) {
-            done = true;
-        }
-
-        if ( lastLoaded.size() > 0 ) {
-            toReturn = lastLoaded;
-        }
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see java.util.Iterator#next()
-     */
-    @Override
-    public Set<ScanColumn> next() {
-        if ( !hasNext() ) {
-            throw new NoSuchElementException();
-        }
-
-        Set<ScanColumn> temp = toReturn;
-
-        toReturn = null;
-
-        return temp;
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see java.util.Iterator#remove()
-     */
-    @Override
-    public void remove() {
-        throw new UnsupportedOperationException( "You cannot reove elements from this iterator" );
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see org.usergrid.persistence.query.ir.result.ResultIterator#reset()
-     */
-    @Override
-    public void reset() {
-        //only 1 iteration was invoked.  Just reset the pointer rather than re-search
-        if ( pagesLoaded == 1 ) {
-            toReturn = lastLoaded;
-            return;
-        }
-
-        idOrder.clear();
-        lastLoaded.clear();
-        lastCellsSearched = null;
-        last = null;
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see
-     * org.usergrid.persistence.query.ir.result.ResultIterator#finalizeCursor(
-     * org.usergrid.persistence.cassandra.CursorCache, java.util.UUID)
-     */
-    @Override
-    public void finalizeCursor( CursorCache cache, UUID uuid ) {
-
-        LocationScanColumn col = idOrder.get( uuid );
-
-        if ( col == null ) {
-            return;
-        }
-
-        final EntityLocationRef location = col.location;
-
-        if ( location == null ) {
-            return;
-        }
-
-        final int sliceHash = slice.hashCode();
-
-        // get our next distance
-        final double latitude = location.getLatitude();
-
-        final double longitude = location.getLongitude();
-
-        // now create a string value for this
-        final StringBuilder builder = new StringBuilder();
-
-        builder.append( uuid ).append( DELIM );
-        builder.append( latitude ).append( DELIM );
-        builder.append( longitude );
-
-        if ( lastCellsSearched != null ) {
-            builder.append( DELIM );
-
-            for ( String geoCell : lastCellsSearched ) {
-                builder.append( geoCell ).append( TILE_DELIM );
-            }
-
-            int length = builder.length();
-
-            builder.delete( length - TILE_DELIM.length() - 1, length );
-        }
-
-        ByteBuffer buff = STR_SER.toByteBuffer( builder.toString() );
-
-
-        cache.setNextCursor( sliceHash, buff );
-    }
-
-
-    /** Get the last cells searched in the iteraton */
-    public List<String> getLastCellsSearched() {
-        return Collections.unmodifiableList( lastCellsSearched );
-    }
-
-
-    private void parseCursor() {
-        if ( !slice.hasCursor() ) {
-            return;
-        }
-
-        String string = STR_SER.fromByteBuffer( slice.getCursor() );
-
-        // was set to the end, set the no op flag
-        if ( string.length() == 0 ) {
-            done = true;
-            return;
-        }
-
-        String[] parts = string.split( "\\" + DELIM );
-
-        if ( parts.length < 3 ) {
-            throw new RuntimeException(
-                    "Geo cursors must contain 3 or more parts.  Incorrect cursor, please execute the query again" );
-        }
-
-        UUID startId = UUID.fromString( parts[0] );
-        double latitude = Double.parseDouble( parts[1] );
-        double longitude = Double.parseDouble( parts[2] );
-
-        if ( parts.length >= 4 ) {
-            String[] geoCells = parts[3].split( TILE_DELIM );
-
-            lastCellsSearched = Arrays.asList( geoCells );
-        }
-
-        last = new EntityLocationRef( ( String ) null, startId, latitude, longitude );
-    }
-
-
-    private class LocationScanColumn implements ScanColumn {
-
-        private final EntityLocationRef location;
-
-
-        public LocationScanColumn( EntityLocationRef location ) {
-            this.location = location;
-        }
-
-
-        @Override
-        public UUID getUUID() {
-            return location.getUuid();
-        }
-
-
-        @Override
-        public ByteBuffer getCursorValue() {
-            throw new UnsupportedOperationException(
-                    "This is not supported for location scan columns.  It requires iterator information" );
-        }
-
-
-        @Override
-        public boolean equals( Object o ) {
-            if ( this == o ) {
-                return true;
-            }
-            if ( !( o instanceof ScanColumn ) ) {
-                return false;
-            }
-
-            ScanColumn that = ( ScanColumn ) o;
-
-            return location.getUuid().equals( that.getUUID() );
-        }
-
-
-        @Override
-        public int hashCode() {
-            return location.getUuid().hashCode();
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/IDLoader.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/IDLoader.java b/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/IDLoader.java
deleted file mode 100644
index 49d891a..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/IDLoader.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package org.usergrid.persistence.query.ir.result;
-
-
-import java.util.List;
-
-import org.usergrid.persistence.Results;
-
-
-public class IDLoader implements ResultsLoader {
-
-    public IDLoader() {
-    }
-
-
-    /* (non-Javadoc)
-     * @see org.usergrid.persistence.query.ir.result.ResultsLoader#getResults(java.util.List)
-     */
-    @Override
-    public Results getResults( List<ScanColumn> entityIds ) throws Exception {
-        Results r = new Results();
-        r.setIds( ScanColumnTransformer.getIds( entityIds ) );
-        return r;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/IntersectionIterator.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/IntersectionIterator.java b/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/IntersectionIterator.java
deleted file mode 100644
index 4ffad1b..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/IntersectionIterator.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.query.ir.result;
-
-
-import java.util.LinkedHashSet;
-import java.util.Set;
-import java.util.UUID;
-
-import org.usergrid.persistence.cassandra.CursorCache;
-
-import com.google.common.collect.Sets;
-
-
-/**
- * An iterator that unions 1 or more subsets. It makes the assuming that sub iterators iterate from min(uuid) to
- * max(uuid)
- *
- * @author tnine
- */
-public class IntersectionIterator extends MultiIterator {
-
-
-    /**
-     *
-     */
-    public IntersectionIterator( int pageSize ) {
-        super( pageSize );
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see org.usergrid.persistence.query.ir.result.ResultIterator#reset()
-     */
-    @Override
-    public void doReset() {
-        for ( ResultIterator itr : iterators ) {
-            itr.reset();
-        }
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see org.usergrid.persistence.query.ir.result.MergeIterator#advance()
-     */
-    @Override
-    protected Set<ScanColumn> advance() {
-        /**
-         * Advance our sub iterators until the UUID's all line up
-         */
-
-        int size = iterators.size();
-
-        if ( size == 0 ) {
-            return null;
-        }
-
-        // edge case with only 1 iterator
-        if ( size == 1 ) {
-
-            ResultIterator itr = iterators.get( 0 );
-
-            if ( !itr.hasNext() ) {
-                return null;
-            }
-
-            return itr.next();
-        }
-
-        // begin our tree merge of the iterators
-
-        return merge();
-    }
-
-
-    private Set<ScanColumn> merge() {
-
-        Set<ScanColumn> results = new LinkedHashSet<ScanColumn>();
-        ResultIterator rootIterator = iterators.get( 0 );
-
-
-        //we've matched to the end
-        if ( !rootIterator.hasNext() ) {
-            return null;
-        }
-
-
-        //purposely check size first, that way we avoid another round trip if we can
-        while ( results.size() < pageSize && rootIterator.hasNext() ) {
-
-            Set<ScanColumn> intersection = rootIterator.next();
-
-            for ( int i = 1; i < iterators.size(); i++ ) {
-
-                ResultIterator joinIterator = iterators.get( i );
-
-                intersection = merge( intersection, joinIterator );
-
-                //nothing left short circuit, there is no point in advancing to further join iterators
-                if ( intersection.size() == 0 ) {
-                    break;
-                }
-            }
-
-            //now add the intermediate results and continue
-            results.addAll( intersection );
-        }
-
-        return results;
-    }
-
-
-    private Set<ScanColumn> merge( Set<ScanColumn> current, ResultIterator child ) {
-
-        Set<ScanColumn> results = new LinkedHashSet<ScanColumn>( pageSize );
-
-        while ( results.size() < pageSize ) {
-            if ( !child.hasNext() ) {
-                // we've iterated to the end, reset for next pass
-                child.reset();
-                return results;
-            }
-
-
-            final Set<ScanColumn> childResults = child.next();
-
-            results.addAll( Sets.intersection( current, childResults ) );
-        }
-
-        return results;
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see
-     * org.usergrid.persistence.query.ir.result.ResultIterator#finalizeCursor(
-     * org.usergrid.persistence.cassandra.CursorCache)
-     */
-    @Override
-    public void finalizeCursor( CursorCache cache, UUID lastLoaded ) {
-        ResultIterator itr = iterators.get( 0 );
-
-        //We can only create a cursor on our root level value in the intersection iterator.
-        if ( itr != null ) {
-            itr.finalizeCursor( cache, lastLoaded );
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/MergeIterator.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/MergeIterator.java b/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/MergeIterator.java
deleted file mode 100644
index 46807e1..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/MergeIterator.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.query.ir.result;
-
-
-import java.util.Iterator;
-import java.util.Set;
-
-
-/** @author tnine */
-public abstract class MergeIterator implements ResultIterator {
-
-
-    /** kept private on purpose so advance must return the correct value */
-    private Set<ScanColumn> next;
-
-    /** Pointer to the last set.  Equal to "next" when returned.  Used to retain results after "next" is set to null */
-    private Set<ScanColumn> last;
-    /** The size of the pages */
-    protected int pageSize;
-
-    int loadCount = 0;
-
-
-    /**
-     *
-     */
-    public MergeIterator( int pageSize ) {
-        this.pageSize = pageSize;
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see java.lang.Iterable#iterator()
-     */
-    @Override
-    public Iterator<Set<ScanColumn>> iterator() {
-        return this;
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see java.util.Iterator#hasNext()
-     */
-    @Override
-    public boolean hasNext() {
-        //if next isn't set, try to advance
-        if ( next == null ) {
-            doAdvance();
-        }
-
-        boolean results = next != null && next.size() > 0;
-
-        if ( results ) {
-            last = next;
-            loadCount++;
-        }
-
-        return results;
-    }
-
-
-    /** Advance to the next page */
-    protected void doAdvance() {
-        next = advance();
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see java.util.Iterator#next()
-     */
-    @Override
-    public Set<ScanColumn> next() {
-        if ( next == null ) {
-            doAdvance();
-        }
-
-        Set<ScanColumn> returnVal = next;
-
-        next = null;
-
-        return returnVal;
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see java.util.Iterator#remove()
-     */
-    @Override
-    public void remove() {
-        throw new UnsupportedOperationException( "You can't remove from a union iterator" );
-    }
-
-
-    /* (non-Javadoc)
-     * @see org.usergrid.persistence.query.ir.result.ResultIterator#reset()
-     */
-    @Override
-    public void reset() {
-        if ( loadCount == 1 && last != null ) {
-            next = last;
-            return;
-        }
-        //clean up the last pointer
-        last = null;
-        //reset in the child iterators
-        doReset();
-    }
-
-
-    /** Advance the iterator to the next value.  Can return an empty set with signals no values */
-    protected abstract Set<ScanColumn> advance();
-
-    /** Perform the reset if required */
-    protected abstract void doReset();
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/MultiIterator.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/MultiIterator.java b/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/MultiIterator.java
deleted file mode 100644
index 51b0420..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/MultiIterator.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.query.ir.result;
-
-
-import java.util.ArrayList;
-import java.util.List;
-
-
-/** @author tnine */
-public abstract class MultiIterator extends MergeIterator {
-
-    protected List<ResultIterator> iterators = new ArrayList<ResultIterator>();
-
-
-    /**
-     * @param pageSize
-     */
-    public MultiIterator( int pageSize ) {
-        super( pageSize );
-    }
-
-
-    /** Add an iterator for our sub results */
-    public void addIterator( ResultIterator iterator ) {
-        iterators.add( iterator );
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see org.usergrid.persistence.query.ir.result.ResultIterator#reset()
-     */
-    @Override
-    public void doReset() {
-        for ( ResultIterator itr : iterators ) {
-            itr.reset();
-        }
-    }
-}


[03/96] [abbrv] [partial] Change package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/utils/MapUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/utils/MapUtils.java b/stack/core/src/main/java/org/usergrid/utils/MapUtils.java
deleted file mode 100644
index bf1e1b8..0000000
--- a/stack/core/src/main/java/org/usergrid/utils/MapUtils.java
+++ /dev/null
@@ -1,377 +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.usergrid.utils;
-
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.LinkedHashMap;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Properties;
-import java.util.Set;
-import java.util.TreeMap;
-import java.util.TreeSet;
-
-import static org.apache.commons.lang.StringUtils.isNotBlank;
-
-import static org.usergrid.utils.ClassUtils.cast;
-
-
-public class MapUtils extends org.apache.commons.collections.MapUtils {
-
-    public static <A, B> void addMapSet( Map<A, Set<B>> map, A a, B b ) {
-        addMapSet( map, false, a, b );
-    }
-
-
-    @SuppressWarnings("unchecked")
-    public static <A, B> void addMapSet( Map<A, Set<B>> map, boolean ignoreCase, A a, B b ) {
-
-        Set<B> setB = map.get( a );
-        if ( setB == null ) {
-            if ( ignoreCase && ( b instanceof String ) ) {
-                setB = ( Set<B> ) new TreeSet<String>( String.CASE_INSENSITIVE_ORDER );
-            }
-            else {
-                setB = new LinkedHashSet<B>();
-            }
-            map.put( a, setB );
-        }
-        setB.add( b );
-    }
-
-
-    public static <A, B, C> void addMapMapSet( Map<A, Map<B, Set<C>>> map, A a, B b, C c ) {
-        addMapMapSet( map, false, a, b, c );
-    }
-
-
-    @SuppressWarnings("unchecked")
-    public static <A, B, C> void addMapMapSet( Map<A, Map<B, Set<C>>> map, boolean ignoreCase, A a, B b, C c ) {
-
-        Map<B, Set<C>> mapB = map.get( a );
-        if ( mapB == null ) {
-            if ( ignoreCase && ( b instanceof String ) ) {
-                mapB = ( Map<B, Set<C>> ) new TreeMap<String, Set<C>>( String.CASE_INSENSITIVE_ORDER );
-            }
-            else {
-                mapB = new LinkedHashMap<B, Set<C>>();
-            }
-            map.put( a, mapB );
-        }
-        addMapSet( mapB, ignoreCase, b, c );
-    }
-
-
-    @SuppressWarnings("unchecked")
-    public static <A, B, C, D> void addMapMapMapSet( Map<A, Map<B, Map<C, Set<D>>>> map, boolean ignoreCase, A a, B b,
-                                                     C c, D d ) {
-        Map<B, Map<C, Set<D>>> mapB = map.get( a );
-        if ( mapB == null ) {
-            if ( ignoreCase && ( b instanceof String ) ) {
-                mapB = ( Map<B, Map<C, Set<D>>> ) new TreeMap<String, Map<C, Set<D>>>( String.CASE_INSENSITIVE_ORDER );
-            }
-            else {
-                mapB = new LinkedHashMap<B, Map<C, Set<D>>>();
-            }
-            map.put( a, mapB );
-        }
-        addMapMapSet( mapB, ignoreCase, b, c, d );
-    }
-
-
-    public static <A, B, C> C getMapMap( Map<A, Map<B, C>> map, A a, B b ) {
-
-        Map<B, C> mapB = map.get( a );
-        if ( mapB == null ) {
-            return null;
-        }
-        return mapB.get( b );
-    }
-
-
-    public static <A, B> void addMapList( Map<A, List<B>> map, A a, B b ) {
-
-        List<B> listB = map.get( a );
-        if ( listB == null ) {
-            listB = new ArrayList<B>();
-            map.put( a, listB );
-        }
-        listB.add( b );
-    }
-
-
-    public static <A, B> void addListToMapList( Map<A, List<B>> map, A a, List<B> b ) {
-
-        List<B> listB = map.get( a );
-        if ( listB == null ) {
-            listB = new ArrayList<B>();
-            map.put( a, listB );
-        }
-        listB.addAll( b );
-    }
-
-
-    @SuppressWarnings("unchecked")
-    public static <K, V> V getValue( Map<K, ?> map, K k ) {
-        V v = null;
-        try {
-            v = ( V ) map.get( k );
-        }
-        catch ( ClassCastException e ) {
-            //LOG.war( "Map value {} was not the expected class", map.get( k ), e );
-        }
-
-        return v;
-    }
-
-
-    @SuppressWarnings("unchecked")
-    public static <K, V> Map<?, ?> map( Object... objects ) {
-        Map<K, V> map = new LinkedHashMap<K, V>();
-        int i = 0;
-        while ( i < objects.length ) {
-            if ( objects[i] instanceof Map.Entry ) {
-                Map.Entry<K, V> entry = ( Entry<K, V> ) objects[i];
-                map.put( entry.getKey(), entry.getValue() );
-                i++;
-            }
-            else if ( objects[i] instanceof Map ) {
-                map.putAll( ( Map<? extends K, ? extends V> ) objects[i] );
-                i++;
-            }
-            else if ( i < ( objects.length - 1 ) ) {
-                K k = ( K ) objects[i];
-                V v = ( V ) objects[i + 1];
-                map.put( k, v );
-                i += 2;
-            }
-            else {
-                break;
-            }
-        }
-        return map;
-    }
-
-
-    private static class SimpleMapEntry<K, V> implements Map.Entry<K, V> {
-
-        private final K k;
-        private V v;
-
-
-        public SimpleMapEntry( K k, V v ) {
-            this.k = k;
-            this.v = v;
-        }
-
-
-        @Override
-        public K getKey() {
-            return k;
-        }
-
-
-        @Override
-        public V getValue() {
-            return v;
-        }
-
-
-        @Override
-        public V setValue( V v ) {
-            V oldV = this.v;
-            this.v = v;
-            return oldV;
-        }
-    }
-
-
-    public static <K, V> Map.Entry<K, V> entry( K k, V v ) {
-        return new SimpleMapEntry<K, V>( k, v );
-    }
-
-
-    public static <K, V> K getFirstKey( Map<K, V> map ) {
-        if ( map == null ) {
-            return null;
-        }
-        Entry<K, V> e = map.entrySet().iterator().next();
-        if ( e != null ) {
-            return e.getKey();
-        }
-        return null;
-    }
-
-
-    public static <V> Map<String, V> filter( Map<String, V> map, String prefix, boolean removePrefix ) {
-        Map<String, V> filteredMap = new LinkedHashMap<String, V>();
-        for ( Entry<String, V> entry : map.entrySet() ) {
-            if ( entry.getKey().startsWith( prefix ) ) {
-                if ( removePrefix ) {
-                    filteredMap.put( entry.getKey().substring( prefix.length() ), entry.getValue() );
-                }
-                else {
-                    filteredMap.put( entry.getKey(), entry.getValue() );
-                }
-            }
-        }
-        return filteredMap;
-    }
-
-
-    public static <V> Map<String, V> filter( Map<String, V> map, String prefix ) {
-        return filter( map, prefix, false );
-    }
-
-
-    public static Properties filter( Properties properties, String prefix, boolean removePrefix ) {
-        Properties filteredProperties = new Properties();
-        for ( Entry<String, String> entry : asMap( properties ).entrySet() ) {
-            if ( entry.getKey().startsWith( prefix ) ) {
-                if ( removePrefix ) {
-                    filteredProperties.put( entry.getKey().substring( prefix.length() ), entry.getValue() );
-                }
-                else {
-                    filteredProperties.put( entry.getKey(), entry.getValue() );
-                }
-            }
-        }
-        return filteredProperties;
-    }
-
-
-    public static Properties filter( Properties properties, String prefix ) {
-        return filter( properties, prefix, false );
-    }
-
-
-    @SuppressWarnings("unchecked")
-    public static Map<String, String> asMap( Properties properties ) {
-        return cast( properties );
-    }
-
-
-    public static <S, T> HashMapBuilder<S, T> hashMap( S key, T value ) {
-        return new HashMapBuilder<S, T>().map( key, value );
-    }
-
-
-    public static class HashMapBuilder<S, T> extends HashMap<S, T> {
-        private static final long serialVersionUID = 1L;
-
-
-        public HashMapBuilder() {
-        }
-
-
-        public HashMapBuilder<S, T> map( S key, T value ) {
-            put( key, value );
-            return this;
-        }
-    }
-
-
-    @SuppressWarnings("unchecked")
-    public static Map<String, List<?>> toMapList( Map<String, ?> m ) {
-        Map<String, List<Object>> mapList = new LinkedHashMap<String, List<Object>>();
-
-        for ( Entry<String, ?> e : m.entrySet() ) {
-            if ( e.getValue() instanceof List ) {
-                addListToMapList( mapList, e.getKey(), ( List<Object> ) e.getValue() );
-            }
-            else {
-                addMapList( mapList, e.getKey(), e.getValue() );
-            }
-        }
-
-        return cast( mapList );
-    }
-
-
-    public static Map<String, ?> putPath( String path, Object value ) {
-        return putPath( null, path, value );
-    }
-
-
-    @SuppressWarnings("unchecked")
-    public static Map<String, ?> putPath( Map<String, ?> map, String path, Object value ) {
-
-        if ( map == null ) {
-            map = new HashMap<String, Object>();
-        }
-
-        int i = path.indexOf( '.' );
-        if ( i < 0 ) {
-            ( ( Map<String, Object> ) map ).put( path, value );
-            return map;
-        }
-        String segment = path.substring( 0, i ).trim();
-        if ( isNotBlank( segment ) ) {
-            Object o = map.get( segment );
-            if ( ( o != null ) && ( !( o instanceof Map ) ) ) {
-                return map;
-            }
-            Map<String, Object> subMap = ( Map<String, Object> ) o;
-            if ( subMap == null ) {
-                subMap = new HashMap<String, Object>();
-                ( ( Map<String, Object> ) map ).put( segment, subMap );
-            }
-            String subPath = path.substring( i + 1 );
-            if ( isNotBlank( subPath ) ) {
-                putPath( subMap, subPath, value );
-            }
-        }
-
-        return map;
-    }
-
-
-    public static <K, V> Map<K, V> emptyMapWithKeys( Map<K, V> map ) {
-        Map<K, V> newMap = new HashMap<K, V>();
-
-        for ( K k : map.keySet() ) {
-            newMap.put( k, null );
-        }
-
-        return newMap;
-    }
-
-
-    public static boolean hasKeys( Map<?, ?> map, String... keys ) {
-        if ( map == null ) {
-            return false;
-        }
-        for ( String key : keys ) {
-            if ( !map.containsKey( key ) ) {
-                return false;
-            }
-        }
-        return true;
-    }
-
-
-    public static boolean hasKeys( Map<?, ?> map, Set<String> keys ) {
-        if ( map == null ) {
-            return false;
-        }
-        return map.keySet().containsAll( keys );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/utils/NumberUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/utils/NumberUtils.java b/stack/core/src/main/java/org/usergrid/utils/NumberUtils.java
deleted file mode 100644
index 562ada1..0000000
--- a/stack/core/src/main/java/org/usergrid/utils/NumberUtils.java
+++ /dev/null
@@ -1,35 +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.usergrid.utils;
-
-
-public class NumberUtils {
-    public static int sign( int i ) {
-        if ( i < 0 ) {
-            return -1;
-        }
-        if ( i > 0 ) {
-            return 1;
-        }
-        return 0;
-    }
-
-
-    public static long roundLong( long l, long r ) {
-        return ( l / r ) * r;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/utils/PasswordUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/utils/PasswordUtils.java b/stack/core/src/main/java/org/usergrid/utils/PasswordUtils.java
deleted file mode 100644
index a5eb2a5..0000000
--- a/stack/core/src/main/java/org/usergrid/utils/PasswordUtils.java
+++ /dev/null
@@ -1,28 +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.usergrid.utils;
-
-
-import org.apache.commons.codec.digest.DigestUtils;
-
-
-public class PasswordUtils {
-
-    public static String mongoPassword( String username, String password ) {
-        return DigestUtils.md5Hex( username + ":mongo:" + password );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/utils/StringUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/utils/StringUtils.java b/stack/core/src/main/java/org/usergrid/utils/StringUtils.java
deleted file mode 100644
index 373748a..0000000
--- a/stack/core/src/main/java/org/usergrid/utils/StringUtils.java
+++ /dev/null
@@ -1,172 +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.usergrid.utils;
-
-
-import java.util.Arrays;
-
-import org.apache.commons.io.IOUtils;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import static org.usergrid.utils.ConversionUtils.string;
-
-
-public class StringUtils extends org.apache.commons.lang.StringUtils {
-
-    private static final Logger LOG = LoggerFactory.getLogger( StringUtils.class );
-
-
-    public static Object lower( Object obj ) {
-        if ( !( obj instanceof String ) ) {
-            return obj;
-        }
-        return ( ( String ) obj ).toLowerCase();
-    }
-
-
-    public static String stringOrSubstringAfterLast( String str, char c ) {
-        if ( str == null ) {
-            return null;
-        }
-        int i = str.lastIndexOf( c );
-        if ( i != -1 ) {
-            return str.substring( i + 1 );
-        }
-        return str;
-    }
-
-
-    public static String stringOrSubstringBeforeLast( String str, char c ) {
-        if ( str == null ) {
-            return null;
-        }
-        int i = str.lastIndexOf( c );
-        if ( i != -1 ) {
-            return str.substring( 0, i );
-        }
-        return str;
-    }
-
-
-    public static String stringOrSubstringBeforeFirst( String str, char c ) {
-        if ( str == null ) {
-            return null;
-        }
-        int i = str.indexOf( c );
-        if ( i != -1 ) {
-            return str.substring( 0, i );
-        }
-        return str;
-    }
-
-
-    public static String stringOrSubstringAfterFirst( String str, char c ) {
-        if ( str == null ) {
-            return null;
-        }
-        int i = str.indexOf( c );
-        if ( i != -1 ) {
-            return str.substring( i + 1 );
-        }
-        return str;
-    }
-
-
-    public static String compactWhitespace( String str ) {
-        if ( str == null ) {
-            return null;
-        }
-        boolean prevWS = false;
-        StringBuilder builder = new StringBuilder();
-        for ( int i = 0; i < str.length(); i++ ) {
-            char c = str.charAt( i );
-            if ( Character.isWhitespace( c ) ) {
-                if ( !prevWS ) {
-                    builder.append( ' ' );
-                }
-                prevWS = true;
-            }
-            else {
-                prevWS = false;
-                builder.append( c );
-            }
-        }
-        return builder.toString().trim();
-    }
-
-
-    /** @return new string with replace applied */
-    public static String replaceAll( String source, String find, String replace ) {
-        if ( source == null ) {
-            return null;
-        }
-        while ( true ) {
-            String old = source;
-            source = source.replaceAll( find, replace );
-            if ( source.equals( old ) ) {
-                return source;
-            }
-        }
-    }
-
-
-    public static String toString( Object obj ) {
-        return string( obj );
-    }
-
-
-    public static String toStringFormat( Object obj, String format ) {
-        if ( obj != null ) {
-            if ( format != null ) {
-                if ( obj.getClass().isArray() ) {
-                    return String.format( format, Arrays.toString( ( Object[] ) obj ) );
-                }
-                return String.format( format, string( obj ) );
-            }
-            else {
-                return string( obj );
-            }
-        }
-        return "";
-    }
-
-
-    public static boolean isString( Object obj ) {
-        return obj instanceof String;
-    }
-
-
-    public static boolean isStringOrNull( Object obj ) {
-        if ( obj == null ) {
-            return true;
-        }
-        return obj instanceof String;
-    }
-
-
-    public static String readClasspathFileAsString( String filePath ) {
-        try {
-            return IOUtils.toString( StringUtils.class.getResourceAsStream( filePath ) );
-        }
-        catch ( Exception e ) {
-            LOG.error( "Error getting file from classpath: " + filePath, e );
-        }
-        return null;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/utils/TimeUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/utils/TimeUtils.java b/stack/core/src/main/java/org/usergrid/utils/TimeUtils.java
deleted file mode 100644
index 92dabf1..0000000
--- a/stack/core/src/main/java/org/usergrid/utils/TimeUtils.java
+++ /dev/null
@@ -1,88 +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.usergrid.utils;
-
-
-import com.google.common.base.CharMatcher;
-import com.google.common.base.Splitter;
-
-
-public class TimeUtils {
-    /**
-     * Jira-style duration parser. Supported duration strings are: <ul> <li>'S': milliseconds</li> <li>'s': seconds</li>
-     * <li>'m': minutes</li> <li>'h': hours</li> <li>'d': days</li> </ul>
-     * <p/>
-     * Durations can be compound statements in any order as long as they are separated by a ',' (comma). Eg. "1d,14h,3s"
-     * to get the millisecond equivalent of one day, fourteen hours and 3 seconds.
-     * <p/>
-     * Numbers with no durations will be treated as raw millisecond values
-     *
-     * @return the number of milliseconds representing the duration
-     */
-    public static long millisFromDuration( String durationStr ) {
-        long total = 0;
-        MultiplierToken mt;
-        long dur;
-        for ( String val : Splitter.on( ',' ).trimResults().omitEmptyStrings().split( durationStr ) ) {
-            dur = Long.parseLong( CharMatcher.DIGIT.retainFrom( val ) );
-            mt = MultiplierToken.from( val.charAt( val.length() - 1 ) );
-            total += ( mt.multiplier * dur );
-        }
-        return total;
-    }
-
-
-    private enum MultiplierToken {
-        MILSEC_TOKEN( 'S', 1L ),
-        SEC_TOKEN( 's', 1000L ),
-        MIN_TOKEN( 'm', 60000L ),
-        HOUR_TOKEN( 'h', 3600000L ),
-        DAY_TOKEN( 'd', 86400000L );
-
-        final char token;
-        final long multiplier;
-
-
-        MultiplierToken( char token, long multiplier ) {
-            this.token = token;
-            this.multiplier = multiplier;
-        }
-
-
-        static MultiplierToken from( char c ) {
-            switch ( c ) {
-                case 's':
-                    return SEC_TOKEN;
-                case 'm':
-                    return MIN_TOKEN;
-                case 'h':
-                    return HOUR_TOKEN;
-                case 'd':
-                    return DAY_TOKEN;
-                case 'S':
-                    return MILSEC_TOKEN;
-                default:
-                    break;
-            }
-
-            if ( CharMatcher.DIGIT.matches( c ) ) {
-                return MILSEC_TOKEN;
-            }
-            throw new IllegalArgumentException( "Duration token was not on of [S,s,m,h,d] but was " + c );
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/utils/UUIDUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/utils/UUIDUtils.java b/stack/core/src/main/java/org/usergrid/utils/UUIDUtils.java
deleted file mode 100644
index 110a20c..0000000
--- a/stack/core/src/main/java/org/usergrid/utils/UUIDUtils.java
+++ /dev/null
@@ -1,412 +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.usergrid.utils;
-
-
-import java.util.Collections;
-import java.util.List;
-import java.util.Random;
-import java.util.UUID;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.concurrent.locks.ReentrantLock;
-
-import com.fasterxml.uuid.EthernetAddress;
-import com.fasterxml.uuid.UUIDComparator;
-
-import static com.fasterxml.uuid.impl.UUIDUtil.BYTE_OFFSET_CLOCK_HI;
-import static com.fasterxml.uuid.impl.UUIDUtil.BYTE_OFFSET_CLOCK_LO;
-import static com.fasterxml.uuid.impl.UUIDUtil.BYTE_OFFSET_CLOCK_MID;
-import static com.fasterxml.uuid.impl.UUIDUtil.BYTE_OFFSET_CLOCK_SEQUENCE;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import static org.apache.commons.codec.binary.Base64.decodeBase64;
-import static org.apache.commons.codec.binary.Base64.encodeBase64URLSafeString;
-
-import static org.usergrid.utils.ConversionUtils.bytes;
-import static org.usergrid.utils.ConversionUtils.uuid;
-
-
-public class UUIDUtils {
-    private static final Logger LOG = LoggerFactory.getLogger( UUIDUtils.class );
-    private static final int[] MICROS = new int[1000];
-
-
-    static {
-        for ( int x = 0; x < 1000; x++ ) {
-            MICROS[x] = x * 10;
-        }
-    }
-
-
-    private static ReentrantLock tsLock = new ReentrantLock( true );
-
-    public static final UUID MIN_TIME_UUID = UUID.fromString( "00000000-0000-1000-8000-000000000000" );
-
-    public static final UUID MAX_TIME_UUID = UUID.fromString( "ffffffff-ffff-1fff-bfff-ffffffffffff" );
-
-    public static final UUID ZERO_UUID = new UUID( 0, 0 );
-
-    private static long timestampMillisNow = System.currentTimeMillis();
-
-    private static AtomicInteger currentMicrosPoint = new AtomicInteger( 0 );
-    private static AtomicInteger customMicrosPointer = new AtomicInteger( 0 );
-
-
-    /**
-     * Return the "next" UUID in micro second resolution. <b>WARNING</b>: this is designed to return the next unique
-     * timestamped UUID for this JVM. Depending on velocity of the call, this method may block internally to insure that
-     * "now" is kept in sync with the UUIDs being generated by this call.
-     * <p/>
-     * In other words, we will intentionally burn CPU insuring that this method is not executed more than 10k -1 times
-     * per millisecond and guarantee that those microseconds held within are sequential.
-     * <p/>
-     * If we did not do this, you would get <b>timestamp collision</b> even though the UUIDs will technically be
-     * 'unique.'
-     */
-    public static java.util.UUID newTimeUUID() {
-        // get & inc counter, but roll on 1k (because we divide by 10 on retrieval)
-        // if count + currentMicro > 1k, block and roll
-        tsLock.lock();
-        long ts = System.currentTimeMillis();
-        if ( ts > timestampMillisNow ) {
-            timestampMillisNow = ts;
-            currentMicrosPoint.set( 0 );
-        }
-        int pointer = currentMicrosPoint.getAndIncrement();
-        try {
-            if ( pointer > 990 ) {
-                TimeUnit.MILLISECONDS.sleep( 1L );
-            }
-        }
-        catch ( Exception ex ) {
-            ex.printStackTrace();
-        }
-        finally {
-            tsLock.unlock();
-        }
-        return newTimeUUID( ts, MICROS[pointer] );
-    }
-
-
-    private static final long KCLOCK_OFFSET = 0x01b21dd213814000L;
-    private static final long KCLOCK_MULTIPLIER_L = 10000L;
-
-    private static final Random CLOCK_SEQ_RANDOM = new Random();
-
-
-    // 14 bits of randomness
-    private static int getRandomClockSequence() {
-        return CLOCK_SEQ_RANDOM.nextInt() & 0x3FFF;
-    }
-
-
-    private static void setTimestamp( long timestamp, byte[] uuidBytes, int clockSeq, int timeOffset ) {
-
-        timestamp *= KCLOCK_MULTIPLIER_L;
-        timestamp += KCLOCK_OFFSET;
-        timestamp += timeOffset;
-
-        // Set random clock sequence
-        uuidBytes[BYTE_OFFSET_CLOCK_SEQUENCE] = ( byte ) ( clockSeq >> 8 );
-        uuidBytes[BYTE_OFFSET_CLOCK_SEQUENCE + 1] = ( byte ) clockSeq;
-
-        // Set variant
-        uuidBytes[BYTE_OFFSET_CLOCK_SEQUENCE] &= 0x3F;
-        uuidBytes[BYTE_OFFSET_CLOCK_SEQUENCE] |= 0x80;
-        setTime( uuidBytes, timestamp );
-    }
-
-
-    @SuppressWarnings("all")
-    private static void setTime( byte[] uuidBytes, long timestamp ) {
-
-        // Time fields aren't nicely split across the UUID, so can't just
-        // linearly dump the stamp:
-        int clockHi = ( int ) ( timestamp >>> 32 );
-        int clockLo = ( int ) timestamp;
-
-        uuidBytes[BYTE_OFFSET_CLOCK_HI] = ( byte ) ( clockHi >>> 24 );
-        uuidBytes[BYTE_OFFSET_CLOCK_HI + 1] = ( byte ) ( clockHi >>> 16 );
-        uuidBytes[BYTE_OFFSET_CLOCK_MID] = ( byte ) ( clockHi >>> 8 );
-        uuidBytes[BYTE_OFFSET_CLOCK_MID + 1] = ( byte ) clockHi;
-
-        uuidBytes[BYTE_OFFSET_CLOCK_LO] = ( byte ) ( clockLo >>> 24 );
-        uuidBytes[BYTE_OFFSET_CLOCK_LO + 1] = ( byte ) ( clockLo >>> 16 );
-        uuidBytes[BYTE_OFFSET_CLOCK_LO + 2] = ( byte ) ( clockLo >>> 8 );
-        uuidBytes[BYTE_OFFSET_CLOCK_LO + 3] = ( byte ) clockLo;
-
-        // Set version
-        uuidBytes[BYTE_OFFSET_CLOCK_HI] &= 0x0F;
-        uuidBytes[BYTE_OFFSET_CLOCK_HI] |= 0x10;
-    }
-
-
-    /**
-     * Generate a timeuuid with the given timestamp in milliseconds and the time offset. Useful when you need to
-     * generate sequential UUIDs for the same period in time. I.E
-     * <p/>
-     * newTimeUUID(1000, 0) <br/> newTimeUUID(1000, 1) <br /> newTimeUUID(1000, 2) <br />
-     * <p/>
-     * etc.
-     * <p/>
-     * Only use this method if you are absolutely sure you need it. When it doubt use the method without the timestamp
-     * offset
-     *
-     * @param ts The timestamp in milliseconds
-     * @param timeoffset The offset, which should always be <= 10000. If you go beyond this range, the millisecond will
-     * be incremented since this is beyond the possible values when coverrting from millis to 1/10 microseconds stored
-     * in the time uuid.
-     */
-    public static UUID newTimeUUID( long ts, int timeoffset ) {
-        if ( ts == 0 ) {
-            return newTimeUUID();
-        }
-
-        byte[] uuidBytes = new byte[16];
-        // 47 bits of randomness
-        EthernetAddress eth = EthernetAddress.constructMulticastAddress();
-        eth.toByteArray( uuidBytes, 10 );
-        setTimestamp( ts, uuidBytes, getRandomClockSequence(), timeoffset );
-
-        return uuid( uuidBytes );
-    }
-
-
-    /**
-     * Generate a new UUID with the given time stamp in milliseconds. This method guarantees that subsequent calls will
-     * be of increasing value chronologically. If a large number of subsequent calls are made to this method (>1000)
-     * with the same timestamp, you will have non-unique temporal values stored in your UUID.
-     */
-    public static UUID newTimeUUID( long ts ) {
-        tsLock.lock();
-        int pointer = customMicrosPointer.getAndIncrement();
-        try {
-            if ( pointer > 990 ) {
-                customMicrosPointer.set( 0 );
-            }
-        }
-        finally {
-            tsLock.unlock();
-        }
-        return newTimeUUID( ts, MICROS[pointer] );
-    }
-
-
-    public static UUID minTimeUUID( long ts ) {
-        byte[] uuidBytes = new byte[16];
-        setTimestamp( ts, uuidBytes, 0, 0 );
-
-        return uuid( uuidBytes );
-    }
-
-
-    public static UUID maxTimeUUID( long ts ) {
-        byte[] uuidBytes = new byte[16];
-        uuidBytes[10] = ( byte ) 0xFF;
-        uuidBytes[11] = ( byte ) 0xFF;
-        uuidBytes[12] = ( byte ) 0xFF;
-        uuidBytes[13] = ( byte ) 0xFF;
-        uuidBytes[14] = ( byte ) 0xFF;
-        uuidBytes[15] = ( byte ) 0xFF;
-        setTimestamp( ts, uuidBytes, 0x3FFF, 0x1FFF );
-
-        return uuid( uuidBytes );
-    }
-
-
-    /** Returns the minimum UUID */
-    public static UUID min( UUID first, UUID second ) {
-        if ( first == null ) {
-            if ( second == null ) {
-                return null;
-            }
-            return second;
-        }
-
-        if ( second == null ) {
-            return first;
-        }
-
-        if ( compare( first, second ) < 0 ) {
-            return first;
-        }
-        return second;
-    }
-
-
-    /** Returns the minimum UUID */
-    public static UUID max( UUID first, UUID second ) {
-        if ( first == null ) {
-            if ( second == null ) {
-                return null;
-            }
-            return second;
-        }
-
-        if ( second == null ) {
-            return first;
-        }
-
-        if ( compare( first, second ) < 0 ) {
-            return second;
-        }
-        return first;
-    }
-
-
-    /** Returns a UUID that is -1 of the passed uuid, sorted by time uuid only */
-    public static UUID decrement( UUID uuid ) {
-        if ( !isTimeBased( uuid ) ) {
-            throw new IllegalArgumentException( "The uuid must be a time type" );
-        }
-
-
-        //timestamp is in the 60 bit timestamp
-        long timestamp = uuid.timestamp();
-        timestamp--;
-
-        if ( timestamp < 0 ) {
-            throw new IllegalArgumentException( "You must specify a time uuid with a timestamp > 0" );
-        }
-
-        //get our bytes, then set the smaller timestamp into it
-        byte[] uuidBytes = bytes( uuid );
-
-        setTime( uuidBytes, timestamp );
-
-        return uuid( uuidBytes );
-    }
-
-
-    public static boolean isTimeBased( UUID uuid ) {
-        if ( uuid == null ) {
-            return false;
-        }
-        return uuid.version() == 1;
-    }
-
-
-    public static long getTimestampInMillis( UUID uuid ) {
-        if ( uuid == null ) {
-            return 0;
-        }
-        long t = uuid.timestamp();
-        return ( t - KCLOCK_OFFSET ) / KCLOCK_MULTIPLIER_L;
-    }
-
-
-    public static long getTimestampInMicros( UUID uuid ) {
-        if ( uuid == null ) {
-            return 0;
-        }
-        long t = uuid.timestamp();
-        return ( t - KCLOCK_OFFSET ) / 10;
-    }
-
-
-    public static UUID tryGetUUID( String s ) {
-        if ( s == null ) {
-            return null;
-        }
-        if ( s.length() != 36 ) {
-            return null;
-        }
-        // 8-4-4-4-12
-        // 0-7,8,9-12,13,14-17,18,19-22,23,24-35
-        if ( s.charAt( 8 ) != '-' ) {
-            return null;
-        }
-        if ( s.charAt( 13 ) != '-' ) {
-            return null;
-        }
-        if ( s.charAt( 18 ) != '-' ) {
-            return null;
-        }
-        if ( s.charAt( 23 ) != '-' ) {
-            return null;
-        }
-        UUID uuid = null;
-        try {
-            uuid = UUID.fromString( s );
-        }
-        catch ( Exception e ) {
-            LOG.info( "Could not convert String {} into a UUID", s, e );
-        }
-        return uuid;
-    }
-
-
-    public static boolean isUUID( String s ) {
-        return tryGetUUID( s ) != null;
-    }
-
-
-    public static UUID tryExtractUUID( String s ) {
-        if ( s == null ) {
-            return null;
-        }
-        if ( s.length() < 36 ) {
-            return null;
-        }
-        return tryGetUUID( s.substring( 0, 36 ) );
-    }
-
-
-    public static UUID tryExtractUUID( String s, int offset ) {
-        if ( s == null ) {
-            return null;
-        }
-        if ( ( s.length() - offset ) < 36 ) {
-            return null;
-        }
-        return tryGetUUID( s.substring( offset, offset + 36 ) );
-    }
-
-
-    public static String toBase64( UUID id ) {
-        if ( id == null ) {
-            return null;
-        }
-        return encodeBase64URLSafeString( bytes( id ) );
-    }
-
-
-    public static UUID fromBase64( String str ) {
-        if ( str == null ) {
-            return null;
-        }
-        byte[] bytes = decodeBase64( str );
-        if ( bytes.length != 16 ) {
-            return null;
-        }
-        return uuid( bytes );
-    }
-
-
-    public static int compare( UUID u1, UUID u2 ) {
-        return UUIDComparator.staticCompare( u1, u2 );
-    }
-
-
-    public static List<UUID> sort( List<UUID> uuids ) {
-        Collections.sort( uuids, new UUIDComparator() );
-        return uuids;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/utils/Version.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/utils/Version.java b/stack/core/src/main/java/org/usergrid/utils/Version.java
deleted file mode 100644
index 0c4ac32..0000000
--- a/stack/core/src/main/java/org/usergrid/utils/Version.java
+++ /dev/null
@@ -1,428 +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.usergrid.utils;
-
-/*******************************************************************************
- * Copyright (c) 2010, Schley Andrew Kutz All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * - Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * - Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- *
- * - Neither the name of the Schley Andrew Kutz nor the names of its
- * contributors may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- ******************************************************************************/
-
-import java.io.Serializable;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.apache.commons.lang.StringUtils;
-
-
-/**
- * The Version class can be used to parse a standard version string into its four components,
- * MAJOR.MINOR.BUILD.REVISION.
- */
-public class Version implements Serializable, Cloneable, Comparable<Version> {
-    /** A serial version UID. */
-    private static final long serialVersionUID = -4316270526722986552L;
-
-    /** A pattern to match the standard version format MAJOR.MINOR.BUILD.REVISION. */
-    private static final Pattern STD_VERSION_PATT =
-            Pattern.compile( "^([^\\d]*?)(\\d+)(?:\\.(\\d+))?(?:\\.(\\d+))?(?:\\.(\\d+))?(.*)$" );
-
-
-    /** Initialize a new Version object that is set to "0.0.0.0". */
-    public Version() {
-    }
-
-
-    /** Everything before the version in the string that was parsed. */
-    private String prefix;
-
-    /** Everything after the version in the string that was parsed. */
-    private String suffix;
-
-    /** The String that was parsed to create this version object. */
-    private String rawVersion;
-
-
-    /**
-     * Gets everything before the version in the string that was parsed.
-     *
-     * @return Everything before the version in the string that was parsed.
-     */
-    public String getPrefix() {
-        return prefix;
-    }
-
-
-    /**
-     * Parses a new Version object from a String.
-     *
-     * @param toParse The String object to parse.
-     *
-     * @return A new Version object.
-     *
-     * @throws Exception When there is an error parsing the String.
-     */
-    public static Version parse( String toParse ) throws Exception {
-        Matcher m = STD_VERSION_PATT.matcher( toParse );
-
-        if ( !m.find() ) {
-            throw new Exception( String.format( "Error parsing version from '%s'", toParse ) );
-        }
-
-        Version v = new Version();
-        v.rawVersion = toParse;
-        v.prefix = m.group( 1 );
-
-        if ( StringUtils.isNotEmpty( m.group( 2 ) ) ) {
-            v.setMajor( m.group( 2 ) );
-        }
-
-        if ( StringUtils.isNotEmpty( m.group( 3 ) ) ) {
-            v.setMinor( m.group( 3 ) );
-        }
-
-        if ( StringUtils.isNotEmpty( m.group( 4 ) ) ) {
-            v.setBuild( m.group( 4 ) );
-        }
-
-        if ( StringUtils.isNotEmpty( m.group( 5 ) ) ) {
-            v.setRevision( m.group( 5 ) );
-        }
-
-        v.suffix = m.group( 6 );
-
-        return v;
-    }
-
-
-    /** The version's MAJOR component. */
-    private String major = "0";
-
-
-    /**
-     * Sets the version's MAJOR component.
-     *
-     * @param toSet The version's MAJOR component.
-     *
-     * @throws IllegalArgumentException When a null or non-numeric value is given.
-     */
-    public void setMajor( String toSet ) throws IllegalArgumentException {
-        if ( StringUtils.isEmpty( toSet ) ) {
-            throw new IllegalArgumentException( "Argument is null" );
-        }
-
-        if ( !toSet.matches( "\\d+" ) ) {
-            throw new IllegalArgumentException( "Argument is not numeric" );
-        }
-
-        if ( numberOfComponents < 1 ) {
-            numberOfComponents = 1;
-        }
-
-        major = toSet;
-    }
-
-
-    /** The version's MAJOR component as an integer. */
-    private int getMajorAsInt() {
-        return Integer.parseInt( major );
-    }
-
-
-    /** The version's MINOR component. */
-    private String minor = "0";
-
-
-    /**
-     * Sets the version's MINOR component.
-     *
-     * @param toSet The version's MINOR component.
-     *
-     * @throws IllegalArgumentException When a null or non-numeric value is given.
-     */
-    public void setMinor( String toSet ) throws IllegalArgumentException {
-        if ( StringUtils.isEmpty( toSet ) ) {
-            throw new IllegalArgumentException( "Argument is null" );
-        }
-
-        if ( !toSet.matches( "\\d+" ) ) {
-            throw new IllegalArgumentException( "Argument is not numeric" );
-        }
-
-        if ( numberOfComponents < 2 ) {
-            numberOfComponents = 2;
-        }
-
-        minor = toSet;
-    }
-
-
-    /** The version's MINOR component as an integer. */
-    private int getMinorAsInt() {
-        return Integer.parseInt( minor );
-    }
-
-
-    /** The version's BUILD component. */
-    private String build = "0";
-
-
-    /** The version's BUILD component as an integer. */
-    private int getBuildAsInt() {
-        return Integer.parseInt( build );
-    }
-
-
-    /**
-     * Gets the version's BUILD component.
-     *
-     * @return The version's BUILD component.
-     */
-    public String getBuild() {
-        return build;
-    }
-
-
-    /**
-     * Sets the version's BUILD component.
-     *
-     * @param toSet The version's BUILD component.
-     *
-     * @throws IllegalArgumentException When a null or non-numeric value is given.
-     */
-    public void setBuild( String toSet ) throws IllegalArgumentException {
-        if ( StringUtils.isEmpty( toSet ) ) {
-            throw new IllegalArgumentException( "Argument is null" );
-        }
-
-        if ( !toSet.matches( "\\d+" ) ) {
-            throw new IllegalArgumentException( "Argument is not numeric" );
-        }
-
-        if ( numberOfComponents < 3 ) {
-            numberOfComponents = 3;
-        }
-
-        build = toSet;
-    }
-
-
-    /**
-     * Sets the version's BUILD component.
-     *
-     * @param toSet The version's BUILD component.
-     */
-    public void setBuild( int toSet ) {
-        setBuild( String.valueOf( toSet ) );
-    }
-
-
-    /** The version's REVISION component. */
-    private String revision = "0";
-
-
-    /** The version's REVISION component as an integer. */
-    private int getRevisionAsInt() {
-        return Integer.parseInt( revision );
-    }
-
-
-    /**
-     * Sets the version's REVISION component.
-     *
-     * @param toSet The version's REVISION component.
-     *
-     * @throws IllegalArgumentException When a null or non-numeric value is given.
-     */
-    public void setRevision( String toSet ) throws IllegalArgumentException {
-        if ( StringUtils.isEmpty( toSet ) ) {
-            throw new IllegalArgumentException( "Argument is null" );
-        }
-
-        if ( !toSet.matches( "\\d+" ) ) {
-            throw new IllegalArgumentException( "Argument is not numeric" );
-        }
-
-        if ( numberOfComponents < 4 ) {
-            numberOfComponents = 4;
-        }
-
-        revision = toSet;
-    }
-
-
-    /**
-     * The number of components that make up the version. The value will always be between 1 (inclusive) and 4
-     * (inclusive).
-     */
-    private int numberOfComponents;
-
-
-    @Override
-    @SuppressWarnings("all")
-    public Object clone() throws CloneNotSupportedException {
-        Version v = new Version();
-
-        v.rawVersion = rawVersion;
-        v.prefix = prefix;
-        v.suffix = suffix;
-
-        v.numberOfComponents = numberOfComponents;
-
-        v.major = major;
-        v.minor = minor;
-        v.build = build;
-        v.revision = revision;
-
-        return v;
-    }
-
-
-    @Override
-    public boolean equals( Object toCompare ) {
-        // Compare pointers
-        if ( toCompare == this ) {
-            return true;
-        }
-
-        // Compare types
-        if ( !( toCompare instanceof Version ) ) {
-            return false;
-        }
-
-        return compareTo( ( Version ) toCompare ) == 0;
-    }
-
-
-    @Override
-    public int hashCode() {
-        return toString().hashCode();
-    }
-
-
-    @Override
-    public String toString() {
-        return String.format( "%s.%s.%s.%s", major, minor, build, revision );
-    }
-
-
-    /**
-     * Gets the version as a string using the specified number of components.
-     *
-     * @param components The number of components. Values less than 1 will be treated as 1 and values greater than 4
-     * will be treated as 4.
-     *
-     * @return The version as a string using the specified number of components.
-     */
-    public String toString( int components ) {
-        StringBuilder buff = new StringBuilder();
-        buff.append( major );
-
-        if ( components > 4 ) {
-            components = 4;
-        }
-
-        switch ( components ) {
-            case 2:
-                buff.append( String.format( ".%s", minor ) );
-                break;
-            case 3:
-                buff.append( String.format( ".%s.%s", minor, build ) );
-                break;
-            case 4:
-                buff.append( String.format( ".%s.%s.%s", minor, build, revision ) );
-                break;
-            default:
-                break;
-        }
-
-        return buff.toString();
-    }
-
-
-    private int compareInts( int x, int y ) {
-        if ( x == y ) {
-            return 0;
-        }
-
-        if ( x < y ) {
-            return -1;
-        }
-
-        return 1;
-    }
-
-
-    @Override
-    public int compareTo( Version toCompare ) {
-        int result = toString().compareTo( toCompare.toString() );
-
-        if ( result == 0 ) {
-            return result;
-        }
-
-        result = compareInts( getMajorAsInt(), toCompare.getMajorAsInt() );
-
-        if ( result != 0 ) {
-            return result;
-        }
-
-        result = compareInts( getMinorAsInt(), toCompare.getMinorAsInt() );
-
-        if ( result != 0 ) {
-            return result;
-        }
-
-        result = compareInts( getBuildAsInt(), toCompare.getBuildAsInt() );
-
-        if ( result != 0 ) {
-            return result;
-        }
-
-        result = compareInts( getRevisionAsInt(), toCompare.getRevisionAsInt() );
-
-        if ( result != 0 ) {
-            return result;
-        }
-
-        return result;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/utils/package-info.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/utils/package-info.java b/stack/core/src/main/java/org/usergrid/utils/package-info.java
deleted file mode 100644
index 740805c..0000000
--- a/stack/core/src/main/java/org/usergrid/utils/package-info.java
+++ /dev/null
@@ -1,18 +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.usergrid.utils;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/resources/usergrid-core-context.xml
----------------------------------------------------------------------
diff --git a/stack/core/src/main/resources/usergrid-core-context.xml b/stack/core/src/main/resources/usergrid-core-context.xml
index 85864b9..67afbbf 100644
--- a/stack/core/src/main/resources/usergrid-core-context.xml
+++ b/stack/core/src/main/resources/usergrid-core-context.xml
@@ -9,7 +9,7 @@
 	http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.1.xsd
 	http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd">
 
-	<context:component-scan base-package="org.usergrid.persistence" />
+	<context:component-scan base-package="org.apache.usergrid.persistence" />
 	<context:annotation-config />
 
     <aop:config proxy-target-class="true"/>
@@ -27,10 +27,10 @@
 	
 	<!-- The Time Resolution used for the cluster -->
 	<bean id="microsecondsTimeResolution" class="me.prettyprint.cassandra.service.clock.MicrosecondsClockResolution" />
-  <bean id="traceTagManager" class="org.usergrid.persistence.cassandra.util.TraceTagManager"/>
-  <bean id="traceTagReporter" class="org.usergrid.persistence.cassandra.util.Slf4jTraceTagReporter"/>
+  <bean id="traceTagManager" class="org.apache.usergrid.persistence.cassandra.util.TraceTagManager"/>
+  <bean id="traceTagReporter" class="org.apache.usergrid.persistence.cassandra.util.Slf4jTraceTagReporter"/>
 
-  <bean id="taggedOpTimer" class="org.usergrid.persistence.cassandra.util.TaggedOpTimer">
+  <bean id="taggedOpTimer" class="org.apache.usergrid.persistence.cassandra.util.TaggedOpTimer">
     <constructor-arg ref="traceTagManager"/>
   </bean>
 
@@ -54,20 +54,20 @@
     <bean id="loadBalancingPolicy" class="me.prettyprint.cassandra.connection.DynamicLoadBalancingPolicy"/>
 
 	<!--  locking for a single node -->	
-	<bean name="lockManager" class="org.usergrid.locking.singlenode.SingleNodeLockManagerImpl" />
+	<bean name="lockManager" class="org.apache.usergrid.locking.singlenode.SingleNodeLockManagerImpl" />
 	
 	<!--  hector based locks -->
 	<!-- Note that if this is deployed in a production cluster, the RF on the keyspace MUST be updated to use an odd number for it's replication Factor.
 		  Even numbers can potentially case the locks to fail, via "split brain" when read at QUORUM on lock verification-->
 	
-	<!--  <bean name="lockManager" class="org.usergrid.locking.cassandra.HectorLockManagerImpl" >
+	<!--  <bean name="lockManager" class="org.apache.usergrid.locking.cassandra.HectorLockManagerImpl" >
 		<property name="cluster" ref="cassandraCluster"/>
 		<property name="keyspaceName" value="${cassandra.lock.keyspace}"/>
 	</bean>-->
 	
 	<!--  zookeeper locks -->
 	<!--
-	<bean name="lockManager" class="org.usergrid.locking.zookeeper.ZooKeeperLockManagerImpl" >
+	<bean name="lockManager" class="org.apache.usergrid.locking.zookeeper.ZooKeeperLockManagerImpl" >
 		<property name="hostPort" value="${zookeeper.url}"/>
 		<property name="sessionTimeout" value="2000"/>
 		<property name="maxAttempts" value="10"/>
@@ -76,7 +76,7 @@
 		
 	
 	<bean id="cassandraService"
-		class="org.usergrid.persistence.cassandra.CassandraService" init-method="init" destroy-method="destroy">
+		class="org.apache.usergrid.persistence.cassandra.CassandraService" init-method="init" destroy-method="destroy">
 		<constructor-arg ref="properties" />
 		<constructor-arg ref="cassandraCluster" />
 		<constructor-arg ref="cassandraHostConfigurator" />
@@ -91,30 +91,30 @@
 	
 
 	<bean id="entityManagerFactory"
-		class="org.usergrid.persistence.cassandra.EntityManagerFactoryImpl">
+		class="org.apache.usergrid.persistence.cassandra.EntityManagerFactoryImpl">
 		<constructor-arg ref="cassandraService" />
         <constructor-arg ref="counterUtils"/>
         <constructor-arg value="${usergrid.counter.skipAggregate}"/>
     </bean>
 
     <bean id="queueManagerFactory"
-          class="org.usergrid.mq.cassandra.QueueManagerFactoryImpl">
+          class="org.apache.usergrid.mq.cassandra.QueueManagerFactoryImpl">
         <constructor-arg ref="cassandraService" />
         <constructor-arg ref="counterUtils"/>
         <constructor-arg ref="lockManager"/>
         <constructor-arg value="${usergrid.queue.lock.timeout}"/>
     </bean>
 
-    <bean id="simpleBatcher" class="org.usergrid.count.SimpleBatcher">
+    <bean id="simpleBatcher" class="org.apache.usergrid.count.SimpleBatcher">
         <property name="batchSubmitter" ref="batchSubmitter"/>
         <property name="batchSize" value="${usergrid.counter.batch.size}"/>
     </bean>
 
-    <bean id="batchSubmitter" class="org.usergrid.count.CassandraSubmitter">
+    <bean id="batchSubmitter" class="org.apache.usergrid.count.CassandraSubmitter">
         <constructor-arg ref="cassandraCounterStore"/>
     </bean>
 
-    <bean id="cassandraCounterStore" class="org.usergrid.count.CassandraCounterStore">
+    <bean id="cassandraCounterStore" class="org.apache.usergrid.count.CassandraCounterStore">
         <constructor-arg>
             <bean id="keyspace"
                   factory-bean="cassandraService"
@@ -122,36 +122,36 @@
         </constructor-arg>
     </bean>
 
-    <bean id="counterUtils" class="org.usergrid.persistence.cassandra.CounterUtils">
+    <bean id="counterUtils" class="org.apache.usergrid.persistence.cassandra.CounterUtils">
         <property name="batcher" ref="simpleBatcher"/>
         <property name="counterType" value="n"/>
     </bean>
 
-    <bean id="usergridSystemMonitor" class="org.usergrid.system.UsergridSystemMonitor">
+    <bean id="usergridSystemMonitor" class="org.apache.usergrid.system.UsergridSystemMonitor">
         <constructor-arg value="${usergrid.version.build}"/>
         <constructor-arg ref="cassandraCluster"/>
         <constructor-arg ref="properties"/>
     </bean>
     
         
-   <bean id="indexBucketLocator" class="org.usergrid.persistence.cassandra.SimpleIndexBucketLocatorImpl">
+   <bean id="indexBucketLocator" class="org.apache.usergrid.persistence.cassandra.SimpleIndexBucketLocatorImpl">
     	<constructor-arg value="${usergrid.index.defaultbucketsize}"/>
     </bean>
     
-    <bean id="mailUtils" class="org.usergrid.utils.MailUtils" />
+    <bean id="mailUtils" class="org.apache.usergrid.utils.MailUtils" />
 
-    <bean id="entityManager" class="org.usergrid.persistence.cassandra.EntityManagerImpl" scope="prototype"/>
+    <bean id="entityManager" class="org.apache.usergrid.persistence.cassandra.EntityManagerImpl" scope="prototype"/>
 
-    <bean id="relationManager" class="org.usergrid.persistence.cassandra.RelationManagerImpl" scope="prototype"/>
+    <bean id="relationManager" class="org.apache.usergrid.persistence.cassandra.RelationManagerImpl" scope="prototype"/>
 
-    <bean id="traceTagAspect" class="org.usergrid.persistence.cassandra.util.TraceTagAspect"/>
+    <bean id="traceTagAspect" class="org.apache.usergrid.persistence.cassandra.util.TraceTagAspect"/>
 
     <aop:config>
       <aop:aspect id="traceParticipant" ref="traceTagAspect">
         <!-- pointcut on the prescense of the TraceParticipant annotation only -->
         <aop:pointcut id="emTraceParticipant"
-            expression="execution(* org.usergrid.persistence.cassandra.EntityManagerImpl.*(..)) and
-            @annotation(org.usergrid.persistence.cassandra.util.TraceParticipant)"/>
+            expression="execution(* org.apache.usergrid.persistence.cassandra.EntityManagerImpl.*(..)) and
+            @annotation(org.apache.usergrid.persistence.cassandra.util.TraceParticipant)"/>
         <aop:around
            pointcut-ref="emTraceParticipant"
            method="applyTrace"/>
@@ -162,7 +162,7 @@
     <!-- Scheduler Settings from removed Scheduler Module's app context -->
     <!-- ============================================================== -->
 
-    <bean id="jobSchedulerBackgroundService" class="org.usergrid.batch.service.JobSchedulerService">
+    <bean id="jobSchedulerBackgroundService" class="org.apache.usergrid.batch.service.JobSchedulerService">
       <property name="jobFactory" ref="jobFactory" />
       <property name="jobAccessor" ref="schedulerService" />
       <property name="workerSize" value="${usergrid.scheduler.job.workers}" />
@@ -170,15 +170,15 @@
       <property name="maxFailCount" value="${usergrid.scheduler.job.maxfail}" />
     </bean>
 
-    <bean id="schedulerService" class="org.usergrid.batch.service.SchedulerServiceImpl">
+    <bean id="schedulerService" class="org.apache.usergrid.batch.service.SchedulerServiceImpl">
       <property name="jobTimeout" value="${usergrid.scheduler.job.timeout}" />
       <property name="jobQueueName" value="${usergrid.scheduler.job.queueName}" />
     </bean>
 
-    <bean id="jobFactory" class="org.usergrid.batch.UsergridJobFactory" />
+    <bean id="jobFactory" class="org.apache.usergrid.batch.UsergridJobFactory" />
 
     <!-- scan all job classes -->
-    <context:component-scan base-package="org.usergrid.batch.job" />
+    <context:component-scan base-package="org.apache.usergrid.batch.job" />
     <context:annotation-config />
 
 </beans>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/resources/usergrid-scheduler-context.xml
----------------------------------------------------------------------
diff --git a/stack/core/src/main/resources/usergrid-scheduler-context.xml b/stack/core/src/main/resources/usergrid-scheduler-context.xml
index 96ef1d9..fd3232c 100644
--- a/stack/core/src/main/resources/usergrid-scheduler-context.xml
+++ b/stack/core/src/main/resources/usergrid-scheduler-context.xml
@@ -6,7 +6,7 @@
 
 	<import resource="classpath:/usergrid-core-context.xml" />
 
-	<bean id="jobSchedulerBackgroundService" class="org.usergrid.batch.service.JobSchedulerService">
+	<bean id="jobSchedulerBackgroundService" class="org.apache.usergrid.batch.service.JobSchedulerService">
 		<property name="jobFactory" ref="jobFactory" />
 		<property name="jobAccessor" ref="schedulerService" />
 		<property name="workerSize" value="${usergrid.scheduler.job.workers}" />
@@ -14,17 +14,17 @@
 		<property name="maxFailCount" value="${usergrid.scheduler.job.maxfail}" />
 	</bean>
 
-	<bean id="schedulerService" class="org.usergrid.batch.service.SchedulerServiceImpl">
+	<bean id="schedulerService" class="org.apache.usergrid.batch.service.SchedulerServiceImpl">
 		<property name="jobTimeout" value="${usergrid.scheduler.job.timeout}" />
 		<property name="jobQueueName" value="${usergrid.scheduler.job.queueName}" />
 	</bean>
 
 
-	<bean id="jobFactory" class="org.usergrid.batch.UsergridJobFactory" />
+	<bean id="jobFactory" class="org.apache.usergrid.batch.UsergridJobFactory" />
 
 
 	<!-- scan all job classes -->
-	<context:component-scan base-package="org.usergrid.batch.job" />
+	<context:component-scan base-package="org.apache.usergrid.batch.job" />
 	<context:annotation-config />
 	
 	<!-- other beans -->

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/test/java/io/baas/Simple.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/io/baas/Simple.java b/stack/core/src/test/java/io/baas/Simple.java
deleted file mode 100644
index 14428ad..0000000
--- a/stack/core/src/test/java/io/baas/Simple.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package io.baas;
-
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.usergrid.clustering.hazelcast.HazelcastTest;
-import org.usergrid.persistence.TypedEntity;
-
-
-public class Simple extends TypedEntity {
-
-    private static final Logger logger = LoggerFactory.getLogger( HazelcastTest.class );
-
-
-    public Simple() {
-        super();
-        logger.info( "simple entity" );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/test/java/org/apache/usergrid/AbstractCoreIT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/AbstractCoreIT.java b/stack/core/src/test/java/org/apache/usergrid/AbstractCoreIT.java
new file mode 100644
index 0000000..57d1698
--- /dev/null
+++ b/stack/core/src/test/java/org/apache/usergrid/AbstractCoreIT.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2012 Apigee Corporation
+ * 
+ * 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;
+
+
+import org.apache.usergrid.utils.JsonUtils;
+import org.junit.ClassRule;
+import org.junit.Rule;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+public abstract class AbstractCoreIT {
+
+    private static final Logger LOG = LoggerFactory.getLogger( AbstractCoreIT.class );
+    @ClassRule
+    public static CoreITSetup setup = new CoreITSetupImpl( CoreITSuite.cassandraResource );
+    @Rule
+    public CoreApplication app = new CoreApplication( setup );
+
+
+    public void dump( Object obj ) {
+        dump( "Object", obj );
+    }
+
+
+    public void dump( String name, Object obj ) {
+        if ( obj != null && LOG.isInfoEnabled() ) {
+            LOG.info( name + ":\n" + JsonUtils.mapToFormattedJsonString( obj ) );
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/test/java/org/apache/usergrid/Application.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/Application.java b/stack/core/src/test/java/org/apache/usergrid/Application.java
new file mode 100644
index 0000000..6357138
--- /dev/null
+++ b/stack/core/src/test/java/org/apache/usergrid/Application.java
@@ -0,0 +1,124 @@
+package org.apache.usergrid;
+
+
+import java.util.Map;
+import java.util.UUID;
+
+import org.apache.usergrid.persistence.Entity;
+import org.apache.usergrid.persistence.Query;
+import org.apache.usergrid.persistence.Results;
+import org.junit.rules.TestRule;
+
+
+/**
+ * A Usergrid Application object used to simplify Test code by making it much more readable and removing unnecessary
+ * clutter due to boilerplate code. Use concrete instances of Application from various modules like {@link
+ * CoreApplication} with the Rule and ClassRule annotations to create unique Applications in Usergrid for use in
+ * testing.
+ */
+public interface Application extends TestRule {
+    /**
+     * Gets the Application's UUID.
+     *
+     * @return the UUID of the application
+     */
+    UUID getId();
+
+    /** Clears the properties associated with this Application. */
+    void clear();
+
+    /**
+     * Gets a property value managed by this Application.
+     *
+     * @param key the key associated with the property
+     *
+     * @return the value of the property
+     */
+    Object get( String key );
+
+    /**
+     * Puts a property value into the Application.
+     *
+     * @param property the key of the property
+     * @param value the value of the property
+     *
+     * @return the last value held by the property
+     */
+    Object put( String property, Object value );
+
+    /**
+     * Gets the Map of properties associated with this Application.
+     *
+     * @return the Map of properties associated with this Application
+     */
+    Map<String, Object> getProperties();
+
+    /**
+     * Gets the name of the organization this Application is associated with.
+     *
+     * @return the name of this Application's organization
+     */
+    @SuppressWarnings("UnusedDeclaration")
+    String getOrgName();
+
+    /**
+     * Gets the name of this Application.
+     *
+     * @return the name of this Application
+     */
+    @SuppressWarnings("UnusedDeclaration")
+    String getAppName();
+
+    /**
+     * Gets an entity associated with this Application based on it's type.
+     *
+     * @param type the type of the entity
+     *
+     * @return the entity
+     *
+     * @throws Exception if something goes wrong accessing the entity
+     */
+    Entity create( String type ) throws Exception;
+
+    /**
+     * Gets an entity associated with this Application by unique id.
+     *
+     * @param id the unique identifier for the entity associated with this Application
+     *
+     * @return the entity associated with this Application
+     *
+     * @throws Exception if anything goes wrong accessing the entity
+     */
+    Entity get( UUID id ) throws Exception;
+
+    /**
+     * Adds an item to a collection associated with this Application.
+     *
+     * @param user the user adding the item
+     * @param collection the collection the item is added to
+     * @param item the entity being added to the collection
+     *
+     * @throws Exception if anything goes wrong adding the item to the specified collection
+     */
+    void addToCollection( Entity user, String collection, Entity item ) throws Exception;
+
+    /**
+     * Searches a collection for items satisfying a Query.
+     *
+     * @param user the user performing the query
+     * @param collection the collection being queried
+     * @param query the query to apply for selecting items in the collection
+     *
+     * @return the set of items resulting from the query
+     *
+     * @throws Exception if anything goes wrong querying the specified collection
+     */
+    Results searchCollection( Entity user, String collection, Query query ) throws Exception;
+
+    /**
+     * Puts all of the properties into this Application's properties.
+     *
+     * @param properties the Map of property key value pairs
+     */
+    void putAll( Map<String, Object> properties );
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/test/java/org/apache/usergrid/ConcurrentCoreITSuite.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/ConcurrentCoreITSuite.java b/stack/core/src/test/java/org/apache/usergrid/ConcurrentCoreITSuite.java
new file mode 100644
index 0000000..dbe165b
--- /dev/null
+++ b/stack/core/src/test/java/org/apache/usergrid/ConcurrentCoreITSuite.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2012 Apigee Corporation
+ * 
+ * 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;
+
+
+import org.apache.usergrid.cassandra.CassandraResource;
+import org.apache.usergrid.cassandra.Concurrent;
+import org.apache.usergrid.cassandra.ConcurrentSuite;
+import org.apache.usergrid.mq.MessagesIT;
+import org.apache.usergrid.persistence.CollectionIT;
+import org.apache.usergrid.persistence.CounterIT;
+import org.apache.usergrid.persistence.EntityConnectionsIT;
+import org.apache.usergrid.persistence.EntityDictionaryIT;
+import org.apache.usergrid.persistence.EntityManagerIT;
+import org.apache.usergrid.persistence.GeoIT;
+import org.apache.usergrid.persistence.IndexIT;
+import org.apache.usergrid.persistence.PathQueryIT;
+import org.apache.usergrid.persistence.PermissionsIT;
+import org.apache.usergrid.persistence.cassandra.EntityManagerFactoryImplIT;
+import org.apache.usergrid.system.UsergridSystemMonitorIT;
+import org.junit.ClassRule;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+
+@RunWith(ConcurrentSuite.class)
+@Suite.SuiteClasses({
+        //        HectorLockManagerIT.class,
+        UsergridSystemMonitorIT.class, CollectionIT.class, CounterIT.class, EntityConnectionsIT.class,
+        EntityDictionaryIT.class, EntityManagerIT.class, GeoIT.class, IndexIT.class, MessagesIT.class,
+        PermissionsIT.class, PathQueryIT.class, EntityManagerFactoryImplIT.class
+})
+@Concurrent()
+public class ConcurrentCoreITSuite {
+    @ClassRule
+    public static CassandraResource cassandraResource = CassandraResource.newWithAvailablePorts( "coreManager" );
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/test/java/org/apache/usergrid/ConcurrentCoreIteratorITSuite.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/ConcurrentCoreIteratorITSuite.java b/stack/core/src/test/java/org/apache/usergrid/ConcurrentCoreIteratorITSuite.java
new file mode 100644
index 0000000..ad1c009
--- /dev/null
+++ b/stack/core/src/test/java/org/apache/usergrid/ConcurrentCoreIteratorITSuite.java
@@ -0,0 +1,62 @@
+package org.apache.usergrid;
+
+
+import org.apache.usergrid.cassandra.CassandraResource;
+import org.apache.usergrid.cassandra.Concurrent;
+import org.apache.usergrid.cassandra.ConcurrentSuite;
+import org.apache.usergrid.persistence.query.AllInCollectionIT;
+import org.apache.usergrid.persistence.query.AllInConnectionIT;
+import org.apache.usergrid.persistence.query.AllInConnectionNoTypeIT;
+import org.apache.usergrid.persistence.query.MultiOrderByCollectionIT;
+import org.apache.usergrid.persistence.query.MultiOrderByComplexUnionCollectionIT;
+import org.apache.usergrid.persistence.query.MultiOrderByComplexUnionConnectionIT;
+import org.apache.usergrid.persistence.query.SingleOrderByBoundRangeScanAscCollectionIT;
+import org.apache.usergrid.persistence.query.SingleOrderByBoundRangeScanAscConnectionIT;
+import org.apache.usergrid.persistence.query.SingleOrderByBoundRangeScanDescCollectionIT;
+import org.apache.usergrid.persistence.query.SingleOrderByBoundRangeScanDescConnectionIT;
+import org.apache.usergrid.persistence.query.SingleOrderByComplexIntersectionCollectionIT;
+import org.apache.usergrid.persistence.query.SingleOrderByComplexIntersectionConnectionIT;
+import org.apache.usergrid.persistence.query.SingleOrderByComplexUnionCollectionIT;
+import org.apache.usergrid.persistence.query.SingleOrderByComplexUnionConnectionIT;
+import org.apache.usergrid.persistence.query.SingleOrderByLessThanLimitCollectionIT;
+import org.apache.usergrid.persistence.query.SingleOrderByLessThanLimitConnectionIT;
+import org.apache.usergrid.persistence.query.SingleOrderByMaxLimitCollectionIT;
+import org.apache.usergrid.persistence.query.SingleOrderByMaxLimitConnectionIT;
+import org.apache.usergrid.persistence.query.SingleOrderByNoIntersectionCollectionIT;
+import org.apache.usergrid.persistence.query.SingleOrderByNoIntersectionConnectionIT;
+import org.apache.usergrid.persistence.query.SingleOrderByNotCollectionIT;
+import org.apache.usergrid.persistence.query.SingleOrderByNotConnectionIT;
+import org.apache.usergrid.persistence.query.SingleOrderBySameRangeScanGreaterCollectionIT;
+import org.apache.usergrid.persistence.query.SingleOrderBySameRangeScanGreaterConnectionIT;
+import org.apache.usergrid.persistence.query.SingleOrderBySameRangeScanGreaterThanEqualCollectionIT;
+import org.apache.usergrid.persistence.query.SingleOrderBySameRangeScanLessCollectionIT;
+import org.apache.usergrid.persistence.query.SingleOrderBySameRangeScanLessConnectionIT;
+import org.apache.usergrid.persistence.query.SingleOrderBySameRangeScanLessThanEqualCollectionIT;
+import org.apache.usergrid.persistence.query.SingleOrderBySameRangeScanLessThanEqualConnectionIT;
+import org.junit.ClassRule;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+
+@RunWith(ConcurrentSuite.class)
+@Suite.SuiteClasses({
+        AllInCollectionIT.class, AllInConnectionIT.class, AllInConnectionNoTypeIT.class, MultiOrderByCollectionIT.class,
+        MultiOrderByComplexUnionCollectionIT.class, MultiOrderByComplexUnionConnectionIT.class,
+        SingleOrderByBoundRangeScanAscCollectionIT.class, SingleOrderByBoundRangeScanAscConnectionIT.class,
+        SingleOrderByBoundRangeScanDescCollectionIT.class, SingleOrderByBoundRangeScanDescConnectionIT.class,
+        SingleOrderByComplexIntersectionCollectionIT.class, SingleOrderByComplexIntersectionConnectionIT.class,
+        SingleOrderByComplexUnionCollectionIT.class, SingleOrderByComplexUnionConnectionIT.class,
+        SingleOrderByLessThanLimitCollectionIT.class, SingleOrderByLessThanLimitConnectionIT.class,
+        SingleOrderByMaxLimitCollectionIT.class, SingleOrderByMaxLimitConnectionIT.class,
+        SingleOrderByNoIntersectionCollectionIT.class, SingleOrderByNoIntersectionConnectionIT.class,
+        SingleOrderByNotCollectionIT.class, SingleOrderByNotConnectionIT.class,
+        SingleOrderBySameRangeScanGreaterCollectionIT.class, SingleOrderBySameRangeScanGreaterConnectionIT.class,
+        SingleOrderBySameRangeScanGreaterThanEqualCollectionIT.class, SingleOrderBySameRangeScanLessCollectionIT.class,
+        SingleOrderBySameRangeScanLessConnectionIT.class, SingleOrderBySameRangeScanLessThanEqualCollectionIT.class,
+        SingleOrderBySameRangeScanLessThanEqualConnectionIT.class
+})
+@Concurrent(threads = 15)
+public class ConcurrentCoreIteratorITSuite {
+    @ClassRule
+    public static CassandraResource cassandraResource = CassandraResource.newWithAvailablePorts( "coreManager" );
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/test/java/org/apache/usergrid/ConcurrentCoreTestSuite.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/ConcurrentCoreTestSuite.java b/stack/core/src/test/java/org/apache/usergrid/ConcurrentCoreTestSuite.java
new file mode 100644
index 0000000..2e429af
--- /dev/null
+++ b/stack/core/src/test/java/org/apache/usergrid/ConcurrentCoreTestSuite.java
@@ -0,0 +1,33 @@
+package org.apache.usergrid;
+
+
+import org.apache.usergrid.cassandra.Concurrent;
+import org.apache.usergrid.cassandra.ConcurrentSuite;
+import org.apache.usergrid.locking.zookeeper.ZookeeperLockManagerTest;
+import org.apache.usergrid.mq.QueuePathsTest;
+import org.apache.usergrid.persistence.EntityTest;
+import org.apache.usergrid.persistence.QueryTest;
+import org.apache.usergrid.persistence.QueryUtilsTest;
+import org.apache.usergrid.persistence.SchemaTest;
+import org.apache.usergrid.persistence.UtilsTest;
+import org.apache.usergrid.persistence.cassandra.QueryProcessorTest;
+import org.apache.usergrid.persistence.cassandra.SimpleIndexBucketLocatorImplTest;
+import org.apache.usergrid.persistence.query.ir.result.IntersectionIteratorTest;
+import org.apache.usergrid.persistence.query.ir.result.SubtractionIteratorTest;
+import org.apache.usergrid.persistence.query.ir.result.UnionIteratorTest;
+import org.apache.usergrid.persistence.query.tree.GrammarTreeTest;
+import org.apache.usergrid.persistence.query.tree.LongLiteralTest;
+import org.apache.usergrid.persistence.query.tree.StringLiteralTest;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+
+@RunWith(ConcurrentSuite.class)
+@Suite.SuiteClasses({
+        ZookeeperLockManagerTest.class, QueuePathsTest.class, QueryProcessorTest.class,
+        SimpleIndexBucketLocatorImplTest.class, EntityTest.class, QueryTest.class, QueryUtilsTest.class,
+        SchemaTest.class, UtilsTest.class, IntersectionIteratorTest.class, SubtractionIteratorTest.class,
+        UnionIteratorTest.class, GrammarTreeTest.class, LongLiteralTest.class, StringLiteralTest.class
+})
+@Concurrent()
+public class ConcurrentCoreTestSuite {}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/test/java/org/apache/usergrid/CoreApplication.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/CoreApplication.java b/stack/core/src/test/java/org/apache/usergrid/CoreApplication.java
new file mode 100644
index 0000000..930785e
--- /dev/null
+++ b/stack/core/src/test/java/org/apache/usergrid/CoreApplication.java
@@ -0,0 +1,171 @@
+/*
+ * Copyright 2012 Apigee Corporation
+ * 
+ * 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;
+
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.apache.usergrid.mq.QueueManager;
+import org.apache.usergrid.persistence.Entity;
+import org.apache.usergrid.persistence.EntityManager;
+import org.apache.usergrid.persistence.Query;
+import org.apache.usergrid.persistence.Results;
+import org.junit.rules.TestRule;
+import org.junit.runner.Description;
+import org.junit.runners.model.Statement;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static junit.framework.Assert.assertNotNull;
+
+
+public class CoreApplication implements Application, TestRule {
+
+    private final static Logger LOG = LoggerFactory.getLogger( CoreApplication.class );
+    protected UUID id;
+    protected String appName;
+    protected String orgName;
+    protected CoreITSetup setup;
+    protected EntityManager em;
+    protected Map<String, Object> properties = new LinkedHashMap<String, Object>();
+
+
+    public CoreApplication( CoreITSetup setup ) {
+        this.setup = setup;
+    }
+
+
+    @Override
+    public void putAll( Map<String, Object> properties ) {
+        this.properties.putAll( properties );
+    }
+
+
+    @Override
+    public Object get( String key ) {
+        return properties.get( key );
+    }
+
+
+    @Override
+    public Map<String, Object> getProperties() {
+        return properties;
+    }
+
+
+    @Override
+    public UUID getId() {
+        return id;
+    }
+
+
+    @Override
+    public String getOrgName() {
+        return orgName;
+    }
+
+
+    @Override
+    public String getAppName() {
+        return appName;
+    }
+
+
+    @Override
+    public Entity create( String type ) throws Exception {
+        Entity entity = em.create( type, properties );
+        clear();
+        return entity;
+    }
+
+
+    @Override
+    public Object put( String property, Object value ) {
+        return properties.put( property, value );
+    }
+
+
+    @Override
+    public void clear() {
+        properties.clear();
+    }
+
+
+    @Override
+    public void addToCollection( Entity user, String collection, Entity item ) throws Exception {
+        em.addToCollection( user, collection, item );
+    }
+
+
+    @Override
+    public Results searchCollection( Entity user, String collection, Query query ) throws Exception {
+        return em.searchCollection( user, collection, query );
+    }
+
+
+    @Override
+    public Entity get( UUID id ) throws Exception {
+        return em.get( id );
+    }
+
+
+    @Override
+    public Statement apply( final Statement base, final Description description ) {
+        return new Statement() {
+            @Override
+            public void evaluate() throws Throwable {
+                before( description );
+
+                try {
+                    base.evaluate();
+                }
+                finally {
+                    after( description );
+                }
+            }
+        };
+    }
+
+
+    protected void after( Description description ) {
+        LOG.info( "Test {}: finish with application", description.getDisplayName() );
+    }
+
+
+    protected void before( Description description ) throws Exception {
+        orgName = description.getClassName();
+        appName = description.getMethodName();
+        id = setup.createApplication( orgName, appName );
+        assertNotNull( id );
+
+        em = setup.getEmf().getEntityManager( id );
+        assertNotNull( em );
+
+        LOG.info( "Created new application {} in organization {}", appName, orgName );
+    }
+
+
+    public EntityManager getEm() {
+        return em;
+    }
+
+
+    public QueueManager getQm() {
+        return setup.getQmf().getQueueManager( getId() );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/test/java/org/apache/usergrid/CoreITSetup.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/CoreITSetup.java b/stack/core/src/test/java/org/apache/usergrid/CoreITSetup.java
new file mode 100644
index 0000000..045b204
--- /dev/null
+++ b/stack/core/src/test/java/org/apache/usergrid/CoreITSetup.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2012 Apigee Corporation
+ * 
+ * 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;
+
+
+import java.util.UUID;
+
+import org.apache.usergrid.mq.QueueManagerFactory;
+import org.apache.usergrid.persistence.EntityManagerFactory;
+import org.apache.usergrid.persistence.IndexBucketLocator;
+import org.apache.usergrid.persistence.cassandra.CassandraService;
+import org.junit.rules.TestRule;
+
+
+public interface CoreITSetup extends TestRule {
+
+    boolean USE_DEFAULT_APPLICATION = false;
+
+    EntityManagerFactory getEmf();
+
+    QueueManagerFactory getQmf();
+
+    IndexBucketLocator getIbl();
+
+    CassandraService getCassSvc();
+
+    UUID createApplication( String organizationName, String applicationName ) throws Exception;
+
+    void dump( String name, Object obj );
+}


[90/96] [abbrv] USERGRID-2 package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/Client.QueuePosition.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/Client.QueuePosition.html b/sdks/android/doc/org/usergrid/android/client/Client.QueuePosition.html
index c799440..5df22a6 100644
--- a/sdks/android/doc/org/usergrid/android/client/Client.QueuePosition.html
+++ b/sdks/android/doc/org/usergrid/android/client/Client.QueuePosition.html
@@ -55,7 +55,7 @@ function windowTitle()
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client"><B>PREV CLASS</B></A>&nbsp;
 &nbsp;NEXT CLASS</FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../index.html?org/usergrid/android/client/Client.QueuePosition.html" target="_top"><B>FRAMES</B></A>  &nbsp;
@@ -88,23 +88,23 @@ DETAIL:&nbsp;<A HREF="#enum_constant_detail">ENUM CONSTANTS</A>&nbsp;|&nbsp;FIEL
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client</FONT>
+org.apache.usergrid.android.client</FONT>
 <BR>
 Enum Client.QueuePosition</H2>
 <PRE>
 java.lang.Object
-  <IMG SRC="../../../../resources/inherit.gif" ALT="extended by ">java.lang.Enum&lt;<A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A>&gt;
-      <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.usergrid.android.client.Client.QueuePosition</B>
+  <IMG SRC="../../../../resources/inherit.gif" ALT="extended by ">java.lang.Enum&lt;<A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A>&gt;
+      <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.usergrid.android.client.Client.QueuePosition</B>
 </PRE>
 <DL>
-<DT><B>All Implemented Interfaces:</B> <DD>java.io.Serializable, java.lang.Comparable&lt;<A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A>&gt;</DD>
+<DT><B>All Implemented Interfaces:</B> <DD>java.io.Serializable, java.lang.Comparable&lt;<A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A>&gt;</DD>
 </DL>
 <DL>
-<DT><B>Enclosing class:</B><DD><A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A></DD>
+<DT><B>Enclosing class:</B><DD><A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A></DD>
 </DL>
 <HR>
 <DL>
-<DT><PRE>public static enum <B>Client.QueuePosition</B><DT>extends java.lang.Enum&lt;<A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A>&gt;</DL>
+<DT><PRE>public static enum <B>Client.QueuePosition</B><DT>extends java.lang.Enum&lt;<A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A>&gt;</DL>
 </PRE>
 
 <P>
@@ -155,7 +155,7 @@ java.lang.Object
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>static&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A></CODE></FONT></TD>
+<CODE>static&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html#find(java.lang.String)">find</A></B>(java.lang.String&nbsp;s)</CODE>
 
 <BR>
@@ -171,7 +171,7 @@ java.lang.Object
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>static&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A></CODE></FONT></TD>
+<CODE>static&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html#valueOf(java.lang.String)">valueOf</A></B>(java.lang.String&nbsp;name)</CODE>
 
 <BR>
@@ -179,7 +179,7 @@ java.lang.Object
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>static&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A>[]</CODE></FONT></TD>
+<CODE>static&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A>[]</CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html#values()">values</A></B>()</CODE>
 
 <BR>
@@ -221,7 +221,7 @@ the order they are declared.</TD>
 <A NAME="START"><!-- --></A><H3>
 START</H3>
 <PRE>
-public static final <A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A> <B>START</B></PRE>
+public static final <A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A> <B>START</B></PRE>
 <DL>
 <DL>
 </DL>
@@ -231,7 +231,7 @@ public static final <A HREF="../../../../org/usergrid/android/client/Client.Queu
 <A NAME="END"><!-- --></A><H3>
 END</H3>
 <PRE>
-public static final <A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A> <B>END</B></PRE>
+public static final <A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A> <B>END</B></PRE>
 <DL>
 <DL>
 </DL>
@@ -241,7 +241,7 @@ public static final <A HREF="../../../../org/usergrid/android/client/Client.Queu
 <A NAME="LAST"><!-- --></A><H3>
 LAST</H3>
 <PRE>
-public static final <A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A> <B>LAST</B></PRE>
+public static final <A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A> <B>LAST</B></PRE>
 <DL>
 <DL>
 </DL>
@@ -251,7 +251,7 @@ public static final <A HREF="../../../../org/usergrid/android/client/Client.Queu
 <A NAME="CONSUMER"><!-- --></A><H3>
 CONSUMER</H3>
 <PRE>
-public static final <A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A> <B>CONSUMER</B></PRE>
+public static final <A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A> <B>CONSUMER</B></PRE>
 <DL>
 <DL>
 </DL>
@@ -270,7 +270,7 @@ public static final <A HREF="../../../../org/usergrid/android/client/Client.Queu
 <A NAME="values()"><!-- --></A><H3>
 values</H3>
 <PRE>
-public static <A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A>[] <B>values</B>()</PRE>
+public static <A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A>[] <B>values</B>()</PRE>
 <DL>
 <DD>Returns an array containing the constants of this enum type, in
 the order they are declared.  This method may be used to iterate
@@ -291,7 +291,7 @@ the order they are declared</DL>
 <A NAME="valueOf(java.lang.String)"><!-- --></A><H3>
 valueOf</H3>
 <PRE>
-public static <A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A> <B>valueOf</B>(java.lang.String&nbsp;name)</PRE>
+public static <A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A> <B>valueOf</B>(java.lang.String&nbsp;name)</PRE>
 <DL>
 <DD>Returns the enum constant of this type with the specified name.
 The string must match <I>exactly</I> an identifier used to declare an
@@ -312,7 +312,7 @@ with the specified name
 <A NAME="find(java.lang.String)"><!-- --></A><H3>
 find</H3>
 <PRE>
-public static <A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A> <B>find</B>(java.lang.String&nbsp;s)</PRE>
+public static <A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A> <B>find</B>(java.lang.String&nbsp;s)</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -326,7 +326,7 @@ toString</H3>
 public java.lang.String <B>toString</B>()</PRE>
 <DL>
 <DD><DL>
-<DT><B>Overrides:</B><DD><CODE>toString</CODE> in class <CODE>java.lang.Enum&lt;<A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A>&gt;</CODE></DL>
+<DT><B>Overrides:</B><DD><CODE>toString</CODE> in class <CODE>java.lang.Enum&lt;<A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A>&gt;</CODE></DL>
 </DD>
 <DD><DL>
 </DL>
@@ -363,7 +363,7 @@ public java.lang.String <B>toString</B>()</PRE>
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client"><B>PREV CLASS</B></A>&nbsp;
 &nbsp;NEXT CLASS</FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../index.html?org/usergrid/android/client/Client.QueuePosition.html" target="_top"><B>FRAMES</B></A>  &nbsp;


[11/96] [abbrv] [partial] Change package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/cassandra/RelationManagerImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/cassandra/RelationManagerImpl.java b/stack/core/src/main/java/org/usergrid/persistence/cassandra/RelationManagerImpl.java
deleted file mode 100644
index 4f565c7..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/cassandra/RelationManagerImpl.java
+++ /dev/null
@@ -1,2339 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.cassandra;
-
-
-import java.nio.ByteBuffer;
-import java.util.AbstractMap;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-import java.util.TreeMap;
-import java.util.TreeSet;
-import java.util.UUID;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.util.Assert;
-import org.usergrid.persistence.CollectionRef;
-import org.usergrid.persistence.ConnectedEntityRef;
-import org.usergrid.persistence.ConnectionRef;
-import org.usergrid.persistence.Entity;
-import org.usergrid.persistence.EntityRef;
-import org.usergrid.persistence.IndexBucketLocator;
-import org.usergrid.persistence.IndexBucketLocator.IndexType;
-import org.usergrid.persistence.PagingResultsIterator;
-import org.usergrid.persistence.Query;
-import org.usergrid.persistence.RelationManager;
-import org.usergrid.persistence.Results;
-import org.usergrid.persistence.Results.Level;
-import org.usergrid.persistence.RoleRef;
-import org.usergrid.persistence.Schema;
-import org.usergrid.persistence.SimpleCollectionRef;
-import org.usergrid.persistence.SimpleEntityRef;
-import org.usergrid.persistence.SimpleRoleRef;
-import org.usergrid.persistence.cassandra.IndexUpdate.IndexEntry;
-import org.usergrid.persistence.cassandra.index.ConnectedIndexScanner;
-import org.usergrid.persistence.cassandra.index.IndexBucketScanner;
-import org.usergrid.persistence.cassandra.index.IndexScanner;
-import org.usergrid.persistence.cassandra.index.NoOpIndexScanner;
-import org.usergrid.persistence.entities.Group;
-import org.usergrid.persistence.geo.CollectionGeoSearch;
-import org.usergrid.persistence.geo.ConnectionGeoSearch;
-import org.usergrid.persistence.geo.EntityLocationRef;
-import org.usergrid.persistence.geo.model.Point;
-import org.usergrid.persistence.query.ir.AllNode;
-import org.usergrid.persistence.query.ir.NameIdentifierNode;
-import org.usergrid.persistence.query.ir.QueryNode;
-import org.usergrid.persistence.query.ir.QuerySlice;
-import org.usergrid.persistence.query.ir.SearchVisitor;
-import org.usergrid.persistence.query.ir.WithinNode;
-import org.usergrid.persistence.query.ir.result.CollectionResultsLoaderFactory;
-import org.usergrid.persistence.query.ir.result.ConnectionIndexSliceParser;
-import org.usergrid.persistence.query.ir.result.ConnectionResultsLoaderFactory;
-import org.usergrid.persistence.query.ir.result.ConnectionTypesIterator;
-import org.usergrid.persistence.query.ir.result.EmptyIterator;
-import org.usergrid.persistence.query.ir.result.GeoIterator;
-import org.usergrid.persistence.query.ir.result.SliceIterator;
-import org.usergrid.persistence.query.ir.result.StaticIdIterator;
-import org.usergrid.persistence.query.ir.result.UUIDIndexSliceParser;
-import org.usergrid.persistence.schema.CollectionInfo;
-import org.usergrid.utils.IndexUtils;
-import org.usergrid.utils.MapUtils;
-
-import com.yammer.metrics.annotation.Metered;
-
-import me.prettyprint.cassandra.serializers.ByteBufferSerializer;
-import me.prettyprint.cassandra.serializers.StringSerializer;
-import me.prettyprint.cassandra.serializers.UUIDSerializer;
-import me.prettyprint.hector.api.Keyspace;
-import me.prettyprint.hector.api.beans.DynamicComposite;
-import me.prettyprint.hector.api.beans.HColumn;
-import me.prettyprint.hector.api.mutation.Mutator;
-
-import static java.lang.String.CASE_INSENSITIVE_ORDER;
-import static java.util.Arrays.asList;
-
-import static me.prettyprint.hector.api.factory.HFactory.createMutator;
-import static org.usergrid.persistence.Schema.COLLECTION_ROLES;
-import static org.usergrid.persistence.Schema.DICTIONARY_COLLECTIONS;
-import static org.usergrid.persistence.Schema.DICTIONARY_CONNECTED_ENTITIES;
-import static org.usergrid.persistence.Schema.DICTIONARY_CONNECTED_TYPES;
-import static org.usergrid.persistence.Schema.DICTIONARY_CONNECTING_ENTITIES;
-import static org.usergrid.persistence.Schema.DICTIONARY_CONNECTING_TYPES;
-import static org.usergrid.persistence.Schema.INDEX_CONNECTIONS;
-import static org.usergrid.persistence.Schema.PROPERTY_COLLECTION_NAME;
-import static org.usergrid.persistence.Schema.PROPERTY_INACTIVITY;
-import static org.usergrid.persistence.Schema.PROPERTY_ITEM;
-import static org.usergrid.persistence.Schema.PROPERTY_ITEM_TYPE;
-import static org.usergrid.persistence.Schema.PROPERTY_NAME;
-import static org.usergrid.persistence.Schema.PROPERTY_TITLE;
-import static org.usergrid.persistence.Schema.PROPERTY_TYPE;
-import static org.usergrid.persistence.Schema.TYPE_APPLICATION;
-import static org.usergrid.persistence.Schema.TYPE_ENTITY;
-import static org.usergrid.persistence.Schema.TYPE_MEMBER;
-import static org.usergrid.persistence.Schema.TYPE_ROLE;
-import static org.usergrid.persistence.Schema.defaultCollectionName;
-import static org.usergrid.persistence.Schema.getDefaultSchema;
-import static org.usergrid.persistence.cassandra.ApplicationCF.ENTITY_COMPOSITE_DICTIONARIES;
-import static org.usergrid.persistence.cassandra.ApplicationCF.ENTITY_DICTIONARIES;
-import static org.usergrid.persistence.cassandra.ApplicationCF.ENTITY_ID_SETS;
-import static org.usergrid.persistence.cassandra.ApplicationCF.ENTITY_INDEX;
-import static org.usergrid.persistence.cassandra.ApplicationCF.ENTITY_INDEX_ENTRIES;
-import static org.usergrid.persistence.cassandra.CassandraPersistenceUtils.addDeleteToMutator;
-import static org.usergrid.persistence.cassandra.CassandraPersistenceUtils.addInsertToMutator;
-import static org.usergrid.persistence.cassandra.CassandraPersistenceUtils.batchExecute;
-import static org.usergrid.persistence.cassandra.CassandraPersistenceUtils.key;
-import static org.usergrid.persistence.cassandra.CassandraService.INDEX_ENTRY_LIST_COUNT;
-import static org.usergrid.persistence.cassandra.ConnectionRefImpl.CONNECTION_ENTITY_CONNECTION_TYPE;
-import static org.usergrid.persistence.cassandra.GeoIndexManager.batchDeleteLocationInConnectionsIndex;
-import static org.usergrid.persistence.cassandra.GeoIndexManager.batchRemoveLocationFromCollectionIndex;
-import static org.usergrid.persistence.cassandra.GeoIndexManager.batchStoreLocationInCollectionIndex;
-import static org.usergrid.persistence.cassandra.GeoIndexManager.batchStoreLocationInConnectionsIndex;
-import static org.usergrid.persistence.cassandra.IndexUpdate.indexValueCode;
-import static org.usergrid.persistence.cassandra.IndexUpdate.toIndexableValue;
-import static org.usergrid.persistence.cassandra.IndexUpdate.validIndexableValue;
-import static org.usergrid.utils.ClassUtils.cast;
-import static org.usergrid.utils.CompositeUtils.setGreaterThanEqualityFlag;
-import static org.usergrid.utils.ConversionUtils.string;
-import static org.usergrid.utils.InflectionUtils.singularize;
-import static org.usergrid.utils.MapUtils.addMapSet;
-import static org.usergrid.utils.UUIDUtils.getTimestampInMicros;
-import static org.usergrid.utils.UUIDUtils.newTimeUUID;
-
-
-public class RelationManagerImpl implements RelationManager {
-
-    private static final Logger logger = LoggerFactory.getLogger( RelationManagerImpl.class );
-
-    private EntityManagerImpl em;
-    private CassandraService cass;
-    private UUID applicationId;
-    private EntityRef headEntity;
-    private IndexBucketLocator indexBucketLocator;
-
-    public static final StringSerializer se = new StringSerializer();
-    public static final ByteBufferSerializer be = new ByteBufferSerializer();
-    public static final UUIDSerializer ue = new UUIDSerializer();
-
-
-    public RelationManagerImpl() {
-    }
-
-
-    public RelationManagerImpl init( EntityManagerImpl em, CassandraService cass, UUID applicationId,
-                                     EntityRef headEntity, IndexBucketLocator indexBucketLocator ) {
-
-        Assert.notNull( em, "Entity manager cannot be null" );
-        Assert.notNull( cass, "Cassandra service cannot be null" );
-        Assert.notNull( applicationId, "Application Id cannot be null" );
-        Assert.notNull( headEntity, "Head entity cannot be null" );
-        Assert.notNull( headEntity.getUuid(), "Head entity uuid cannot be null" );
-        Assert.notNull( indexBucketLocator, "Index bucket locator cannot be null" );
-
-        this.em = em;
-        this.applicationId = applicationId;
-        this.cass = cass;
-        this.headEntity = headEntity;
-        this.indexBucketLocator = indexBucketLocator;
-
-        return this;
-    }
-
-
-    private RelationManagerImpl getRelationManager( EntityRef headEntity ) {
-        RelationManagerImpl rmi = new RelationManagerImpl();
-        rmi.init( em, cass, applicationId, headEntity, indexBucketLocator );
-        return rmi;
-    }
-
-
-    /** side effect: converts headEntity into an Entity if it is an EntityRef! */
-    private Entity getHeadEntity() throws Exception {
-        Entity entity = null;
-        if ( headEntity instanceof Entity ) {
-            entity = ( Entity ) headEntity;
-        }
-        else {
-            entity = em.get( headEntity );
-            headEntity = entity;
-        }
-        return entity;
-    }
-
-
-    /**
-     * Batch update collection index.
-     *
-     * @param indexUpdate The update to apply
-     * @param owner The entity that is the owner context of this entity update.  Can either be an application, or
-     * another entity
-     * @param collectionName the collection name
-     *
-     * @return The indexUpdate with batch mutations
-     *
-     * @throws Exception the exception
-     */
-    @Metered(group = "core", name = "RelationManager_batchUpdateCollectionIndex")
-    public IndexUpdate batchUpdateCollectionIndex( IndexUpdate indexUpdate, EntityRef owner, String collectionName )
-            throws Exception {
-
-        logger.debug( "batchUpdateCollectionIndex" );
-
-        Entity indexedEntity = indexUpdate.getEntity();
-
-        String bucketId = indexBucketLocator
-                .getBucket( applicationId, IndexType.COLLECTION, indexedEntity.getUuid(), indexedEntity.getType(),
-                        indexUpdate.getEntryName() );
-
-        // the root name without the bucket
-        // entity_id,collection_name,prop_name,
-        Object index_name = null;
-        // entity_id,collection_name,prop_name, bucketId
-        Object index_key = null;
-
-        // entity_id,collection_name,collected_entity_id,prop_name
-
-        for ( IndexEntry entry : indexUpdate.getPrevEntries() ) {
-
-            if ( entry.getValue() != null ) {
-
-                index_name = key( owner.getUuid(), collectionName, entry.getPath() );
-
-                index_key = key( index_name, bucketId );
-
-                addDeleteToMutator( indexUpdate.getBatch(), ENTITY_INDEX, index_key, entry.getIndexComposite(),
-                        indexUpdate.getTimestamp() );
-
-                if ( "location.coordinates".equals( entry.getPath() ) ) {
-                    EntityLocationRef loc = new EntityLocationRef( indexUpdate.getEntity(), entry.getTimestampUuid(),
-                            entry.getValue().toString() );
-                    batchRemoveLocationFromCollectionIndex( indexUpdate.getBatch(), indexBucketLocator, applicationId,
-                            index_name, loc );
-                }
-            }
-            else {
-                logger.error( "Unexpected condition - deserialized property value is null" );
-            }
-        }
-
-        if ( ( indexUpdate.getNewEntries().size() > 0 ) && ( !indexUpdate.isMultiValue() || ( indexUpdate.isMultiValue()
-                && !indexUpdate.isRemoveListEntry() ) ) ) {
-
-            for ( IndexEntry indexEntry : indexUpdate.getNewEntries() ) {
-
-                // byte valueCode = indexEntry.getValueCode();
-
-                index_name = key( owner.getUuid(), collectionName, indexEntry.getPath() );
-
-                index_key = key( index_name, bucketId );
-
-                // int i = 0;
-
-                addInsertToMutator( indexUpdate.getBatch(), ENTITY_INDEX, index_key, indexEntry.getIndexComposite(),
-                        null, indexUpdate.getTimestamp() );
-
-                if ( "location.coordinates".equals( indexEntry.getPath() ) ) {
-                    EntityLocationRef loc =
-                            new EntityLocationRef( indexUpdate.getEntity(), indexEntry.getTimestampUuid(),
-                                    indexEntry.getValue().toString() );
-                    batchStoreLocationInCollectionIndex( indexUpdate.getBatch(), indexBucketLocator, applicationId,
-                            index_name, indexedEntity.getUuid(), loc );
-                }
-
-                // i++;
-            }
-        }
-
-        for ( String index : indexUpdate.getIndexesSet() ) {
-            addInsertToMutator( indexUpdate.getBatch(), ENTITY_DICTIONARIES,
-                    key( owner.getUuid(), collectionName, Schema.DICTIONARY_INDEXES ), index, null,
-                    indexUpdate.getTimestamp() );
-        }
-
-        return indexUpdate;
-    }
-
-
-    @Override
-    @Metered(group = "core", name = "RelationManager_getCollectionIndexes")
-    public Set<String> getCollectionIndexes( String collectionName ) throws Exception {
-
-        // TODO TN, read all buckets here
-        List<HColumn<String, String>> results =
-                cass.getAllColumns( cass.getApplicationKeyspace( applicationId ), ENTITY_DICTIONARIES,
-                        key( headEntity.getUuid(), collectionName, Schema.DICTIONARY_INDEXES ), se, se );
-        Set<String> indexes = new TreeSet<String>();
-        if ( results != null ) {
-            for ( HColumn<String, String> column : results ) {
-                String propertyName = column.getName();
-                if ( !propertyName.endsWith( ".keywords" ) ) {
-                    indexes.add( column.getName() );
-                }
-            }
-        }
-        return indexes;
-    }
-
-
-    public Map<EntityRef, Set<String>> getContainingCollections() throws Exception {
-        Map<EntityRef, Set<String>> results = new LinkedHashMap<EntityRef, Set<String>>();
-
-        Keyspace ko = cass.getApplicationKeyspace( applicationId );
-
-        // TODO TN get all buckets here
-
-        List<HColumn<DynamicComposite, ByteBuffer>> containers = cass.getAllColumns( ko, ENTITY_COMPOSITE_DICTIONARIES,
-                key( headEntity.getUuid(), Schema.DICTIONARY_CONTAINER_ENTITIES ), EntityManagerFactoryImpl.dce, be );
-        if ( containers != null ) {
-            for ( HColumn<DynamicComposite, ByteBuffer> container : containers ) {
-                DynamicComposite composite = container.getName();
-                if ( composite != null ) {
-                    String ownerType = ( String ) composite.get( 0 );
-                    String collectionName = ( String ) composite.get( 1 );
-                    UUID ownerId = ( UUID ) composite.get( 2 );
-                    addMapSet( results, new SimpleEntityRef( ownerType, ownerId ), collectionName );
-                    if ( logger.isDebugEnabled() ) {
-                        logger.debug( " {} ( {} ) is in collection {} ( {} ).", new Object[] {
-                                headEntity.getType(), headEntity.getUuid(), ownerType, collectionName, ownerId
-                        } );
-                    }
-                }
-            }
-        }
-        EntityRef applicationRef = new SimpleEntityRef( TYPE_APPLICATION, applicationId );
-        if ( !results.containsKey( applicationRef ) ) {
-            addMapSet( results, applicationRef, defaultCollectionName( headEntity.getType() ) );
-        }
-        return results;
-    }
-
-
-    @SuppressWarnings("unchecked")
-    public void batchCreateCollectionMembership( Mutator<ByteBuffer> batch, EntityRef ownerRef, String collectionName,
-                                                 EntityRef itemRef, EntityRef membershipRef, UUID timestampUuid )
-            throws Exception {
-
-        long timestamp = getTimestampInMicros( timestampUuid );
-
-        if ( membershipRef == null ) {
-            membershipRef = new SimpleCollectionRef( ownerRef, collectionName, itemRef );
-        }
-
-        Map<String, Object> properties = new TreeMap<String, Object>( CASE_INSENSITIVE_ORDER );
-        properties.put( PROPERTY_TYPE, membershipRef.getType() );
-        properties.put( PROPERTY_COLLECTION_NAME, collectionName );
-        properties.put( PROPERTY_ITEM, itemRef.getUuid() );
-        properties.put( PROPERTY_ITEM_TYPE, itemRef.getType() );
-
-        em.batchCreate( batch, membershipRef.getType(), null, properties, membershipRef.getUuid(), timestampUuid );
-
-        addInsertToMutator( batch, ENTITY_COMPOSITE_DICTIONARIES,
-                key( membershipRef.getUuid(), Schema.DICTIONARY_CONTAINER_ENTITIES ),
-                asList( ownerRef.getType(), collectionName, ownerRef.getUuid() ), membershipRef.getUuid(), timestamp );
-    }
-
-
-    /**
-     * Batch add to collection.
-     *
-     * @param batch the batch
-     * @param collectionName the collection name
-     * @param entity The entity to add to the batch
-     * @param timestampUuid The timestamp of this update in a time uuid
-     *
-     * @return batch
-     *
-     * @throws Exception the exception
-     */
-    public Mutator<ByteBuffer> batchAddToCollection( Mutator<ByteBuffer> batch, String collectionName, Entity entity,
-                                                     UUID timestampUuid ) throws Exception {
-        List<UUID> ids = new ArrayList<UUID>( 1 );
-        ids.add( headEntity.getUuid() );
-        return batchAddToCollections( batch, headEntity.getType(), ids, collectionName, entity, timestampUuid );
-    }
-
-
-    @SuppressWarnings("unchecked")
-    @Metered(group = "core", name = "RelationManager_batchAddToCollections")
-    public Mutator<ByteBuffer> batchAddToCollections( Mutator<ByteBuffer> batch, String ownerType, List<UUID> ownerIds,
-                                                      String collectionName, Entity entity, UUID timestampUuid )
-            throws Exception {
-
-        long timestamp = getTimestampInMicros( timestampUuid );
-
-        if ( Schema.isAssociatedEntityType( entity.getType() ) ) {
-            logger.error( "Cant add an extended type to any collection", new Throwable() );
-            return batch;
-        }
-
-        Map<UUID, CollectionRef> membershipRefs = new LinkedHashMap<UUID, CollectionRef>();
-
-        for ( UUID ownerId : ownerIds ) {
-
-            CollectionRef membershipRef =
-                    new SimpleCollectionRef( new SimpleEntityRef( ownerType, ownerId ), collectionName, entity );
-
-            membershipRefs.put( ownerId, membershipRef );
-
-            // get the bucket this entityId needs to be inserted into
-            String bucketId = indexBucketLocator
-                    .getBucket( applicationId, IndexType.COLLECTION, entity.getUuid(), collectionName );
-
-            Object collections_key = key( ownerId, Schema.DICTIONARY_COLLECTIONS, collectionName, bucketId );
-
-            // Insert in main collection
-
-            addInsertToMutator( batch, ENTITY_ID_SETS, collections_key, entity.getUuid(), membershipRef.getUuid(),
-                    timestamp );
-
-            addInsertToMutator( batch, ENTITY_COMPOSITE_DICTIONARIES,
-                    key( entity.getUuid(), Schema.DICTIONARY_CONTAINER_ENTITIES ),
-                    asList( ownerType, collectionName, ownerId ), membershipRef.getUuid(), timestamp );
-        }
-
-
-        Schema schema = getDefaultSchema();
-
-        // Add property indexes
-        for ( String propertyName : entity.getProperties().keySet() ) {
-            boolean indexed_property = schema.isPropertyIndexed( entity.getType(), propertyName );
-            if ( indexed_property ) {
-                boolean collection_indexes_property =
-                        schema.isPropertyIndexedInCollection( ownerType, collectionName, propertyName );
-                boolean item_schema_has_property = schema.hasProperty( entity.getType(), propertyName );
-                boolean fulltext_indexed = schema.isPropertyFulltextIndexed( entity.getType(), propertyName );
-                if ( collection_indexes_property || !item_schema_has_property ) {
-                    Object propertyValue = entity.getProperty( propertyName );
-                    IndexUpdate indexUpdate =
-                            batchStartIndexUpdate( batch, entity, propertyName, propertyValue, timestampUuid,
-                                    item_schema_has_property, false, false, fulltext_indexed, true );
-                    for ( UUID ownerId : ownerIds ) {
-                        EntityRef owner = new SimpleEntityRef( ownerType, ownerId );
-                        batchUpdateCollectionIndex( indexUpdate, owner, collectionName );
-                    }
-                }
-            }
-        }
-
-        // Add set property indexes
-
-        Set<String> dictionaryNames = em.getDictionaryNames( entity );
-
-        for ( String dictionaryName : dictionaryNames ) {
-            boolean has_dictionary = schema.hasDictionary( entity.getType(), dictionaryName );
-            boolean dictionary_indexed =
-                    schema.isDictionaryIndexedInCollection( ownerType, collectionName, dictionaryName );
-
-            if ( dictionary_indexed || !has_dictionary ) {
-                Set<Object> elementValues = em.getDictionaryAsSet( entity, dictionaryName );
-                for ( Object elementValue : elementValues ) {
-                    IndexUpdate indexUpdate =
-                            batchStartIndexUpdate( batch, entity, dictionaryName, elementValue, timestampUuid,
-                                    has_dictionary, true, false, false, true );
-                    for ( UUID ownerId : ownerIds ) {
-                        EntityRef owner = new SimpleEntityRef( ownerType, ownerId );
-                        batchUpdateCollectionIndex( indexUpdate, owner, collectionName );
-                    }
-                }
-            }
-        }
-
-        for ( UUID ownerId : ownerIds ) {
-            EntityRef owner = new SimpleEntityRef( ownerType, ownerId );
-            batchCreateCollectionMembership( batch, owner, collectionName, entity, membershipRefs.get( ownerId ),
-                    timestampUuid );
-        }
-
-        return batch;
-    }
-
-
-    /**
-     * Batch remove from collection.
-     * <p/>
-     * * Batch add to collection.
-     *
-     * @param batch the batch
-     * @param collectionName the collection name
-     * @param entity The entity to add to the batch
-     * @param timestampUuid The timestamp of this update in a time uuid
-     *
-     * @return The mutation with the delete operations added
-     *
-     * @throws Exception the exception
-     */
-    public Mutator<ByteBuffer> batchRemoveFromCollection( Mutator<ByteBuffer> batch, String collectionName,
-                                                          Entity entity, UUID timestampUuid ) throws Exception {
-        return this.batchRemoveFromCollection( batch, collectionName, entity, false, timestampUuid );
-    }
-
-
-    @SuppressWarnings("unchecked")
-    @Metered(group = "core", name = "RelationManager_batchRemoveFromCollection")
-    public Mutator<ByteBuffer> batchRemoveFromCollection( Mutator<ByteBuffer> batch, String collectionName,
-                                                          Entity entity, boolean force, UUID timestampUuid )
-            throws Exception {
-
-        long timestamp = getTimestampInMicros( timestampUuid );
-
-        if ( !force && headEntity.getUuid().equals( applicationId ) ) {
-            // Can't remove entities from root collections
-            return batch;
-        }
-
-        Object collections_key = key( headEntity.getUuid(), Schema.DICTIONARY_COLLECTIONS, collectionName,
-                indexBucketLocator.getBucket( applicationId, IndexType.COLLECTION, entity.getUuid(), collectionName ) );
-
-        // Remove property indexes
-
-        Schema schema = getDefaultSchema();
-        for ( String propertyName : entity.getProperties().keySet() ) {
-            boolean collection_indexes_property =
-                    schema.isPropertyIndexedInCollection( headEntity.getType(), collectionName, propertyName );
-            boolean item_schema_has_property = schema.hasProperty( entity.getType(), propertyName );
-            boolean fulltext_indexed = schema.isPropertyFulltextIndexed( entity.getType(), propertyName );
-            if ( collection_indexes_property || !item_schema_has_property ) {
-                IndexUpdate indexUpdate = batchStartIndexUpdate( batch, entity, propertyName, null, timestampUuid,
-                        item_schema_has_property, false, false, fulltext_indexed );
-                batchUpdateCollectionIndex( indexUpdate, headEntity, collectionName );
-            }
-        }
-
-        // Remove set indexes
-
-        Set<String> dictionaryNames = em.getDictionaryNames( entity );
-
-        for ( String dictionaryName : dictionaryNames ) {
-            boolean has_dictionary = schema.hasDictionary( entity.getType(), dictionaryName );
-            boolean dictionary_indexed =
-                    schema.isDictionaryIndexedInCollection( headEntity.getType(), collectionName, dictionaryName );
-
-            if ( dictionary_indexed || !has_dictionary ) {
-                Set<Object> elementValues = em.getDictionaryAsSet( entity, dictionaryName );
-                for ( Object elementValue : elementValues ) {
-                    IndexUpdate indexUpdate =
-                            batchStartIndexUpdate( batch, entity, dictionaryName, elementValue, timestampUuid,
-                                    has_dictionary, true, true, false );
-                    batchUpdateCollectionIndex( indexUpdate, headEntity, collectionName );
-                }
-            }
-        }
-
-        // Delete actual property
-
-        addDeleteToMutator( batch, ENTITY_ID_SETS, collections_key, entity.getUuid(), timestamp );
-
-        addDeleteToMutator( batch, ENTITY_COMPOSITE_DICTIONARIES,
-                key( entity.getUuid(), Schema.DICTIONARY_CONTAINER_ENTITIES ),
-                asList( headEntity.getType(), collectionName, headEntity.getUuid() ), timestamp );
-
-        if ( !headEntity.getType().equalsIgnoreCase( TYPE_APPLICATION ) && !Schema
-                .isAssociatedEntityType( entity.getType() ) ) {
-            em.deleteEntity( new SimpleCollectionRef( headEntity, collectionName, entity ).getUuid() );
-        }
-
-        return batch;
-    }
-
-
-    @Metered(group = "core", name = "RelationManager_batchDeleteConnectionIndexEntries")
-    public Mutator<ByteBuffer> batchDeleteConnectionIndexEntries( IndexUpdate indexUpdate, IndexEntry entry,
-                                                                  ConnectionRefImpl connection, UUID[] index_keys )
-            throws Exception {
-
-        // entity_id,prop_name
-        Object property_index_key = key( index_keys[ConnectionRefImpl.ALL], INDEX_CONNECTIONS, entry.getPath(),
-                indexBucketLocator.getBucket( applicationId, IndexType.CONNECTION, index_keys[ConnectionRefImpl.ALL],
-                        entry.getPath() ) );
-
-        // entity_id,entity_type,prop_name
-        Object entity_type_prop_index_key =
-                key( index_keys[ConnectionRefImpl.BY_ENTITY_TYPE], INDEX_CONNECTIONS, entry.getPath(),
-                        indexBucketLocator.getBucket( applicationId, IndexType.CONNECTION,
-                                index_keys[ConnectionRefImpl.BY_ENTITY_TYPE], entry.getPath() ) );
-
-        // entity_id,connection_type,prop_name
-        Object connection_type_prop_index_key =
-                key( index_keys[ConnectionRefImpl.BY_CONNECTION_TYPE], INDEX_CONNECTIONS, entry.getPath(),
-                        indexBucketLocator.getBucket( applicationId, IndexType.CONNECTION,
-                                index_keys[ConnectionRefImpl.BY_CONNECTION_TYPE], entry.getPath() ) );
-
-        // entity_id,connection_type,entity_type,prop_name
-        Object connection_type_and_entity_type_prop_index_key =
-                key( index_keys[ConnectionRefImpl.BY_CONNECTION_AND_ENTITY_TYPE], INDEX_CONNECTIONS, entry.getPath(),
-                        indexBucketLocator.getBucket( applicationId, IndexType.CONNECTION,
-                                index_keys[ConnectionRefImpl.BY_CONNECTION_AND_ENTITY_TYPE], entry.getPath() ) );
-
-        // composite(property_value,connected_entity_id,connection_type,entity_type,entry_timestamp)
-        addDeleteToMutator( indexUpdate.getBatch(), ENTITY_INDEX, property_index_key,
-                entry.getIndexComposite( connection.getConnectedEntityId(), connection.getConnectionType(),
-                        connection.getConnectedEntityType() ), indexUpdate.getTimestamp() );
-
-        // composite(property_value,connected_entity_id,connection_type,entry_timestamp)
-        addDeleteToMutator( indexUpdate.getBatch(), ENTITY_INDEX, entity_type_prop_index_key,
-                entry.getIndexComposite( connection.getConnectedEntityId(), connection.getConnectionType() ),
-                indexUpdate.getTimestamp() );
-
-        // composite(property_value,connected_entity_id,entity_type,entry_timestamp)
-        addDeleteToMutator( indexUpdate.getBatch(), ENTITY_INDEX, connection_type_prop_index_key,
-                entry.getIndexComposite( connection.getConnectedEntityId(), connection.getConnectedEntityType() ),
-                indexUpdate.getTimestamp() );
-
-        // composite(property_value,connected_entity_id,entry_timestamp)
-        addDeleteToMutator( indexUpdate.getBatch(), ENTITY_INDEX, connection_type_and_entity_type_prop_index_key,
-                entry.getIndexComposite( connection.getConnectedEntityId() ), indexUpdate.getTimestamp() );
-
-        return indexUpdate.getBatch();
-    }
-
-
-    @Metered(group = "core", name = "RelationManager_batchAddConnectionIndexEntries")
-    public Mutator<ByteBuffer> batchAddConnectionIndexEntries( IndexUpdate indexUpdate, IndexEntry entry,
-                                                               ConnectionRefImpl connection, UUID[] index_keys ) {
-
-        // entity_id,prop_name
-        Object property_index_key = key( index_keys[ConnectionRefImpl.ALL], INDEX_CONNECTIONS, entry.getPath(),
-                indexBucketLocator.getBucket( applicationId, IndexType.CONNECTION, index_keys[ConnectionRefImpl.ALL],
-                        entry.getPath() ) );
-
-        // entity_id,entity_type,prop_name
-        Object entity_type_prop_index_key =
-                key( index_keys[ConnectionRefImpl.BY_ENTITY_TYPE], INDEX_CONNECTIONS, entry.getPath(),
-                        indexBucketLocator.getBucket( applicationId, IndexType.CONNECTION,
-                                index_keys[ConnectionRefImpl.BY_ENTITY_TYPE], entry.getPath() ) );
-
-        // entity_id,connection_type,prop_name
-        Object connection_type_prop_index_key =
-                key( index_keys[ConnectionRefImpl.BY_CONNECTION_TYPE], INDEX_CONNECTIONS, entry.getPath(),
-                        indexBucketLocator.getBucket( applicationId, IndexType.CONNECTION,
-                                index_keys[ConnectionRefImpl.BY_CONNECTION_TYPE], entry.getPath() ) );
-
-        // entity_id,connection_type,entity_type,prop_name
-        Object connection_type_and_entity_type_prop_index_key =
-                key( index_keys[ConnectionRefImpl.BY_CONNECTION_AND_ENTITY_TYPE], INDEX_CONNECTIONS, entry.getPath(),
-                        indexBucketLocator.getBucket( applicationId, IndexType.CONNECTION,
-                                index_keys[ConnectionRefImpl.BY_CONNECTION_AND_ENTITY_TYPE], entry.getPath() ) );
-
-        // composite(property_value,connected_entity_id,connection_type,entity_type,entry_timestamp)
-        addInsertToMutator( indexUpdate.getBatch(), ENTITY_INDEX, property_index_key,
-                entry.getIndexComposite( connection.getConnectedEntityId(), connection.getConnectionType(),
-                        connection.getConnectedEntityType() ), connection.getUuid(), indexUpdate.getTimestamp() );
-
-        // composite(property_value,connected_entity_id,connection_type,entry_timestamp)
-        addInsertToMutator( indexUpdate.getBatch(), ENTITY_INDEX, entity_type_prop_index_key,
-                entry.getIndexComposite( connection.getConnectedEntityId(), connection.getConnectionType() ),
-                connection.getUuid(), indexUpdate.getTimestamp() );
-
-        // composite(property_value,connected_entity_id,entity_type,entry_timestamp)
-        addInsertToMutator( indexUpdate.getBatch(), ENTITY_INDEX, connection_type_prop_index_key,
-                entry.getIndexComposite( connection.getConnectedEntityId(), connection.getConnectedEntityType() ),
-                connection.getUuid(), indexUpdate.getTimestamp() );
-
-        // composite(property_value,connected_entity_id,entry_timestamp)
-        addInsertToMutator( indexUpdate.getBatch(), ENTITY_INDEX, connection_type_and_entity_type_prop_index_key,
-                entry.getIndexComposite( connection.getConnectedEntityId() ), connection.getUuid(),
-                indexUpdate.getTimestamp() );
-
-        return indexUpdate.getBatch();
-    }
-
-
-    /**
-     * Batch update connection index.
-     *
-     * @param indexUpdate The update operation to perform
-     * @param connection The connection to update
-     *
-     * @return The index with the batch mutation udpated
-     *
-     * @throws Exception the exception
-     */
-    @Metered(group = "core", name = "RelationManager_batchUpdateConnectionIndex")
-    public IndexUpdate batchUpdateConnectionIndex( IndexUpdate indexUpdate, ConnectionRefImpl connection )
-            throws Exception {
-
-        // UUID connection_id = connection.getUuid();
-
-        UUID[] index_keys = connection.getIndexIds();
-
-        // Delete all matching entries from entry list
-        for ( IndexEntry entry : indexUpdate.getPrevEntries() ) {
-
-            if ( entry.getValue() != null ) {
-
-                batchDeleteConnectionIndexEntries( indexUpdate, entry, connection, index_keys );
-
-                if ( "location.coordinates".equals( entry.getPath() ) ) {
-                    EntityLocationRef loc = new EntityLocationRef( indexUpdate.getEntity(), entry.getTimestampUuid(),
-                            entry.getValue().toString() );
-                    batchDeleteLocationInConnectionsIndex( indexUpdate.getBatch(), indexBucketLocator, applicationId,
-                            index_keys, entry.getPath(), loc );
-                }
-            }
-            else {
-                logger.error( "Unexpected condition - deserialized property value is null" );
-            }
-        }
-
-        if ( ( indexUpdate.getNewEntries().size() > 0 ) && ( !indexUpdate.isMultiValue() || ( indexUpdate.isMultiValue()
-                && !indexUpdate.isRemoveListEntry() ) ) ) {
-
-            for ( IndexEntry indexEntry : indexUpdate.getNewEntries() ) {
-
-                batchAddConnectionIndexEntries( indexUpdate, indexEntry, connection, index_keys );
-
-                if ( "location.coordinates".equals( indexEntry.getPath() ) ) {
-                    EntityLocationRef loc =
-                            new EntityLocationRef( indexUpdate.getEntity(), indexEntry.getTimestampUuid(),
-                                    indexEntry.getValue().toString() );
-                    batchStoreLocationInConnectionsIndex( indexUpdate.getBatch(), indexBucketLocator, applicationId,
-                            index_keys, indexEntry.getPath(), loc );
-                }
-            }
-
-      /*
-       * addInsertToMutator(batch, EntityCF.SETS, key(connection_id,
-       * Schema.INDEXES_SET), indexEntry.getKey(), null, false, timestamp); }
-       * 
-       * addInsertToMutator(batch, EntityCF.SETS, key(connection_id,
-       * Schema.INDEXES_SET), entryName, null, false, timestamp);
-       */
-        }
-
-        for ( String index : indexUpdate.getIndexesSet() ) {
-            addInsertToMutator( indexUpdate.getBatch(), ENTITY_DICTIONARIES,
-                    key( connection.getConnectingIndexId(), Schema.DICTIONARY_INDEXES ), index, null,
-                    indexUpdate.getTimestamp() );
-        }
-
-        return indexUpdate;
-    }
-
-
-    public Set<String> getConnectionIndexes( ConnectionRefImpl connection ) throws Exception {
-        List<HColumn<String, String>> results =
-                cass.getAllColumns( cass.getApplicationKeyspace( applicationId ), ENTITY_DICTIONARIES,
-                        key( connection.getConnectingIndexId(), Schema.DICTIONARY_INDEXES ), se, se );
-        Set<String> indexes = new TreeSet<String>();
-        if ( results != null ) {
-            for ( HColumn<String, String> column : results ) {
-                String propertyName = column.getName();
-                if ( !propertyName.endsWith( ".keywords" ) ) {
-                    indexes.add( column.getName() );
-                }
-            }
-        }
-        return indexes;
-    }
-
-
-    /**
-     * Batch update backward connections property indexes.
-     *
-     * @param indexUpdate The update to run for incoming connections
-     *
-     * @return The index update to run
-     *
-     * @throws Exception the exception
-     */
-    @Metered(group = "core", name = "RelationManager_batchUpdateBackwardConnectionsPropertyIndexes")
-    public IndexUpdate batchUpdateBackwardConnectionsPropertyIndexes( IndexUpdate indexUpdate ) throws Exception {
-
-        logger.debug( "batchUpdateBackwordConnectionsPropertyIndexes" );
-
-        boolean entitySchemaHasProperty = indexUpdate.isSchemaHasProperty();
-
-        if ( entitySchemaHasProperty ) {
-            if ( !getDefaultSchema()
-                    .isPropertyIndexed( indexUpdate.getEntity().getType(), indexUpdate.getEntryName() ) ) {
-                return indexUpdate;
-            }
-        }
-
-
-        return doBackwardConnectionsUpdate( indexUpdate );
-    }
-
-
-    /**
-     * Search each reverse connection type in the graph for connections.  If one is found, update the index
-     * appropriately
-     *
-     * @param indexUpdate The index update to use
-     *
-     * @return The updated index update
-     */
-    private IndexUpdate doBackwardConnectionsUpdate( IndexUpdate indexUpdate ) throws Exception {
-        final Entity targetEntity = indexUpdate.getEntity();
-
-        final ConnectionTypesIterator connectionTypes =
-                new ConnectionTypesIterator( cass, applicationId, targetEntity.getUuid(), false, 100 );
-
-        for ( String connectionType : connectionTypes ) {
-
-            PagingResultsIterator itr = getReversedConnectionsIterator( targetEntity, connectionType );
-
-            for ( Object connection : itr ) {
-
-                final ConnectedEntityRef sourceEntity = ( ConnectedEntityRef ) connection;
-
-                //we need to create a connection ref from the source entity (found via reverse edge) to the entity
-                // we're about to update.  This is the index that needs updated
-                final ConnectionRefImpl connectionRef =
-                        new ConnectionRefImpl( sourceEntity, connectionType, indexUpdate.getEntity() );
-
-                batchUpdateConnectionIndex( indexUpdate, connectionRef );
-            }
-        }
-
-        return indexUpdate;
-    }
-
-
-    /**
-     * Get a paging results iterator.  Should return an iterator for all results
-     *
-     * @param targetEntity The target entity search connections from
-     *
-     * @return connectionType The name of the edges to search
-     */
-    private PagingResultsIterator getReversedConnectionsIterator( EntityRef targetEntity, String connectionType )
-            throws Exception {
-        return new PagingResultsIterator( getConnectingEntities( targetEntity, connectionType, null, Level.REFS ) );
-    }
-
-
-    /**
-     * Batch update backward connections set indexes.
-     *
-     * @param indexUpdate The index to update in the dictionary
-     *
-     * @return The index update
-     *
-     * @throws Exception the exception
-     */
-    @Metered(group = "core", name = "RelationManager_batchUpdateBackwardConnectionsDictionaryIndexes")
-    public IndexUpdate batchUpdateBackwardConnectionsDictionaryIndexes( IndexUpdate indexUpdate ) throws Exception {
-
-        logger.debug( "batchUpdateBackwardConnectionsListIndexes" );
-
-        boolean entityHasDictionary = getDefaultSchema()
-                .isDictionaryIndexedInConnections( indexUpdate.getEntity().getType(), indexUpdate.getEntryName() );
-
-        if ( !entityHasDictionary ) {
-            return indexUpdate;
-        }
-
-
-        return doBackwardConnectionsUpdate( indexUpdate );
-    }
-
-
-    @SuppressWarnings("unchecked")
-    @Metered(group = "core", name = "RelationManager_batchUpdateEntityConnection")
-    public Mutator<ByteBuffer> batchUpdateEntityConnection( Mutator<ByteBuffer> batch, boolean disconnect,
-                                                            ConnectionRefImpl connection, UUID timestampUuid )
-            throws Exception {
-
-        long timestamp = getTimestampInMicros( timestampUuid );
-
-        Entity connectedEntity = em.get( connection.getConnectedEntityId() );
-
-        if ( connectedEntity == null ) {
-            return batch;
-        }
-
-        // Create connection for requested params
-
-
-        if ( disconnect ) {
-            addDeleteToMutator( batch, ENTITY_COMPOSITE_DICTIONARIES,
-                    key( connection.getConnectingEntityId(), DICTIONARY_CONNECTED_ENTITIES,
-                            connection.getConnectionType() ),
-                    asList( connection.getConnectedEntityId(), connection.getConnectedEntityType() ), timestamp );
-
-            addDeleteToMutator( batch, ENTITY_COMPOSITE_DICTIONARIES,
-                    key( connection.getConnectedEntityId(), DICTIONARY_CONNECTING_ENTITIES,
-                            connection.getConnectionType() ),
-                    asList( connection.getConnectingEntityId(), connection.getConnectingEntityType() ), timestamp );
-
-            // delete the connection path if there will be no connections left
-
-            boolean delete = true;
-
-            //check out outbound edges of the given type.  If we have more than the 1 specified,
-            // we shouldn't delete the connection types from our outbound index
-            PagingResultsIterator itr = new PagingResultsIterator(
-                    getConnectedEntities( connection.getConnectingEntity(), connection.getConnectionType(), null,
-                            Level.REFS ) );
-
-            ConnectedEntityRef c;
-
-            while ( itr.hasNext() ) {
-                c = ( ConnectedEntityRef ) itr.next();
-
-                if ( !connection.getConnectedEntityId().equals( c.getUuid() ) ) {
-                    delete = false;
-                    break;
-                }
-
-
-                //        c = (ConnectionRef) itr.next();
-                //        if (c.getConnectedEntity().getConnectionType().equals(connection.getConnectedEntity()
-                // .getConnectionType()) &&!c.getConnectedEntity().getUuid().equals(connection.getConnectedEntity()
-                // .getUuid())) {
-                //            delete = false;
-                //            break;
-                //        }
-
-            }
-            //      for (ConnectionRefImpl c : getConnectionsWithEntity(connection.getConnectingEntityId())) {
-            //        if (c.getConnectedEntity().getConnectionType().equals(connection.getConnectedEntity()
-            // .getConnectionType())) {
-            //          if (!c.getConnectedEntity().getUuid().equals(connection.getConnectedEntity().getUuid())) {
-            //            delete = false;
-            //            break;
-            //          }
-            //        }
-            //      }
-            if ( delete ) {
-                addDeleteToMutator( batch, ENTITY_DICTIONARIES,
-                        key( connection.getConnectingEntityId(), DICTIONARY_CONNECTED_TYPES ),
-                        connection.getConnectionType(), timestamp );
-            }
-
-            // delete the connection path if there will be no connections left
-            delete = true;
-
-
-            //check out inbound edges of the given type.  If we have more than the 1 specified,
-            // we shouldn't delete the connection types from our outbound index
-            itr = new PagingResultsIterator(
-                    getConnectingEntities( connection.getConnectingEntity(), connection.getConnectionType(), null,
-                            Level.REFS ) );
-
-            while ( itr.hasNext() ) {
-                c = ( ConnectedEntityRef ) itr.next();
-
-                if ( !connection.getConnectedEntityId().equals( c.getUuid() ) ) {
-                    delete = false;
-                    break;
-                }
-                //        if (c.getConnectedEntity().getConnectionType().equals(connection.getConnectedEntity()
-                // .getConnectionType()) && !c.getConnectingEntity().getUuid().equals(connection.getConnectingEntity
-                // ().getUuid())) {
-                //            delete = false;
-                //            break;
-                //        }
-
-            }
-
-            //      for (ConnectionRefImpl c : getConnectionsWithEntity(connection.getConnectedEntityId())) {
-            //        if (c.getConnectedEntity().getConnectionType().equals(connection.getConnectedEntity()
-            // .getConnectionType())) {
-            //          if (!c.getConnectingEntity().getUuid().equals(connection.getConnectingEntity().getUuid())) {
-            //            delete = false;
-            //            break;
-            //          }
-            //        }
-            //      }
-            if ( delete ) {
-                addDeleteToMutator( batch, ENTITY_DICTIONARIES,
-                        key( connection.getConnectedEntityId(), DICTIONARY_CONNECTING_TYPES ),
-                        connection.getConnectionType(), timestamp );
-            }
-        }
-        else {
-            addInsertToMutator( batch, ENTITY_COMPOSITE_DICTIONARIES,
-                    key( connection.getConnectingEntityId(), DICTIONARY_CONNECTED_ENTITIES,
-                            connection.getConnectionType() ),
-                    asList( connection.getConnectedEntityId(), connection.getConnectedEntityType() ), timestamp,
-                    timestamp );
-
-            addInsertToMutator( batch, ENTITY_COMPOSITE_DICTIONARIES,
-                    key( connection.getConnectedEntityId(), DICTIONARY_CONNECTING_ENTITIES,
-                            connection.getConnectionType() ),
-                    asList( connection.getConnectingEntityId(), connection.getConnectingEntityType() ), timestamp,
-                    timestamp );
-
-            // Add connection type to connections set
-            addInsertToMutator( batch, ENTITY_DICTIONARIES,
-                    key( connection.getConnectingEntityId(), DICTIONARY_CONNECTED_TYPES ),
-                    connection.getConnectionType(), null, timestamp );
-
-            // Add connection type to connections set
-            addInsertToMutator( batch, ENTITY_DICTIONARIES,
-                    key( connection.getConnectedEntityId(), DICTIONARY_CONNECTING_TYPES ),
-                    connection.getConnectionType(), null, timestamp );
-        }
-
-        // Add property indexes
-
-        // Iterate though all the properties of the connected entity
-
-        Schema schema = getDefaultSchema();
-        for ( String propertyName : connectedEntity.getProperties().keySet() ) {
-            Object propertyValue = connectedEntity.getProperties().get( propertyName );
-
-            boolean indexed = schema.isPropertyIndexed( connectedEntity.getType(), propertyName );
-
-            boolean connection_indexes_property = schema.isPropertyIndexed( connectedEntity.getType(), propertyName );
-            boolean item_schema_has_property = schema.hasProperty( connectedEntity.getType(), propertyName );
-            boolean fulltext_indexed = schema.isPropertyFulltextIndexed( connectedEntity.getType(), propertyName );
-            // For each property, if the schema says it's indexed, update its
-            // index
-
-            if ( indexed && ( connection_indexes_property || !item_schema_has_property ) ) {
-                IndexUpdate indexUpdate =
-                        batchStartIndexUpdate( batch, connectedEntity, propertyName, disconnect ? null : propertyValue,
-                                timestampUuid, item_schema_has_property, false, false, fulltext_indexed );
-                batchUpdateConnectionIndex( indexUpdate, connection );
-            }
-        }
-
-        // Add indexes for the connected entity's list properties
-
-        // Get the names of the list properties in the connected entity
-        Set<String> dictionaryNames = em.getDictionaryNames( connectedEntity );
-
-        // For each list property, get the values in the list and
-        // update the index with those values
-
-        for ( String dictionaryName : dictionaryNames ) {
-            boolean has_dictionary = schema.hasDictionary( connectedEntity.getType(), dictionaryName );
-            boolean dictionary_indexed =
-                    schema.isDictionaryIndexedInConnections( connectedEntity.getType(), dictionaryName );
-
-            if ( dictionary_indexed || !has_dictionary ) {
-                Set<Object> elementValues = em.getDictionaryAsSet( connectedEntity, dictionaryName );
-                for ( Object elementValue : elementValues ) {
-                    IndexUpdate indexUpdate =
-                            batchStartIndexUpdate( batch, connectedEntity, dictionaryName, elementValue, timestampUuid,
-                                    has_dictionary, true, disconnect, false );
-                    batchUpdateConnectionIndex( indexUpdate, connection );
-                }
-            }
-        }
-
-        return batch;
-    }
-
-
-    public void updateEntityConnection( boolean disconnect, ConnectionRefImpl connection ) throws Exception {
-
-        UUID timestampUuid = newTimeUUID();
-        Mutator<ByteBuffer> batch = createMutator( cass.getApplicationKeyspace( applicationId ), be );
-
-        // Make or break the connection
-
-        batchUpdateEntityConnection( batch, disconnect, connection, timestampUuid );
-
-        // Make or break a connection from the connecting entity
-        // to the connection itself
-
-        ConnectionRefImpl loopback = connection.getConnectionToConnectionEntity();
-        if ( !disconnect ) {
-            em.insertEntity( CONNECTION_ENTITY_CONNECTION_TYPE, loopback.getConnectedEntityId() );
-        }
-
-        batchUpdateEntityConnection( batch, disconnect, loopback, timestampUuid );
-
-        batchExecute( batch, CassandraService.RETRY_COUNT );
-    }
-
-
-    @Metered(group = "core", name = "RelationManager_batchDisconnect")
-    public void batchDisconnect( Mutator<ByteBuffer> batch, UUID timestampUuid ) throws Exception {
-
-
-        PagingResultsIterator itr =
-                new PagingResultsIterator( getConnectingEntities( headEntity, null, null, Level.REFS ) );
-
-        ConnectionRefImpl connection;
-
-        while ( itr.hasNext() ) {
-            connection = ( ConnectionRefImpl ) itr.next();
-
-            batchUpdateEntityConnection( batch, true, connection, timestampUuid );
-        }
-        //
-        //    List<ConnectionRefImpl> connections = getConnectionsWithEntity(headEntity.getUuid());
-        //    if (connections != null) {
-        //      for (ConnectionRefImpl connection : connections) {
-        //        batchUpdateEntityConnection(batch, true, connection, timestampUuid);
-        //      }
-        //    }
-    }
-
-
-    public IndexUpdate batchStartIndexUpdate( Mutator<ByteBuffer> batch, Entity entity, String entryName,
-                                              Object entryValue, UUID timestampUuid, boolean schemaHasProperty,
-                                              boolean isMultiValue, boolean removeListEntry, boolean fulltextIndexed )
-            throws Exception {
-        return batchStartIndexUpdate( batch, entity, entryName, entryValue, timestampUuid, schemaHasProperty,
-                isMultiValue, removeListEntry, fulltextIndexed, false );
-    }
-
-
-    @Metered(group = "core", name = "RelationManager_batchStartIndexUpdate")
-    public IndexUpdate batchStartIndexUpdate( Mutator<ByteBuffer> batch, Entity entity, String entryName,
-                                              Object entryValue, UUID timestampUuid, boolean schemaHasProperty,
-                                              boolean isMultiValue, boolean removeListEntry, boolean fulltextIndexed,
-                                              boolean skipRead ) throws Exception {
-
-        long timestamp = getTimestampInMicros( timestampUuid );
-
-        IndexUpdate indexUpdate =
-                new IndexUpdate( batch, entity, entryName, entryValue, schemaHasProperty, isMultiValue, removeListEntry,
-                        timestampUuid );
-
-        // entryName = entryName.toLowerCase();
-
-        // entity_id,connection_type,connected_entity_id,prop_name
-
-        if ( !skipRead ) {
-
-            List<HColumn<ByteBuffer, ByteBuffer>> entries = null;
-
-            if ( isMultiValue && validIndexableValue( entryValue ) ) {
-                entries = cass.getColumns( cass.getApplicationKeyspace( applicationId ), ENTITY_INDEX_ENTRIES,
-                        entity.getUuid(),
-                        new DynamicComposite( entryName, indexValueCode( entryValue ), toIndexableValue( entryValue ) ),
-                        setGreaterThanEqualityFlag( new DynamicComposite( entryName, indexValueCode( entryValue ),
-                                toIndexableValue( entryValue ) ) ), INDEX_ENTRY_LIST_COUNT, false );
-            }
-            else {
-                entries = cass.getColumns( cass.getApplicationKeyspace( applicationId ), ENTITY_INDEX_ENTRIES,
-                        entity.getUuid(), new DynamicComposite( entryName ),
-                        setGreaterThanEqualityFlag( new DynamicComposite( entryName ) ), INDEX_ENTRY_LIST_COUNT,
-                        false );
-            }
-
-            if ( logger.isDebugEnabled() ) {
-                logger.debug( "Found {} previous index entries for {} of entity {}", new Object[] {
-                        entries.size(), entryName, entity.getUuid()
-                } );
-            }
-
-            // Delete all matching entries from entry list
-            for ( HColumn<ByteBuffer, ByteBuffer> entry : entries ) {
-                UUID prev_timestamp = null;
-                Object prev_value = null;
-                String prev_obj_path = null;
-
-                // new format:
-                // composite(entryName,
-                // value_code,prev_value,prev_timestamp,prev_obj_path) = null
-                DynamicComposite composite = DynamicComposite.fromByteBuffer( entry.getName().duplicate() );
-                prev_value = composite.get( 2 );
-                prev_timestamp = ( UUID ) composite.get( 3 );
-                if ( composite.size() > 4 ) {
-                    prev_obj_path = ( String ) composite.get( 4 );
-                }
-
-                if ( prev_value != null ) {
-
-                    String entryPath = entryName;
-                    if ( ( prev_obj_path != null ) && ( prev_obj_path.length() > 0 ) ) {
-                        entryPath = entryName + "." + prev_obj_path;
-                    }
-
-                    indexUpdate.addPrevEntry( entryPath, prev_value, prev_timestamp, entry.getName().duplicate() );
-
-                    // composite(property_value,connected_entity_id,entry_timestamp)
-                    // addDeleteToMutator(batch, ENTITY_INDEX_ENTRIES,
-                    // entity.getUuid(), entry.getName(), timestamp);
-
-                }
-                else {
-                    logger.error( "Unexpected condition - deserialized property value is null" );
-                }
-            }
-        }
-
-        if ( !isMultiValue || ( isMultiValue && !removeListEntry ) ) {
-
-            List<Map.Entry<String, Object>> list = IndexUtils.getKeyValueList( entryName, entryValue, fulltextIndexed );
-
-            if ( entryName.equalsIgnoreCase( "location" ) && ( entryValue instanceof Map ) ) {
-                @SuppressWarnings("rawtypes") double latitude =
-                        MapUtils.getDoubleValue( ( Map ) entryValue, "latitude" );
-                @SuppressWarnings("rawtypes") double longitude =
-                        MapUtils.getDoubleValue( ( Map ) entryValue, "longitude" );
-                list.add( new AbstractMap.SimpleEntry<String, Object>( "location.coordinates",
-                        latitude + "," + longitude ) );
-            }
-
-            for ( Map.Entry<String, Object> indexEntry : list ) {
-
-                if ( validIndexableValue( indexEntry.getValue() ) ) {
-                    indexUpdate.addNewEntry( indexEntry.getKey(), toIndexableValue( indexEntry.getValue() ) );
-                }
-            }
-
-            if ( isMultiValue ) {
-                addInsertToMutator( batch, ENTITY_INDEX_ENTRIES, entity.getUuid(),
-                        asList( entryName, indexValueCode( entryValue ), toIndexableValue( entryValue ),
-                                indexUpdate.getTimestampUuid() ), null, timestamp );
-            }
-            else {
-                // int i = 0;
-
-                for ( Map.Entry<String, Object> indexEntry : list ) {
-
-                    String name = indexEntry.getKey();
-                    if ( name.startsWith( entryName + "." ) ) {
-                        name = name.substring( entryName.length() + 1 );
-                    }
-                    else if ( name.startsWith( entryName ) ) {
-                        name = name.substring( entryName.length() );
-                    }
-
-                    byte code = indexValueCode( indexEntry.getValue() );
-                    Object val = toIndexableValue( indexEntry.getValue() );
-                    addInsertToMutator( batch, ENTITY_INDEX_ENTRIES, entity.getUuid(),
-                            asList( entryName, code, val, indexUpdate.getTimestampUuid(), name ), null, timestamp );
-
-                    indexUpdate.addIndex( indexEntry.getKey() );
-                }
-            }
-
-            indexUpdate.addIndex( entryName );
-        }
-
-        return indexUpdate;
-    }
-
-
-    @Metered(group = "core", name = "RelationManager_batchUpdatePropertyIndexes")
-    public void batchUpdatePropertyIndexes( Mutator<ByteBuffer> batch, String propertyName, Object propertyValue,
-                                            boolean entitySchemaHasProperty, boolean noRead, UUID timestampUuid )
-            throws Exception {
-
-        Entity entity = getHeadEntity();
-
-        UUID associatedId = null;
-        String associatedType = null;
-
-        if ( Schema.isAssociatedEntityType( entity.getType() ) ) {
-            Object item = entity.getProperty( PROPERTY_ITEM );
-            if ( ( item instanceof UUID ) && ( entity.getProperty( PROPERTY_COLLECTION_NAME ) instanceof String ) ) {
-                associatedId = ( UUID ) item;
-                associatedType = string( entity.getProperty( PROPERTY_ITEM_TYPE ) );
-                String entryName = TYPE_MEMBER + "." + propertyName;
-                if ( logger.isDebugEnabled() ) {
-                    logger.debug( "Extended property {} ( {} ).{} indexed as {} ({})." + entryName, new Object[] {
-                            entity.getType(), entity.getUuid(), propertyName, associatedType, associatedId
-                    } );
-                }
-                propertyName = entryName;
-            }
-        }
-
-        IndexUpdate indexUpdate = batchStartIndexUpdate( batch, entity, propertyName, propertyValue, timestampUuid,
-                entitySchemaHasProperty, false, false,
-                getDefaultSchema().isPropertyFulltextIndexed( entity.getType(), propertyName ), noRead );
-
-        // Update collections
-
-        String effectiveType = entity.getType();
-        if ( associatedType != null ) {
-            indexUpdate.setAssociatedId( associatedId );
-            effectiveType = associatedType;
-        }
-
-        Map<String, Set<CollectionInfo>> containers = getDefaultSchema().getContainers( effectiveType );
-        if ( containers != null ) {
-
-            Map<EntityRef, Set<String>> containerEntities = null;
-            if ( noRead ) {
-                containerEntities = new LinkedHashMap<EntityRef, Set<String>>();
-                EntityRef applicationRef = new SimpleEntityRef( TYPE_APPLICATION, applicationId );
-                addMapSet( containerEntities, applicationRef, defaultCollectionName( entity.getType() ) );
-            }
-            else {
-                containerEntities = getContainingCollections();
-            }
-
-            for ( EntityRef containerEntity : containerEntities.keySet() ) {
-                if ( containerEntity.getType().equals( TYPE_APPLICATION ) && Schema
-                        .isAssociatedEntityType( entity.getType() ) ) {
-                    logger.debug( "Extended properties for {} not indexed by application", entity.getType() );
-                    continue;
-                }
-                Set<String> collectionNames = containerEntities.get( containerEntity );
-                Set<CollectionInfo> collections = containers.get( containerEntity.getType() );
-
-                if ( collections != null ) {
-                    for ( CollectionInfo collection : collections ) {
-                        if ( collectionNames.contains( collection.getName() ) ) {
-                            batchUpdateCollectionIndex( indexUpdate, containerEntity, collection.getName() );
-                        }
-                    }
-                }
-            }
-        }
-
-        if ( !noRead ) {
-            batchUpdateBackwardConnectionsPropertyIndexes( indexUpdate );
-        }
-
-        /**
-         * We've updated the properties, add the deletes to the ledger
-         *
-         */
-
-        for ( IndexEntry entry : indexUpdate.getPrevEntries() ) {
-            addDeleteToMutator( batch, ENTITY_INDEX_ENTRIES, entity.getUuid(), entry.getLedgerColumn(),
-                    indexUpdate.getTimestamp() );
-        }
-    }
-
-
-    public void batchUpdateSetIndexes( Mutator<ByteBuffer> batch, String setName, Object elementValue,
-                                       boolean removeFromSet, UUID timestampUuid ) throws Exception {
-
-        Entity entity = getHeadEntity();
-
-        elementValue = getDefaultSchema().validateEntitySetValue( entity.getType(), setName, elementValue );
-
-        IndexUpdate indexUpdate =
-                batchStartIndexUpdate( batch, entity, setName, elementValue, timestampUuid, true, true, removeFromSet,
-                        false );
-
-        // Update collections
-        Map<String, Set<CollectionInfo>> containers =
-                getDefaultSchema().getContainersIndexingDictionary( entity.getType(), setName );
-
-        if ( containers != null ) {
-            Map<EntityRef, Set<String>> containerEntities = getContainingCollections();
-            for ( EntityRef containerEntity : containerEntities.keySet() ) {
-                if ( containerEntity.getType().equals( TYPE_APPLICATION ) && Schema
-                        .isAssociatedEntityType( entity.getType() ) ) {
-                    logger.debug( "Extended properties for {} not indexed by application", entity.getType() );
-                    continue;
-                }
-                Set<String> collectionNames = containerEntities.get( containerEntity );
-                Set<CollectionInfo> collections = containers.get( containerEntity.getType() );
-
-                if ( collections != null ) {
-
-                    for ( CollectionInfo collection : collections ) {
-                        if ( collectionNames.contains( collection.getName() ) ) {
-
-                            batchUpdateCollectionIndex( indexUpdate, containerEntity, collection.getName() );
-                        }
-                    }
-                }
-            }
-        }
-
-        batchUpdateBackwardConnectionsDictionaryIndexes( indexUpdate );
-    }
-
-
-    private IndexScanner searchIndex( Object indexKey, QuerySlice slice, int pageSize ) throws Exception {
-
-        DynamicComposite[] range = slice.getRange();
-
-        Object keyPrefix = key( indexKey, slice.getPropertyName() );
-
-        IndexScanner scanner =
-                new IndexBucketScanner( cass, indexBucketLocator, ENTITY_INDEX, applicationId, IndexType.CONNECTION,
-                        keyPrefix, range[0], range[1], slice.isReversed(), pageSize, slice.getPropertyName() );
-
-        return scanner;
-    }
-
-
-    /**
-     * Search the collection index using all the buckets for the given collection
-     *
-     * @param indexKey The index key to read
-     * @param slice Slice set in the query
-     * @param collectionName The name of the collection to search
-     * @param pageSize The page size to load when iterating
-     */
-    private IndexScanner searchIndexBuckets( Object indexKey, QuerySlice slice, String collectionName, int pageSize )
-            throws Exception {
-
-        DynamicComposite[] range = slice.getRange();
-
-        Object keyPrefix = key( indexKey, slice.getPropertyName() );
-
-        // we have a cursor, so the first record should be discarded
-        if ( slice.hasCursor() ) {
-            pageSize++;
-        }
-
-        IndexScanner scanner =
-                new IndexBucketScanner( cass, indexBucketLocator, ENTITY_INDEX, applicationId, IndexType.COLLECTION,
-                        keyPrefix, range[0], range[1], slice.isReversed(), pageSize, collectionName );
-
-        return scanner;
-    }
-
-
-    @SuppressWarnings("unchecked")
-    @Override
-    @Metered(group = "core", name = "RelationManager_isOwner")
-    public boolean isCollectionMember( String collectionName, EntityRef entity ) throws Exception {
-
-        Keyspace ko = cass.getApplicationKeyspace( applicationId );
-
-        ByteBuffer col = DynamicComposite
-                .toByteBuffer( asList( this.headEntity.getType(), collectionName, headEntity.getUuid() ) );
-
-        HColumn<ByteBuffer, ByteBuffer> result = cass.getColumn( ko, ENTITY_COMPOSITE_DICTIONARIES,
-                key( entity.getUuid(), Schema.DICTIONARY_CONTAINER_ENTITIES ), col, be, be );
-
-        return result != null;
-    }
-
-
-    /** @param connectionName The name of hte connection */
-    public boolean isConnectionMember( String connectionName, EntityRef entity ) throws Exception {
-        Keyspace ko = cass.getApplicationKeyspace( applicationId );
-
-        Object key = key( this.headEntity.getUuid(), DICTIONARY_CONNECTED_ENTITIES, connectionName );
-
-        DynamicComposite start = new DynamicComposite( entity.getUuid() );
-
-        List<HColumn<ByteBuffer, ByteBuffer>> cols =
-                cass.getColumns( ko, ENTITY_COMPOSITE_DICTIONARIES, key, start, null, 1, false );
-
-        if ( cols == null || cols.size() == 0 ) {
-            return false;
-        }
-
-        UUID returnedUUID = ( UUID ) DynamicComposite.fromByteBuffer( cols.get( 0 ).getName() ).get( 0 );
-
-        return entity.getUuid().equals( returnedUUID );
-
-
-        //    addDeleteToMutator(batch, ENTITY_COMPOSITE_DICTIONARIES,
-        //        key(connection.getConnectedEntityId(), DICTIONARY_CONNECTING_ENTITIES,
-        // connection.getConnectionType()),
-        //        asList(connection.getConnectingEntityId(), connection.getConnectingEntityType()), timestamp);
-        //
-        //
-        //    ConnectionRefImpl ref = new ConnectionRefImpl(this.headEntity, connectionName, entity);
-        //
-        //
-        //
-        //
-        //
-        //
-        //    HColumn<String, UUID> col = cass.getColumn(ko, ENTITY_CONNECTIONS, ref.getUuid(),
-        //        ConnectionRefImpl.CONNECTED_ENTITY_ID, se, ue);
-        //
-        //
-        //    getConnectedEntities(this.headEntity, connectionName, )
-        //
-        //    return col != null && entity.getUuid().equals(col.getValue());
-    }
-
-
-    @Override
-    @Metered(group = "core", name = "RelationManager_getOwners")
-    public Map<String, Map<UUID, Set<String>>> getOwners() throws Exception {
-        Map<EntityRef, Set<String>> containerEntities = getContainingCollections();
-        Map<String, Map<UUID, Set<String>>> owners = new LinkedHashMap<String, Map<UUID, Set<String>>>();
-
-        for ( EntityRef owner : containerEntities.keySet() ) {
-            Set<String> collections = containerEntities.get( owner );
-            for ( String collection : collections ) {
-                MapUtils.addMapMapSet( owners, owner.getType(), owner.getUuid(), collection );
-            }
-        }
-
-        return owners;
-    }
-
-
-    @Override
-    @Metered(group = "core", name = "RelationManager_getCollections")
-    public Set<String> getCollections() throws Exception {
-
-        Map<String, CollectionInfo> collections = getDefaultSchema().getCollections( headEntity.getType() );
-        if ( collections == null ) {
-            return null;
-        }
-
-        return collections.keySet();
-    }
-
-
-    @Override
-    @Metered(group = "core", name = "RelationManager_getCollection_start_result")
-    public Results getCollection( String collectionName, UUID startResult, int count, Results.Level resultsLevel,
-                                  boolean reversed ) throws Exception {
-        // changed intentionally to delegate to search so that behavior is
-        // consistent across all index access.
-
-        // TODO T.N fix cursor parsing here so startResult can be used in this
-        // context. Needs a bit of refactor
-        // for accommodating cursor I/O USERGRID-1750. A bit hacky, but until a
-        // furthur refactor this works.
-
-        Query query = new Query().withResultsLevel( resultsLevel ).withReversed( reversed ).withLimit( count )
-                                 .withStartResult( startResult );
-
-        return searchCollection( collectionName, query );
-    }
-
-
-    @Override
-    @Metered(group = "core", name = "RelationManager_getCollecitonForQuery")
-    public Results getCollection( String collectionName, Query query, Results.Level resultsLevel ) throws Exception {
-
-        // changed intentionally to delegate to search so that behavior is
-        // consistent across all index access.
-
-        return searchCollection( collectionName, query );
-    }
-
-
-    @Override
-    @Metered(group = "core", name = "RelationManager_addToCollection")
-    public Entity addToCollection( String collectionName, EntityRef itemRef ) throws Exception {
-
-        Entity itemEntity = em.get( itemRef );
-
-        if ( itemEntity == null ) {
-            return null;
-        }
-
-        CollectionInfo collection = getDefaultSchema().getCollection( headEntity.getType(), collectionName );
-        if ( ( collection != null ) && !collection.getType().equals( itemRef.getType() ) ) {
-            return null;
-        }
-
-        UUID timestampUuid = newTimeUUID();
-        Mutator<ByteBuffer> batch = createMutator( cass.getApplicationKeyspace( applicationId ), be );
-
-        batchAddToCollection( batch, collectionName, itemEntity, timestampUuid );
-
-        if ( collection.getLinkedCollection() != null ) {
-            getRelationManager( itemEntity )
-                    .batchAddToCollection( batch, collection.getLinkedCollection(), getHeadEntity(), timestampUuid );
-        }
-
-        batchExecute( batch, CassandraService.RETRY_COUNT );
-
-        return itemEntity;
-    }
-
-
-    @Override
-    @Metered(group = "core", name = "RelationManager_addToCollections")
-    public Entity addToCollections( List<EntityRef> owners, String collectionName ) throws Exception {
-
-        Entity itemEntity = getHeadEntity();
-
-        Map<String, List<UUID>> collectionsByType = new LinkedHashMap<String, List<UUID>>();
-        for ( EntityRef owner : owners ) {
-            MapUtils.addMapList( collectionsByType, owner.getType(), owner.getUuid() );
-        }
-
-        UUID timestampUuid = newTimeUUID();
-        Mutator<ByteBuffer> batch = createMutator( cass.getApplicationKeyspace( applicationId ), be );
-
-        Schema schema = getDefaultSchema();
-        for ( Entry<String, List<UUID>> entry : collectionsByType.entrySet() ) {
-            CollectionInfo collection = schema.getCollection( entry.getKey(), collectionName );
-            if ( ( collection != null ) && !collection.getType().equals( headEntity.getType() ) ) {
-                continue;
-            }
-            batchAddToCollections( batch, entry.getKey(), entry.getValue(), collectionName, itemEntity, timestampUuid );
-
-            if ( collection.getLinkedCollection() != null ) {
-                logger.error(
-                        "Bulk add to collections used on a linked collection, linked connection will not be updated" );
-            }
-        }
-
-        batchExecute( batch, CassandraService.RETRY_COUNT );
-
-        return null;
-    }
-
-
-    @Override
-    @Metered(group = "core", name = "RelationManager_createItemInCollection")
-    public Entity createItemInCollection( String collectionName, String itemType, Map<String, Object> properties )
-            throws Exception {
-
-        if ( headEntity.getUuid().equals( applicationId ) ) {
-            if ( itemType.equals( TYPE_ENTITY ) ) {
-                itemType = singularize( collectionName );
-            }
-            if ( itemType.equals( TYPE_ROLE ) ) {
-                Long inactivity = ( Long ) properties.get( PROPERTY_INACTIVITY );
-                if ( inactivity == null ) {
-                    inactivity = 0L;
-                }
-                return em.createRole( ( String ) properties.get( PROPERTY_NAME ),
-                        ( String ) properties.get( PROPERTY_TITLE ), inactivity );
-            }
-            return em.create( itemType, properties );
-        }
-        else if ( headEntity.getType().equals( Group.ENTITY_TYPE ) && ( collectionName.equals( COLLECTION_ROLES ) ) ) {
-            UUID groupId = headEntity.getUuid();
-            String roleName = ( String ) properties.get( PROPERTY_NAME );
-            return em.createGroupRole( groupId, roleName, ( Long ) properties.get( PROPERTY_INACTIVITY ) );
-        }
-
-        CollectionInfo collection = getDefaultSchema().getCollection( headEntity.getType(), collectionName );
-        if ( ( collection != null ) && !collection.getType().equals( itemType ) ) {
-            return null;
-        }
-
-        properties = getDefaultSchema().cleanUpdatedProperties( itemType, properties, true );
-
-        Entity itemEntity = em.create( itemType, properties );
-
-        if ( itemEntity != null ) {
-            UUID timestampUuid = newTimeUUID();
-            Mutator<ByteBuffer> batch = createMutator( cass.getApplicationKeyspace( applicationId ), be );
-
-            batchAddToCollection( batch, collectionName, itemEntity, timestampUuid );
-
-            if ( collection.getLinkedCollection() != null ) {
-                getRelationManager( itemEntity )
-                        .batchAddToCollection( batch, collection.getLinkedCollection(), getHeadEntity(),
-                                timestampUuid );
-            }
-
-            batchExecute( batch, CassandraService.RETRY_COUNT );
-        }
-
-        return itemEntity;
-    }
-
-
-    @Override
-    @Metered(group = "core", name = "RelationManager_removeFromCollection")
-    public void removeFromCollection( String collectionName, EntityRef itemRef ) throws Exception {
-
-        if ( headEntity.getUuid().equals( applicationId ) ) {
-            if ( collectionName.equals( COLLECTION_ROLES ) ) {
-                Entity itemEntity = em.get( itemRef );
-                if ( itemEntity != null ) {
-                    RoleRef roleRef = SimpleRoleRef.forRoleEntity( itemEntity );
-                    em.deleteRole( roleRef.getApplicationRoleName() );
-                    return;
-                }
-                em.delete( itemEntity );
-                return;
-            }
-            em.delete( itemRef );
-            return;
-        }
-
-        Entity itemEntity = em.get( itemRef );
-
-        if ( itemEntity == null ) {
-            return;
-        }
-
-        UUID timestampUuid = newTimeUUID();
-        Mutator<ByteBuffer> batch = createMutator( cass.getApplicationKeyspace( applicationId ), be );
-
-        batchRemoveFromCollection( batch, collectionName, itemEntity, timestampUuid );
-
-        CollectionInfo collection = getDefaultSchema().getCollection( headEntity.getType(), collectionName );
-        if ( ( collection != null ) && ( collection.getLinkedCollection() != null ) ) {
-            getRelationManager( itemEntity )
-                    .batchRemoveFromCollection( batch, collection.getLinkedCollection(), getHeadEntity(),
-                            timestampUuid );
-        }
-
-        batchExecute( batch, CassandraService.RETRY_COUNT );
-
-        if ( headEntity.getType().equals( Group.ENTITY_TYPE ) ) {
-            if ( collectionName.equals( COLLECTION_ROLES ) ) {
-                String path = ( String ) ( ( Entity ) itemRef ).getMetadata( "path" );
-                if ( path.startsWith( "/roles/" ) ) {
-                    RoleRef roleRef = SimpleRoleRef.forRoleEntity( itemEntity );
-                    em.deleteRole( roleRef.getApplicationRoleName() );
-                }
-            }
-        }
-    }
-
-
-    @Metered(group = "core", name = "RelationManager_batchRemoveFromContainers")
-    public void batchRemoveFromContainers( Mutator<ByteBuffer> m, UUID timestampUuid ) throws Exception {
-        Entity entity = getHeadEntity();
-        // find all the containing collections
-        Map<EntityRef, Set<String>> containers = getContainingCollections();
-        if ( containers != null ) {
-            for ( Entry<EntityRef, Set<String>> container : containers.entrySet() ) {
-                for ( String collectionName : container.getValue() ) {
-                    getRelationManager( container.getKey() )
-                            .batchRemoveFromCollection( m, collectionName, entity, true, timestampUuid );
-                }
-            }
-        }
-    }
-
-
-    @Override
-    @Metered(group = "core", name = "RelationManager_copyRelationships")
-    public void copyRelationships( String srcRelationName, EntityRef dstEntityRef, String dstRelationName )
-            throws Exception {
-
-        headEntity = em.validate( headEntity );
-        dstEntityRef = em.validate( dstEntityRef );
-
-        CollectionInfo srcCollection = getDefaultSchema().getCollection( headEntity.getType(), srcRelationName );
-
-        CollectionInfo dstCollection = getDefaultSchema().getCollection( dstEntityRef.getType(), dstRelationName );
-
-        Results results = null;
-        do {
-            if ( srcCollection != null ) {
-                results = em.getCollection( headEntity, srcRelationName, null, 5000, Level.REFS, false );
-            }
-            else {
-                results = em.getConnectedEntities( headEntity.getUuid(), srcRelationName, null, Level.REFS );
-            }
-
-            if ( ( results != null ) && ( results.size() > 0 ) ) {
-                List<EntityRef> refs = results.getRefs();
-                for ( EntityRef ref : refs ) {
-                    if ( dstCollection != null ) {
-                        em.addToCollection( dstEntityRef, dstRelationName, ref );
-                    }
-                    else {
-                        em.createConnection( dstEntityRef, dstRelationName, ref );
-                    }
-                }
-            }
-        }
-        while ( ( results != null ) && ( results.hasMoreResults() ) );
-    }
-
-
-    @Override
-    @Metered(group = "core", name = "RelationManager_searchCollection")
-    public Results searchCollection( String collectionName, Query query ) throws Exception {
-
-        if ( query == null ) {
-            query = new Query();
-        }
-
-        headEntity = em.validate( headEntity );
-
-        CollectionInfo collection = getDefaultSchema().getCollection( headEntity.getType(), collectionName );
-
-        query.setEntityType( collection.getType() );
-
-        final CollectionResultsLoaderFactory factory = new CollectionResultsLoaderFactory();
-
-        // we have something to search with, visit our tree and evaluate the
-        // results
-        QueryProcessor qp = new QueryProcessor( query, collection, em, factory );
-        SearchCollectionVisitor visitor = new SearchCollectionVisitor( qp );
-
-        return qp.getResults( visitor );
-    }
-
-
-    @Override
-    @Metered(group = "core", name = "RelationManager_createConnection_connection_ref")
-    public ConnectionRef createConnection( ConnectionRef connection ) throws Exception {
-        ConnectionRefImpl connectionImpl = new ConnectionRefImpl( connection );
-
-        updateEntityConnection( false, connectionImpl );
-
-        return connection;
-    }
-
-
-    @Override
-    @Metered(group = "core", name = "RelationManager_createConnection_connectionType")
-    public ConnectionRef createConnection( String connectionType, EntityRef connectedEntityRef ) throws Exception {
-
-        headEntity = em.validate( headEntity );
-        connectedEntityRef = em.validate( connectedEntityRef );
-
-        ConnectionRefImpl connection = new ConnectionRefImpl( headEntity, connectionType, connectedEntityRef );
-
-        updateEntityConnection( false, connection );
-
-        return connection;
-    }
-
-
-    @Override
-    @Metered(group = "core", name = "RelationManager_createConnection_paired_connection_type")
-    public ConnectionRef createConnection( String pairedConnectionType, EntityRef pairedEntity, String connectionType,
-                                           EntityRef connectedEntityRef ) throws Exception {
-
-        ConnectionRefImpl connection =
-                new ConnectionRefImpl( headEntity, new ConnectedEntityRefImpl( pairedConnectionType, pairedEntity ),
-                        new ConnectedEntityRefImpl( connectionType, connectedEntityRef ) );
-
-        updateEntityConnection( false, connection );
-
-        return connection;
-    }
-
-
-    @Override
-    @Metered(group = "core", name = "RelationManager_createConnection_connected_entity_ref")
-    public ConnectionRef createConnection( ConnectedEntityRef... connections ) throws Exception {
-
-        ConnectionRefImpl connection = new ConnectionRefImpl( headEntity, connections );
-
-        updateEntityConnection( false, connection );
-
-        return connection;
-    }
-
-
-    @Override
-    @Metered(group = "core", name = "RelationManager_connectionRef_type_entity")
-    public ConnectionRef connectionRef( String connectionType, EntityRef connectedEntityRef ) throws Exception {
-
-        ConnectionRef connection = new ConnectionRefImpl( headEntity, connectionType, connectedEntityRef );
-
-        return connection;
-    }
-
-
-    @Override
-    @Metered(group = "core", name = "RelationManager_connectionRef_entity_to_entity")
-    public ConnectionRef connectionRef( String pairedConnectionType, EntityRef pairedEntity, String connectionType,
-                                        EntityRef connectedEntityRef ) throws Exception {
-
-        ConnectionRef connection =
-                new ConnectionRefImpl( headEntity, new ConnectedEntityRefImpl( pairedConnectionType, pairedEntity ),
-                        new ConnectedEntityRefImpl( connectionType, connectedEntityRef ) );
-
-        return connection;
-    }
-
-
-    @Override
-    @Metered(group = "core", name = "RelationManager_connectionRef_connections")
-    public ConnectionRef connectionRef( ConnectedEntityRef... connections ) {
-
-        ConnectionRef connection = new ConnectionRefImpl( headEntity, connections );
-
-        return connection;
-    }
-
-
-    @Override
-    @Metered(group = "core", name = "RelationManager_deleteConnection")
-    public void deleteConnection( ConnectionRef connectionRef ) throws Exception {
-        updateEntityConnection( true, new ConnectionRefImpl( connectionRef ) );
-    }
-
-
-    @Override
-    @Metered(group = "core", name = "RelationManager_getConnectionTypes_entity_id")
-    public Set<String> getConnectionTypes( UUID connectedEntityId ) throws Exception {
-        // Add connection type to connections set
-        //    addInsertToMutator(batch, ENTITY_DICTIONARIES,
-        //        key(connection.getConnectingEntityId(), DICTIONARY_CONNECTED_TYPES),
-        // connection.getConnectionType(), null,
-        //        timestamp);
-        //
-        //    // Add connection type to connections set
-        //    addInsertToMutator(batch, ENTITY_DICTIONARIES,
-        //        key(connection.getConnectedEntityId(), DICTIONARY_CONNECTING_TYPES),
-        // connection.getConnectionType(), null,
-        //        timestamp);
-        //
-        //
-        //    Object key = key(connectedEntityId, DICTIONARY_CONNECTED_TYPES);
-
-        Set<String> connections = cast( em.getDictionaryAsSet( new SimpleEntityRef( connectedEntityId ),
-                Schema.DICTIONARY_CONNECTED_TYPES ) );
-
-        return connections;
-
-        //    Set<String> connection_types = new TreeSet<String>(CASE_INSENSITIVE_ORDER);
-        //
-        //    //TODO T.N. get this from the dictionary
-        //    List<ConnectionRefImpl> connections = getConnections(new ConnectionRefImpl(headEntity,
-        // new ConnectedEntityRefImpl(
-        //        NULL_ID), new ConnectedEntityRefImpl(connectedEntityId)), false);
-        //
-        //    for (ConnectionRefImpl connection : connections) {
-        //      if ((connection.getConnectionType() != null) && (connection.getFirstPairedConnectedEntityId() ==
-        // null)) {
-        //        connection_types.add(connection.getConnectionType());
-        //      }
-        //    }
-        //
-        //    return connection_types;
-    }
-
-
-    // <<<<<<< HEAD
-    @Override
-    public Set<String> getConnectionTypes() throws Exception {
-        return getConnectionTypes( false );
-    }
-
-
-    @Override
-    @Metered(group = "core", name = "RelationManager_getConnectionTypes")
-    public Set<String> getConnectionTypes( boolean filterConnection ) throws Exception {
-        Set<String> connections = cast( em.getDictionaryAsSet( headEntity, Schema.DICTIONARY_CONNECTED_TYPES ) );
-        if ( connections == null ) {
-            return null;
-        }
-        if ( filterConnection && ( connections.size() > 0 ) ) {
-            connections.remove( "connection" );
-        }
-        return connections;
-    }
-
-
-    @Override
-    @Metered(group = "core", name = "RelationManager_getConnectedEntities")
-    public Results getConnectedEntities( String connectionType, String connectedEntityType, Results.Level resultsLevel )
-            throws Exception {
-
-
-        return getConnectedEntities( headEntity, connectionTy

<TRUNCATED>

[62/96] [abbrv] USERGRID-2 package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/entities/class-use/Activity.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/entities/class-use/Activity.html b/sdks/android/doc/org/usergrid/android/client/entities/class-use/Activity.html
index f17e98e..ae2ea24 100644
--- a/sdks/android/doc/org/usergrid/android/client/entities/class-use/Activity.html
+++ b/sdks/android/doc/org/usergrid/android/client/entities/class-use/Activity.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Class org.usergrid.android.client.entities.Activity
+Uses of Class org.apache.usergrid.android.client.entities.Activity
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Class org.usergrid.android.client.entities.Activity
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Class org.usergrid.android.client.entities.Activity";
+        parent.document.title="Uses of Class org.apache.usergrid.android.client.entities.Activity";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,30 +81,30 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Class<br>org.usergrid.android.client.entities.Activity</B></H2>
+<B>Uses of Class<br>org.apache.usergrid.android.client.entities.Activity</B></H2>
 </CENTER>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Packages that use <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A></FONT></TH>
+Packages that use <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client"><B>org.usergrid.android.client</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client"><B>org.apache.usergrid.android.client</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client.entities"><B>org.usergrid.android.client.entities</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client.entities"><B>org.apache.usergrid.android.client.entities</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A> in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A></FONT></TH>
+Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A> in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -112,22 +112,22 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postGroupActivity(java.lang.String, org.usergrid.android.client.entities.Activity)">postGroupActivity</A></B>(java.lang.String&nbsp;groupId,
-                  <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>&nbsp;activity)</CODE>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postGroupActivity(java.lang.String, org.apache.usergrid.android.client.entities.Activity)">postGroupActivity</A></B>(java.lang.String&nbsp;groupId,
+                  <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>&nbsp;activity)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Posts an activity to a group.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postUserActivity(java.lang.String, org.usergrid.android.client.entities.Activity)">postUserActivity</A></B>(java.lang.String&nbsp;userId,
-                 <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>&nbsp;activity)</CODE>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postUserActivity(java.lang.String, org.apache.usergrid.android.client.entities.Activity)">postUserActivity</A></B>(java.lang.String&nbsp;userId,
+                 <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>&nbsp;activity)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Posts an activity to a user.</TD>
@@ -135,11 +135,11 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client.entities"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client.entities"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A> in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A></FONT></TH>
+Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A> in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -147,17 +147,17 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A> that return <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A> that return <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>static&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A></CODE></FONT></TD>
-<TD><CODE><B>Activity.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html#newActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.entities.User, org.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)">newActivity</A></B>(java.lang.String&nbsp;verb,
+<CODE>static&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A></CODE></FONT></TD>
+<TD><CODE><B>Activity.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html#newActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.entities.User, org.apache.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)">newActivity</A></B>(java.lang.String&nbsp;verb,
             java.lang.String&nbsp;title,
             java.lang.String&nbsp;content,
             java.lang.String&nbsp;category,
-            <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>&nbsp;user,
-            <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;object,
+            <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>&nbsp;user,
+            <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;object,
             java.lang.String&nbsp;objectType,
             java.lang.String&nbsp;objectName,
             java.lang.String&nbsp;objectContent)</CODE>
@@ -182,7 +182,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/entities/class-use/Device.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/entities/class-use/Device.html b/sdks/android/doc/org/usergrid/android/client/entities/class-use/Device.html
index fa51d01..a843d78 100644
--- a/sdks/android/doc/org/usergrid/android/client/entities/class-use/Device.html
+++ b/sdks/android/doc/org/usergrid/android/client/entities/class-use/Device.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Class org.usergrid.android.client.entities.Device
+Uses of Class org.apache.usergrid.android.client.entities.Device
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Class org.usergrid.android.client.entities.Device
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Class org.usergrid.android.client.entities.Device";
+        parent.document.title="Uses of Class org.apache.usergrid.android.client.entities.Device";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,30 +81,30 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Class<br>org.usergrid.android.client.entities.Device</B></H2>
+<B>Uses of Class<br>org.apache.usergrid.android.client.entities.Device</B></H2>
 </CENTER>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Packages that use <A HREF="../../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities">Device</A></FONT></TH>
+Packages that use <A HREF="../../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities">Device</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client"><B>org.usergrid.android.client</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client"><B>org.apache.usergrid.android.client</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client.callbacks"><B>org.usergrid.android.client.callbacks</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client.callbacks"><B>org.apache.usergrid.android.client.callbacks</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities">Device</A> in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A></FONT></TH>
+Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities">Device</A> in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -112,11 +112,11 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Device.h
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A> that return <A HREF="../../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities">Device</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A> that return <A HREF="../../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities">Device</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities">Device</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities">Device</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#registerDevice(android.content.Context, java.util.Map)">registerDevice</A></B>(android.content.Context&nbsp;context,
                java.util.Map&lt;java.lang.String,java.lang.Object&gt;&nbsp;properties)</CODE>
 
@@ -126,11 +126,11 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Device.h
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client.callbacks"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client.callbacks"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities">Device</A> in <A HREF="../../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.usergrid.android.client.callbacks</A></FONT></TH>
+Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities">Device</A> in <A HREF="../../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.apache.usergrid.android.client.callbacks</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -138,12 +138,12 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Device.h
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.usergrid.android.client.callbacks</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities">Device</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.apache.usergrid.android.client.callbacks</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities">Device</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>DeviceRegistrationCallback.</B><B><A HREF="../../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html#onDeviceRegistration(org.usergrid.android.client.entities.Device)">onDeviceRegistration</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities">Device</A>&nbsp;device)</CODE>
+<TD><CODE><B>DeviceRegistrationCallback.</B><B><A HREF="../../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html#onDeviceRegistration(org.apache.usergrid.android.client.entities.Device)">onDeviceRegistration</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities">Device</A>&nbsp;device)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -165,7 +165,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Device.h
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/entities/class-use/Entity.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/entities/class-use/Entity.html b/sdks/android/doc/org/usergrid/android/client/entities/class-use/Entity.html
index a32c317..7670b4b 100644
--- a/sdks/android/doc/org/usergrid/android/client/entities/class-use/Entity.html
+++ b/sdks/android/doc/org/usergrid/android/client/entities/class-use/Entity.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Class org.usergrid.android.client.entities.Entity
+Uses of Class org.apache.usergrid.android.client.entities.Entity
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Class org.usergrid.android.client.entities.Entity
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Class org.usergrid.android.client.entities.Entity";
+        parent.document.title="Uses of Class org.apache.usergrid.android.client.entities.Entity";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,34 +81,34 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Class<br>org.usergrid.android.client.entities.Entity</B></H2>
+<B>Uses of Class<br>org.apache.usergrid.android.client.entities.Entity</B></H2>
 </CENTER>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Packages that use <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></FONT></TH>
+Packages that use <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client"><B>org.usergrid.android.client</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client"><B>org.apache.usergrid.android.client</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client.entities"><B>org.usergrid.android.client.entities</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client.entities"><B>org.apache.usergrid.android.client.entities</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client.response"><B>org.usergrid.android.client.response</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client.response"><B>org.apache.usergrid.android.client.response</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A> in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A></FONT></TH>
+Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A> in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -116,12 +116,12 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.h
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#createEntity(org.usergrid.android.client.entities.Entity)">createEntity</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;entity)</CODE>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#createEntity(org.apache.usergrid.android.client.entities.Entity)">createEntity</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;entity)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a new entity on the server.</TD>
@@ -129,21 +129,21 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.h
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#createEntityAsync(org.usergrid.android.client.entities.Entity, org.usergrid.android.client.callbacks.ApiResponseCallback)">createEntityAsync</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;entity,
-                  <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#createEntityAsync(org.apache.usergrid.android.client.entities.Entity, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">createEntityAsync</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;entity,
+                  <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a new entity on the server.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postGroupActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.entities.User, org.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)">postGroupActivity</A></B>(java.lang.String&nbsp;verb,
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postGroupActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.entities.User, org.apache.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)">postGroupActivity</A></B>(java.lang.String&nbsp;verb,
                   java.lang.String&nbsp;title,
                   java.lang.String&nbsp;content,
                   java.lang.String&nbsp;category,
-                  <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>&nbsp;user,
-                  <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;object,
+                  <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>&nbsp;user,
+                  <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;object,
                   java.lang.String&nbsp;objectType,
                   java.lang.String&nbsp;objectName,
                   java.lang.String&nbsp;objectContent)</CODE>
@@ -154,29 +154,29 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.h
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postGroupActivityAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.entities.User, org.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">postGroupActivityAsync</A></B>(java.lang.String&nbsp;verb,
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postGroupActivityAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.entities.User, org.apache.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">postGroupActivityAsync</A></B>(java.lang.String&nbsp;verb,
                        java.lang.String&nbsp;title,
                        java.lang.String&nbsp;content,
                        java.lang.String&nbsp;category,
-                       <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>&nbsp;user,
-                       <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;object,
+                       <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>&nbsp;user,
+                       <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;object,
                        java.lang.String&nbsp;objectType,
                        java.lang.String&nbsp;objectName,
                        java.lang.String&nbsp;objectContent,
-                       <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+                       <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates and posts an activity to a group.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postUserActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.entities.User, org.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)">postUserActivity</A></B>(java.lang.String&nbsp;verb,
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postUserActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.entities.User, org.apache.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)">postUserActivity</A></B>(java.lang.String&nbsp;verb,
                  java.lang.String&nbsp;title,
                  java.lang.String&nbsp;content,
                  java.lang.String&nbsp;category,
-                 <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>&nbsp;user,
-                 <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;object,
+                 <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>&nbsp;user,
+                 <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;object,
                  java.lang.String&nbsp;objectType,
                  java.lang.String&nbsp;objectName,
                  java.lang.String&nbsp;objectContent)</CODE>
@@ -187,16 +187,16 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.h
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postUserActivityAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.entities.User, org.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">postUserActivityAsync</A></B>(java.lang.String&nbsp;verb,
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postUserActivityAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.entities.User, org.apache.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">postUserActivityAsync</A></B>(java.lang.String&nbsp;verb,
                       java.lang.String&nbsp;title,
                       java.lang.String&nbsp;content,
                       java.lang.String&nbsp;category,
-                      <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>&nbsp;user,
-                      <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;object,
+                      <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>&nbsp;user,
+                      <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;object,
                       java.lang.String&nbsp;objectType,
                       java.lang.String&nbsp;objectName,
                       java.lang.String&nbsp;objectContent,
-                      <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+                      <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates and posts an activity to a user.</TD>
@@ -204,11 +204,11 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.h
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client.entities"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client.entities"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A> in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A></FONT></TH>
+Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A> in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -216,12 +216,12 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.h
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Subclasses of <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A> in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Subclasses of <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A> in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;class</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A></B></CODE>
+<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A></B></CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;An entity type for representing activity stream actions.</TD>
@@ -229,7 +229,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.h
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;class</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities">Device</A></B></CODE>
+<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities">Device</A></B></CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -237,7 +237,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.h
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;class</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A></B></CODE>
+<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A></B></CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -245,7 +245,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.h
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;class</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A></B></CODE>
+<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A></B></CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -253,7 +253,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.h
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;class</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A></B></CODE>
+<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A></B></CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -264,11 +264,11 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.h
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Fields in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A> with type parameters of type <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Fields in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A> with type parameters of type <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>static&nbsp;java.util.Map&lt;java.lang.String,java.lang.Class&lt;? extends <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt;&gt;</CODE></FONT></TD>
+<CODE>static&nbsp;java.util.Map&lt;java.lang.String,java.lang.Class&lt;? extends <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt;&gt;</CODE></FONT></TD>
 <TD><CODE><B>Entity.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html#CLASS_FOR_ENTITY_TYPE">CLASS_FOR_ENTITY_TYPE</A></B></CODE>
 
 <BR>
@@ -280,7 +280,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.h
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A> with type parameters of type <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A> with type parameters of type <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
@@ -288,7 +288,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.h
 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
 <TR ALIGN="right" VALIGN="">
 <TD NOWRAP><FONT SIZE="-1">
-<CODE>&lt;T extends <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt; 
+<CODE>&lt;T extends <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt; 
 <BR>
 T</CODE></FONT></TD>
 </TR>
@@ -305,13 +305,13 @@ T</CODE></FONT></TD>
 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
 <TR ALIGN="right" VALIGN="">
 <TD NOWRAP><FONT SIZE="-1">
-<CODE>&lt;T extends <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt; 
+<CODE>&lt;T extends <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt; 
 <BR>
 T</CODE></FONT></TD>
 </TR>
 </TABLE>
 </CODE></FONT></TD>
-<TD><CODE><B>Entity.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html#toType(org.usergrid.android.client.entities.Entity, java.lang.Class)">toType</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;entity,
+<TD><CODE><B>Entity.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html#toType(org.apache.usergrid.android.client.entities.Entity, java.lang.Class)">toType</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;entity,
        java.lang.Class&lt;T&gt;&nbsp;t)</CODE>
 
 <BR>
@@ -323,13 +323,13 @@ T</CODE></FONT></TD>
 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
 <TR ALIGN="right" VALIGN="">
 <TD NOWRAP><FONT SIZE="-1">
-<CODE>&lt;T extends <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt; 
+<CODE>&lt;T extends <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt; 
 <BR>
 java.util.List&lt;T&gt;</CODE></FONT></TD>
 </TR>
 </TABLE>
 </CODE></FONT></TD>
-<TD><CODE><B>Entity.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html#toType(java.util.List, java.lang.Class)">toType</A></B>(java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt;&nbsp;entities,
+<TD><CODE><B>Entity.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html#toType(java.util.List, java.lang.Class)">toType</A></B>(java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt;&nbsp;entities,
        java.lang.Class&lt;T&gt;&nbsp;t)</CODE>
 
 <BR>
@@ -341,17 +341,17 @@ java.util.List&lt;T&gt;</CODE></FONT></TD>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>static&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A></CODE></FONT></TD>
-<TD><CODE><B>Activity.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html#newActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.entities.User, org.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)">newActivity</A></B>(java.lang.String&nbsp;verb,
+<CODE>static&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A></CODE></FONT></TD>
+<TD><CODE><B>Activity.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html#newActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.entities.User, org.apache.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)">newActivity</A></B>(java.lang.String&nbsp;verb,
             java.lang.String&nbsp;title,
             java.lang.String&nbsp;content,
             java.lang.String&nbsp;category,
-            <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>&nbsp;user,
-            <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;object,
+            <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>&nbsp;user,
+            <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;object,
             java.lang.String&nbsp;objectType,
             java.lang.String&nbsp;objectName,
             java.lang.String&nbsp;objectContent)</CODE>
@@ -365,13 +365,13 @@ java.util.List&lt;T&gt;</CODE></FONT></TD>
 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
 <TR ALIGN="right" VALIGN="">
 <TD NOWRAP><FONT SIZE="-1">
-<CODE>&lt;T extends <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt; 
+<CODE>&lt;T extends <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt; 
 <BR>
 T</CODE></FONT></TD>
 </TR>
 </TABLE>
 </CODE></FONT></TD>
-<TD><CODE><B>Entity.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html#toType(org.usergrid.android.client.entities.Entity, java.lang.Class)">toType</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;entity,
+<TD><CODE><B>Entity.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html#toType(org.apache.usergrid.android.client.entities.Entity, java.lang.Class)">toType</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;entity,
        java.lang.Class&lt;T&gt;&nbsp;t)</CODE>
 
 <BR>
@@ -383,7 +383,7 @@ T</CODE></FONT></TD>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Method parameters in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A> with type arguments of type <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Method parameters in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A> with type arguments of type <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
@@ -391,13 +391,13 @@ T</CODE></FONT></TD>
 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
 <TR ALIGN="right" VALIGN="">
 <TD NOWRAP><FONT SIZE="-1">
-<CODE>&lt;T extends <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt; 
+<CODE>&lt;T extends <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt; 
 <BR>
 java.util.List&lt;T&gt;</CODE></FONT></TD>
 </TR>
 </TABLE>
 </CODE></FONT></TD>
-<TD><CODE><B>Entity.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html#toType(java.util.List, java.lang.Class)">toType</A></B>(java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt;&nbsp;entities,
+<TD><CODE><B>Entity.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html#toType(java.util.List, java.lang.Class)">toType</A></B>(java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt;&nbsp;entities,
        java.lang.Class&lt;T&gt;&nbsp;t)</CODE>
 
 <BR>
@@ -409,34 +409,34 @@ java.util.List&lt;T&gt;</CODE></FONT></TD>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Constructors in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Constructors in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html#Activity(org.usergrid.android.client.entities.Entity)">Activity</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;entity)</CODE>
+<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html#Activity(org.apache.usergrid.android.client.entities.Entity)">Activity</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;entity)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/entities/Device.html#Device(org.usergrid.android.client.entities.Entity)">Device</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;entity)</CODE>
+<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/entities/Device.html#Device(org.apache.usergrid.android.client.entities.Entity)">Device</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;entity)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/entities/Group.html#Group(org.usergrid.android.client.entities.Entity)">Group</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;entity)</CODE>
+<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/entities/Group.html#Group(org.apache.usergrid.android.client.entities.Entity)">Group</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;entity)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/entities/Message.html#Message(org.usergrid.android.client.entities.Entity)">Message</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;entity)</CODE>
+<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/entities/Message.html#Message(org.apache.usergrid.android.client.entities.Entity)">Message</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;entity)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/entities/User.html#User(org.usergrid.android.client.entities.Entity)">User</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;entity)</CODE>
+<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/entities/User.html#User(org.apache.usergrid.android.client.entities.Entity)">User</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;entity)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -444,11 +444,11 @@ java.util.List&lt;T&gt;</CODE></FONT></TD>
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client.response"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client.response"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A> in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A></FONT></TH>
+Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A> in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -456,7 +456,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.h
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A> with type parameters of type <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A> with type parameters of type <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
@@ -464,7 +464,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.h
 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
 <TR ALIGN="right" VALIGN="">
 <TD NOWRAP><FONT SIZE="-1">
-<CODE>&lt;T extends <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt; 
+<CODE>&lt;T extends <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt; 
 <BR>
 java.util.List&lt;T&gt;</CODE></FONT></TD>
 </TR>
@@ -481,7 +481,7 @@ java.util.List&lt;T&gt;</CODE></FONT></TD>
 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
 <TR ALIGN="right" VALIGN="">
 <TD NOWRAP><FONT SIZE="-1">
-<CODE>&lt;T extends <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt; 
+<CODE>&lt;T extends <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt; 
 <BR>
 T</CODE></FONT></TD>
 </TR>
@@ -498,7 +498,7 @@ T</CODE></FONT></TD>
 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
 <TR ALIGN="right" VALIGN="">
 <TD NOWRAP><FONT SIZE="-1">
-<CODE>&lt;T extends <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt; 
+<CODE>&lt;T extends <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt; 
 <BR>
 T</CODE></FONT></TD>
 </TR>
@@ -515,11 +515,11 @@ T</CODE></FONT></TD>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A> that return <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A> that return <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></CODE></FONT></TD>
 <TD><CODE><B>ApiResponse.</B><B><A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html#getFirstEntity()">getFirstEntity</A></B>()</CODE>
 
 <BR>
@@ -527,7 +527,7 @@ T</CODE></FONT></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></CODE></FONT></TD>
 <TD><CODE><B>ApiResponse.</B><B><A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html#getLastEntity()">getLastEntity</A></B>()</CODE>
 
 <BR>
@@ -535,7 +535,7 @@ T</CODE></FONT></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></CODE></FONT></TD>
 <TD><CODE><B>ApiResponse.</B><B><A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html#getLastMessage()">getLastMessage</A></B>()</CODE>
 
 <BR>
@@ -547,11 +547,11 @@ T</CODE></FONT></TD>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A> that return types with arguments of type <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A> that return types with arguments of type <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt;</CODE></FONT></TD>
+<CODE>&nbsp;java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt;</CODE></FONT></TD>
 <TD><CODE><B>ApiResponse.</B><B><A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html#getEntities()">getEntities</A></B>()</CODE>
 
 <BR>
@@ -563,12 +563,12 @@ T</CODE></FONT></TD>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Method parameters in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A> with type arguments of type <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Method parameters in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A> with type arguments of type <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>ApiResponse.</B><B><A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html#setEntities(java.util.List)">setEntities</A></B>(java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt;&nbsp;entities)</CODE>
+<TD><CODE><B>ApiResponse.</B><B><A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html#setEntities(java.util.List)">setEntities</A></B>(java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt;&nbsp;entities)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -590,7 +590,7 @@ T</CODE></FONT></TD>
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/entities/class-use/Group.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/entities/class-use/Group.html b/sdks/android/doc/org/usergrid/android/client/entities/class-use/Group.html
index 71ca921..d1217a1 100644
--- a/sdks/android/doc/org/usergrid/android/client/entities/class-use/Group.html
+++ b/sdks/android/doc/org/usergrid/android/client/entities/class-use/Group.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Class org.usergrid.android.client.entities.Group
+Uses of Class org.apache.usergrid.android.client.entities.Group
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Class org.usergrid.android.client.entities.Group
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Class org.usergrid.android.client.entities.Group";
+        parent.document.title="Uses of Class org.apache.usergrid.android.client.entities.Group";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,30 +81,30 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Class<br>org.usergrid.android.client.entities.Group</B></H2>
+<B>Uses of Class<br>org.apache.usergrid.android.client.entities.Group</B></H2>
 </CENTER>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Packages that use <A HREF="../../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A></FONT></TH>
+Packages that use <A HREF="../../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client"><B>org.usergrid.android.client</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client"><B>org.apache.usergrid.android.client</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client.callbacks"><B>org.usergrid.android.client.callbacks</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client.callbacks"><B>org.apache.usergrid.android.client.callbacks</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A> in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A></FONT></TH>
+Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A> in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -112,11 +112,11 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Group.ht
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A> that return types with arguments of type <A HREF="../../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A> that return types with arguments of type <A HREF="../../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;java.util.Map&lt;java.lang.String,<A HREF="../../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A>&gt;</CODE></FONT></TD>
+<CODE>&nbsp;java.util.Map&lt;java.lang.String,<A HREF="../../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A>&gt;</CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#getGroupsForUser(java.lang.String)">getGroupsForUser</A></B>(java.lang.String&nbsp;userId)</CODE>
 
 <BR>
@@ -125,11 +125,11 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Group.ht
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client.callbacks"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client.callbacks"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A> in <A HREF="../../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.usergrid.android.client.callbacks</A></FONT></TH>
+Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A> in <A HREF="../../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.apache.usergrid.android.client.callbacks</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -137,12 +137,12 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Group.ht
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Method parameters in <A HREF="../../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.usergrid.android.client.callbacks</A> with type arguments of type <A HREF="../../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Method parameters in <A HREF="../../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.apache.usergrid.android.client.callbacks</A> with type arguments of type <A HREF="../../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>GroupsRetrievedCallback.</B><B><A HREF="../../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html#onGroupsRetrieved(java.util.Map)">onGroupsRetrieved</A></B>(java.util.Map&lt;java.lang.String,<A HREF="../../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A>&gt;&nbsp;groups)</CODE>
+<TD><CODE><B>GroupsRetrievedCallback.</B><B><A HREF="../../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html#onGroupsRetrieved(java.util.Map)">onGroupsRetrieved</A></B>(java.util.Map&lt;java.lang.String,<A HREF="../../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A>&gt;&nbsp;groups)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -164,7 +164,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Group.ht
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>


[29/96] [abbrv] [partial] Change package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/QueryVisitor.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/QueryVisitor.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/QueryVisitor.java
new file mode 100644
index 0000000..63d549b
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/QueryVisitor.java
@@ -0,0 +1,90 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.query.tree;
+
+
+import org.apache.usergrid.persistence.exceptions.NoFullTextIndexException;
+import org.apache.usergrid.persistence.exceptions.NoIndexException;
+import org.apache.usergrid.persistence.exceptions.PersistenceException;
+
+
+/**
+ * Interface for visiting nodes in our AST as we produce
+ *
+ * @author tnine
+ */
+public interface QueryVisitor {
+
+    /**
+     *
+     * @param op
+     * @throws PersistenceException
+     */
+    public void visit( AndOperand op ) throws PersistenceException;
+
+    /**
+     * @param op
+     * @throws PersistenceException
+     */
+    public void visit( OrOperand op ) throws PersistenceException;
+
+    /**
+     * @param op
+     * @throws PersistenceException
+     */
+    public void visit( NotOperand op ) throws PersistenceException;
+
+    /**
+     * @param op
+     * @throws NoIndexException
+     */
+    public void visit( LessThan op ) throws NoIndexException;
+
+    /**
+     * @param op
+     * @throws NoFullTextIndexException
+     */
+    public void visit( ContainsOperand op ) throws NoFullTextIndexException;
+
+    /**
+     * @param op
+     */
+    public void visit( WithinOperand op );
+
+    /**
+     * @param op
+     * @throws NoIndexException
+     */
+    public void visit( LessThanEqual op ) throws NoIndexException;
+
+    /**
+     * @param op
+     * @throws NoIndexException
+     */
+    public void visit( Equal op ) throws NoIndexException;
+
+    /**
+     * @param op
+     * @throws NoIndexException
+     */
+    public void visit( GreaterThan op ) throws NoIndexException;
+
+    /**
+     * @param op
+     * @throws NoIndexException
+     */
+    public void visit( GreaterThanEqual op ) throws NoIndexException;
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/StringLiteral.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/StringLiteral.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/StringLiteral.java
new file mode 100644
index 0000000..a7ada85
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/StringLiteral.java
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.query.tree;
+
+
+import org.antlr.runtime.ClassicToken;
+import org.antlr.runtime.Token;
+
+import static org.apache.commons.lang.StringUtils.removeEnd;
+
+
+/** @author tnine */
+public class StringLiteral extends Literal<String> {
+
+    private String value;
+    private String finishValue;
+
+
+    /**
+     * @param t
+     */
+    public StringLiteral( Token t ) {
+        super( t );
+        String newValue = t.getText();
+        newValue = newValue.substring( 1, newValue.length() - 1 );
+
+        parseValue( newValue );
+    }
+
+
+    public StringLiteral( String value ) {
+        super( new ClassicToken( 0, value ) );
+        parseValue( value );
+    }
+
+
+    /** Parse the value and set the optional end value */
+    private void parseValue( String value ) {
+
+        this.value = value.trim().toLowerCase();
+
+        if ( "*".equals( value ) ) {
+            this.value = null;
+            this.finishValue = null;
+            return;
+        }
+
+        if ( value != null && value.endsWith( "*" ) ) {
+            this.value = removeEnd( value.toString(), "*" );
+
+            finishValue = this.value + "\uFFFF";
+        }
+        // set the end value to the same as the start value
+        else {
+            finishValue = value;
+        }
+    }
+
+
+    /** If this were a string literal */
+    public String getEndValue() {
+        return this.finishValue;
+    }
+
+
+    public String getValue() {
+        return this.value;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/UUIDLiteral.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/UUIDLiteral.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/UUIDLiteral.java
new file mode 100644
index 0000000..5c6c90d
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/UUIDLiteral.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.query.tree;
+
+
+import java.util.UUID;
+
+import org.antlr.runtime.ClassicToken;
+import org.antlr.runtime.Token;
+
+
+/** @author tnine */
+public class UUIDLiteral extends Literal<UUID> {
+
+    private UUID value;
+
+
+    /**
+     * @param t
+     */
+    public UUIDLiteral( Token t ) {
+        super( t );
+        value = UUID.fromString( t.getText() );
+    }
+
+
+    public UUIDLiteral( UUID value ) {
+        super( new ClassicToken( 0, String.valueOf( value ) ) );
+        this.value = value;
+    }
+
+
+    public UUID getValue() {
+        return this.value;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/WithinOperand.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/WithinOperand.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/WithinOperand.java
new file mode 100644
index 0000000..1891c25
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/WithinOperand.java
@@ -0,0 +1,111 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.query.tree;
+
+
+import org.antlr.runtime.Token;
+
+
+/** @author tnine */
+public class WithinOperand extends Operand {
+
+    /**
+     * @param property
+     * @param literal
+     */
+    public WithinOperand( Token t ) {
+        super( t );
+    }
+
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.usergrid.persistence.query.tree.Operand#visit(org.apache.usergrid.persistence
+     * .query.tree.QueryVisitor)
+     */
+    @Override
+    public void visit( QueryVisitor visitor ) {
+        visitor.visit( this );
+    }
+
+
+    /**
+     * @param propName
+     */
+    public void setProperty( String propName ) {
+        setChild( 0, new WithinProperty( propName ) );
+    }
+
+
+    /**
+     * @param distance
+     */
+    public void setDistance( float distance ) {
+        setChild( 1, new FloatLiteral( distance ) );
+    }
+
+
+    /**
+     * @param lattitude
+     */
+    public void setLattitude( float lattitude ) {
+        setChild( 2, new FloatLiteral( lattitude ) );
+    }
+
+
+    /**
+     * @param longitude
+     */
+    public void setLongitude( float longitude ) {
+        setChild( 3, new FloatLiteral( longitude ) );
+    }
+
+
+    /**
+     *
+     * @return
+     */
+    public WithinProperty getProperty() {
+        return ( WithinProperty ) this.children.get( 0 );
+    }
+
+
+    /**
+     *
+     * @return
+     */
+    public NumericLiteral getDistance() {
+        return ( NumericLiteral ) this.children.get( 1 );
+    }
+
+
+    /**
+     * @return
+     */
+    public NumericLiteral getLattitude() {
+        return ( NumericLiteral ) this.children.get( 2 );
+    }
+
+
+    /**
+     * @return
+     */
+    public NumericLiteral getLongitude() {
+        return ( NumericLiteral ) this.children.get( 3 );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/WithinProperty.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/WithinProperty.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/WithinProperty.java
new file mode 100644
index 0000000..7a340ab
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/WithinProperty.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.query.tree;
+
+
+import org.antlr.runtime.ClassicToken;
+import org.antlr.runtime.Token;
+
+
+/**
+ * A property
+ *
+ * @author tnine
+ */
+public class WithinProperty extends Property {
+
+    private String indexedName = null;
+
+
+    public WithinProperty( Token t ) {
+        super( t );
+        this.indexedName = String.format( "%s.coordinates", super.getValue() );
+    }
+
+
+    public WithinProperty( String property ) {
+        this( new ClassicToken( 0, property ) );
+    }
+
+
+    /** Get the */
+    public String getIndexedName() {
+        return this.indexedName;
+    }
+
+
+    /** @return the property */
+    public WithinProperty getProperty() {
+        return ( WithinProperty ) this.children.get( 0 );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/schema/CollectionInfo.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/schema/CollectionInfo.java b/stack/core/src/main/java/org/apache/usergrid/persistence/schema/CollectionInfo.java
new file mode 100644
index 0000000..7abcbd7
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/schema/CollectionInfo.java
@@ -0,0 +1,207 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.schema;
+
+
+import java.util.Arrays;
+import java.util.LinkedHashSet;
+import java.util.Set;
+import java.util.TreeSet;
+
+import org.apache.usergrid.persistence.Schema;
+import org.apache.usergrid.persistence.annotations.EntityCollection;
+
+
+public class CollectionInfo {
+
+    private String name;
+    private EntityInfo container;
+
+    private boolean indexingDynamicDictionaries;
+    private String linkedCollection;
+    private Set<String> propertiesIndexed = null;
+    private boolean publicVisible = true;
+    private final Set<String> dictionariesIndexed = new TreeSet<String>( String.CASE_INSENSITIVE_ORDER );
+    private String type;
+    private boolean reversed;
+    private boolean includedInExport = true;
+    private String sort;
+
+
+    public CollectionInfo() {
+    }
+
+
+    public CollectionInfo( EntityCollection collectionAnnotation ) {
+        setIndexingDynamicDictionaries( collectionAnnotation.indexingDynamicDictionaries() );
+        setLinkedCollection( collectionAnnotation.linkedCollection() );
+        setPublic( collectionAnnotation.publicVisible() );
+        setDictionariesIndexed(
+                new LinkedHashSet<String>( Arrays.asList( collectionAnnotation.dictionariesIndexed() ) ) );
+        setType( collectionAnnotation.type() );
+        setReversed( collectionAnnotation.reversed() );
+        setIncludedInExport( collectionAnnotation.includedInExport() );
+        setSort( collectionAnnotation.sort() );
+    }
+
+
+    public String getType() {
+        return type;
+    }
+
+
+    public void setType( String type ) {
+        if ( "".equals( type ) ) {
+            type = null;
+        }
+        this.type = type;
+    }
+
+
+    public boolean isPropertyIndexed( String propertyName ) {
+        return getPropertiesIndexed().contains( propertyName );
+    }
+
+
+    public boolean hasIndexedProperties() {
+        return !getPropertiesIndexed().isEmpty();
+    }
+
+
+    public Set<String> getPropertiesIndexed() {
+        if ( propertiesIndexed != null ) {
+            return propertiesIndexed;
+        }
+        return Schema.getDefaultSchema().getEntityInfo( getType() ).getIndexedProperties();
+    }
+
+
+    public void setPropertiesIndexed( Set<String> propertiesIndexed ) {
+        this.propertiesIndexed = new TreeSet<String>( String.CASE_INSENSITIVE_ORDER );
+        this.propertiesIndexed.addAll( propertiesIndexed );
+    }
+
+
+    public boolean isDictionaryIndexed( String propertyName ) {
+        return dictionariesIndexed.contains( propertyName );
+    }
+
+
+    public Set<String> getDictionariesIndexed() {
+        return dictionariesIndexed;
+    }
+
+
+    public void setDictionariesIndexed( Set<String> dictionariesIndexed ) {
+        dictionariesIndexed = new TreeSet<String>( String.CASE_INSENSITIVE_ORDER );
+        dictionariesIndexed.addAll( dictionariesIndexed );
+    }
+
+
+    public boolean isIndexingDynamicDictionaries() {
+        return indexingDynamicDictionaries;
+    }
+
+
+    public void setIndexingDynamicDictionaries( boolean indexingDynamicDictionaries ) {
+        this.indexingDynamicDictionaries = indexingDynamicDictionaries;
+    }
+
+
+    public String getLinkedCollection() {
+        return linkedCollection;
+    }
+
+
+    public void setLinkedCollection( String linkedCollection ) {
+        if ( "".equals( linkedCollection ) ) {
+            linkedCollection = null;
+        }
+        this.linkedCollection = linkedCollection;
+    }
+
+
+    public String getName() {
+        return name;
+    }
+
+
+    public void setName( String name ) {
+        this.name = name;
+    }
+
+
+    public EntityInfo getContainer() {
+        return container;
+    }
+
+
+    public void setContainer( EntityInfo entityInfo ) {
+        container = entityInfo;
+    }
+
+
+    public boolean isPublic() {
+        return publicVisible;
+    }
+
+
+    public void setPublic( boolean publicVisible ) {
+        this.publicVisible = publicVisible;
+    }
+
+
+    public boolean isReversed() {
+        return reversed;
+    }
+
+
+    public void setReversed( boolean reversed ) {
+        this.reversed = reversed;
+    }
+
+
+    public void setIncludedInExport( boolean includedInExport ) {
+        this.includedInExport = includedInExport;
+    }
+
+
+    public boolean isIncludedInExport() {
+        return includedInExport;
+    }
+
+
+    public String getSort() {
+        return sort;
+    }
+
+
+    public void setSort( String sort ) {
+        if ( "".equals( sort ) ) {
+            sort = null;
+        }
+        this.sort = sort;
+    }
+
+
+    @Override
+    public String toString() {
+        return "CollectionInfo [name=" + name + ", indexingDynamicDictionaries=" + indexingDynamicDictionaries
+                + ", linkedCollection=" + linkedCollection + ", propertiesIndexed=" + propertiesIndexed
+                + ", publicVisible=" + publicVisible + ", dictionariesIndexed=" + dictionariesIndexed + ", type=" + type
+                + ", reversed=" + reversed + ", includedInExport=" + includedInExport + ", sort=" + sort + "]";
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/schema/DictionaryInfo.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/schema/DictionaryInfo.java b/stack/core/src/main/java/org/apache/usergrid/persistence/schema/DictionaryInfo.java
new file mode 100644
index 0000000..c839252
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/schema/DictionaryInfo.java
@@ -0,0 +1,117 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.schema;
+
+
+import org.apache.usergrid.persistence.annotations.EntityDictionary;
+
+
+public class DictionaryInfo {
+    private String name;
+    private Class<?> keyType;
+
+    private Class<?> valueType; // = Long.class.getName();
+    private boolean keysIndexedInConnections;
+    private boolean publicVisible = true;
+    private boolean includedInExport = true;
+    ;
+
+
+    public DictionaryInfo() {
+    }
+
+
+    public DictionaryInfo( EntityDictionary setAnnotation ) {
+        setKeyType( setAnnotation.keyType() );
+        setValueType( setAnnotation.valueType() );
+        setKeysIndexedInConnections( setAnnotation.keysIndexedInConnections() );
+        setPublic( setAnnotation.publicVisible() );
+        setIncludedInExport( setAnnotation.includedInExport() );
+    }
+
+
+    public String getName() {
+        return name;
+    }
+
+
+    public void setName( String name ) {
+        this.name = name;
+    }
+
+
+    public Class<?> getKeyType() {
+        return keyType;
+    }
+
+
+    public void setKeyType( Class<?> type ) {
+        if ( type == Object.class ) {
+            type = null;
+        }
+        keyType = type;
+    }
+
+
+    public Class<?> getValueType() {
+        return valueType;
+    }
+
+
+    public void setValueType( Class<?> valueType ) {
+        if ( valueType == Object.class ) {
+            valueType = null;
+        }
+        this.valueType = valueType;
+    }
+
+
+    public boolean isKeysIndexedInConnections() {
+        return keysIndexedInConnections;
+    }
+
+
+    public void setKeysIndexedInConnections( boolean keysIndexedInConnections ) {
+        this.keysIndexedInConnections = keysIndexedInConnections;
+    }
+
+
+    public boolean isPublic() {
+        return publicVisible;
+    }
+
+
+    public void setPublic( boolean publicVisible ) {
+        this.publicVisible = publicVisible;
+    }
+
+
+    public boolean isIncludedInExport() {
+        return includedInExport;
+    }
+
+
+    public void setIncludedInExport( boolean includedInExport ) {
+        this.includedInExport = includedInExport;
+    }
+
+
+    @Override
+    public String toString() {
+        return "Set [name=" + name + ", keyType=" + keyType + ", valueType=" + valueType + ", keysIndexedInConnections="
+                + keysIndexedInConnections + ", publicVisible=" + publicVisible + "]";
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/schema/EntityInfo.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/schema/EntityInfo.java b/stack/core/src/main/java/org/apache/usergrid/persistence/schema/EntityInfo.java
new file mode 100644
index 0000000..ff5cf3b
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/schema/EntityInfo.java
@@ -0,0 +1,299 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.schema;
+
+
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.TreeSet;
+
+import org.apache.usergrid.persistence.Schema;
+
+
+public class EntityInfo {
+
+    private String type;
+
+    private String aliasProperty;
+
+    private Map<String, PropertyInfo> properties = new TreeMap<String, PropertyInfo>( String.CASE_INSENSITIVE_ORDER );
+    private final Set<String> indexed = new TreeSet<String>( String.CASE_INSENSITIVE_ORDER );
+    private final Set<String> basic = new TreeSet<String>( String.CASE_INSENSITIVE_ORDER );
+    private final Set<String> required = new TreeSet<String>( String.CASE_INSENSITIVE_ORDER );
+    private Map<String, DictionaryInfo> dictionaries =
+            new TreeMap<String, DictionaryInfo>( String.CASE_INSENSITIVE_ORDER );
+    private Map<String, CollectionInfo> collections =
+            new TreeMap<String, CollectionInfo>( String.CASE_INSENSITIVE_ORDER );
+    private final Set<String> fulltextIndexed = new TreeSet<String>( String.CASE_INSENSITIVE_ORDER );
+
+    private boolean publicVisible = true;
+
+    private boolean includedInExport = true;
+    ;
+
+
+    public EntityInfo() {
+    }
+
+
+    public String getType() {
+        return type;
+    }
+
+
+    public void setType( String type ) {
+        this.type = type;
+    }
+
+
+    public boolean hasProperty( String propertyName ) {
+        return properties.containsKey( propertyName );
+    }
+
+
+    public PropertyInfo getProperty( String propertyName ) {
+        return properties.get( propertyName );
+    }
+
+
+    public boolean hasProperties() {
+        return !properties.isEmpty();
+    }
+
+
+    public Map<String, PropertyInfo> getProperties() {
+        return properties;
+    }
+
+
+    public void setProperties( Map<String, PropertyInfo> properties ) {
+        this.properties = new TreeMap<String, PropertyInfo>( String.CASE_INSENSITIVE_ORDER );
+        this.properties.putAll( properties );
+        for ( String key : properties.keySet() ) {
+            PropertyInfo property = properties.get( key );
+            property.setName( key );
+
+            if ( property.isIndexed() ) {
+                indexed.add( key );
+            }
+
+            if ( property.isRequired() ) {
+                required.add( key );
+                // logger.info("property " + key + " is required");
+            }
+
+            if ( property.isBasic() ) {
+                basic.add( key );
+            }
+
+
+            if ( property.isFulltextIndexed() ) {
+                fulltextIndexed.add( key );
+            }
+
+            if ( property.isAliasProperty() ) {
+                aliasProperty = property.getName();
+            }
+        }
+    }
+
+
+    public boolean isPropertyMutable( String propertyName ) {
+        PropertyInfo property = properties.get( propertyName );
+        if ( property == null ) {
+            return false;
+        }
+        return property.isMutable();
+    }
+
+
+    /** A property is unique if it has either been declared as unique, or as an alias property */
+    public boolean isPropertyUnique( String propertyName ) {
+        PropertyInfo property = properties.get( propertyName );
+        if ( property == null ) {
+            return false;
+        }
+        return property.isUnique() || property.isAliasProperty();
+    }
+
+
+    public boolean isPropertyTimestamp( String propertyName ) {
+        PropertyInfo property = properties.get( propertyName );
+        if ( property == null ) {
+            return false;
+        }
+        return property.isTimestamp();
+    }
+
+
+    public boolean isPropertyRequired( String propertyName ) {
+        return required.contains( propertyName );
+    }
+
+
+    public Set<String> getIndexedProperties() {
+        return indexed;
+    }
+
+
+    public boolean isPropertyIndexed( String propertyName ) {
+        return indexed.contains( propertyName );
+    }
+
+
+    public boolean isPropertyFulltextIndexed( String propertyName ) {
+        return fulltextIndexed.contains( propertyName );
+    }
+
+
+    public Set<String> getRequiredProperties() {
+        return required;
+    }
+
+
+    public boolean isPropertyBasic( String propertyName ) {
+        return basic.contains( propertyName );
+    }
+
+
+    public Set<String> getBasicProperties() {
+        return basic;
+    }
+
+
+    public boolean hasDictionary( String dictionaryName ) {
+        return dictionaries.containsKey( dictionaryName );
+    }
+
+
+    public DictionaryInfo getDictionary( String dictionaryName ) {
+        return dictionaries.get( dictionaryName );
+    }
+
+
+    public boolean hasDictionaries() {
+        return !dictionaries.isEmpty();
+    }
+
+
+    public Map<String, DictionaryInfo> getDictionaries() {
+        return dictionaries;
+    }
+
+
+    public void setDictionaries( Map<String, DictionaryInfo> dictionaries ) {
+        this.dictionaries = new TreeMap<String, DictionaryInfo>( String.CASE_INSENSITIVE_ORDER );
+        this.dictionaries.putAll( dictionaries );
+        for ( String key : dictionaries.keySet() ) {
+            DictionaryInfo dictionary = dictionaries.get( key );
+            dictionary.setName( key );
+        }
+
+        for ( @SuppressWarnings( "rawtypes" ) Entry<String, Class> dictionaryEntry : Schema.DEFAULT_DICTIONARIES
+                                                                                           .entrySet() ) {
+            String dictionaryName = dictionaryEntry.getKey();
+            if ( !this.dictionaries.containsKey( dictionaryName ) ) {
+                DictionaryInfo dictionary = new DictionaryInfo();
+                dictionary.setName( dictionaryName );
+                dictionary.setKeyType( String.class );
+                dictionary.setValueType( dictionaryEntry.getValue() );
+                this.dictionaries.put( dictionaryName, dictionary );
+            }
+        }
+    }
+
+
+    public boolean hasCollection( String collectionName ) {
+        return collections.containsKey( collectionName );
+    }
+
+
+    public CollectionInfo getCollection( String collectionName ) {
+        return collections.get( collectionName );
+    }
+
+
+    public Map<String, CollectionInfo> getCollections() {
+        return collections;
+    }
+
+
+    public void setCollections( Map<String, CollectionInfo> collections ) {
+        this.collections = new TreeMap<String, CollectionInfo>( String.CASE_INSENSITIVE_ORDER );
+        this.collections.putAll( collections );
+    }
+
+
+    public void mapCollectors( Schema schema, String entityType ) {
+
+        setType( entityType );
+
+        for ( String collectionName : collections.keySet() ) {
+            CollectionInfo collection = collections.get( collectionName );
+            collection.setContainer( this );
+            collection.setName( collectionName );
+            schema.mapCollector( collection.getType(), entityType, collectionName, collection );
+        }
+    }
+
+
+    public String getAliasProperty() {
+        return aliasProperty;
+    }
+
+
+    public void setAliasProperty( String nameProperty ) {
+        aliasProperty = nameProperty;
+    }
+
+
+    public PropertyInfo getAliasPropertyObject() {
+        if ( aliasProperty == null ) {
+            return null;
+        }
+        return getProperty( aliasProperty );
+    }
+
+
+    public boolean isPublic() {
+        return publicVisible;
+    }
+
+
+    public void setPublic( boolean publicVisible ) {
+        this.publicVisible = publicVisible;
+    }
+
+
+    public void setIncludedInExport( boolean includedInExport ) {
+        this.includedInExport = includedInExport;
+    }
+
+
+    public boolean isIncludedInExport() {
+        return includedInExport;
+    }
+
+
+    @Override
+    public String toString() {
+        return "Entity [type=" + type + ", aliasProperty=" + aliasProperty + ", properties=" + properties + ", indexed="
+                + indexed + ", required=" + required + ", sets=" + dictionaries + ", collections=" + collections
+                + ", fulltextIndexed=" + fulltextIndexed + ", publicVisible=" + publicVisible + "]";
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/schema/PropertyInfo.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/schema/PropertyInfo.java b/stack/core/src/main/java/org/apache/usergrid/persistence/schema/PropertyInfo.java
new file mode 100644
index 0000000..de32ebe
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/schema/PropertyInfo.java
@@ -0,0 +1,218 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.schema;
+
+
+import org.apache.usergrid.persistence.annotations.EntityProperty;
+
+
+public class PropertyInfo {
+    private String name;
+    private Class<?> type;
+
+    private boolean aliasProperty;
+    private boolean fulltextIndexed;
+    private boolean indexed = true;
+    private boolean basic = false;
+    private boolean mutable = true;
+    private boolean pathBasedName;
+    private boolean publicVisible = true;
+    private boolean required;
+    private boolean unique;
+    private boolean includedInExport = true;
+    private boolean timestamp = false;
+    private boolean encrypted = false;
+
+
+    public PropertyInfo() {
+    }
+
+
+    public PropertyInfo( EntityProperty propertyAnnotation ) {
+        setName( propertyAnnotation.name() );
+        setAliasProperty( propertyAnnotation.aliasProperty() );
+        setFulltextIndexed( propertyAnnotation.fulltextIndexed() );
+        setIndexed( propertyAnnotation.indexed() );
+        setBasic( propertyAnnotation.basic() );
+        setMutable( propertyAnnotation.mutable() );
+        setPathBasedName( propertyAnnotation.pathBasedName() );
+        setPublic( propertyAnnotation.publicVisible() );
+        setRequired( propertyAnnotation.required() );
+        setUnique( propertyAnnotation.unique() );
+        setIncludedInExport( propertyAnnotation.includedInExport() );
+        setTimestamp( propertyAnnotation.timestamp() );
+        setEncrypted( propertyAnnotation.encrypted() );
+    }
+
+
+    public String getName() {
+        return name;
+    }
+
+
+    public void setName( String name ) {
+        if ( "".equals( name ) ) {
+            name = null;
+        }
+        this.name = name;
+    }
+
+
+    public Class<?> getType() {
+        return type;
+    }
+
+
+    public void setType( Class<?> type ) {
+        if ( type == Object.class ) {
+            type = null;
+        }
+        this.type = type;
+    }
+
+
+    public boolean isIndexed() {
+        return indexed;
+    }
+
+
+    public void setIndexed( boolean indexed ) {
+        this.indexed = indexed;
+    }
+
+
+    public boolean isBasic() {
+        return basic;
+    }
+
+
+    public void setBasic( boolean basic ) {
+        this.basic = basic;
+    }
+
+
+    public boolean isRequired() {
+        return required;
+    }
+
+
+    public void setRequired( boolean required ) {
+        this.required = required;
+    }
+
+
+    public boolean isMutable() {
+        return mutable;
+    }
+
+
+    public void setMutable( boolean mutable ) {
+        this.mutable = mutable;
+    }
+
+
+    public boolean isUnique() {
+        return unique;
+    }
+
+
+    public void setUnique( boolean unique ) {
+        this.unique = unique;
+    }
+
+
+    public boolean isAliasProperty() {
+        return aliasProperty;
+    }
+
+
+    public void setAliasProperty( boolean aliasProperty ) {
+        this.aliasProperty = aliasProperty;
+        if ( aliasProperty ) {
+            mutable = false;
+        }
+    }
+
+
+    public boolean isPathBasedName() {
+        return pathBasedName;
+    }
+
+
+    public void setPathBasedName( boolean pathBasedName ) {
+        this.pathBasedName = pathBasedName;
+    }
+
+
+    public boolean isFulltextIndexed() {
+        return fulltextIndexed;
+    }
+
+
+    public void setFulltextIndexed( boolean fulltextIndexed ) {
+        this.fulltextIndexed = fulltextIndexed;
+    }
+
+
+    public boolean isPublic() {
+        return publicVisible;
+    }
+
+
+    public void setPublic( boolean publicVisible ) {
+        this.publicVisible = publicVisible;
+    }
+
+
+    public boolean isIncludedInExport() {
+        return includedInExport;
+    }
+
+
+    public void setIncludedInExport( boolean includedInExport ) {
+        this.includedInExport = includedInExport;
+    }
+
+
+    public boolean isTimestamp() {
+        return timestamp;
+    }
+
+
+    public void setTimestamp( boolean timestamp ) {
+        this.timestamp = timestamp;
+    }
+
+
+    public boolean isEncrypted() {
+        return encrypted;
+    }
+
+
+    public void setEncrypted( boolean encrypted ) {
+        this.encrypted = encrypted;
+    }
+
+
+    @Override
+    public String toString() {
+        return "PropertyInfo [name=" + name + ", type=" + type + ", aliasProperty=" + aliasProperty
+                + ", fulltextIndexed=" + fulltextIndexed + ", indexed=" + indexed + ", basic=" + basic + ", mutable="
+                + mutable + ", pathBasedName=" + pathBasedName + ", publicVisible=" + publicVisible + ", required="
+                + required + ", unique=" + unique + ", includedInExport=" + includedInExport + ", timestamp="
+                + timestamp + "]";
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/system/UsergridSystemMonitor.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/system/UsergridSystemMonitor.java b/stack/core/src/main/java/org/apache/usergrid/system/UsergridSystemMonitor.java
new file mode 100644
index 0000000..418a62a
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/system/UsergridSystemMonitor.java
@@ -0,0 +1,95 @@
+package org.apache.usergrid.system;
+
+
+import java.util.Properties;
+
+import org.apache.usergrid.utils.JsonUtils;
+import org.apache.usergrid.utils.MapUtils;
+import org.apache.usergrid.utils.TimeUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import me.prettyprint.hector.api.Cluster;
+import me.prettyprint.hector.api.exceptions.HectorException;
+
+
+/**
+ * Provide a single spot for monitoring usergrid system health
+ *
+ * @author zznate
+ */
+public class UsergridSystemMonitor {
+    private static final String TIMER_THRESHOLD_TRIGGERED_MSG =
+            "TimerThreshold triggered on duration: %d \n%s\n----------------";
+    private static Logger logger = LoggerFactory.getLogger( UsergridSystemMonitor.class );
+
+    private final String buildNumber;
+    private final Cluster cluster;
+    /** The trigger point for printing debugging information. {@see #maybeLogPayload} */
+    private long timerLogThreshold = 15 * 1000;
+    public static final String LOG_THRESHOLD_PROPERTY = "metering.request.timer.log.threshold";
+
+
+    /**
+     * Must be instantiated with a build number and a cluster to be of any use. Properties can be null. Threshold
+     * property must be a form compatible with {@link TimeUtils#millisFromDuration(String)}
+     */
+    public UsergridSystemMonitor( String buildNumber, Cluster cluster, Properties properties ) {
+        this.buildNumber = buildNumber;
+        this.cluster = cluster;
+        if ( properties != null ) {
+            timerLogThreshold = TimeUtils.millisFromDuration( properties.getProperty( LOG_THRESHOLD_PROPERTY, "15s" ) );
+        }
+    }
+
+
+    /**
+     * Wraps "describe_thrift_version API call as this hits a static string in Cassandra. This is the most lightweight
+     * way to assure that Hector is alive and talking to the cluster.
+     *
+     * @return true if we have a lit connection to the cluster.
+     */
+    public boolean getIsCassandraAlive() {
+        boolean isAlive = false;
+        try {
+            isAlive = cluster.describeThriftVersion() != null;
+        }
+        catch ( HectorException he ) {
+            logger.error( "Could not communicate with Cassandra cluster", he );
+        }
+        return isAlive;
+    }
+
+
+    /** @return a string representing the build number */
+    public String getBuildNumber() {
+        return buildNumber;
+    }
+
+
+    /**
+     * Uses {@link JsonUtils#mapToFormattedJsonString(Object)} against the object if the duration is greater than {@link
+     * #timerLogThreshold}. When using the varargs form, the number of elements must be even such that key,value,key,
+     * value mapping via {@link MapUtils#map(Object...)} can collect all the elements.
+     * <p/>
+     * Conversion to a map this way let's us lazy create the map if and only if the triggering threshold is true or we
+     * are in debug mode.
+     */
+    public void maybeLogPayload( long duration, Object... objects ) {
+        if ( duration > timerLogThreshold || logger.isDebugEnabled() ) {
+            String message;
+            if ( objects.length > 1 ) {
+                message = formatMessage( duration, MapUtils.map( objects ) );
+            }
+            else {
+                message = formatMessage( duration, objects );
+            }
+            logger.info( message );
+        }
+    }
+
+
+    static String formatMessage( long duration, Object object ) {
+        return String.format( TIMER_THRESHOLD_TRIGGERED_MSG, duration, JsonUtils.mapToFormattedJsonString( object ) );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/utils/AESUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/utils/AESUtils.java b/stack/core/src/main/java/org/apache/usergrid/utils/AESUtils.java
new file mode 100644
index 0000000..db87210
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/utils/AESUtils.java
@@ -0,0 +1,84 @@
+/*
+ * 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.utils;
+
+
+import javax.crypto.Cipher;
+import javax.crypto.SecretKey;
+import javax.crypto.spec.SecretKeySpec;
+
+import org.apache.commons.codec.binary.Base64;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static org.apache.commons.lang.StringUtils.rightPad;
+import static org.apache.commons.lang.StringUtils.substring;
+
+
+public class AESUtils {
+
+    private static final Logger LOG = LoggerFactory.getLogger( AESUtils.class );
+
+    private static byte[] linebreak = { };
+    private static Cipher cipher;
+    private static Base64 coder;
+
+
+    static {
+        try {
+            cipher = Cipher.getInstance( "AES/ECB/PKCS5Padding", "SunJCE" );
+            coder = new Base64( 32, linebreak, true );
+        }
+        catch ( Throwable t ) {
+            LOG.error( "Cipher error", t );
+        }
+    }
+
+
+    public static synchronized String encrypt( String secret, String plainText ) {
+        secret = substring( rightPad( secret, 16 ), 0, 16 );
+        SecretKey key = new SecretKeySpec( secret.getBytes(), "AES" );
+        try {
+            cipher.init( Cipher.ENCRYPT_MODE, key );
+            byte[] cipherText = cipher.doFinal( plainText.getBytes() );
+            return new String( coder.encode( cipherText ) );
+        }
+        catch ( Exception e ) {
+            LOG.error( "Encryption error", e );
+        }
+        return null;
+    }
+
+
+    @SuppressWarnings("unused")
+    public static synchronized String decrypt( String secret, String codedText ) {
+        secret = substring( rightPad( secret, 16 ), 0, 16 );
+        SecretKey key = new SecretKeySpec( secret.getBytes(), "AES" );
+        byte[] encypted = coder.decode( codedText.getBytes() );
+        try {
+            cipher.init( Cipher.DECRYPT_MODE, key );
+            byte[] decrypted = cipher.doFinal( encypted );
+            return new String( decrypted );
+        }
+        catch ( Exception e ) {
+            LOG.error( "Decryption error", e );
+        }
+        return null;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/utils/BCrypt.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/utils/BCrypt.java b/stack/core/src/main/java/org/apache/usergrid/utils/BCrypt.java
new file mode 100644
index 0000000..aa15071
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/utils/BCrypt.java
@@ -0,0 +1,627 @@
+/*
+ * 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.utils;
+
+//Copyright (c) 2006 Damien Miller <dj...@mindrot.org>
+//
+// Permission to use, copy, modify, and distribute this software for any
+// purpose with or without fee is hereby granted, provided that the above
+// copyright notice and this permission notice appear in all copies.
+//
+// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+import java.io.UnsupportedEncodingException;
+import java.security.SecureRandom;
+
+
+/**
+ * BCrypt implements OpenBSD-style Blowfish password hashing using the scheme described in "A Future-Adaptable Password
+ * Scheme" by Niels Provos and David Mazieres.
+ * <p/>
+ * This password hashing system tries to thwart off-line password cracking using a computationally-intensive hashing
+ * algorithm, based on Bruce Schneier's Blowfish cipher. The work factor of the algorithm is parameterised, so it can be
+ * increased as computers get faster.
+ * <p/>
+ * Usage is really simple. To hash a password for the first time, call the hashpw method with a random salt, like this:
+ * <p/>
+ * <code> String pw_hash = BCrypt.hashpw(plain_password, BCrypt.gensalt()); <br /> </code>
+ * <p/>
+ * To check whether a plaintext password matches one that has been hashed previously, use the checkpw method:
+ * <p/>
+ * <code> if (BCrypt.checkpw(candidate_password, stored_hash))<br /> &nbsp;&nbsp;&nbsp;&nbsp;System.out.println("It
+ * matches");<br /> else<br /> &nbsp;&nbsp;&nbsp;&nbsp;System.out.println("It does not match");<br /> </code>
+ * <p/>
+ * The gensalt() method takes an optional parameter (logRounds) that determines the computational complexity of the
+ * hashing:
+ * <p/>
+ * <code> String strong_salt = BCrypt.gensalt(10)<br /> String stronger_salt = BCrypt.gensalt(12)<br /> </code>
+ * <p/>
+ * The amount of work increases exponentially (2**logRounds), so each increment is twice as much work. The default
+ * logRounds is 10, and the valid range is 4 to 31.
+ *
+ * @version 0.2
+ */
+public class BCrypt {
+    private static final int BCRYPT_SALT_LEN = 16;
+
+    // Blowfish parameters
+    private static final int BLOWFISH_NUM_ROUNDS = 16;
+
+    // Initial contents of key schedule
+    private static final int[] P_orig = {
+            0x243f6a88, 0x85a308d3, 0x13198a2e, 0x03707344, 0xa4093822, 0x299f31d0, 0x082efa98, 0xec4e6c89, 0x452821e6,
+            0x38d01377, 0xbe5466cf, 0x34e90c6c, 0xc0ac29b7, 0xc97c50dd, 0x3f84d5b5, 0xb5470917, 0x9216d5d9, 0x8979fb1b
+    };
+    private static final int[] S_orig = {
+            0xd1310ba6, 0x98dfb5ac, 0x2ffd72db, 0xd01adfb7, 0xb8e1afed, 0x6a267e96, 0xba7c9045, 0xf12c7f99, 0x24a19947,
+            0xb3916cf7, 0x0801f2e2, 0x858efc16, 0x636920d8, 0x71574e69, 0xa458fea3, 0xf4933d7e, 0x0d95748f, 0x728eb658,
+            0x718bcd58, 0x82154aee, 0x7b54a41d, 0xc25a59b5, 0x9c30d539, 0x2af26013, 0xc5d1b023, 0x286085f0, 0xca417918,
+            0xb8db38ef, 0x8e79dcb0, 0x603a180e, 0x6c9e0e8b, 0xb01e8a3e, 0xd71577c1, 0xbd314b27, 0x78af2fda, 0x55605c60,
+            0xe65525f3, 0xaa55ab94, 0x57489862, 0x63e81440, 0x55ca396a, 0x2aab10b6, 0xb4cc5c34, 0x1141e8ce, 0xa15486af,
+            0x7c72e993, 0xb3ee1411, 0x636fbc2a, 0x2ba9c55d, 0x741831f6, 0xce5c3e16, 0x9b87931e, 0xafd6ba33, 0x6c24cf5c,
+            0x7a325381, 0x28958677, 0x3b8f4898, 0x6b4bb9af, 0xc4bfe81b, 0x66282193, 0x61d809cc, 0xfb21a991, 0x487cac60,
+            0x5dec8032, 0xef845d5d, 0xe98575b1, 0xdc262302, 0xeb651b88, 0x23893e81, 0xd396acc5, 0x0f6d6ff3, 0x83f44239,
+            0x2e0b4482, 0xa4842004, 0x69c8f04a, 0x9e1f9b5e, 0x21c66842, 0xf6e96c9a, 0x670c9c61, 0xabd388f0, 0x6a51a0d2,
+            0xd8542f68, 0x960fa728, 0xab5133a3, 0x6eef0b6c, 0x137a3be4, 0xba3bf050, 0x7efb2a98, 0xa1f1651d, 0x39af0176,
+            0x66ca593e, 0x82430e88, 0x8cee8619, 0x456f9fb4, 0x7d84a5c3, 0x3b8b5ebe, 0xe06f75d8, 0x85c12073, 0x401a449f,
+            0x56c16aa6, 0x4ed3aa62, 0x363f7706, 0x1bfedf72, 0x429b023d, 0x37d0d724, 0xd00a1248, 0xdb0fead3, 0x49f1c09b,
+            0x075372c9, 0x80991b7b, 0x25d479d8, 0xf6e8def7, 0xe3fe501a, 0xb6794c3b, 0x976ce0bd, 0x04c006ba, 0xc1a94fb6,
+            0x409f60c4, 0x5e5c9ec2, 0x196a2463, 0x68fb6faf, 0x3e6c53b5, 0x1339b2eb, 0x3b52ec6f, 0x6dfc511f, 0x9b30952c,
+            0xcc814544, 0xaf5ebd09, 0xbee3d004, 0xde334afd, 0x660f2807, 0x192e4bb3, 0xc0cba857, 0x45c8740f, 0xd20b5f39,
+            0xb9d3fbdb, 0x5579c0bd, 0x1a60320a, 0xd6a100c6, 0x402c7279, 0x679f25fe, 0xfb1fa3cc, 0x8ea5e9f8, 0xdb3222f8,
+            0x3c7516df, 0xfd616b15, 0x2f501ec8, 0xad0552ab, 0x323db5fa, 0xfd238760, 0x53317b48, 0x3e00df82, 0x9e5c57bb,
+            0xca6f8ca0, 0x1a87562e, 0xdf1769db, 0xd542a8f6, 0x287effc3, 0xac6732c6, 0x8c4f5573, 0x695b27b0, 0xbbca58c8,
+            0xe1ffa35d, 0xb8f011a0, 0x10fa3d98, 0xfd2183b8, 0x4afcb56c, 0x2dd1d35b, 0x9a53e479, 0xb6f84565, 0xd28e49bc,
+            0x4bfb9790, 0xe1ddf2da, 0xa4cb7e33, 0x62fb1341, 0xcee4c6e8, 0xef20cada, 0x36774c01, 0xd07e9efe, 0x2bf11fb4,
+            0x95dbda4d, 0xae909198, 0xeaad8e71, 0x6b93d5a0, 0xd08ed1d0, 0xafc725e0, 0x8e3c5b2f, 0x8e7594b7, 0x8ff6e2fb,
+            0xf2122b64, 0x8888b812, 0x900df01c, 0x4fad5ea0, 0x688fc31c, 0xd1cff191, 0xb3a8c1ad, 0x2f2f2218, 0xbe0e1777,
+            0xea752dfe, 0x8b021fa1, 0xe5a0cc0f, 0xb56f74e8, 0x18acf3d6, 0xce89e299, 0xb4a84fe0, 0xfd13e0b7, 0x7cc43b81,
+            0xd2ada8d9, 0x165fa266, 0x80957705, 0x93cc7314, 0x211a1477, 0xe6ad2065, 0x77b5fa86, 0xc75442f5, 0xfb9d35cf,
+            0xebcdaf0c, 0x7b3e89a0, 0xd6411bd3, 0xae1e7e49, 0x00250e2d, 0x2071b35e, 0x226800bb, 0x57b8e0af, 0x2464369b,
+            0xf009b91e, 0x5563911d, 0x59dfa6aa, 0x78c14389, 0xd95a537f, 0x207d5ba2, 0x02e5b9c5, 0x83260376, 0x6295cfa9,
+            0x11c81968, 0x4e734a41, 0xb3472dca, 0x7b14a94a, 0x1b510052, 0x9a532915, 0xd60f573f, 0xbc9bc6e4, 0x2b60a476,
+            0x81e67400, 0x08ba6fb5, 0x571be91f, 0xf296ec6b, 0x2a0dd915, 0xb6636521, 0xe7b9f9b6, 0xff34052e, 0xc5855664,
+            0x53b02d5d, 0xa99f8fa1, 0x08ba4799, 0x6e85076a, 0x4b7a70e9, 0xb5b32944, 0xdb75092e, 0xc4192623, 0xad6ea6b0,
+            0x49a7df7d, 0x9cee60b8, 0x8fedb266, 0xecaa8c71, 0x699a17ff, 0x5664526c, 0xc2b19ee1, 0x193602a5, 0x75094c29,
+            0xa0591340, 0xe4183a3e, 0x3f54989a, 0x5b429d65, 0x6b8fe4d6, 0x99f73fd6, 0xa1d29c07, 0xefe830f5, 0x4d2d38e6,
+            0xf0255dc1, 0x4cdd2086, 0x8470eb26, 0x6382e9c6, 0x021ecc5e, 0x09686b3f, 0x3ebaefc9, 0x3c971814, 0x6b6a70a1,
+            0x687f3584, 0x52a0e286, 0xb79c5305, 0xaa500737, 0x3e07841c, 0x7fdeae5c, 0x8e7d44ec, 0x5716f2b8, 0xb03ada37,
+            0xf0500c0d, 0xf01c1f04, 0x0200b3ff, 0xae0cf51a, 0x3cb574b2, 0x25837a58, 0xdc0921bd, 0xd19113f9, 0x7ca92ff6,
+            0x94324773, 0x22f54701, 0x3ae5e581, 0x37c2dadc, 0xc8b57634, 0x9af3dda7, 0xa9446146, 0x0fd0030e, 0xecc8c73e,
+            0xa4751e41, 0xe238cd99, 0x3bea0e2f, 0x3280bba1, 0x183eb331, 0x4e548b38, 0x4f6db908, 0x6f420d03, 0xf60a04bf,
+            0x2cb81290, 0x24977c79, 0x5679b072, 0xbcaf89af, 0xde9a771f, 0xd9930810, 0xb38bae12, 0xdccf3f2e, 0x5512721f,
+            0x2e6b7124, 0x501adde6, 0x9f84cd87, 0x7a584718, 0x7408da17, 0xbc9f9abc, 0xe94b7d8c, 0xec7aec3a, 0xdb851dfa,
+            0x63094366, 0xc464c3d2, 0xef1c1847, 0x3215d908, 0xdd433b37, 0x24c2ba16, 0x12a14d43, 0x2a65c451, 0x50940002,
+            0x133ae4dd, 0x71dff89e, 0x10314e55, 0x81ac77d6, 0x5f11199b, 0x043556f1, 0xd7a3c76b, 0x3c11183b, 0x5924a509,
+            0xf28fe6ed, 0x97f1fbfa, 0x9ebabf2c, 0x1e153c6e, 0x86e34570, 0xeae96fb1, 0x860e5e0a, 0x5a3e2ab3, 0x771fe71c,
+            0x4e3d06fa, 0x2965dcb9, 0x99e71d0f, 0x803e89d6, 0x5266c825, 0x2e4cc978, 0x9c10b36a, 0xc6150eba, 0x94e2ea78,
+            0xa5fc3c53, 0x1e0a2df4, 0xf2f74ea7, 0x361d2b3d, 0x1939260f, 0x19c27960, 0x5223a708, 0xf71312b6, 0xebadfe6e,
+            0xeac31f66, 0xe3bc4595, 0xa67bc883, 0xb17f37d1, 0x018cff28, 0xc332ddef, 0xbe6c5aa5, 0x65582185, 0x68ab9802,
+            0xeecea50f, 0xdb2f953b, 0x2aef7dad, 0x5b6e2f84, 0x1521b628, 0x29076170, 0xecdd4775, 0x619f1510, 0x13cca830,
+            0xeb61bd96, 0x0334fe1e, 0xaa0363cf, 0xb5735c90, 0x4c70a239, 0xd59e9e0b, 0xcbaade14, 0xeecc86bc, 0x60622ca7,
+            0x9cab5cab, 0xb2f3846e, 0x648b1eaf, 0x19bdf0ca, 0xa02369b9, 0x655abb50, 0x40685a32, 0x3c2ab4b3, 0x319ee9d5,
+            0xc021b8f7, 0x9b540b19, 0x875fa099, 0x95f7997e, 0x623d7da8, 0xf837889a, 0x97e32d77, 0x11ed935f, 0x16681281,
+            0x0e358829, 0xc7e61fd6, 0x96dedfa1, 0x7858ba99, 0x57f584a5, 0x1b227263, 0x9b83c3ff, 0x1ac24696, 0xcdb30aeb,
+            0x532e3054, 0x8fd948e4, 0x6dbc3128, 0x58ebf2ef, 0x34c6ffea, 0xfe28ed61, 0xee7c3c73, 0x5d4a14d9, 0xe864b7e3,
+            0x42105d14, 0x203e13e0, 0x45eee2b6, 0xa3aaabea, 0xdb6c4f15, 0xfacb4fd0, 0xc742f442, 0xef6abbb5, 0x654f3b1d,
+            0x41cd2105, 0xd81e799e, 0x86854dc7, 0xe44b476a, 0x3d816250, 0xcf62a1f2, 0x5b8d2646, 0xfc8883a0, 0xc1c7b6a3,
+            0x7f1524c3, 0x69cb7492, 0x47848a0b, 0x5692b285, 0x095bbf00, 0xad19489d, 0x1462b174, 0x23820e00, 0x58428d2a,
+            0x0c55f5ea, 0x1dadf43e, 0x233f7061, 0x3372f092, 0x8d937e41, 0xd65fecf1, 0x6c223bdb, 0x7cde3759, 0xcbee7460,
+            0x4085f2a7, 0xce77326e, 0xa6078084, 0x19f8509e, 0xe8efd855, 0x61d99735, 0xa969a7aa, 0xc50c06c2, 0x5a04abfc,
+            0x800bcadc, 0x9e447a2e, 0xc3453484, 0xfdd56705, 0x0e1e9ec9, 0xdb73dbd3, 0x105588cd, 0x675fda79, 0xe3674340,
+            0xc5c43465, 0x713e38d8, 0x3d28f89e, 0xf16dff20, 0x153e21e7, 0x8fb03d4a, 0xe6e39f2b, 0xdb83adf7, 0xe93d5a68,
+            0x948140f7, 0xf64c261c, 0x94692934, 0x411520f7, 0x7602d4f7, 0xbcf46b2e, 0xd4a20068, 0xd4082471, 0x3320f46a,
+            0x43b7d4b7, 0x500061af, 0x1e39f62e, 0x97244546, 0x14214f74, 0xbf8b8840, 0x4d95fc1d, 0x96b591af, 0x70f4ddd3,
+            0x66a02f45, 0xbfbc09ec, 0x03bd9785, 0x7fac6dd0, 0x31cb8504, 0x96eb27b3, 0x55fd3941, 0xda2547e6, 0xabca0a9a,
+            0x28507825, 0x530429f4, 0x0a2c86da, 0xe9b66dfb, 0x68dc1462, 0xd7486900, 0x680ec0a4, 0x27a18dee, 0x4f3ffea2,
+            0xe887ad8c, 0xb58ce006, 0x7af4d6b6, 0xaace1e7c, 0xd3375fec, 0xce78a399, 0x406b2a42, 0x20fe9e35, 0xd9f385b9,
+            0xee39d7ab, 0x3b124e8b, 0x1dc9faf7, 0x4b6d1856, 0x26a36631, 0xeae397b2, 0x3a6efa74, 0xdd5b4332, 0x6841e7f7,
+            0xca7820fb, 0xfb0af54e, 0xd8feb397, 0x454056ac, 0xba489527, 0x55533a3a, 0x20838d87, 0xfe6ba9b7, 0xd096954b,
+            0x55a867bc, 0xa1159a58, 0xcca92963, 0x99e1db33, 0xa62a4a56, 0x3f3125f9, 0x5ef47e1c, 0x9029317c, 0xfdf8e802,
+            0x04272f70, 0x80bb155c, 0x05282ce3, 0x95c11548, 0xe4c66d22, 0x48c1133f, 0xc70f86dc, 0x07f9c9ee, 0x41041f0f,
+            0x404779a4, 0x5d886e17, 0x325f51eb, 0xd59bc0d1, 0xf2bcc18f, 0x41113564, 0x257b7834, 0x602a9c60, 0xdff8e8a3,
+            0x1f636c1b, 0x0e12b4c2, 0x02e1329e, 0xaf664fd1, 0xcad18115, 0x6b2395e0, 0x333e92e1, 0x3b240b62, 0xeebeb922,
+            0x85b2a20e, 0xe6ba0d99, 0xde720c8c, 0x2da2f728, 0xd0127845, 0x95b794fd, 0x647d0862, 0xe7ccf5f0, 0x5449a36f,
+            0x877d48fa, 0xc39dfd27, 0xf33e8d1e, 0x0a476341, 0x992eff74, 0x3a6f6eab, 0xf4f8fd37, 0xa812dc60, 0xa1ebddf8,
+            0x991be14c, 0xdb6e6b0d, 0xc67b5510, 0x6d672c37, 0x2765d43b, 0xdcd0e804, 0xf1290dc7, 0xcc00ffa3, 0xb5390f92,
+            0x690fed0b, 0x667b9ffb, 0xcedb7d9c, 0xa091cf0b, 0xd9155ea3, 0xbb132f88, 0x515bad24, 0x7b9479bf, 0x763bd6eb,
+            0x37392eb3, 0xcc115979, 0x8026e297, 0xf42e312d, 0x6842ada7, 0xc66a2b3b, 0x12754ccc, 0x782ef11c, 0x6a124237,
+            0xb79251e7, 0x06a1bbe6, 0x4bfb6350, 0x1a6b1018, 0x11caedfa, 0x3d25bdd8, 0xe2e1c3c9, 0x44421659, 0x0a121386,
+            0xd90cec6e, 0xd5abea2a, 0x64af674e, 0xda86a85f, 0xbebfe988, 0x64e4c3fe, 0x9dbc8057, 0xf0f7c086, 0x60787bf8,
+            0x6003604d, 0xd1fd8346, 0xf6381fb0, 0x7745ae04, 0xd736fccc, 0x83426b33, 0xf01eab71, 0xb0804187, 0x3c005e5f,
+            0x77a057be, 0xbde8ae24, 0x55464299, 0xbf582e61, 0x4e58f48f, 0xf2ddfda2, 0xf474ef38, 0x8789bdc2, 0x5366f9c3,
+            0xc8b38e74, 0xb475f255, 0x46fcd9b9, 0x7aeb2661, 0x8b1ddf84, 0x846a0e79, 0x915f95e2, 0x466e598e, 0x20b45770,
+            0x8cd55591, 0xc902de4c, 0xb90bace1, 0xbb8205d0, 0x11a86248, 0x7574a99e, 0xb77f19b6, 0xe0a9dc09, 0x662d09a1,
+            0xc4324633, 0xe85a1f02, 0x09f0be8c, 0x4a99a025, 0x1d6efe10, 0x1ab93d1d, 0x0ba5a4df, 0xa186f20f, 0x2868f169,
+            0xdcb7da83, 0x573906fe, 0xa1e2ce9b, 0x4fcd7f52, 0x50115e01, 0xa70683fa, 0xa002b5c4, 0x0de6d027, 0x9af88c27,
+            0x773f8641, 0xc3604c06, 0x61a806b5, 0xf0177a28, 0xc0f586e0, 0x006058aa, 0x30dc7d62, 0x11e69ed7, 0x2338ea63,
+            0x53c2dd94, 0xc2c21634, 0xbbcbee56, 0x90bcb6de, 0xebfc7da1, 0xce591d76, 0x6f05e409, 0x4b7c0188, 0x39720a3d,
+            0x7c927c24, 0x86e3725f, 0x724d9db9, 0x1ac15bb4, 0xd39eb8fc, 0xed545578, 0x08fca5b5, 0xd83d7cd3, 0x4dad0fc4,
+            0x1e50ef5e, 0xb161e6f8, 0xa28514d9, 0x6c51133c, 0x6fd5c7e7, 0x56e14ec4, 0x362abfce, 0xddc6c837, 0xd79a3234,
+            0x92638212, 0x670efa8e, 0x406000e0, 0x3a39ce37, 0xd3faf5cf, 0xabc27737, 0x5ac52d1b, 0x5cb0679e, 0x4fa33742,
+            0xd3822740, 0x99bc9bbe, 0xd5118e9d, 0xbf0f7315, 0xd62d1c7e, 0xc700c47b, 0xb78c1b6b, 0x21a19045, 0xb26eb1be,
+            0x6a366eb4, 0x5748ab2f, 0xbc946e79, 0xc6a376d2, 0x6549c2c8, 0x530ff8ee, 0x468dde7d, 0xd5730a1d, 0x4cd04dc6,
+            0x2939bbdb, 0xa9ba4650, 0xac9526e8, 0xbe5ee304, 0xa1fad5f0, 0x6a2d519a, 0x63ef8ce2, 0x9a86ee22, 0xc089c2b8,
+            0x43242ef6, 0xa51e03aa, 0x9cf2d0a4, 0x83c061ba, 0x9be96a4d, 0x8fe51550, 0xba645bd6, 0x2826a2f9, 0xa73a3ae1,
+            0x4ba99586, 0xef5562e9, 0xc72fefd3, 0xf752f7da, 0x3f046f69, 0x77fa0a59, 0x80e4a915, 0x87b08601, 0x9b09e6ad,
+            0x3b3ee593, 0xe990fd5a, 0x9e34d797, 0x2cf0b7d9, 0x022b8b51, 0x96d5ac3a, 0x017da67d, 0xd1cf3ed6, 0x7c7d2d28,
+            0x1f9f25cf, 0xadf2b89b, 0x5ad6b472, 0x5a88f54c, 0xe029ac71, 0xe019a5e6, 0x47b0acfd, 0xed93fa9b, 0xe8d3c48d,
+            0x283b57cc, 0xf8d56629, 0x79132e28, 0x785f0191, 0xed756055, 0xf7960e44, 0xe3d35e8c, 0x15056dd4, 0x88f46dba,
+            0x03a16125, 0x0564f0bd, 0xc3eb9e15, 0x3c9057a2, 0x97271aec, 0xa93a072a, 0x1b3f6d9b, 0x1e6321f5, 0xf59c66fb,
+            0x26dcf319, 0x7533d928, 0xb155fdf5, 0x03563482, 0x8aba3cbb, 0x28517711, 0xc20ad9f8, 0xabcc5167, 0xccad925f,
+            0x4de81751, 0x3830dc8e, 0x379d5862, 0x9320f991, 0xea7a90c2, 0xfb3e7bce, 0x5121ce64, 0x774fbe32, 0xa8b6e37e,
+            0xc3293d46, 0x48de5369, 0x6413e680, 0xa2ae0810, 0xdd6db224, 0x69852dfd, 0x09072166, 0xb39a460a, 0x6445c0dd,
+            0x586cdecf, 0x1c20c8ae, 0x5bbef7dd, 0x1b588d40, 0xccd2017f, 0x6bb4e3bb, 0xdda26a7e, 0x3a59ff45, 0x3e350a44,
+            0xbcb4cdd5, 0x72eacea8, 0xfa6484bb, 0x8d6612ae, 0xbf3c6f47, 0xd29be463, 0x542f5d9e, 0xaec2771b, 0xf64e6370,
+            0x740e0d8d, 0xe75b1357, 0xf8721671, 0xaf537d5d, 0x4040cb08, 0x4eb4e2cc, 0x34d2466a, 0x0115af84, 0xe1b00428,
+            0x95983a1d, 0x06b89fb4, 0xce6ea048, 0x6f3f3b82, 0x3520ab82, 0x011a1d4b, 0x277227f8, 0x611560b1, 0xe7933fdc,
+            0xbb3a792b, 0x344525bd, 0xa08839e1, 0x51ce794b, 0x2f32c9b7, 0xa01fbac9, 0xe01cc87e, 0xbcc7d1f6, 0xcf0111c3,
+            0xa1e8aac7, 0x1a908749, 0xd44fbd9a, 0xd0dadecb, 0xd50ada38, 0x0339c32a, 0xc6913667, 0x8df9317c, 0xe0b12b4f,
+            0xf79e59b7, 0x43f5bb3a, 0xf2d519ff, 0x27d9459c, 0xbf97222c, 0x15e6fc2a, 0x0f91fc71, 0x9b941525, 0xfae59361,
+            0xceb69ceb, 0xc2a86459, 0x12baa8d1, 0xb6c1075e, 0xe3056a0c, 0x10d25065, 0xcb03a442, 0xe0ec6e0e, 0x1698db3b,
+            0x4c98a0be, 0x3278e964, 0x9f1f9532, 0xe0d392df, 0xd3a0342b, 0x8971f21e, 0x1b0a7441, 0x4ba3348c, 0xc5be7120,
+            0xc37632d8, 0xdf359f8d, 0x9b992f2e, 0xe60b6f47, 0x0fe3f11d, 0xe54cda54, 0x1edad891, 0xce6279cf, 0xcd3e7e6f,
+            0x1618b166, 0xfd2c1d05, 0x848fd2c5, 0xf6fb2299, 0xf523f357, 0xa6327623, 0x93a83531, 0x56cccd02, 0xacf08162,
+            0x5a75ebb5, 0x6e163697, 0x88d273cc, 0xde966292, 0x81b949d0, 0x4c50901b, 0x71c65614, 0xe6c6c7bd, 0x327a140a,
+            0x45e1d006, 0xc3f27b9a, 0xc9aa53fd, 0x62a80f00, 0xbb25bfe2, 0x35bdd2f6, 0x71126905, 0xb2040222, 0xb6cbcf7c,
+            0xcd769c2b, 0x53113ec0, 0x1640e3d3, 0x38abbd60, 0x2547adf0, 0xba38209c, 0xf746ce76, 0x77afa1c5, 0x20756060,
+            0x85cbfe4e, 0x8ae88dd8, 0x7aaaf9b0, 0x4cf9aa7e, 0x1948c25c, 0x02fb8a8c, 0x01c36ae4, 0xd6ebe1f9, 0x90d4f869,
+            0xa65cdea0, 0x3f09252d, 0xc208e69f, 0xb74e6132, 0xce77e25b, 0x578fdfe3, 0x3ac372e6
+    };
+
+    // bcrypt IV: "OrpheanBeholderScryDoubt"
+    private static final int[] BF_CRYPT_CYPHERTEXT = {
+            0x4f727068, 0x65616e42, 0x65686f6c, 0x64657253, 0x63727944, 0x6f756274
+    };
+
+    // Table for Base64 encoding
+    private static final char[] BASE64_CODE = {
+            '.', '/', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S',
+            'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n',
+            'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'
+    };
+
+    // Table for Base64 decoding
+    private static final byte[] INDEX_64 = {
+            -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+            -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 54, 55, 56, 57, 58, 59,
+            60, 61, 62, 63, -1, -1, -1, -1, -1, -1, -1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+            20, 21, 22, 23, 24, 25, 26, 27, -1, -1, -1, -1, -1, -1, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
+            41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, -1, -1, -1, -1, -1
+    };
+
+    // Expanded Blowfish key
+    private int[] p;
+    private int[] s;
+
+
+    /**
+     * Encode a byte array using bcrypt's slightly-modified base64 encoding scheme. Note that this is *not* compatible
+     * with the standard MIME-base64 encoding.
+     *
+     * @param d the byte array to encode
+     * @param len the number of bytes to encode
+     *
+     * @return base64-encoded string
+     *
+     * @throws IllegalArgumentException if the length is invalid
+     */
+    private static String encodeBase64( byte[] d, int len ) throws IllegalArgumentException {
+        int off = 0;
+        StringBuilder rs = new StringBuilder();
+        int c1;
+        int c2;
+
+        if ( ( len <= 0 ) || ( len > d.length ) ) {
+            throw new IllegalArgumentException( "Invalid len" );
+        }
+
+        while ( off < len ) {
+            c1 = d[off++] & 0xff;
+            rs.append( BASE64_CODE[( c1 >> 2 ) & 0x3f] );
+            c1 = ( c1 & 0x03 ) << 4;
+            if ( off >= len ) {
+                rs.append( BASE64_CODE[c1 & 0x3f] );
+                break;
+            }
+            c2 = d[off++] & 0xff;
+            c1 |= ( c2 >> 4 ) & 0x0f;
+            rs.append( BASE64_CODE[c1 & 0x3f] );
+            c1 = ( c2 & 0x0f ) << 2;
+            if ( off >= len ) {
+                rs.append( BASE64_CODE[c1 & 0x3f] );
+                break;
+            }
+            c2 = d[off++] & 0xff;
+            c1 |= ( c2 >> 6 ) & 0x03;
+            rs.append( BASE64_CODE[c1 & 0x3f] );
+            rs.append( BASE64_CODE[c2 & 0x3f] );
+        }
+        return rs.toString();
+    }
+
+
+    /**
+     * Look up the 3 bits base64-encoded by the specified character, range-checking againt conversion table
+     *
+     * @param x the base64-encoded value
+     *
+     * @return the decoded value of x
+     */
+    private static byte char64( char x ) {
+        if ( ( x < 0 ) || ( x > INDEX_64.length ) ) {
+            return -1;
+        }
+        return INDEX_64[x];
+    }
+
+
+    /**
+     * Decode a string encoded using bcrypt's base64 scheme to a byte array. Note that this is *not* compatible with the
+     * standard MIME-base64 encoding.
+     *
+     * @param s the string to decode
+     * @param maxolen the maximum number of bytes to decode
+     *
+     * @return an array containing the decoded bytes
+     *
+     * @throws IllegalArgumentException if maxolen is invalid
+     */
+    private static byte[] decodeBase64( String s, int maxolen ) throws IllegalArgumentException {
+        StringBuilder rs = new StringBuilder();
+        int off = 0;
+        int slen = s.length();
+        int olen = 0;
+        byte[] ret;
+        byte c1;
+        byte c2;
+        byte c3;
+        byte c4;
+        byte o;
+
+        if ( maxolen <= 0 ) {
+            throw new IllegalArgumentException( "Invalid maxolen" );
+        }
+
+        while ( ( off < slen - 1 ) && ( olen < maxolen ) ) {
+            c1 = char64( s.charAt( off++ ) );
+            c2 = char64( s.charAt( off++ ) );
+            if ( ( c1 == -1 ) || ( c2 == -1 ) ) {
+                break;
+            }
+            o = ( byte ) ( c1 << 2 );
+            o |= ( c2 & 0x30 ) >> 4;
+            rs.append( ( char ) o );
+            if ( ( ++olen >= maxolen ) || ( off >= slen ) ) {
+                break;
+            }
+            c3 = char64( s.charAt( off++ ) );
+            if ( c3 == -1 ) {
+                break;
+            }
+            o = ( byte ) ( ( c2 & 0x0f ) << 4 );
+            o |= ( c3 & 0x3c ) >> 2;
+            rs.append( ( char ) o );
+            if ( ( ++olen >= maxolen ) || ( off >= slen ) ) {
+                break;
+            }
+            c4 = char64( s.charAt( off++ ) );
+            o = ( byte ) ( ( c3 & 0x03 ) << 6 );
+            o |= c4;
+            rs.append( ( char ) o );
+            ++olen;
+        }
+
+        ret = new byte[olen];
+        for ( off = 0; off < olen; off++ ) {
+            ret[off] = ( byte ) rs.charAt( off );
+        }
+        return ret;
+    }
+
+
+    /**
+     * Blowfish encipher a single 64-bit block encoded as two 32-bit halves
+     *
+     * @param lr an array containing the two 32-bit half blocks
+     * @param off the position in the array of the blocks
+     */
+    private void encipher( int[] lr, int off ) {
+        int i;
+        int n;
+        int l = lr[off];
+        int r = lr[off + 1];
+
+        l ^= p[0];
+        for ( i = 0; i <= BLOWFISH_NUM_ROUNDS - 2; ) {
+            // Feistel substitution on left word
+            n = s[( l >> 24 ) & 0xff];
+            n += s[0x100 | ( ( l >> 16 ) & 0xff )];
+            n ^= s[0x200 | ( ( l >> 8 ) & 0xff )];
+            n += s[0x300 | ( l & 0xff )];
+            r ^= n ^ p[++i];
+
+            // Feistel substitution on right word
+            n = s[( r >> 24 ) & 0xff];
+            n += s[0x100 | ( ( r >> 16 ) & 0xff )];
+            n ^= s[0x200 | ( ( r >> 8 ) & 0xff )];
+            n += s[0x300 | ( r & 0xff )];
+            l ^= n ^ p[++i];
+        }
+        lr[off] = r ^ p[BLOWFISH_NUM_ROUNDS + 1];
+        lr[off + 1] = l;
+    }
+
+
+    /**
+     * Cyclically extract a word of key material
+     *
+     * @param data the string to extract the data from
+     * @param offp a "pointer" (as a one-entry array) to the current offset into data
+     *
+     * @return the next word of material from data
+     */
+    private static int streamtoword( byte[] data, int[] offp ) {
+        int i;
+        int word = 0;
+        int off = offp[0];
+
+        for ( i = 0; i < 4; i++ ) {
+            word = ( word << 8 ) | ( data[off] & 0xff );
+            off = ( off + 1 ) % data.length;
+        }
+
+        offp[0] = off;
+        return word;
+    }
+
+
+    /** Initialise the Blowfish key schedule */
+    private void initKey() {
+        p = P_orig.clone();
+        s = S_orig.clone();
+    }
+
+
+    /**
+     * Key the Blowfish cipher
+     *
+     * @param key an array containing the key
+     */
+    private void key( byte[] key ) {
+        int i;
+        int[] koffp = { 0 };
+        int[] lr = { 0, 0 };
+        int plen = p.length;
+        int slen = s.length;
+
+        for ( i = 0; i < plen; i++ ) {
+            p[i] = p[i] ^ streamtoword( key, koffp );
+        }
+
+        for ( i = 0; i < plen; i += 2 ) {
+            encipher( lr, 0 );
+            p[i] = lr[0];
+            p[i + 1] = lr[1];
+        }
+
+        for ( i = 0; i < slen; i += 2 ) {
+            encipher( lr, 0 );
+            s[i] = lr[0];
+            s[i + 1] = lr[1];
+        }
+    }
+
+
+    /**
+     * Perform the "enhanced key schedule" step described by Provos and Mazieres in "A Future-Adaptable Password Scheme"
+     * http://www.openbsd.org/papers/bcrypt-paper.ps
+     *
+     * @param data salt information
+     * @param key password information
+     */
+    private void ekskey( byte[] data, byte[] key ) {
+        int i;
+        int[] koffp = { 0 };
+        int[] doffp = { 0 };
+        int[] lr = { 0, 0 };
+        int plen = p.length;
+        int slen = s.length;
+
+        for ( i = 0; i < plen; i++ ) {
+            p[i] = p[i] ^ streamtoword( key, koffp );
+        }
+
+        for ( i = 0; i < plen; i += 2 ) {
+            lr[0] ^= streamtoword( data, doffp );
+            lr[1] ^= streamtoword( data, doffp );
+            encipher( lr, 0 );
+            p[i] = lr[0];
+            p[i + 1] = lr[1];
+        }
+
+        for ( i = 0; i < slen; i += 2 ) {
+            lr[0] ^= streamtoword( data, doffp );
+            lr[1] ^= streamtoword( data, doffp );
+            encipher( lr, 0 );
+            s[i] = lr[0];
+            s[i + 1] = lr[1];
+        }
+    }
+
+
+    /**
+     * Perform the central password hashing step in the bcrypt scheme
+     *
+     * @param password the password to hash
+     * @param salt the binary salt to hash with the password
+     * @param logRounds the binary logarithm of the number of rounds of hashing to apply
+     *
+     * @return an array containing the binary hashed password
+     */
+    private byte[] cryptRaw( byte[] password, byte[] salt, int logRounds ) {
+        int rounds;
+        int i;
+        int j;
+        int[] cdata = BF_CRYPT_CYPHERTEXT.clone();
+        int clen = cdata.length;
+        byte[] ret;
+
+        if ( ( logRounds < 4 ) || ( logRounds > 31 ) ) {
+            throw new IllegalArgumentException( "Bad number of rounds" );
+        }
+        rounds = 1 << logRounds;
+        if ( salt.length != BCRYPT_SALT_LEN ) {
+            throw new IllegalArgumentException( "Bad salt length" );
+        }
+
+        initKey();
+        ekskey( salt, password );
+        for ( i = 0; i < rounds; i++ ) {
+            key( password );
+            key( salt );
+        }
+
+        for ( i = 0; i < 64; i++ ) {
+            for ( j = 0; j < ( clen >> 1 ); j++ ) {
+                encipher( cdata, j << 1 );
+            }
+        }
+
+        ret = new byte[clen * 4];
+        for ( i = 0, j = 0; i < clen; i++ ) {
+            ret[j++] = ( byte ) ( ( cdata[i] >> 24 ) & 0xff );
+            ret[j++] = ( byte ) ( ( cdata[i] >> 16 ) & 0xff );
+            ret[j++] = ( byte ) ( ( cdata[i] >> 8 ) & 0xff );
+            ret[j++] = ( byte ) ( cdata[i] & 0xff );
+        }
+        return ret;
+    }
+
+
+    /**
+     * Hash a password using the OpenBSD bcrypt scheme
+     *
+     * @param password the password to hash
+     * @param salt the salt to hash with (perhaps generated using BCrypt.gensalt)
+     *
+     * @return the hashed password
+     */
+    public static String hashpw( String password, String salt ) {
+        BCrypt b;
+        String realSalt;
+        byte[] passwordb;
+        byte[] saltb;
+        byte[] hashed;
+        char minor = ( char ) 0;
+        int rounds;
+        int off;
+        StringBuilder rs = new StringBuilder();
+
+        if ( ( salt.charAt( 0 ) != '$' ) || ( salt.charAt( 1 ) != '2' ) ) {
+            throw new IllegalArgumentException( "Invalid salt version" );
+        }
+        if ( salt.charAt( 2 ) == '$' ) {
+            off = 3;
+        }
+        else {
+            minor = salt.charAt( 2 );
+            if ( ( minor != 'a' ) || ( salt.charAt( 3 ) != '$' ) ) {
+                throw new IllegalArgumentException( "Invalid salt revision" );
+            }
+            off = 4;
+        }
+
+        // Extract number of rounds
+        if ( salt.charAt( off + 2 ) > '$' ) {
+            throw new IllegalArgumentException( "Missing salt rounds" );
+        }
+        rounds = Integer.parseInt( salt.substring( off, off + 2 ) );
+
+        realSalt = salt.substring( off + 3, off + 25 );
+        try {
+            passwordb = ( password + ( minor >= 'a' ? "\000" : "" ) ).getBytes( "UTF-8" );
+        }
+        catch ( UnsupportedEncodingException uee ) {
+            throw new AssertionError( "UTF-8 is not supported" );
+        }
+
+        saltb = decodeBase64( realSalt, BCRYPT_SALT_LEN );
+
+        b = new BCrypt();
+        hashed = b.cryptRaw( passwordb, saltb, rounds );
+
+        rs.append( "$2" );
+        if ( minor >= 'a' ) {
+            rs.append( minor );
+        }
+        rs.append( "$" );
+        if ( rounds < 10 ) {
+            rs.append( "0" );
+        }
+        rs.append( Integer.toString( rounds ) );
+        rs.append( "$" );
+        rs.append( encodeBase64( saltb, saltb.length ) );
+        rs.append( encodeBase64( hashed, BF_CRYPT_CYPHERTEXT.length * 4 - 1 ) );
+        return rs.toString();
+    }
+
+
+    /**
+     * Generate a salt for use with the BCrypt.hashpw() method
+     *
+     * @param logRounds the log2 of the number of rounds of hashing to apply - the work factor therefore increases as
+     * 2**logRounds.
+     * @param random an instance of SecureRandom to use
+     *
+     * @return an encoded salt value
+     */
+    public static String gensalt( int logRounds, SecureRandom random ) {
+        StringBuilder rs = new StringBuilder();
+        byte[] rnd = new byte[BCRYPT_SALT_LEN];
+
+        random.nextBytes( rnd );
+
+        rs.append( "$2a$" );
+        if ( logRounds < 10 ) {
+            rs.append( "0" );
+        }
+        rs.append( Integer.toString( logRounds ) );
+        rs.append( "$" );
+        rs.append( encodeBase64( rnd, rnd.length ) );
+        return rs.toString();
+    }
+
+
+    /**
+     * Generate a salt for use with the BCrypt.hashpw() method
+     *
+     * @param logRounds the log2 of the number of rounds of hashing to apply - the work factor therefore increases as
+     * 2**logRounds.
+     *
+     * @return an encoded salt value
+     */
+    public static String gensalt( int logRounds ) {
+        return gensalt( logRounds, new SecureRandom() );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/utils/ClassUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/utils/ClassUtils.java b/stack/core/src/main/java/org/apache/usergrid/utils/ClassUtils.java
new file mode 100644
index 0000000..6ce847e
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/utils/ClassUtils.java
@@ -0,0 +1,58 @@
+/*
+ * 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.utils;
+
+
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+
+public class ClassUtils extends org.apache.commons.lang.ClassUtils {
+
+    @SuppressWarnings("unchecked")
+    public static <A, B> B cast( A a ) {
+        return ( B ) a;
+    }
+
+
+    @SuppressWarnings("unchecked")
+    private static final Set<Class<?>> WRAPPER_TYPES = new HashSet<Class<?>>(
+            Arrays.asList( Boolean.class, Byte.class, Character.class, Double.class, Float.class, Integer.class,
+                    Long.class, Short.class, Void.class ) );
+
+
+    public static boolean isWrapperType( Class<?> clazz ) {
+        return WRAPPER_TYPES.contains( clazz );
+    }
+
+
+    public static boolean isPrimitiveType( Class<?> clazz ) {
+        if ( clazz == null ) {
+            return false;
+        }
+        return clazz.isPrimitive() || isWrapperType( clazz );
+    }
+
+
+    public static boolean isBasicType( Class<?> clazz ) {
+        if ( clazz == null ) {
+            return false;
+        }
+        return ( String.class.isAssignableFrom( clazz ) ) || isPrimitiveType( clazz );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/utils/CodecUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/utils/CodecUtils.java b/stack/core/src/main/java/org/apache/usergrid/utils/CodecUtils.java
new file mode 100644
index 0000000..0696ac0
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/utils/CodecUtils.java
@@ -0,0 +1,45 @@
+/*
+ * 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.utils;
+
+
+import java.util.UUID;
+
+import org.apache.commons.codec.binary.Base64;
+
+import static org.apache.usergrid.utils.ConversionUtils.bytes;
+
+
+public class CodecUtils {
+
+    public static Base64 base64 = new Base64( true );
+
+
+    public static String base64( byte[] bytes ) {
+        return base64.encodeToString( bytes );
+    }
+
+
+    public static String base64( UUID uuid ) {
+        return base64.encodeToString( bytes( uuid ) );
+    }
+
+
+    public static String base64( String str ) {
+        return Base64.encodeBase64URLSafeString( bytes( str ) );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/utils/CompositeUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/utils/CompositeUtils.java b/stack/core/src/main/java/org/apache/usergrid/utils/CompositeUtils.java
new file mode 100644
index 0000000..e66928d
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/utils/CompositeUtils.java
@@ -0,0 +1,54 @@
+/*
+ * 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.utils;
+
+
+import java.nio.ByteBuffer;
+import java.util.List;
+
+import me.prettyprint.hector.api.beans.AbstractComposite.Component;
+import me.prettyprint.hector.api.beans.AbstractComposite.ComponentEquality;
+import me.prettyprint.hector.api.beans.DynamicComposite;
+
+
+public class CompositeUtils {
+
+    public static Object deserialize( ByteBuffer bytes ) {
+        List<Object> objects = DynamicComposite.fromByteBuffer( bytes );
+        if ( objects.size() > 0 ) {
+            return objects.get( 0 );
+        }
+        return null;
+    }
+
+
+    @SuppressWarnings("unchecked")
+    public static DynamicComposite setEqualityFlag( DynamicComposite composite, ComponentEquality eq ) {
+        if ( composite.isEmpty() ) {
+            return composite;
+        }
+        int i = composite.size() - 1;
+        @SuppressWarnings("rawtypes") Component c = composite.getComponent( i );
+        composite.setComponent( i, c.getValue(), c.getSerializer(), c.getComparator(), eq );
+        return composite;
+    }
+
+
+    public static DynamicComposite setGreaterThanEqualityFlag( DynamicComposite composite ) {
+        return setEqualityFlag( composite, ComponentEquality.GREATER_THAN_EQUAL );
+    }
+}


[48/96] [abbrv] [partial] Change package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/mq/Message.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/mq/Message.java b/stack/core/src/main/java/org/apache/usergrid/mq/Message.java
new file mode 100644
index 0000000..7676225
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/mq/Message.java
@@ -0,0 +1,512 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.mq;
+
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.TreeMap;
+import java.util.UUID;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.apache.usergrid.utils.UUIDUtils;
+import org.codehaus.jackson.annotate.JsonAnyGetter;
+import org.codehaus.jackson.annotate.JsonAnySetter;
+import org.codehaus.jackson.annotate.JsonIgnore;
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
+
+import com.fasterxml.uuid.UUIDComparator;
+
+import static org.apache.commons.collections.IteratorUtils.asEnumeration;
+import static org.apache.commons.collections.MapUtils.getBooleanValue;
+import static org.apache.commons.collections.MapUtils.getByteValue;
+import static org.apache.commons.collections.MapUtils.getDoubleValue;
+import static org.apache.commons.collections.MapUtils.getFloatValue;
+import static org.apache.commons.collections.MapUtils.getIntValue;
+import static org.apache.commons.collections.MapUtils.getLongValue;
+import static org.apache.commons.collections.MapUtils.getShortValue;
+import static org.apache.commons.collections.MapUtils.getString;
+import static org.apache.usergrid.utils.ClassUtils.cast;
+import static org.apache.usergrid.utils.ConversionUtils.bytes;
+import static org.apache.usergrid.utils.ConversionUtils.coerceMap;
+import static org.apache.usergrid.utils.ConversionUtils.getInt;
+import static org.apache.usergrid.utils.ConversionUtils.uuid;
+import static org.apache.usergrid.utils.MapUtils.hashMap;
+import static org.apache.usergrid.utils.UUIDUtils.getTimestampInMillis;
+import static org.apache.usergrid.utils.UUIDUtils.isTimeBased;
+import static org.apache.usergrid.utils.UUIDUtils.newTimeUUID;
+
+
+@XmlRootElement
+public class Message {
+
+    public static final String MESSAGE_CORRELATION_ID = "correlation_id";
+    public static final String MESSAGE_DESTINATION = "destination";
+    public static final String MESSAGE_ID = "uuid";
+    public static final String MESSAGE_REPLY_TO = "reply_to";
+    public static final String MESSAGE_TIMESTAMP = "timestamp";
+    public static final String MESSAGE_TYPE = "type";
+    public static final String MESSAGE_CATEGORY = "category";
+    public static final String MESSAGE_INDEXED = "indexed";
+    public static final String MESSAGE_PERSISTENT = "persistent";
+    public static final String MESSAGE_TRANSACTION = "transaction";
+
+    @SuppressWarnings("rawtypes")
+    public static final Map<String, Class> MESSAGE_PROPERTIES =
+            hashMap( MESSAGE_CORRELATION_ID, ( Class ) String.class ).map( MESSAGE_DESTINATION, String.class )
+                    .map( MESSAGE_ID, UUID.class ).map( MESSAGE_REPLY_TO, String.class )
+                    .map( MESSAGE_TIMESTAMP, Long.class ).map( MESSAGE_TYPE, String.class )
+                    .map( MESSAGE_CATEGORY, String.class ).map( MESSAGE_INDEXED, Boolean.class )
+                    .map( MESSAGE_PERSISTENT, Boolean.class ).map( MESSAGE_TRANSACTION, UUID.class );
+
+
+    public static int compare( Message m1, Message m2 ) {
+        if ( ( m1 == null ) && ( m2 == null ) ) {
+            return 0;
+        }
+        else if ( m1 == null ) {
+            return -1;
+        }
+        else if ( m2 == null ) {
+            return 1;
+        }
+        return UUIDComparator.staticCompare( m1.getUuid(), m2.getUuid() );
+    }
+
+
+    public static List<Message> fromList( List<Map<String, Object>> l ) {
+        List<Message> messages = new ArrayList<Message>( l.size() );
+        for ( Map<String, Object> properties : l ) {
+            messages.add( new Message( properties ) );
+        }
+        return messages;
+    }
+
+
+    public static List<Message> sort( List<Message> messages ) {
+        Collections.sort( messages, new Comparator<Message>() {
+            @Override
+            public int compare( Message m1, Message m2 ) {
+                return Message.compare( m1, m2 );
+            }
+        } );
+        return messages;
+    }
+
+
+    public static List<Message> sortReversed( List<Message> messages ) {
+        Collections.sort( messages, new Comparator<Message>() {
+            @Override
+            public int compare( Message m1, Message m2 ) {
+                return Message.compare( m2, m1 );
+            }
+        } );
+        return messages;
+    }
+
+
+    protected Map<String, Object> properties = new TreeMap<String, Object>( String.CASE_INSENSITIVE_ORDER );
+
+
+    public Message() {
+    }
+
+
+    @SuppressWarnings("unchecked")
+    public Message( Map<String, Object> properties ) {
+        this.properties.putAll( coerceMap( ( Map<String, Class<?>> ) cast( MESSAGE_PROPERTIES ), properties ) );
+    }
+
+
+    @SuppressWarnings("unchecked")
+    public void addCounter( String name, int value ) {
+        Map<String, Integer> counters = null;
+        if ( properties.get( "counters" ) instanceof Map ) {
+            counters = ( Map<String, Integer> ) properties.get( "counters" );
+        }
+        else {
+            counters = new HashMap<String, Integer>();
+            properties.put( "counters", counters );
+        }
+        counters.put( name, value );
+    }
+
+
+    public void clearBody() {
+        properties.clear();
+    }
+
+
+    public void clearProperties() {
+        properties.clear();
+    }
+
+
+    public boolean getBooleanProperty( String name ) {
+        return getBooleanValue( properties, name );
+    }
+
+
+    public byte getByteProperty( String name ) {
+        return getByteValue( properties, name );
+    }
+
+
+    @JsonIgnore
+    public String getCategory() {
+        return getString( properties, MESSAGE_CATEGORY );
+    }
+
+
+    @JsonIgnore
+    public String getCorrelationID() {
+        return getString( properties, MESSAGE_CORRELATION_ID );
+    }
+
+
+    @JsonIgnore
+    public byte[] getCorrelationIDAsBytes() {
+        return bytes( properties.get( MESSAGE_CORRELATION_ID ) );
+    }
+
+
+    @JsonIgnore
+    public Map<String, Integer> getCounters() {
+        Map<String, Integer> counters = new HashMap<String, Integer>();
+        if ( properties.get( "counters" ) instanceof Map ) {
+            @SuppressWarnings("unchecked") Map<String, Object> c = ( Map<String, Object> ) properties.get( "counters" );
+            for ( Entry<String, Object> e : c.entrySet() ) {
+                counters.put( e.getKey(), getInt( e.getValue() ) );
+            }
+        }
+        return counters;
+    }
+
+
+    @JsonIgnore
+    public int getDeliveryMode() {
+        return 2;
+    }
+
+
+    @JsonIgnore
+    public Queue getDestination() {
+        return Queue.getDestination( getString( properties, MESSAGE_DESTINATION ) );
+    }
+
+
+    public double getDoubleProperty( String name ) {
+        return getDoubleValue( properties, name );
+    }
+
+
+    @JsonIgnore
+    public long getExpiration() {
+        return 0;
+    }
+
+
+    public float getFloatProperty( String name ) {
+        return getFloatValue( properties, name );
+    }
+
+
+    public int getIntProperty( String name ) {
+        return getIntValue( properties, name );
+    }
+
+
+    public long getLongProperty( String name ) {
+        return getLongValue( properties, name );
+    }
+
+
+    @JsonIgnore
+    public String getMessageID() {
+        return getUuid().toString();
+    }
+
+
+    public Object getObjectProperty( String name ) {
+        return properties.get( name );
+    }
+
+
+    @JsonIgnore
+    public int getPriority() {
+        return 0;
+    }
+
+
+    @JsonAnyGetter
+    public Map<String, Object> getProperties() {
+        sync();
+        return properties;
+    }
+
+
+    @JsonIgnore
+    @SuppressWarnings("unchecked")
+    public Enumeration<String> getPropertyNames() {
+        return asEnumeration( properties.keySet().iterator() );
+    }
+
+
+    @JsonIgnore
+    public boolean getRedelivered() {
+        return false;
+    }
+
+
+    @JsonIgnore
+    public Queue getReplyTo() {
+        return Queue.getDestination( getString( properties, MESSAGE_REPLY_TO ) );
+    }
+
+
+    public short getShortProperty( String name ) {
+        return getShortValue( properties, name );
+    }
+
+
+    public String getStringProperty( String name ) {
+        return getString( properties, name );
+    }
+
+
+    @JsonIgnore
+    public synchronized long getTimestamp() {
+        if ( properties.containsKey( MESSAGE_TIMESTAMP ) ) {
+            long ts = getLongValue( properties, MESSAGE_TIMESTAMP );
+            if ( ts != 0 ) {
+                return ts;
+            }
+        }
+        long timestamp = getTimestampInMillis( getUuid() );
+        properties.put( MESSAGE_TIMESTAMP, timestamp );
+        return timestamp;
+    }
+
+
+    @JsonIgnore
+    public String getType() {
+        return getString( properties, MESSAGE_TYPE );
+    }
+
+
+    @JsonIgnore
+    public synchronized UUID getUuid() {
+        UUID uuid = uuid( properties.get( MESSAGE_ID ), null );
+        if ( uuid == null ) {
+            if ( properties.containsKey( MESSAGE_TIMESTAMP ) ) {
+                long ts = getLongValue( properties, MESSAGE_TIMESTAMP );
+                uuid = newTimeUUID( ts );
+            }
+            else {
+                uuid = newTimeUUID();
+            }
+
+            properties.put( MESSAGE_ID, uuid );
+            properties.put( MESSAGE_TIMESTAMP, getTimestampInMillis( uuid ) );
+        }
+        return uuid;
+    }
+
+
+    @JsonIgnore
+    public boolean isIndexed() {
+        return getBooleanValue( properties, MESSAGE_INDEXED );
+    }
+
+
+    @JsonIgnore
+    public boolean isPersistent() {
+        return getBooleanValue( properties, MESSAGE_PERSISTENT );
+    }
+
+
+    public boolean propertyExists( String name ) {
+        return properties.containsKey( name );
+    }
+
+
+    public void setBooleanProperty( String name, boolean value ) {
+        properties.put( name, value );
+    }
+
+
+    public void setByteProperty( String name, byte value ) {
+        properties.put( name, value );
+    }
+
+
+    public void setCategory( String category ) {
+        if ( category != null ) {
+            properties.put( MESSAGE_CATEGORY, category.toLowerCase() );
+        }
+    }
+
+
+    public void setCorrelationID( String correlationId ) {
+        properties.put( MESSAGE_CORRELATION_ID, correlationId );
+    }
+
+
+    public void setCorrelationIDAsBytes( byte[] correlationId ) {
+        properties.put( MESSAGE_CORRELATION_ID, correlationId );
+    }
+
+
+    public void setCounters( Map<String, Integer> counters ) {
+        if ( counters == null ) {
+            counters = new HashMap<String, Integer>();
+        }
+        properties.put( "counters", counters );
+    }
+
+
+    public void setDeliveryMode( int arg0 ) {
+    }
+
+
+    public void setDestination( Queue destination ) {
+        properties.put( MESSAGE_CORRELATION_ID, destination.toString() );
+    }
+
+
+    public void setDoubleProperty( String name, double value ) {
+        properties.put( name, value );
+    }
+
+
+    public void setExpiration( long expiration ) {
+    }
+
+
+    public void setFloatProperty( String name, float value ) {
+        properties.put( name, value );
+    }
+
+
+    public void setIndexed( boolean indexed ) {
+        properties.put( MESSAGE_INDEXED, indexed );
+    }
+
+
+    public void setIntProperty( String name, int value ) {
+        properties.put( name, value );
+    }
+
+
+    public void setLongProperty( String name, long value ) {
+        properties.put( name, value );
+    }
+
+
+    public void setMessageID( String id ) {
+        if ( UUIDUtils.isUUID( id ) ) {
+            properties.put( MESSAGE_ID, UUIDUtils.tryGetUUID( id ) );
+        }
+        else {
+            throw new RuntimeException( "Not a UUID" );
+        }
+    }
+
+
+    public void setObjectProperty( String name, Object value ) {
+        properties.put( name, value );
+    }
+
+
+    public void setPersistent( boolean persistent ) {
+        properties.put( MESSAGE_PERSISTENT, persistent );
+    }
+
+
+    public void setPriority( int priority ) {
+    }
+
+
+    @JsonAnySetter
+    public void setProperty( String key, Object value ) {
+        properties.put( key, value );
+    }
+
+
+    public void setRedelivered( boolean redelivered ) {
+    }
+
+
+    public void setReplyTo( Queue destination ) {
+        properties.put( MESSAGE_REPLY_TO, destination.toString() );
+    }
+
+
+    public void setShortProperty( String name, short value ) {
+        properties.put( name, value );
+    }
+
+
+    public void setStringProperty( String name, String value ) {
+        properties.put( name, value );
+    }
+
+
+    public void setTimestamp( long timestamp ) {
+        properties.put( MESSAGE_TIMESTAMP, timestamp );
+    }
+
+
+    public void setType( String type ) {
+        properties.put( MESSAGE_TYPE, type );
+    }
+
+
+    public void setUuid( UUID uuid ) {
+        if ( isTimeBased( uuid ) ) {
+            properties.put( MESSAGE_ID, uuid );
+            properties.put( MESSAGE_TIMESTAMP, getTimestampInMillis( uuid ) );
+        }
+        else {
+            throw new IllegalArgumentException( "Not a time-based UUID" );
+        }
+    }
+
+
+    public void setTransaction( UUID transaction ) {
+        properties.put( MESSAGE_TRANSACTION, transaction );
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public UUID getTransaction() {
+        return ( UUID ) properties.get( MESSAGE_TRANSACTION );
+    }
+
+
+    public void sync() {
+        getUuid();
+        getTimestamp();
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/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
new file mode 100644
index 0000000..40c8a8f
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/mq/Query.java
@@ -0,0 +1,1856 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.mq;
+
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.EnumSet;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+import java.util.UUID;
+import java.util.concurrent.ConcurrentHashMap;
+
+import org.antlr.runtime.ANTLRStringStream;
+import org.antlr.runtime.CommonTokenStream;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.apache.commons.lang.StringUtils;
+import org.apache.usergrid.persistence.CounterResolution;
+import org.apache.usergrid.persistence.Entity;
+import org.apache.usergrid.persistence.Identifier;
+import org.apache.usergrid.persistence.Results;
+import org.apache.usergrid.persistence.Results.Level;
+import org.apache.usergrid.utils.JsonUtils;
+
+import static org.apache.commons.codec.binary.Base64.decodeBase64;
+import static org.apache.commons.lang.StringUtils.isBlank;
+import static org.apache.commons.lang.StringUtils.split;
+import static org.apache.usergrid.persistence.Schema.PROPERTY_TYPE;
+import static org.apache.usergrid.persistence.Schema.PROPERTY_UUID;
+import static org.apache.usergrid.utils.ClassUtils.cast;
+import static org.apache.usergrid.utils.ConversionUtils.uuid;
+import static org.apache.usergrid.utils.ListUtils.first;
+import static org.apache.usergrid.utils.ListUtils.firstBoolean;
+import static org.apache.usergrid.utils.ListUtils.firstInteger;
+import static org.apache.usergrid.utils.ListUtils.firstLong;
+import static org.apache.usergrid.utils.ListUtils.firstUuid;
+import static org.apache.usergrid.utils.ListUtils.isEmpty;
+import static org.apache.usergrid.utils.MapUtils.toMapList;
+
+
+public class Query {
+
+    private static final Logger logger = LoggerFactory.getLogger( Query.class );
+
+    public static final int DEFAULT_LIMIT = 10;
+
+    protected String type;
+    protected List<SortPredicate> sortPredicates = new ArrayList<SortPredicate>();
+    protected List<FilterPredicate> filterPredicates = new ArrayList<FilterPredicate>();
+    protected UUID startResult;
+    protected String cursor;
+    protected int limit = 0;
+    protected boolean limitSet = false;
+
+    protected Map<String, String> selectSubjects = new LinkedHashMap<String, String>();
+    protected boolean mergeSelectResults = false;
+    protected Level level = Level.ALL_PROPERTIES;
+    protected String connection;
+    protected List<String> permissions;
+    protected boolean reversed;
+    protected boolean reversedSet = false;
+    protected Long startTime;
+    protected Long finishTime;
+    protected boolean pad;
+    protected CounterResolution resolution = CounterResolution.ALL;
+    protected List<Identifier> users;
+    protected List<Identifier> groups;
+    protected List<Identifier> identifiers;
+    protected List<String> categories;
+    protected List<CounterFilterPredicate> counterFilters;
+
+
+    public Query() {
+    }
+
+
+    public Query( String type ) {
+        this.type = type;
+    }
+
+
+    public Query( Query q ) {
+        if ( q != null ) {
+            type = q.type;
+            sortPredicates = q.sortPredicates != null ? new ArrayList<SortPredicate>( q.sortPredicates ) : null;
+            filterPredicates = q.filterPredicates != null ? new ArrayList<FilterPredicate>( q.filterPredicates ) : null;
+            startResult = q.startResult;
+            cursor = q.cursor;
+            limit = q.limit;
+            limitSet = q.limitSet;
+            selectSubjects = q.selectSubjects != null ? new LinkedHashMap<String, String>( q.selectSubjects ) : null;
+            mergeSelectResults = q.mergeSelectResults;
+            level = q.level;
+            connection = q.connection;
+            permissions = q.permissions != null ? new ArrayList<String>( q.permissions ) : null;
+            reversed = q.reversed;
+            reversedSet = q.reversedSet;
+            startTime = q.startTime;
+            finishTime = q.finishTime;
+            resolution = q.resolution;
+            pad = q.pad;
+            users = q.users != null ? new ArrayList<Identifier>( q.users ) : null;
+            groups = q.groups != null ? new ArrayList<Identifier>( q.groups ) : null;
+            identifiers = q.identifiers != null ? new ArrayList<Identifier>( q.identifiers ) : null;
+            categories = q.categories != null ? new ArrayList<String>( q.categories ) : null;
+            counterFilters =
+                    q.counterFilters != null ? new ArrayList<CounterFilterPredicate>( q.counterFilters ) : null;
+        }
+    }
+
+
+    public static Query fromQL( String ql ) {
+        if ( ql == null ) {
+            return null;
+        }
+        ql = ql.trim();
+
+        String qlt = ql.toLowerCase();
+        if ( !qlt.startsWith( "select" ) && !qlt.startsWith( "insert" ) && !qlt.startsWith( "update" ) && !qlt
+                .startsWith( "delete" ) ) {
+            if ( qlt.startsWith( "order by" ) ) {
+                ql = "select * " + ql;
+            }
+            else {
+                ql = "select * where " + ql;
+            }
+        }
+
+        try {
+            ANTLRStringStream in = new ANTLRStringStream( ql.trim() );
+            QueryFilterLexer lexer = new QueryFilterLexer( in );
+            CommonTokenStream tokens = new CommonTokenStream( lexer );
+            QueryFilterParser parser = new QueryFilterParser( tokens );
+            Query q = parser.ql();
+            return q;
+        }
+        catch ( Exception e ) {
+            logger.error( "Unable to parse \"" + ql + "\"", e );
+        }
+        return null;
+    }
+
+
+    public static Query newQueryIfNull( Query query ) {
+        if ( query == null ) {
+            query = new Query();
+        }
+        return query;
+    }
+
+
+    public static Query fromJsonString( String json ) {
+        Object o = JsonUtils.parse( json );
+        if ( o instanceof Map ) {
+            @SuppressWarnings({ "unchecked", "rawtypes" }) Map<String, List<String>> params =
+                    cast( toMapList( ( Map ) o ) );
+            return fromQueryParams( params );
+        }
+        return null;
+    }
+
+
+    public static Query fromQueryParams( Map<String, List<String>> params ) {
+        String type = null;
+        Query q = null;
+        String ql = null;
+        String connection = null;
+        UUID start = null;
+        String cursor = null;
+        Integer limit = null;
+        List<String> permissions = null;
+        Boolean reversed = null;
+        Long startTime = null;
+        Long finishTime = null;
+        Boolean pad = null;
+        CounterResolution resolution = null;
+        List<Identifier> users = null;
+        List<Identifier> groups = null;
+        List<Identifier> identifiers = null;
+        List<String> categories = null;
+        List<CounterFilterPredicate> counterFilters = null;
+
+        List<String> l = null;
+
+        ql = first( params.get( "ql" ) );
+        type = first( params.get( "type" ) );
+        reversed = firstBoolean( params.get( "reversed" ) );
+        connection = first( params.get( "connection" ) );
+        start = firstUuid( params.get( "start" ) );
+        cursor = first( params.get( "cursor" ) );
+        limit = firstInteger( params.get( "limit" ) );
+        permissions = params.get( "permission" );
+        startTime = firstLong( params.get( "start_time" ) );
+        finishTime = firstLong( params.get( "end_time" ) );
+
+        l = params.get( "resolution" );
+        if ( !isEmpty( l ) ) {
+            resolution = CounterResolution.fromString( l.get( 0 ) );
+        }
+
+        users = Identifier.fromList( params.get( "user" ) );
+        groups = Identifier.fromList( params.get( "group" ) );
+
+        categories = params.get( "category" );
+
+        l = params.get( "counter" );
+        if ( !isEmpty( l ) ) {
+            counterFilters = CounterFilterPredicate.fromList( l );
+        }
+
+        pad = firstBoolean( params.get( "pad" ) );
+
+        for ( Entry<String, List<String>> param : params.entrySet() ) {
+            if ( ( param.getValue() == null ) || ( param.getValue().size() == 0 ) ) {
+                Identifier identifier = Identifier.from( param.getKey() );
+                if ( identifier != null ) {
+                    if ( identifiers == null ) {
+                        identifiers = new ArrayList<Identifier>();
+                    }
+                    identifiers.add( identifier );
+                }
+            }
+        }
+
+        if ( ql != null ) {
+            q = Query.fromQL( ql );
+        }
+
+        l = params.get( "filter" );
+        if ( !isEmpty( l ) ) {
+            q = newQueryIfNull( q );
+            for ( String s : l ) {
+                q.addFilter( s );
+            }
+        }
+
+        l = params.get( "sort" );
+        if ( !isEmpty( l ) ) {
+            q = newQueryIfNull( q );
+            for ( String s : l ) {
+                q.addSort( s );
+            }
+        }
+
+        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 ( categories != null ) {
+            q = newQueryIfNull( q );
+            q.setCategories( categories );
+        }
+
+        if ( counterFilters != null ) {
+            q = newQueryIfNull( q );
+            q.setCounterFilters( counterFilters );
+        }
+
+        if ( pad != null ) {
+            q = newQueryIfNull( q );
+            q.setPad( pad );
+        }
+
+        if ( users != null ) {
+            q = newQueryIfNull( q );
+            q.setUsers( users );
+        }
+
+        if ( groups != null ) {
+            q = newQueryIfNull( q );
+            q.setGroups( groups );
+        }
+
+        if ( identifiers != null ) {
+            q = newQueryIfNull( q );
+            q.setIdentifiers( identifiers );
+        }
+
+        if ( reversed != null ) {
+            q = newQueryIfNull( q );
+            q.setReversed( reversed );
+        }
+
+        return q;
+    }
+
+
+    public static Query searchForProperty( String propertyName, Object propertyValue ) {
+        Query q = new Query();
+        q.addEqualityFilter( propertyName, propertyValue );
+        return q;
+    }
+
+
+    public static Query findForProperty( String propertyName, Object propertyValue ) {
+        Query q = new Query();
+        q.addEqualityFilter( propertyName, propertyValue );
+        q.setLimit( 1 );
+        return q;
+    }
+
+
+    public static Query fromUUID( UUID uuid ) {
+        Query q = new Query();
+        q.addIdentifier( Identifier.fromUUID( uuid ) );
+        return q;
+    }
+
+
+    public static Query fromName( String name ) {
+        Query q = new Query();
+        q.addIdentifier( Identifier.fromName( name ) );
+        return q;
+    }
+
+
+    public static Query fromEmail( String email ) {
+        Query q = new Query();
+        q.addIdentifier( Identifier.fromEmail( email ) );
+        return q;
+    }
+
+
+    public static Query fromIdentifier( Object id ) {
+        Query q = new Query();
+        q.addIdentifier( Identifier.from( id ) );
+        return q;
+    }
+
+
+    public boolean isIdsOnly() {
+        if ( ( selectSubjects.size() == 1 ) && selectSubjects.containsKey( PROPERTY_UUID ) ) {
+            level = Level.IDS;
+            return true;
+        }
+        return false;
+    }
+
+
+    public void setIdsOnly( boolean idsOnly ) {
+        if ( idsOnly ) {
+            selectSubjects = new LinkedHashMap<String, String>();
+            selectSubjects.put( PROPERTY_UUID, PROPERTY_UUID );
+            level = Level.IDS;
+        }
+        else if ( isIdsOnly() ) {
+            selectSubjects = new LinkedHashMap<String, String>();
+            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 String getEntityType() {
+        return type;
+    }
+
+
+    public void setEntityType( String type ) {
+        this.type = type;
+    }
+
+
+    public Query withEntityType( String type ) {
+        this.type = type;
+        return this;
+    }
+
+
+    public String getConnectionType() {
+        return connection;
+    }
+
+
+    public void setConnectionType( String connection ) {
+        this.connection = connection;
+    }
+
+
+    public Query withConnectionType( String connection ) {
+        this.connection = connection;
+        return this;
+    }
+
+
+    public List<String> getPermissions() {
+        return permissions;
+    }
+
+
+    public void setPermissions( List<String> permissions ) {
+        this.permissions = permissions;
+    }
+
+
+    public Query withPermissions( List<String> permissions ) {
+        this.permissions = permissions;
+        return this;
+    }
+
+
+    public Query addSelect( String select ) {
+
+        return addSelect( select, null );
+    }
+
+
+    public Query addSelect( String select, String output ) {
+        // be paranoid with the null checks because
+        // the query parser sometimes flakes out
+        if ( select == null ) {
+            return this;
+        }
+        select = select.trim();
+
+        if ( select.equals( "*" ) ) {
+            return this;
+        }
+
+        if ( StringUtils.isNotEmpty( output ) ) {
+            mergeSelectResults = true;
+        }
+        else {
+            mergeSelectResults = false;
+        }
+
+        if ( output == null ) {
+            output = "";
+        }
+
+        selectSubjects.put( select, output );
+
+        return this;
+    }
+
+
+    public boolean hasSelectSubjects() {
+        return !selectSubjects.isEmpty();
+    }
+
+
+    public Set<String> getSelectSubjects() {
+        return selectSubjects.keySet();
+    }
+
+
+    public Map<String, String> getSelectAssignments() {
+        return selectSubjects;
+    }
+
+
+    public void setMergeSelectResults( boolean mergeSelectResults ) {
+        this.mergeSelectResults = mergeSelectResults;
+    }
+
+
+    public Query withMergeSelectResults( boolean mergeSelectResults ) {
+        this.mergeSelectResults = mergeSelectResults;
+        return this;
+    }
+
+
+    public boolean isMergeSelectResults() {
+        return mergeSelectResults;
+    }
+
+
+    public Query addSort( String propertyName ) {
+        if ( isBlank( propertyName ) ) {
+            return this;
+        }
+        propertyName = propertyName.trim();
+        if ( propertyName.indexOf( ',' ) >= 0 ) {
+            String[] propertyNames = split( propertyName, ',' );
+            for ( String s : propertyNames ) {
+                addSort( s );
+            }
+            return this;
+        }
+
+        SortDirection direction = SortDirection.ASCENDING;
+        if ( propertyName.indexOf( ' ' ) >= 0 ) {
+            String[] parts = split( propertyName, ' ' );
+            if ( parts.length > 1 ) {
+                propertyName = parts[0];
+                direction = SortDirection.find( parts[1] );
+            }
+        }
+        else if ( propertyName.startsWith( "-" ) ) {
+            propertyName = propertyName.substring( 1 );
+            direction = SortDirection.DESCENDING;
+        }
+        else if ( propertyName.startsWith( "+" ) ) {
+            propertyName = propertyName.substring( 1 );
+            direction = SortDirection.ASCENDING;
+        }
+
+        return addSort( propertyName, direction );
+    }
+
+
+    public Query addSort( String propertyName, SortDirection direction ) {
+        if ( isBlank( propertyName ) ) {
+            return this;
+        }
+        propertyName = propertyName.trim();
+        for ( SortPredicate s : sortPredicates ) {
+            if ( s.getPropertyName().equals( propertyName ) ) {
+                logger.error(
+                        "Attempted to set sort order for " + s.getPropertyName() + " more than once, discardng..." );
+                return this;
+            }
+        }
+        sortPredicates.add( new SortPredicate( propertyName, direction ) );
+        return this;
+    }
+
+
+    public Query addSort( SortPredicate sort ) {
+        if ( sort == null ) {
+            return this;
+        }
+        for ( SortPredicate s : sortPredicates ) {
+            if ( s.getPropertyName().equals( sort.getPropertyName() ) ) {
+                logger.error(
+                        "Attempted to set sort order for " + s.getPropertyName() + " more than once, discardng..." );
+                return this;
+            }
+        }
+        sortPredicates.add( sort );
+        return this;
+    }
+
+
+    public List<SortPredicate> getSortPredicates() {
+        return sortPredicates;
+    }
+
+
+    public boolean hasSortPredicates() {
+        return !sortPredicates.isEmpty();
+    }
+
+
+    public Query addEqualityFilter( String propertyName, Object value ) {
+        return addFilter( propertyName, FilterOperator.EQUAL, value );
+    }
+
+
+    public Query addFilter( String propertyName, FilterOperator operator, Object value ) {
+        if ( ( propertyName == null ) || ( operator == null ) || ( value == null ) ) {
+            return this;
+        }
+        if ( PROPERTY_TYPE.equalsIgnoreCase( propertyName ) && ( value != null ) ) {
+            if ( operator == FilterOperator.EQUAL ) {
+                type = value.toString();
+            }
+        }
+        else if ( "connection".equalsIgnoreCase( propertyName ) && ( value != null ) ) {
+            if ( operator == FilterOperator.EQUAL ) {
+                connection = value.toString();
+            }
+        }
+        else {
+            for ( FilterPredicate f : filterPredicates ) {
+                if ( f.getPropertyName().equals( propertyName ) && f.getValue().equals( value ) && "*"
+                        .equals( value ) ) {
+                    logger.error( "Attempted to set wildcard wilder for " + f.getPropertyName()
+                            + " more than once, discardng..." );
+                    return this;
+                }
+            }
+            filterPredicates.add( FilterPredicate.normalize( new FilterPredicate( propertyName, operator, value ) ) );
+        }
+        return this;
+    }
+
+
+    public Query addFilter( String filterStr ) {
+        if ( filterStr == null ) {
+            return this;
+        }
+        FilterPredicate filter = FilterPredicate.valueOf( filterStr );
+        if ( ( filter != null ) && ( filter.propertyName != null ) && ( filter.operator != null ) && ( filter.value
+                != null ) ) {
+
+            if ( PROPERTY_TYPE.equalsIgnoreCase( filter.propertyName ) ) {
+                if ( filter.operator == FilterOperator.EQUAL ) {
+                    type = filter.value.toString();
+                }
+            }
+            else if ( "connection".equalsIgnoreCase( filter.propertyName ) ) {
+                if ( filter.operator == FilterOperator.EQUAL ) {
+                    connection = filter.value.toString();
+                }
+            }
+            else {
+                for ( FilterPredicate f : filterPredicates ) {
+                    if ( f.getPropertyName().equals( filter.getPropertyName() ) && f.getValue()
+                                                                                    .equals( filter.getValue() ) && "*"
+                            .equals( filter.getValue() ) ) {
+                        logger.error( "Attempted to set wildcard wilder for " + f.getPropertyName()
+                                + " more than once, discardng..." );
+                        return this;
+                    }
+                }
+                filterPredicates.add( filter );
+            }
+        }
+        else {
+            logger.error( "Unable to add filter to query: " + filterStr );
+        }
+        return this;
+    }
+
+
+    public Query addFilter( FilterPredicate filter ) {
+        filter = FilterPredicate.normalize( filter );
+        if ( ( filter != null ) && ( filter.propertyName != null ) && ( filter.operator != null ) && ( filter.value
+                != null ) ) {
+
+            if ( PROPERTY_TYPE.equalsIgnoreCase( filter.propertyName ) ) {
+                if ( filter.operator == FilterOperator.EQUAL ) {
+                    type = filter.value.toString();
+                }
+            }
+            else if ( "connection".equalsIgnoreCase( filter.propertyName ) ) {
+                if ( filter.operator == FilterOperator.EQUAL ) {
+                    connection = filter.value.toString();
+                }
+            }
+            else {
+                filterPredicates.add( filter );
+            }
+        }
+        return this;
+    }
+
+
+    public List<FilterPredicate> getFilterPredicates() {
+        return filterPredicates;
+    }
+
+
+    public boolean hasFilterPredicates() {
+        return !filterPredicates.isEmpty();
+    }
+
+
+    public Map<String, Object> getEqualityFilters() {
+        Map<String, Object> map = new LinkedHashMap<String, Object>();
+
+        for ( FilterPredicate f : filterPredicates ) {
+            if ( f.operator == FilterOperator.EQUAL ) {
+                Object val = f.getStartValue();
+                if ( val != null ) {
+                    map.put( f.getPropertyName(), val );
+                }
+            }
+        }
+        return map.size() > 0 ? map : null;
+    }
+
+
+    public boolean hasFiltersForProperty( String name ) {
+        return hasFiltersForProperty( FilterOperator.EQUAL, name );
+    }
+
+
+    public boolean hasFiltersForProperty( FilterOperator operator, String name ) {
+        return getFilterForProperty( operator, name ) != null;
+    }
+
+
+    public FilterPredicate getFilterForProperty( FilterOperator operator, String name ) {
+        if ( name == null ) {
+            return null;
+        }
+        ListIterator<FilterPredicate> iterator = filterPredicates.listIterator();
+        while ( iterator.hasNext() ) {
+            FilterPredicate f = iterator.next();
+            if ( f.propertyName.equalsIgnoreCase( name ) ) {
+                if ( operator != null ) {
+                    if ( operator == f.operator ) {
+                        return f;
+                    }
+                }
+                else {
+                    return f;
+                }
+            }
+        }
+        return null;
+    }
+
+
+    public void removeFiltersForProperty( String name ) {
+        if ( name == null ) {
+            return;
+        }
+        ListIterator<FilterPredicate> iterator = filterPredicates.listIterator();
+        while ( iterator.hasNext() ) {
+            FilterPredicate f = iterator.next();
+            if ( f.propertyName.equalsIgnoreCase( name ) ) {
+                iterator.remove();
+            }
+        }
+    }
+
+
+    public 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 = decodeBase64( cursor );
+            if ( ( cursorBytes != null ) && ( cursorBytes.length == 16 ) ) {
+                startResult = uuid( cursorBytes );
+            }
+        }
+        return startResult;
+    }
+
+
+    public String getCursor() {
+        return cursor;
+    }
+
+
+    public void setCursor( String cursor ) {
+        if ( cursor != null ) {
+            if ( cursor.length() == 22 ) {
+                byte[] cursorBytes = decodeBase64( cursor );
+                if ( ( cursorBytes != null ) && ( cursorBytes.length == 16 ) ) {
+                    startResult = uuid( cursorBytes );
+                    cursor = null;
+                }
+            }
+        }
+        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 ) {
+        limitSet = true;
+        this.limit = limit;
+    }
+
+
+    public Query withLimit( int limit ) {
+        limitSet = true;
+        this.limit = limit;
+        return this;
+    }
+
+
+    public boolean isLimitSet() {
+        return limitSet;
+    }
+
+
+    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 List<Identifier> getUsers() {
+        return users;
+    }
+
+
+    public void addUser( Identifier user ) {
+        if ( users == null ) {
+            users = new ArrayList<Identifier>();
+        }
+        users.add( user );
+    }
+
+
+    public void setUsers( List<Identifier> users ) {
+        this.users = users;
+    }
+
+
+    public List<Identifier> getGroups() {
+        return groups;
+    }
+
+
+    public void addGroup( Identifier group ) {
+        if ( groups == null ) {
+            groups = new ArrayList<Identifier>();
+        }
+        groups.add( group );
+    }
+
+
+    public void setGroups( List<Identifier> groups ) {
+        this.groups = groups;
+    }
+
+
+    public List<Identifier> getIdentifiers() {
+        return identifiers;
+    }
+
+
+    public void addIdentifier( Identifier identifier ) {
+        if ( identifiers == null ) {
+            identifiers = new ArrayList<Identifier>();
+        }
+        identifiers.add( identifier );
+    }
+
+
+    public void setIdentifiers( List<Identifier> identifiers ) {
+        this.identifiers = identifiers;
+    }
+
+
+    public boolean containsUuidIdentifersOnly() {
+        if ( hasFilterPredicates() ) {
+            return false;
+        }
+        if ( ( identifiers == null ) || identifiers.isEmpty() ) {
+            return false;
+        }
+        for ( Identifier identifier : identifiers ) {
+            if ( !identifier.isUUID() ) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+
+    public boolean containsSingleUuidIdentifier() {
+        return containsUuidIdentifersOnly() && ( identifiers.size() == 1 );
+    }
+
+
+    public List<UUID> getUuidIdentifiers() {
+        if ( ( identifiers == null ) || identifiers.isEmpty() ) {
+            return null;
+        }
+        List<UUID> ids = new ArrayList<UUID>();
+        for ( Identifier identifier : identifiers ) {
+            if ( identifier.isUUID() ) {
+                ids.add( identifier.getUUID() );
+            }
+        }
+        return ids;
+    }
+
+
+    public UUID getSingleUuidIdentifier() {
+        if ( !containsSingleUuidIdentifier() ) {
+            return null;
+        }
+        return ( identifiers.get( 0 ).getUUID() );
+    }
+
+
+    public boolean containsNameIdentifiersOnly() {
+        if ( hasFilterPredicates() ) {
+            return false;
+        }
+        if ( ( identifiers == null ) || identifiers.isEmpty() ) {
+            return false;
+        }
+        for ( Identifier identifier : identifiers ) {
+            if ( !identifier.isName() ) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+
+    public boolean containsSingleNameIdentifier() {
+        return containsNameIdentifiersOnly() && ( identifiers.size() == 1 );
+    }
+
+
+    public List<String> getNameIdentifiers() {
+        if ( ( identifiers == null ) || identifiers.isEmpty() ) {
+            return null;
+        }
+        List<String> names = new ArrayList<String>();
+        for ( Identifier identifier : identifiers ) {
+            if ( identifier.isName() ) {
+                names.add( identifier.getName() );
+            }
+        }
+        return names;
+    }
+
+
+    public String getSingleNameIdentifier() {
+        if ( !containsSingleNameIdentifier() ) {
+            return null;
+        }
+        return ( identifiers.get( 0 ).toString() );
+    }
+
+
+    public boolean containsEmailIdentifiersOnly() {
+        if ( hasFilterPredicates() ) {
+            return false;
+        }
+        if ( ( identifiers == null ) || identifiers.isEmpty() ) {
+            return false;
+        }
+        for ( Identifier identifier : identifiers ) {
+            if ( identifier.isEmail() ) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+
+    public boolean containsSingleEmailIdentifier() {
+        return containsEmailIdentifiersOnly() && ( identifiers.size() == 1 );
+    }
+
+
+    public List<String> getEmailIdentifiers() {
+        if ( ( identifiers == null ) || identifiers.isEmpty() ) {
+            return null;
+        }
+        List<String> emails = new ArrayList<String>();
+        for ( Identifier identifier : identifiers ) {
+            if ( identifier.isEmail() ) {
+                emails.add( identifier.getEmail() );
+            }
+        }
+        return emails;
+    }
+
+
+    public String getSingleEmailIdentifier() {
+        if ( !containsSingleEmailIdentifier() ) {
+            return null;
+        }
+        return ( identifiers.get( 0 ).toString() );
+    }
+
+
+    public boolean containsNameOrEmailIdentifiersOnly() {
+        if ( hasFilterPredicates() ) {
+            return false;
+        }
+        if ( ( identifiers == null ) || identifiers.isEmpty() ) {
+            return false;
+        }
+        for ( Identifier identifier : identifiers ) {
+            if ( !identifier.isEmail() && !identifier.isName() ) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+
+    public boolean containsSingleNameOrEmailIdentifier() {
+        return containsNameOrEmailIdentifiersOnly() && ( identifiers.size() == 1 );
+    }
+
+
+    public List<String> getNameAndEmailIdentifiers() {
+        if ( ( identifiers == null ) || identifiers.isEmpty() ) {
+            return null;
+        }
+        List<String> ids = new ArrayList<String>();
+        for ( Identifier identifier : identifiers ) {
+            if ( identifier.isEmail() ) {
+                ids.add( identifier.getEmail() );
+            }
+            else if ( identifier.isName() ) {
+                ids.add( identifier.getName() );
+            }
+        }
+        return ids;
+    }
+
+
+    public String getSingleNameOrEmailIdentifier() {
+        if ( !containsSingleNameOrEmailIdentifier() ) {
+            return null;
+        }
+        return ( identifiers.get( 0 ).toString() );
+    }
+
+
+    public List<String> getCategories() {
+        return categories;
+    }
+
+
+    public void addCategory( String category ) {
+        if ( categories == null ) {
+            categories = new ArrayList<String>();
+        }
+        categories.add( category );
+    }
+
+
+    public void setCategories( List<String> categories ) {
+        this.categories = categories;
+    }
+
+
+    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 );
+    }
+
+
+    public void setCounterFilters( List<CounterFilterPredicate> counterFilters ) {
+        this.counterFilters = counterFilters;
+    }
+
+
+    @Override
+    public String toString() {
+        if ( selectSubjects.isEmpty() && filterPredicates.isEmpty() ) {
+            return "";
+        }
+
+        StringBuilder s = new StringBuilder( "select " );
+        if ( type == null ) {
+            if ( selectSubjects.isEmpty() ) {
+                s.append( "*" );
+            }
+            else {
+                if ( mergeSelectResults ) {
+                    s.append( "{ " );
+                    boolean first = true;
+                    for ( Map.Entry<String, String> select : selectSubjects.entrySet() ) {
+                        if ( !first ) {
+                            s.append( ", " );
+                        }
+                        s.append( select.getValue() + " : " + select.getKey() );
+                        first = false;
+                    }
+                    s.append( " }" );
+                }
+                else {
+                    boolean first = true;
+                    for ( String select : selectSubjects.keySet() ) {
+                        if ( !first ) {
+                            s.append( ", " );
+                        }
+                        s.append( select );
+                        first = false;
+                    }
+                }
+            }
+        }
+        else {
+            s.append( type );
+        }
+        if ( !filterPredicates.isEmpty() ) {
+            s.append( " where " );
+            boolean first = true;
+            for ( FilterPredicate f : filterPredicates ) {
+                if ( !first ) {
+                    s.append( " and " );
+                }
+                s.append( f.toString() );
+                first = false;
+            }
+        }
+        return s.toString();
+    }
+
+
+    public static enum FilterOperator {
+        LESS_THAN( "<", "lt" ), LESS_THAN_OR_EQUAL( "<=", "lte" ), GREATER_THAN( ">", "gt" ),
+        GREATER_THAN_OR_EQUAL( ">=", "gte" ), EQUAL( "=", "eq" ), NOT_EQUAL( "!=", "ne" ), IN( "in", null ),
+        CONTAINS( "contains", null ), WITHIN( "within", null );
+
+        private final String shortName;
+        private final String textName;
+
+
+        FilterOperator( String shortName, String textName ) {
+            this.shortName = shortName;
+            this.textName = textName;
+        }
+
+
+        static Map<String, FilterOperator> nameMap = new ConcurrentHashMap<String, FilterOperator>();
+
+
+        static {
+            for ( FilterOperator op : EnumSet.allOf( FilterOperator.class ) ) {
+                if ( op.shortName != null ) {
+                    nameMap.put( op.shortName, op );
+                }
+                if ( op.textName != null ) {
+                    nameMap.put( op.textName, op );
+                }
+            }
+        }
+
+
+        public static FilterOperator find( String s ) {
+            if ( s == null ) {
+                return null;
+            }
+            return nameMap.get( s );
+        }
+
+
+        @Override
+        public String toString() {
+            return shortName;
+        }
+    }
+
+
+    public static enum SortDirection {
+        ASCENDING, DESCENDING;
+
+
+        public static SortDirection find( String s ) {
+            if ( s == null ) {
+                return ASCENDING;
+            }
+            s = s.toLowerCase();
+            if ( s.startsWith( "asc" ) ) {
+                return ASCENDING;
+            }
+            if ( s.startsWith( "des" ) ) {
+                return DESCENDING;
+            }
+            if ( s.equals( "+" ) ) {
+                return ASCENDING;
+            }
+            if ( s.equals( "-" ) ) {
+                return DESCENDING;
+            }
+            return ASCENDING;
+        }
+    }
+
+
+    public static final class SortPredicate implements Serializable {
+        private static final long serialVersionUID = 1L;
+        private final String propertyName;
+        private final Query.SortDirection direction;
+
+
+        public SortPredicate( String propertyName, Query.SortDirection direction ) {
+            if ( propertyName == null ) {
+                throw new NullPointerException( "Property name was null" );
+            }
+
+            if ( direction == null ) {
+                direction = SortDirection.ASCENDING;
+            }
+
+            this.propertyName = propertyName.trim();
+            this.direction = direction;
+        }
+
+
+        public SortPredicate( String propertyName, String direction ) {
+            this( propertyName, SortDirection.find( direction ) );
+        }
+
+
+        public String getPropertyName() {
+            return propertyName;
+        }
+
+
+        public Query.SortDirection getDirection() {
+            return direction;
+        }
+
+
+        public FilterPredicate toFilter() {
+            return new FilterPredicate( propertyName, FilterOperator.EQUAL, "*" );
+        }
+
+
+        @Override
+        public boolean equals( Object o ) {
+            if ( this == o ) {
+                return true;
+            }
+            if ( ( o == null ) || ( super.getClass() != o.getClass() ) ) {
+                return false;
+            }
+
+            SortPredicate that = ( SortPredicate ) o;
+
+            if ( direction != that.direction ) {
+                return false;
+            }
+
+            return ( propertyName.equals( that.propertyName ) );
+        }
+
+
+        @Override
+        public int hashCode() {
+            int result = propertyName.hashCode();
+            result = ( 31 * result ) + direction.hashCode();
+            return result;
+        }
+
+
+        @Override
+        public String toString() {
+            return propertyName + ( ( direction == Query.SortDirection.DESCENDING ) ? " DESC" : "" );
+        }
+    }
+
+
+    public static final class FilterPredicate implements Serializable {
+        private static final long serialVersionUID = 1L;
+        private final String propertyName;
+        private final Query.FilterOperator operator;
+        private final Object value;
+        private String cursor;
+
+
+        @SuppressWarnings({ "rawtypes", "unchecked" })
+        public FilterPredicate( String propertyName, Query.FilterOperator operator, Object value ) {
+            if ( propertyName == null ) {
+                throw new NullPointerException( "Property name was null" );
+            }
+            if ( operator == null ) {
+                throw new NullPointerException( "Operator was null" );
+            }
+            if ( ( operator == Query.FilterOperator.IN ) || ( operator == Query.FilterOperator.WITHIN ) ) {
+                if ( ( !( value instanceof Collection ) ) && ( value instanceof Iterable ) ) {
+                    List newValue = new ArrayList();
+                    for ( Iterator i$ = ( ( Iterable ) value ).iterator(); i$.hasNext(); ) {
+                        Object val = i$.next();
+                        newValue.add( val );
+                    }
+                    value = newValue;
+                }
+                // DataTypeUtils.checkSupportedValue(propertyName, value, true,
+                // true);
+            }
+            else {
+                // DataTypeUtils.checkSupportedValue(propertyName, value, false,
+                // false);
+            }
+            this.propertyName = propertyName;
+            this.operator = operator;
+            this.value = value;
+        }
+
+
+        public FilterPredicate( String propertyName, String operator, String value, String secondValue,
+                                String thirdValue ) {
+            this.propertyName = propertyName;
+            this.operator = FilterOperator.find( operator );
+            Object first_obj = parseValue( value, 0 );
+            Object second_obj = parseValue( secondValue, 0 );
+            Object third_obj = parseValue( thirdValue, 0 );
+            if ( second_obj != null ) {
+                if ( third_obj != null ) {
+                    this.value = Arrays.asList( first_obj, second_obj, third_obj );
+                }
+                else {
+                    this.value = Arrays.asList( first_obj, second_obj );
+                }
+            }
+            else {
+                this.value = first_obj;
+            }
+        }
+
+
+        public FilterPredicate( String propertyName, String operator, String value, int valueType, String secondValue,
+                                int secondValueType, String thirdValue, int thirdValueType ) {
+            this.propertyName = propertyName;
+            this.operator = FilterOperator.find( operator );
+            Object first_obj = parseValue( value, valueType );
+            Object second_obj = parseValue( secondValue, secondValueType );
+            Object third_obj = parseValue( thirdValue, thirdValueType );
+            if ( second_obj != null ) {
+                if ( third_obj != null ) {
+                    this.value = Arrays.asList( first_obj, second_obj, third_obj );
+                }
+                else {
+                    this.value = Arrays.asList( first_obj, second_obj );
+                }
+            }
+            else {
+                this.value = first_obj;
+            }
+        }
+
+
+        private static Object parseValue( String val, int valueType ) {
+            if ( val == null ) {
+                return null;
+            }
+
+            if ( val.startsWith( "'" ) && ( val.length() > 1 ) ) {
+                return val.substring( 1, val.length() - 1 );
+            }
+
+            if ( val.equalsIgnoreCase( "true" ) || val.equalsIgnoreCase( "false" ) ) {
+                return Boolean.valueOf( val );
+            }
+
+            if ( val.length() == 36 ) {
+                try {
+                    return UUID.fromString( val );
+                }
+                catch ( IllegalArgumentException e ) {
+                }
+            }
+
+            try {
+                return Long.valueOf( val );
+            }
+            catch ( NumberFormatException e ) {
+            }
+
+            try {
+                return Float.valueOf( val );
+            }
+            catch ( NumberFormatException e ) {
+
+            }
+
+            return null;
+        }
+
+
+        public static FilterPredicate valueOf( String str ) {
+            if ( str == null ) {
+                return null;
+            }
+            try {
+                ANTLRStringStream in = new ANTLRStringStream( str.trim() );
+                QueryFilterLexer lexer = new QueryFilterLexer( in );
+                CommonTokenStream tokens = new CommonTokenStream( lexer );
+                QueryFilterParser parser = new QueryFilterParser( tokens );
+                FilterPredicate filter = parser.filter();
+                return normalize( filter );
+            }
+            catch ( Exception e ) {
+                logger.error( "Unable to parse \"" + str + "\"", e );
+            }
+            return null;
+        }
+
+
+        public static FilterPredicate normalize( FilterPredicate p ) {
+            if ( p == null ) {
+                return null;
+            }
+            if ( p.operator == FilterOperator.CONTAINS ) {
+                String propertyName = appendSuffix( p.propertyName, "keywords" );
+                return new FilterPredicate( propertyName, FilterOperator.EQUAL, p.value );
+            }
+            else if ( p.operator == FilterOperator.WITHIN ) {
+                String propertyName = appendSuffix( p.propertyName, "coordinates" );
+                return new FilterPredicate( propertyName, FilterOperator.WITHIN, p.value );
+            }
+
+            return p;
+        }
+
+
+        private static String appendSuffix( String str, String suffix ) {
+            if ( StringUtils.isNotEmpty( str ) ) {
+                if ( !str.endsWith( "." + suffix ) ) {
+                    str += "." + suffix;
+                }
+            }
+            else {
+                str = suffix;
+            }
+            return str;
+        }
+
+
+        public String getPropertyName() {
+            return propertyName;
+        }
+
+
+        public Query.FilterOperator getOperator() {
+            return operator;
+        }
+
+
+        public Object getValue() {
+            return value;
+        }
+
+
+        @SuppressWarnings("unchecked")
+        public Object getStartValue() {
+            if ( value instanceof List ) {
+                List<Object> l = ( List<Object> ) value;
+                return l.get( 0 );
+            }
+            if ( ( operator == FilterOperator.GREATER_THAN ) || ( operator == FilterOperator.GREATER_THAN_OR_EQUAL )
+                    || ( operator == FilterOperator.EQUAL ) ) {
+                return value;
+            }
+            else {
+                return null;
+            }
+        }
+
+
+        @SuppressWarnings("unchecked")
+        public Object getFinishValue() {
+            if ( value instanceof List ) {
+                List<Object> l = ( List<Object> ) value;
+                if ( l.size() > 1 ) {
+                    return l.get( 1 );
+                }
+                return null;
+            }
+            if ( ( operator == FilterOperator.LESS_THAN ) || ( operator == FilterOperator.LESS_THAN_OR_EQUAL ) || (
+                    operator == FilterOperator.EQUAL ) ) {
+                return value;
+            }
+            else {
+                return null;
+            }
+        }
+
+
+        public void setCursor( String cursor ) {
+            this.cursor = cursor;
+        }
+
+
+        public String getCursor() {
+            return cursor;
+        }
+
+
+        @Override
+        public int hashCode() {
+            final int prime = 31;
+            int result = 1;
+            result = ( prime * result ) + ( ( operator == null ) ? 0 : operator.hashCode() );
+            result = ( prime * result ) + ( ( propertyName == null ) ? 0 : propertyName.hashCode() );
+            result = ( prime * result ) + ( ( value == null ) ? 0 : value.hashCode() );
+            return result;
+        }
+
+
+        @Override
+        public boolean equals( Object obj ) {
+            if ( this == obj ) {
+                return true;
+            }
+            if ( obj == null ) {
+                return false;
+            }
+            if ( getClass() != obj.getClass() ) {
+                return false;
+            }
+            FilterPredicate other = ( FilterPredicate ) obj;
+            if ( operator != other.operator ) {
+                return false;
+            }
+            if ( propertyName == null ) {
+                if ( other.propertyName != null ) {
+                    return false;
+                }
+            }
+            else if ( !propertyName.equals( other.propertyName ) ) {
+                return false;
+            }
+            if ( value == null ) {
+                if ( other.value != null ) {
+                    return false;
+                }
+            }
+            else if ( !value.equals( other.value ) ) {
+                return false;
+            }
+            return true;
+        }
+
+
+        @Override
+        public String toString() {
+            String valueStr = "\'\'";
+            if ( value != null ) {
+                if ( value instanceof String ) {
+                    valueStr = "\'" + value + "\'";
+                }
+                else {
+                    valueStr = value.toString();
+                }
+            }
+            return propertyName + " " + operator.toString() + " " + valueStr;
+        }
+    }
+
+
+    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 = 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.getKey(), false );
+                    if ( obj == null ) {
+                        obj = "";
+                    }
+                    else {
+                        include = true;
+                    }
+                    result.put( select.getValue(), 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 ) {
+                        obj = "";
+                    }
+                    else {
+                        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;
+    }
+}


[69/96] [abbrv] USERGRID-2 package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/Client.QueuePosition.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/Client.QueuePosition.html b/sdks/android/doc/org/usergrid/android/client/Client.QueuePosition.html
index c799440..5df22a6 100644
--- a/sdks/android/doc/org/usergrid/android/client/Client.QueuePosition.html
+++ b/sdks/android/doc/org/usergrid/android/client/Client.QueuePosition.html
@@ -55,7 +55,7 @@ function windowTitle()
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client"><B>PREV CLASS</B></A>&nbsp;
 &nbsp;NEXT CLASS</FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../index.html?org/usergrid/android/client/Client.QueuePosition.html" target="_top"><B>FRAMES</B></A>  &nbsp;
@@ -88,23 +88,23 @@ DETAIL:&nbsp;<A HREF="#enum_constant_detail">ENUM CONSTANTS</A>&nbsp;|&nbsp;FIEL
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client</FONT>
+org.apache.usergrid.android.client</FONT>
 <BR>
 Enum Client.QueuePosition</H2>
 <PRE>
 java.lang.Object
-  <IMG SRC="../../../../resources/inherit.gif" ALT="extended by ">java.lang.Enum&lt;<A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A>&gt;
-      <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.usergrid.android.client.Client.QueuePosition</B>
+  <IMG SRC="../../../../resources/inherit.gif" ALT="extended by ">java.lang.Enum&lt;<A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A>&gt;
+      <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.usergrid.android.client.Client.QueuePosition</B>
 </PRE>
 <DL>
-<DT><B>All Implemented Interfaces:</B> <DD>java.io.Serializable, java.lang.Comparable&lt;<A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A>&gt;</DD>
+<DT><B>All Implemented Interfaces:</B> <DD>java.io.Serializable, java.lang.Comparable&lt;<A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A>&gt;</DD>
 </DL>
 <DL>
-<DT><B>Enclosing class:</B><DD><A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A></DD>
+<DT><B>Enclosing class:</B><DD><A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A></DD>
 </DL>
 <HR>
 <DL>
-<DT><PRE>public static enum <B>Client.QueuePosition</B><DT>extends java.lang.Enum&lt;<A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A>&gt;</DL>
+<DT><PRE>public static enum <B>Client.QueuePosition</B><DT>extends java.lang.Enum&lt;<A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A>&gt;</DL>
 </PRE>
 
 <P>
@@ -155,7 +155,7 @@ java.lang.Object
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>static&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A></CODE></FONT></TD>
+<CODE>static&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html#find(java.lang.String)">find</A></B>(java.lang.String&nbsp;s)</CODE>
 
 <BR>
@@ -171,7 +171,7 @@ java.lang.Object
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>static&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A></CODE></FONT></TD>
+<CODE>static&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html#valueOf(java.lang.String)">valueOf</A></B>(java.lang.String&nbsp;name)</CODE>
 
 <BR>
@@ -179,7 +179,7 @@ java.lang.Object
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>static&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A>[]</CODE></FONT></TD>
+<CODE>static&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A>[]</CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html#values()">values</A></B>()</CODE>
 
 <BR>
@@ -221,7 +221,7 @@ the order they are declared.</TD>
 <A NAME="START"><!-- --></A><H3>
 START</H3>
 <PRE>
-public static final <A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A> <B>START</B></PRE>
+public static final <A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A> <B>START</B></PRE>
 <DL>
 <DL>
 </DL>
@@ -231,7 +231,7 @@ public static final <A HREF="../../../../org/usergrid/android/client/Client.Queu
 <A NAME="END"><!-- --></A><H3>
 END</H3>
 <PRE>
-public static final <A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A> <B>END</B></PRE>
+public static final <A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A> <B>END</B></PRE>
 <DL>
 <DL>
 </DL>
@@ -241,7 +241,7 @@ public static final <A HREF="../../../../org/usergrid/android/client/Client.Queu
 <A NAME="LAST"><!-- --></A><H3>
 LAST</H3>
 <PRE>
-public static final <A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A> <B>LAST</B></PRE>
+public static final <A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A> <B>LAST</B></PRE>
 <DL>
 <DL>
 </DL>
@@ -251,7 +251,7 @@ public static final <A HREF="../../../../org/usergrid/android/client/Client.Queu
 <A NAME="CONSUMER"><!-- --></A><H3>
 CONSUMER</H3>
 <PRE>
-public static final <A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A> <B>CONSUMER</B></PRE>
+public static final <A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A> <B>CONSUMER</B></PRE>
 <DL>
 <DL>
 </DL>
@@ -270,7 +270,7 @@ public static final <A HREF="../../../../org/usergrid/android/client/Client.Queu
 <A NAME="values()"><!-- --></A><H3>
 values</H3>
 <PRE>
-public static <A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A>[] <B>values</B>()</PRE>
+public static <A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A>[] <B>values</B>()</PRE>
 <DL>
 <DD>Returns an array containing the constants of this enum type, in
 the order they are declared.  This method may be used to iterate
@@ -291,7 +291,7 @@ the order they are declared</DL>
 <A NAME="valueOf(java.lang.String)"><!-- --></A><H3>
 valueOf</H3>
 <PRE>
-public static <A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A> <B>valueOf</B>(java.lang.String&nbsp;name)</PRE>
+public static <A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A> <B>valueOf</B>(java.lang.String&nbsp;name)</PRE>
 <DL>
 <DD>Returns the enum constant of this type with the specified name.
 The string must match <I>exactly</I> an identifier used to declare an
@@ -312,7 +312,7 @@ with the specified name
 <A NAME="find(java.lang.String)"><!-- --></A><H3>
 find</H3>
 <PRE>
-public static <A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A> <B>find</B>(java.lang.String&nbsp;s)</PRE>
+public static <A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A> <B>find</B>(java.lang.String&nbsp;s)</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -326,7 +326,7 @@ toString</H3>
 public java.lang.String <B>toString</B>()</PRE>
 <DL>
 <DD><DL>
-<DT><B>Overrides:</B><DD><CODE>toString</CODE> in class <CODE>java.lang.Enum&lt;<A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A>&gt;</CODE></DL>
+<DT><B>Overrides:</B><DD><CODE>toString</CODE> in class <CODE>java.lang.Enum&lt;<A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A>&gt;</CODE></DL>
 </DD>
 <DD><DL>
 </DL>
@@ -363,7 +363,7 @@ public java.lang.String <B>toString</B>()</PRE>
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client"><B>PREV CLASS</B></A>&nbsp;
 &nbsp;NEXT CLASS</FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../index.html?org/usergrid/android/client/Client.QueuePosition.html" target="_top"><B>FRAMES</B></A>  &nbsp;


[68/96] [abbrv] USERGRID-2 package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/Client.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/Client.html b/sdks/android/doc/org/usergrid/android/client/Client.html
index beeba0c..eae458e 100644
--- a/sdks/android/doc/org/usergrid/android/client/Client.html
+++ b/sdks/android/doc/org/usergrid/android/client/Client.html
@@ -56,7 +56,7 @@ function windowTitle()
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 &nbsp;PREV CLASS&nbsp;
-&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../index.html?org/usergrid/android/client/Client.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="Client.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
@@ -88,12 +88,12 @@ DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client</FONT>
+org.apache.usergrid.android.client</FONT>
 <BR>
 Class Client</H2>
 <PRE>
 java.lang.Object
-  <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.usergrid.android.client.Client</B>
+  <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.usergrid.android.client.Client</B>
 </PRE>
 <HR>
 <DL>
@@ -120,7 +120,7 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>static&nbsp;interface</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A></B></CODE>
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A></B></CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -128,7 +128,7 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>static&nbsp;class</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A></B></CODE>
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A></B></CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -216,7 +216,7 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#addSubscriber(java.lang.String, java.lang.String)">addSubscriber</A></B>(java.lang.String&nbsp;publisherQueue,
               java.lang.String&nbsp;subscriberQueue)</CODE>
 
@@ -225,7 +225,7 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#addUserToGroup(java.lang.String, java.lang.String)">addUserToGroup</A></B>(java.lang.String&nbsp;userId,
                java.lang.String&nbsp;groupId)</CODE>
 
@@ -235,16 +235,16 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#addUserToGroupAsync(java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">addUserToGroupAsync</A></B>(java.lang.String&nbsp;userId,
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#addUserToGroupAsync(java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">addUserToGroupAsync</A></B>(java.lang.String&nbsp;userId,
                     java.lang.String&nbsp;groupId,
-                    <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+                    <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a user to the specified groups.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#apiRequest(org.springframework.http.HttpMethod, java.util.Map, java.lang.Object, java.lang.String...)">apiRequest</A></B>(org.springframework.http.HttpMethod&nbsp;method,
            java.util.Map&lt;java.lang.String,java.lang.Object&gt;&nbsp;params,
            java.lang.Object&nbsp;data,
@@ -255,7 +255,7 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#authorizeAppClient(java.lang.String, java.lang.String)">authorizeAppClient</A></B>(java.lang.String&nbsp;clientId,
                    java.lang.String&nbsp;clientSecret)</CODE>
 
@@ -265,16 +265,16 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#authorizeAppClientAsync(java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">authorizeAppClientAsync</A></B>(java.lang.String&nbsp;clientId,
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#authorizeAppClientAsync(java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">authorizeAppClientAsync</A></B>(java.lang.String&nbsp;clientId,
                         java.lang.String&nbsp;clientSecret,
-                        <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+                        <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Log the app in with it's client id and client secret key.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#authorizeAppUser(java.lang.String, java.lang.String)">authorizeAppUser</A></B>(java.lang.String&nbsp;email,
                  java.lang.String&nbsp;password)</CODE>
 
@@ -284,16 +284,16 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#authorizeAppUserAsync(java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">authorizeAppUserAsync</A></B>(java.lang.String&nbsp;email,
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#authorizeAppUserAsync(java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">authorizeAppUserAsync</A></B>(java.lang.String&nbsp;email,
                       java.lang.String&nbsp;password,
-                      <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+                      <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Log the user in and get a valid access token.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#authorizeAppUserViaFacebook(java.lang.String)">authorizeAppUserViaFacebook</A></B>(java.lang.String&nbsp;fb_access_token)</CODE>
 
 <BR>
@@ -303,15 +303,15 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#authorizeAppUserViaFacebookAsync(java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">authorizeAppUserViaFacebookAsync</A></B>(java.lang.String&nbsp;fb_access_token,
-                                 <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#authorizeAppUserViaFacebookAsync(java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">authorizeAppUserViaFacebookAsync</A></B>(java.lang.String&nbsp;fb_access_token,
+                                 <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Log the user in with their numeric pin-code and get a valid access token.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#authorizeAppUserViaPin(java.lang.String, java.lang.String)">authorizeAppUserViaPin</A></B>(java.lang.String&nbsp;email,
                        java.lang.String&nbsp;pin)</CODE>
 
@@ -321,16 +321,16 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#authorizeAppUserViaPinAsync(java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">authorizeAppUserViaPinAsync</A></B>(java.lang.String&nbsp;email,
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#authorizeAppUserViaPinAsync(java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">authorizeAppUserViaPinAsync</A></B>(java.lang.String&nbsp;email,
                             java.lang.String&nbsp;pin,
-                            <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+                            <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Log the user in with their numeric pin-code and get a valid access token.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#connectEntities(java.lang.String, java.lang.String, java.lang.String, java.lang.String)">connectEntities</A></B>(java.lang.String&nbsp;connectingEntityType,
                 java.lang.String&nbsp;connectingEntityId,
                 java.lang.String&nbsp;connectionType,
@@ -342,26 +342,26 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#connectEntitiesAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">connectEntitiesAsync</A></B>(java.lang.String&nbsp;connectingEntityType,
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#connectEntitiesAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">connectEntitiesAsync</A></B>(java.lang.String&nbsp;connectingEntityType,
                      java.lang.String&nbsp;connectingEntityId,
                      java.lang.String&nbsp;connectionType,
                      java.lang.String&nbsp;connectedEntityId,
-                     <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+                     <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Connect two entities together.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#createEntity(org.usergrid.android.client.entities.Entity)">createEntity</A></B>(<A HREF="../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;entity)</CODE>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#createEntity(org.apache.usergrid.android.client.entities.Entity)">createEntity</A></B>(<A HREF="../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;entity)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a new entity on the server.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#createEntity(java.util.Map)">createEntity</A></B>(java.util.Map&lt;java.lang.String,java.lang.Object&gt;&nbsp;properties)</CODE>
 
 <BR>
@@ -370,8 +370,8 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#createEntityAsync(org.usergrid.android.client.entities.Entity, org.usergrid.android.client.callbacks.ApiResponseCallback)">createEntityAsync</A></B>(<A HREF="../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;entity,
-                  <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#createEntityAsync(org.apache.usergrid.android.client.entities.Entity, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">createEntityAsync</A></B>(<A HREF="../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;entity,
+                  <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a new entity on the server.</TD>
@@ -379,15 +379,15 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#createEntityAsync(java.util.Map, org.usergrid.android.client.callbacks.ApiResponseCallback)">createEntityAsync</A></B>(java.util.Map&lt;java.lang.String,java.lang.Object&gt;&nbsp;properties,
-                  <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#createEntityAsync(java.util.Map, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">createEntityAsync</A></B>(java.util.Map&lt;java.lang.String,java.lang.Object&gt;&nbsp;properties,
+                  <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a new entity on the server from a set of properties.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#createGroup(java.lang.String)">createGroup</A></B>(java.lang.String&nbsp;groupPath)</CODE>
 
 <BR>
@@ -395,7 +395,7 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#createGroup(java.lang.String, java.lang.String)">createGroup</A></B>(java.lang.String&nbsp;groupPath,
             java.lang.String&nbsp;groupTitle)</CODE>
 
@@ -405,8 +405,8 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#createGroupAsync(java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">createGroupAsync</A></B>(java.lang.String&nbsp;groupPath,
-                 <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#createGroupAsync(java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">createGroupAsync</A></B>(java.lang.String&nbsp;groupPath,
+                 <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a group with the specified group path.</TD>
@@ -414,16 +414,16 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#createGroupAsync(java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">createGroupAsync</A></B>(java.lang.String&nbsp;groupPath,
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#createGroupAsync(java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">createGroupAsync</A></B>(java.lang.String&nbsp;groupPath,
                  java.lang.String&nbsp;groupTitle,
-                 <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+                 <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a group with the specified group path and group title.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#createUser(java.lang.String, java.lang.String, java.lang.String, java.lang.String)">createUser</A></B>(java.lang.String&nbsp;username,
            java.lang.String&nbsp;name,
            java.lang.String&nbsp;email,
@@ -435,18 +435,18 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#createUserAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">createUserAsync</A></B>(java.lang.String&nbsp;username,
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#createUserAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">createUserAsync</A></B>(java.lang.String&nbsp;username,
                 java.lang.String&nbsp;name,
                 java.lang.String&nbsp;email,
                 java.lang.String&nbsp;password,
-                <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+                <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a user.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#disconnectEntities(java.lang.String, java.lang.String, java.lang.String, java.lang.String)">disconnectEntities</A></B>(java.lang.String&nbsp;connectingEntityType,
                    java.lang.String&nbsp;connectingEntityId,
                    java.lang.String&nbsp;connectionType,
@@ -458,11 +458,11 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#disconnectEntitiesAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">disconnectEntitiesAsync</A></B>(java.lang.String&nbsp;connectingEntityType,
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#disconnectEntitiesAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">disconnectEntitiesAsync</A></B>(java.lang.String&nbsp;connectingEntityType,
                         java.lang.String&nbsp;connectingEntityId,
                         java.lang.String&nbsp;connectionType,
                         java.lang.String&nbsp;connectedEntityId,
-                        <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+                        <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Disconnect two entities.</TD>
@@ -517,7 +517,7 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;java.util.Map&lt;java.lang.String,<A HREF="../../../../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A>&gt;</CODE></FONT></TD>
+<CODE>&nbsp;java.util.Map&lt;java.lang.String,<A HREF="../../../../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A>&gt;</CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#getGroupsForUser(java.lang.String)">getGroupsForUser</A></B>(java.lang.String&nbsp;userId)</CODE>
 
 <BR>
@@ -526,15 +526,15 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#getGroupsForUserAsync(java.lang.String, org.usergrid.android.client.callbacks.GroupsRetrievedCallback)">getGroupsForUserAsync</A></B>(java.lang.String&nbsp;userId,
-                      <A HREF="../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.usergrid.android.client.callbacks">GroupsRetrievedCallback</A>&nbsp;callback)</CODE>
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#getGroupsForUserAsync(java.lang.String, org.apache.usergrid.android.client.callbacks.GroupsRetrievedCallback)">getGroupsForUserAsync</A></B>(java.lang.String&nbsp;userId,
+                      <A HREF="../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">GroupsRetrievedCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the groups for the user.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#getLoggedInUser()">getLoggedInUser</A></B>()</CODE>
 
 <BR>
@@ -542,15 +542,15 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#getMessages(java.lang.String, java.lang.String, java.util.UUID, java.lang.Long, java.lang.Integer, java.lang.Integer, java.lang.Integer, org.usergrid.android.client.Client.QueuePosition, java.lang.Boolean, java.lang.Boolean)">getMessages</A></B>(java.lang.String&nbsp;path,
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#getMessages(java.lang.String, java.lang.String, java.util.UUID, java.lang.Long, java.lang.Integer, java.lang.Integer, java.lang.Integer, org.apache.usergrid.android.client.Client.QueuePosition, java.lang.Boolean, java.lang.Boolean)">getMessages</A></B>(java.lang.String&nbsp;path,
             java.lang.String&nbsp;consumer,
             java.util.UUID&nbsp;last,
             java.lang.Long&nbsp;time,
             java.lang.Integer&nbsp;prev,
             java.lang.Integer&nbsp;next,
             java.lang.Integer&nbsp;limit,
-            <A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A>&nbsp;pos,
+            <A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A>&nbsp;pos,
             java.lang.Boolean&nbsp;update,
             java.lang.Boolean&nbsp;sync)</CODE>
 
@@ -586,22 +586,22 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#postGroupActivity(java.lang.String, org.usergrid.android.client.entities.Activity)">postGroupActivity</A></B>(java.lang.String&nbsp;groupId,
-                  <A HREF="../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>&nbsp;activity)</CODE>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#postGroupActivity(java.lang.String, org.apache.usergrid.android.client.entities.Activity)">postGroupActivity</A></B>(java.lang.String&nbsp;groupId,
+                  <A HREF="../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>&nbsp;activity)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Posts an activity to a group.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#postGroupActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.entities.User, org.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)">postGroupActivity</A></B>(java.lang.String&nbsp;verb,
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#postGroupActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.entities.User, org.apache.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)">postGroupActivity</A></B>(java.lang.String&nbsp;verb,
                   java.lang.String&nbsp;title,
                   java.lang.String&nbsp;content,
                   java.lang.String&nbsp;category,
-                  <A HREF="../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>&nbsp;user,
-                  <A HREF="../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;object,
+                  <A HREF="../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>&nbsp;user,
+                  <A HREF="../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;object,
                   java.lang.String&nbsp;objectType,
                   java.lang.String&nbsp;objectName,
                   java.lang.String&nbsp;objectContent)</CODE>
@@ -612,23 +612,23 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#postGroupActivityAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.entities.User, org.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">postGroupActivityAsync</A></B>(java.lang.String&nbsp;verb,
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#postGroupActivityAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.entities.User, org.apache.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">postGroupActivityAsync</A></B>(java.lang.String&nbsp;verb,
                        java.lang.String&nbsp;title,
                        java.lang.String&nbsp;content,
                        java.lang.String&nbsp;category,
-                       <A HREF="../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>&nbsp;user,
-                       <A HREF="../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;object,
+                       <A HREF="../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>&nbsp;user,
+                       <A HREF="../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;object,
                        java.lang.String&nbsp;objectType,
                        java.lang.String&nbsp;objectName,
                        java.lang.String&nbsp;objectContent,
-                       <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+                       <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates and posts an activity to a group.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#postMessage(java.lang.String, java.util.List)">postMessage</A></B>(java.lang.String&nbsp;path,
             java.util.List&lt;java.util.Map&lt;java.lang.String,java.lang.Object&gt;&gt;&nbsp;messages)</CODE>
 
@@ -637,7 +637,7 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#postMessage(java.lang.String, java.util.Map)">postMessage</A></B>(java.lang.String&nbsp;path,
             java.util.Map&lt;java.lang.String,java.lang.Object&gt;&nbsp;message)</CODE>
 
@@ -646,22 +646,22 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#postUserActivity(java.lang.String, org.usergrid.android.client.entities.Activity)">postUserActivity</A></B>(java.lang.String&nbsp;userId,
-                 <A HREF="../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>&nbsp;activity)</CODE>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#postUserActivity(java.lang.String, org.apache.usergrid.android.client.entities.Activity)">postUserActivity</A></B>(java.lang.String&nbsp;userId,
+                 <A HREF="../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>&nbsp;activity)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Posts an activity to a user.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#postUserActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.entities.User, org.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)">postUserActivity</A></B>(java.lang.String&nbsp;verb,
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#postUserActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.entities.User, org.apache.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)">postUserActivity</A></B>(java.lang.String&nbsp;verb,
                  java.lang.String&nbsp;title,
                  java.lang.String&nbsp;content,
                  java.lang.String&nbsp;category,
-                 <A HREF="../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>&nbsp;user,
-                 <A HREF="../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;object,
+                 <A HREF="../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>&nbsp;user,
+                 <A HREF="../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;object,
                  java.lang.String&nbsp;objectType,
                  java.lang.String&nbsp;objectName,
                  java.lang.String&nbsp;objectContent)</CODE>
@@ -672,23 +672,23 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#postUserActivityAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.entities.User, org.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">postUserActivityAsync</A></B>(java.lang.String&nbsp;verb,
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#postUserActivityAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.entities.User, org.apache.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">postUserActivityAsync</A></B>(java.lang.String&nbsp;verb,
                       java.lang.String&nbsp;title,
                       java.lang.String&nbsp;content,
                       java.lang.String&nbsp;category,
-                      <A HREF="../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>&nbsp;user,
-                      <A HREF="../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;object,
+                      <A HREF="../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>&nbsp;user,
+                      <A HREF="../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;object,
                       java.lang.String&nbsp;objectType,
                       java.lang.String&nbsp;objectName,
                       java.lang.String&nbsp;objectContent,
-                      <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+                      <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates and posts an activity to a user.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryActivityFeedForGroup(java.lang.String)">queryActivityFeedForGroup</A></B>(java.lang.String&nbsp;groupId)</CODE>
 
 <BR>
@@ -697,15 +697,15 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryActivityFeedForGroupAsync(java.lang.String, org.usergrid.android.client.callbacks.QueryResultsCallback)">queryActivityFeedForGroupAsync</A></B>(java.lang.String&nbsp;groupId,
-                               <A HREF="../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryActivityFeedForGroupAsync(java.lang.String, org.apache.usergrid.android.client.callbacks.QueryResultsCallback)">queryActivityFeedForGroupAsync</A></B>(java.lang.String&nbsp;groupId,
+                               <A HREF="../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get a group's activity feed.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryActivityFeedForUser(java.lang.String)">queryActivityFeedForUser</A></B>(java.lang.String&nbsp;userId)</CODE>
 
 <BR>
@@ -714,15 +714,15 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryActivityFeedForUserAsync(java.lang.String, org.usergrid.android.client.callbacks.QueryResultsCallback)">queryActivityFeedForUserAsync</A></B>(java.lang.String&nbsp;userId,
-                              <A HREF="../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryActivityFeedForUserAsync(java.lang.String, org.apache.usergrid.android.client.callbacks.QueryResultsCallback)">queryActivityFeedForUserAsync</A></B>(java.lang.String&nbsp;userId,
+                              <A HREF="../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get a user's activity feed.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryEntitiesRequest(org.springframework.http.HttpMethod, java.util.Map, java.lang.Object, java.lang.String...)">queryEntitiesRequest</A></B>(org.springframework.http.HttpMethod&nbsp;method,
                      java.util.Map&lt;java.lang.String,java.lang.Object&gt;&nbsp;params,
                      java.lang.Object&nbsp;data,
@@ -734,7 +734,7 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryEntitiesRequestAsync(org.usergrid.android.client.callbacks.QueryResultsCallback, org.springframework.http.HttpMethod, java.util.Map, java.lang.Object, java.lang.String...)">queryEntitiesRequestAsync</A></B>(<A HREF="../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback,
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryEntitiesRequestAsync(org.apache.usergrid.android.client.callbacks.QueryResultsCallback, org.springframework.http.HttpMethod, java.util.Map, java.lang.Object, java.lang.String...)">queryEntitiesRequestAsync</A></B>(<A HREF="../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback,
                           org.springframework.http.HttpMethod&nbsp;method,
                           java.util.Map&lt;java.lang.String,java.lang.Object&gt;&nbsp;params,
                           java.lang.Object&nbsp;data,
@@ -745,7 +745,7 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryEntityConnections(java.lang.String, java.lang.String, java.lang.String, java.lang.String)">queryEntityConnections</A></B>(java.lang.String&nbsp;connectingEntityType,
                        java.lang.String&nbsp;connectingEntityId,
                        java.lang.String&nbsp;connectionType,
@@ -757,18 +757,18 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryEntityConnectionsAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.QueryResultsCallback)">queryEntityConnectionsAsync</A></B>(java.lang.String&nbsp;connectingEntityType,
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryEntityConnectionsAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.QueryResultsCallback)">queryEntityConnectionsAsync</A></B>(java.lang.String&nbsp;connectingEntityType,
                             java.lang.String&nbsp;connectingEntityId,
                             java.lang.String&nbsp;connectionType,
                             java.lang.String&nbsp;ql,
-                            <A HREF="../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
+                            <A HREF="../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Query the connected entities.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryEntityConnectionsWithinLocation(java.lang.String, java.lang.String, java.lang.String, float, android.location.Location, java.lang.String)">queryEntityConnectionsWithinLocation</A></B>(java.lang.String&nbsp;connectingEntityType,
                                      java.lang.String&nbsp;connectingEntityId,
                                      java.lang.String&nbsp;connectionType,
@@ -782,20 +782,20 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryEntityConnectionsWithinLocationAsync(java.lang.String, java.lang.String, java.lang.String, float, android.location.Location, java.lang.String, org.usergrid.android.client.callbacks.QueryResultsCallback)">queryEntityConnectionsWithinLocationAsync</A></B>(java.lang.String&nbsp;connectingEntityType,
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryEntityConnectionsWithinLocationAsync(java.lang.String, java.lang.String, java.lang.String, float, android.location.Location, java.lang.String, org.apache.usergrid.android.client.callbacks.QueryResultsCallback)">queryEntityConnectionsWithinLocationAsync</A></B>(java.lang.String&nbsp;connectingEntityType,
                                           java.lang.String&nbsp;connectingEntityId,
                                           java.lang.String&nbsp;connectionType,
                                           float&nbsp;distance,
                                           android.location.Location&nbsp;location,
                                           java.lang.String&nbsp;ql,
-                                          <A HREF="../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
+                                          <A HREF="../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Query the connected entities within distance of a specific point.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryQueuesRequest(org.springframework.http.HttpMethod, java.util.Map, java.lang.Object, java.lang.String)">queryQueuesRequest</A></B>(org.springframework.http.HttpMethod&nbsp;method,
                    java.util.Map&lt;java.lang.String,java.lang.Object&gt;&nbsp;params,
                    java.lang.Object&nbsp;data,
@@ -806,7 +806,7 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryUsers()">queryUsers</A></B>()</CODE>
 
 <BR>
@@ -814,7 +814,7 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryUsers(java.lang.String)">queryUsers</A></B>(java.lang.String&nbsp;ql)</CODE>
 
 <BR>
@@ -823,7 +823,7 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryUsersAsync(org.usergrid.android.client.callbacks.QueryResultsCallback)">queryUsersAsync</A></B>(<A HREF="../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryUsersAsync(org.apache.usergrid.android.client.callbacks.QueryResultsCallback)">queryUsersAsync</A></B>(<A HREF="../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Perform a query of the users collection.</TD>
@@ -831,15 +831,15 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryUsersAsync(java.lang.String, org.usergrid.android.client.callbacks.QueryResultsCallback)">queryUsersAsync</A></B>(java.lang.String&nbsp;ql,
-                <A HREF="../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryUsersAsync(java.lang.String, org.apache.usergrid.android.client.callbacks.QueryResultsCallback)">queryUsersAsync</A></B>(java.lang.String&nbsp;ql,
+                <A HREF="../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Perform a query of the users collection using the provided query command.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryUsersForGroup(java.lang.String)">queryUsersForGroup</A></B>(java.lang.String&nbsp;groupId)</CODE>
 
 <BR>
@@ -848,8 +848,8 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryUsersForGroupAsync(java.lang.String, org.usergrid.android.client.callbacks.QueryResultsCallback)">queryUsersForGroupAsync</A></B>(java.lang.String&nbsp;groupId,
-                        <A HREF="../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryUsersForGroupAsync(java.lang.String, org.apache.usergrid.android.client.callbacks.QueryResultsCallback)">queryUsersForGroupAsync</A></B>(java.lang.String&nbsp;groupId,
+                        <A HREF="../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Queries the users for the specified group.</TD>
@@ -857,10 +857,10 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryUsersNearLocation(float, android.location.Location, java.lang.String, org.usergrid.android.client.callbacks.QueryResultsCallback)">queryUsersNearLocation</A></B>(float&nbsp;distance,
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryUsersNearLocation(float, android.location.Location, java.lang.String, org.apache.usergrid.android.client.callbacks.QueryResultsCallback)">queryUsersNearLocation</A></B>(float&nbsp;distance,
                        android.location.Location&nbsp;location,
                        java.lang.String&nbsp;ql,
-                       <A HREF="../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
+                       <A HREF="../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Perform a query of the users collection within the specified distance of
@@ -868,7 +868,7 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryUsersWithinLocation(float, android.location.Location, java.lang.String)">queryUsersWithinLocation</A></B>(float&nbsp;distance,
                          android.location.Location&nbsp;location,
                          java.lang.String&nbsp;ql)</CODE>
@@ -879,7 +879,7 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities">Device</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities">Device</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#registerDevice(android.content.Context, java.util.Map)">registerDevice</A></B>(android.content.Context&nbsp;context,
                java.util.Map&lt;java.lang.String,java.lang.Object&gt;&nbsp;properties)</CODE>
 
@@ -889,16 +889,16 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#registerDeviceAsync(android.content.Context, java.util.Map, org.usergrid.android.client.callbacks.DeviceRegistrationCallback)">registerDeviceAsync</A></B>(android.content.Context&nbsp;context,
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#registerDeviceAsync(android.content.Context, java.util.Map, org.apache.usergrid.android.client.callbacks.DeviceRegistrationCallback)">registerDeviceAsync</A></B>(android.content.Context&nbsp;context,
                     java.util.Map&lt;java.lang.String,java.lang.Object&gt;&nbsp;properties,
-                    <A HREF="../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.usergrid.android.client.callbacks">DeviceRegistrationCallback</A>&nbsp;callback)</CODE>
+                    <A HREF="../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">DeviceRegistrationCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Registers a device using the device's unique device ID.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#removeSubscriber(java.lang.String, java.lang.String)">removeSubscriber</A></B>(java.lang.String&nbsp;publisherQueue,
                  java.lang.String&nbsp;subscriberQueue)</CODE>
 
@@ -956,14 +956,14 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#setLoggedInUser(org.usergrid.android.client.entities.User)">setLoggedInUser</A></B>(<A HREF="../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>&nbsp;loggedInUser)</CODE>
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#setLoggedInUser(org.apache.usergrid.android.client.entities.User)">setLoggedInUser</A></B>(<A HREF="../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>&nbsp;loggedInUser)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#withApiUrl(java.lang.String)">withApiUrl</A></B>(java.lang.String&nbsp;apiUrl)</CODE>
 
 <BR>
@@ -971,7 +971,7 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#withApplicationId(java.lang.String)">withApplicationId</A></B>(java.lang.String&nbsp;applicationId)</CODE>
 
 <BR>
@@ -979,7 +979,7 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#withClientId(java.lang.String)">withClientId</A></B>(java.lang.String&nbsp;clientId)</CODE>
 
 <BR>
@@ -987,7 +987,7 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#withClientSecret(java.lang.String)">withClientSecret</A></B>(java.lang.String&nbsp;clientSecret)</CODE>
 
 <BR>
@@ -1143,7 +1143,7 @@ public void <B>setApiUrl</B>(java.lang.String&nbsp;apiUrl)</PRE>
 <A NAME="withApiUrl(java.lang.String)"><!-- --></A><H3>
 withApiUrl</H3>
 <PRE>
-public <A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A> <B>withApiUrl</B>(java.lang.String&nbsp;apiUrl)</PRE>
+public <A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A> <B>withApiUrl</B>(java.lang.String&nbsp;apiUrl)</PRE>
 <DL>
 <DD><DL>
 <DT><B>Parameters:</B><DD><CODE>apiUrl</CODE> - the Usergrid API url (default: http://api.usergrid.com)
@@ -1178,7 +1178,7 @@ public void <B>setApplicationId</B>(java.lang.String&nbsp;applicationId)</PRE>
 <A NAME="withApplicationId(java.lang.String)"><!-- --></A><H3>
 withApplicationId</H3>
 <PRE>
-public <A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A> <B>withApplicationId</B>(java.lang.String&nbsp;applicationId)</PRE>
+public <A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A> <B>withApplicationId</B>(java.lang.String&nbsp;applicationId)</PRE>
 <DL>
 <DD><DL>
 <DT><B>Parameters:</B><DD><CODE>applicationId</CODE> - the application id or name
@@ -1215,7 +1215,7 @@ public void <B>setClientId</B>(java.lang.String&nbsp;clientId)</PRE>
 <A NAME="withClientId(java.lang.String)"><!-- --></A><H3>
 withClientId</H3>
 <PRE>
-public <A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A> <B>withClientId</B>(java.lang.String&nbsp;clientId)</PRE>
+public <A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A> <B>withClientId</B>(java.lang.String&nbsp;clientId)</PRE>
 <DL>
 <DD><DL>
 <DT><B>Parameters:</B><DD><CODE>clientId</CODE> - the client key id for making calls as the application-owner.
@@ -1253,7 +1253,7 @@ public void <B>setClientSecret</B>(java.lang.String&nbsp;clientSecret)</PRE>
 <A NAME="withClientSecret(java.lang.String)"><!-- --></A><H3>
 withClientSecret</H3>
 <PRE>
-public <A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A> <B>withClientSecret</B>(java.lang.String&nbsp;clientSecret)</PRE>
+public <A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A> <B>withClientSecret</B>(java.lang.String&nbsp;clientSecret)</PRE>
 <DL>
 <DD><DL>
 <DT><B>Parameters:</B><DD><CODE>clientSecret</CODE> - the client key id for making calls as the application-owner.
@@ -1266,7 +1266,7 @@ public <A HREF="../../../../org/usergrid/android/client/Client.html" title="clas
 <A NAME="getLoggedInUser()"><!-- --></A><H3>
 getLoggedInUser</H3>
 <PRE>
-public <A HREF="../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A> <B>getLoggedInUser</B>()</PRE>
+public <A HREF="../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A> <B>getLoggedInUser</B>()</PRE>
 <DL>
 <DD><DL>
 
@@ -1275,10 +1275,10 @@ public <A HREF="../../../../org/usergrid/android/client/entities/User.html" titl
 </DL>
 <HR>
 
-<A NAME="setLoggedInUser(org.usergrid.android.client.entities.User)"><!-- --></A><H3>
+<A NAME="setLoggedInUser(org.apache.usergrid.android.client.entities.User)"><!-- --></A><H3>
 setLoggedInUser</H3>
 <PRE>
-public void <B>setLoggedInUser</B>(<A HREF="../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>&nbsp;loggedInUser)</PRE>
+public void <B>setLoggedInUser</B>(<A HREF="../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>&nbsp;loggedInUser)</PRE>
 <DL>
 <DD><DL>
 <DT><B>Parameters:</B><DD><CODE>loggedInUser</CODE> - the logged-in user, usually not set by host application</DL>
@@ -1354,7 +1354,7 @@ public &lt;T&gt; T <B>httpRequest</B>(org.springframework.http.HttpMethod&nbsp;m
 <A NAME="apiRequest(org.springframework.http.HttpMethod, java.util.Map, java.lang.Object, java.lang.String...)"><!-- --></A><H3>
 apiRequest</H3>
 <PRE>
-public <A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A> <B>apiRequest</B>(org.springframework.http.HttpMethod&nbsp;method,
+public <A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A> <B>apiRequest</B>(org.springframework.http.HttpMethod&nbsp;method,
                               java.util.Map&lt;java.lang.String,java.lang.Object&gt;&nbsp;params,
                               java.lang.Object&nbsp;data,
                               java.lang.String...&nbsp;segments)</PRE>
@@ -1371,7 +1371,7 @@ public <A HREF="../../../../org/usergrid/android/client/response/ApiResponse.htm
 <A NAME="authorizeAppUser(java.lang.String, java.lang.String)"><!-- --></A><H3>
 authorizeAppUser</H3>
 <PRE>
-public <A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A> <B>authorizeAppUser</B>(java.lang.String&nbsp;email,
+public <A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A> <B>authorizeAppUser</B>(java.lang.String&nbsp;email,
                                     java.lang.String&nbsp;password)</PRE>
 <DL>
 <DD>Log the user in and get a valid access token.
@@ -1384,12 +1384,12 @@ public <A HREF="../../../../org/usergrid/android/client/response/ApiResponse.htm
 </DL>
 <HR>
 
-<A NAME="authorizeAppUserAsync(java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)"><!-- --></A><H3>
+<A NAME="authorizeAppUserAsync(java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)"><!-- --></A><H3>
 authorizeAppUserAsync</H3>
 <PRE>
 public void <B>authorizeAppUserAsync</B>(java.lang.String&nbsp;email,
                                   java.lang.String&nbsp;password,
-                                  <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</PRE>
+                                  <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</PRE>
 <DL>
 <DD>Log the user in and get a valid access token. Executes asynchronously in
  background and the callbacks are called in the UI thread.
@@ -1403,7 +1403,7 @@ public void <B>authorizeAppUserAsync</B>(java.lang.String&nbsp;email,
 <A NAME="authorizeAppUserViaPin(java.lang.String, java.lang.String)"><!-- --></A><H3>
 authorizeAppUserViaPin</H3>
 <PRE>
-public <A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A> <B>authorizeAppUserViaPin</B>(java.lang.String&nbsp;email,
+public <A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A> <B>authorizeAppUserViaPin</B>(java.lang.String&nbsp;email,
                                           java.lang.String&nbsp;pin)</PRE>
 <DL>
 <DD>Log the user in with their numeric pin-code and get a valid access token.
@@ -1416,12 +1416,12 @@ public <A HREF="../../../../org/usergrid/android/client/response/ApiResponse.htm
 </DL>
 <HR>
 
-<A NAME="authorizeAppUserViaPinAsync(java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)"><!-- --></A><H3>
+<A NAME="authorizeAppUserViaPinAsync(java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)"><!-- --></A><H3>
 authorizeAppUserViaPinAsync</H3>
 <PRE>
 public void <B>authorizeAppUserViaPinAsync</B>(java.lang.String&nbsp;email,
                                         java.lang.String&nbsp;pin,
-                                        <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</PRE>
+                                        <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</PRE>
 <DL>
 <DD>Log the user in with their numeric pin-code and get a valid access token.
  Executes asynchronously in background and the callbacks are called in the
@@ -1436,7 +1436,7 @@ public void <B>authorizeAppUserViaPinAsync</B>(java.lang.String&nbsp;email,
 <A NAME="authorizeAppUserViaFacebook(java.lang.String)"><!-- --></A><H3>
 authorizeAppUserViaFacebook</H3>
 <PRE>
-public <A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A> <B>authorizeAppUserViaFacebook</B>(java.lang.String&nbsp;fb_access_token)</PRE>
+public <A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A> <B>authorizeAppUserViaFacebook</B>(java.lang.String&nbsp;fb_access_token)</PRE>
 <DL>
 <DD>Log the user in with their Facebook access token retrived via Facebook
  OAuth.
@@ -1449,11 +1449,11 @@ public <A HREF="../../../../org/usergrid/android/client/response/ApiResponse.htm
 </DL>
 <HR>
 
-<A NAME="authorizeAppUserViaFacebookAsync(java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)"><!-- --></A><H3>
+<A NAME="authorizeAppUserViaFacebookAsync(java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)"><!-- --></A><H3>
 authorizeAppUserViaFacebookAsync</H3>
 <PRE>
 public void <B>authorizeAppUserViaFacebookAsync</B>(java.lang.String&nbsp;fb_access_token,
-                                             <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</PRE>
+                                             <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</PRE>
 <DL>
 <DD>Log the user in with their numeric pin-code and get a valid access token.
  Executes asynchronously in background and the callbacks are called in the
@@ -1468,7 +1468,7 @@ public void <B>authorizeAppUserViaFacebookAsync</B>(java.lang.String&nbsp;fb_acc
 <A NAME="authorizeAppClient(java.lang.String, java.lang.String)"><!-- --></A><H3>
 authorizeAppClient</H3>
 <PRE>
-public <A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A> <B>authorizeAppClient</B>(java.lang.String&nbsp;clientId,
+public <A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A> <B>authorizeAppClient</B>(java.lang.String&nbsp;clientId,
                                       java.lang.String&nbsp;clientSecret)</PRE>
 <DL>
 <DD>Log the app in with it's client id and client secret key. Not recommended
@@ -1482,12 +1482,12 @@ public <A HREF="../../../../org/usergrid/android/client/response/ApiResponse.htm
 </DL>
 <HR>
 
-<A NAME="authorizeAppClientAsync(java.lang.String, java.lang.String, org.usergrid

<TRUNCATED>

[41/96] [abbrv] [partial] Change package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/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..65c1240
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/Query.java
@@ -0,0 +1,1309 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence;
+
+
+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 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.codehaus.jackson.annotate.JsonIgnore;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.apache.commons.lang.StringUtils;
+import org.apache.usergrid.persistence.Results.Level;
+import org.apache.usergrid.persistence.exceptions.QueryParseException;
+import org.apache.usergrid.persistence.query.tree.AndOperand;
+import org.apache.usergrid.persistence.query.tree.ContainsOperand;
+import org.apache.usergrid.persistence.query.tree.Equal;
+import org.apache.usergrid.persistence.query.tree.EqualityOperand;
+import org.apache.usergrid.persistence.query.tree.GreaterThan;
+import org.apache.usergrid.persistence.query.tree.GreaterThanEqual;
+import org.apache.usergrid.persistence.query.tree.LessThan;
+import org.apache.usergrid.persistence.query.tree.LessThanEqual;
+import org.apache.usergrid.persistence.query.tree.Operand;
+import org.apache.usergrid.persistence.query.tree.QueryFilterLexer;
+import org.apache.usergrid.persistence.query.tree.QueryFilterParser;
+import org.apache.usergrid.utils.JsonUtils;
+
+import static org.apache.commons.codec.binary.Base64.decodeBase64;
+import static org.apache.commons.lang.StringUtils.isBlank;
+import static org.apache.commons.lang.StringUtils.split;
+import static org.apache.usergrid.persistence.Schema.PROPERTY_UUID;
+import static org.apache.usergrid.utils.ClassUtils.cast;
+import static org.apache.usergrid.utils.ConversionUtils.uuid;
+import static org.apache.usergrid.utils.ListUtils.first;
+import static org.apache.usergrid.utils.ListUtils.firstBoolean;
+import static org.apache.usergrid.utils.ListUtils.firstInteger;
+import static org.apache.usergrid.utils.ListUtils.firstLong;
+import static org.apache.usergrid.utils.ListUtils.firstUuid;
+import static org.apache.usergrid.utils.ListUtils.isEmpty;
+import static org.apache.usergrid.utils.MapUtils.toMapList;
+
+
+public class Query {
+
+    private static final Logger logger = LoggerFactory.getLogger( Query.class );
+
+    public static final int DEFAULT_LIMIT = 10;
+
+    public static final int MAX_LIMIT = 1000;
+
+    private String type;
+    private List<SortPredicate> sortPredicates = new ArrayList<SortPredicate>();
+    private Operand rootOperand;
+    private UUID startResult;
+    private String cursor;
+    private int limit = 0;
+
+    private Map<String, String> selectAssignments = new LinkedHashMap<String, String>();
+    private boolean mergeSelectResults = false;
+    private Level level = Level.ALL_PROPERTIES;
+    private String connection;
+    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;
+
+
+    public Query() {
+    }
+
+
+    public Query( Query q ) {
+        if ( q != null ) {
+            type = q.type;
+            sortPredicates = q.sortPredicates != null ? new ArrayList<SortPredicate>( q.sortPredicates ) : null;
+            startResult = q.startResult;
+            cursor = q.cursor;
+            limit = q.limit;
+            selectAssignments =
+                    q.selectAssignments != null ? new LinkedHashMap<String, String>( q.selectAssignments ) : null;
+            mergeSelectResults = q.mergeSelectResults;
+            level = q.level;
+            connection = q.connection;
+            permissions = q.permissions != null ? new ArrayList<String>( 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<Identifier>( q.identifiers ) : null;
+            counterFilters =
+                    q.counterFilters != null ? new ArrayList<CounterFilterPredicate>( q.counterFilters ) : null;
+            collection = q.collection;
+        }
+    }
+
+
+    public static Query fromQL( String ql ) throws QueryParseException {
+        if ( ql == null ) {
+            return null;
+        }
+        String originalQl = ql;
+        ql = ql.trim();
+
+        String qlt = ql.toLowerCase();
+        if ( !qlt.startsWith( "select" ) && !qlt.startsWith( "insert" ) && !qlt.startsWith( "update" ) && !qlt
+                .startsWith( "delete" ) ) {
+            if ( qlt.startsWith( "order by" ) ) {
+                ql = "select * " + ql;
+            }
+            else {
+                ql = "select * where " + ql;
+            }
+        }
+
+        ANTLRStringStream in = new ANTLRStringStream( qlt.trim() );
+        QueryFilterLexer lexer = new QueryFilterLexer( in );
+        CommonTokenStream tokens = new CommonTokenStream( lexer );
+        QueryFilterParser parser = new QueryFilterParser( tokens );
+
+        try {
+            Query q = parser.ql().query;
+            q.setQl( originalQl );
+            return q;
+        }
+        catch ( RecognitionException e ) {
+            logger.error( "Unable to parse \"{}\"", ql, e );
+
+            int index = e.index;
+            int lineNumber = e.line;
+            Token token = e.token;
+
+            String message = String.format(
+                    "The query cannot be parsed. The token '%s' at column %d on line %d cannot be " + "parsed",
+                    token.getText(), index, lineNumber );
+
+            throw new QueryParseException( message, e );
+        }
+    }
+
+
+    private static Query newQueryIfNull( Query query ) {
+        if ( query == null ) {
+            query = new Query();
+        }
+        return query;
+    }
+
+
+    public static Query fromJsonString( String json ) throws QueryParseException {
+        Object o = JsonUtils.parse( json );
+        if ( o instanceof Map ) {
+            @SuppressWarnings({ "unchecked", "rawtypes" }) Map<String, List<String>> params =
+                    cast( 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 = first( params.get( "type" ) );
+        Boolean reversed = firstBoolean( params.get( "reversed" ) );
+        String connection = first( params.get( "connection" ) );
+        UUID start = firstUuid( params.get( "start" ) );
+        String cursor = first( params.get( "cursor" ) );
+        Integer limit = firstInteger( params.get( "limit" ) );
+        List<String> permissions = params.get( "permission" );
+        Long startTime = firstLong( params.get( "start_time" ) );
+        Long finishTime = firstLong( params.get( "end_time" ) );
+
+        List<String> l = params.get( "resolution" );
+        if ( !isEmpty( l ) ) {
+            resolution = CounterResolution.fromString( l.get( 0 ) );
+        }
+
+        l = params.get( "counter" );
+
+        if ( !isEmpty( l ) ) {
+            counterFilters = CounterFilterPredicate.fromList( l );
+        }
+
+        Boolean pad = 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 ) );
+        }
+
+        l = params.get( "filter" );
+
+        if ( !isEmpty( l ) ) {
+            q = newQueryIfNull( q );
+            for ( String s : l ) {
+                q.addFilter( decode( s ) );
+            }
+        }
+
+        l = params.get( "sort" );
+        if ( !isEmpty( l ) ) {
+            q = newQueryIfNull( q );
+            for ( String s : l ) {
+                q.addSort( decode( s ) );
+            }
+        }
+
+        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 searchForProperty( String propertyName, Object propertyValue ) {
+        Query q = new Query();
+        q.addEqualityFilter( propertyName, propertyValue );
+        return q;
+    }
+
+
+    public static Query findForProperty( String propertyName, Object propertyValue ) {
+        Query q = new Query();
+        q.addEqualityFilter( propertyName, propertyValue );
+        q.setLimit( 1 );
+        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;
+    }
+
+
+    public Query addSort( SortPredicate sort ) {
+        if ( sort == null ) {
+            return this;
+        }
+
+        for ( SortPredicate s : sortPredicates ) {
+            if ( s.getPropertyName().equals( sort.getPropertyName() ) ) {
+                throw new QueryParseException(
+                        String.format( "Attempted to set sort order for %s more than once", s.getPropertyName() ) );
+            }
+        }
+        sortPredicates.add( sort );
+        return this;
+    }
+
+
+    @JsonIgnore
+    public UUID getSingleUuidIdentifier() {
+        if ( !containsSingleUuidIdentifier() ) {
+            return null;
+        }
+        return ( identifiers.get( 0 ).getUUID() );
+    }
+
+
+    @JsonIgnore
+    boolean isIdsOnly() {
+        if ( ( selectAssignments.size() == 1 ) && selectAssignments.containsKey( PROPERTY_UUID ) ) {
+            level = Level.IDS;
+            return true;
+        }
+        return false;
+    }
+
+
+    private void setIdsOnly( boolean idsOnly ) {
+        if ( idsOnly ) {
+            selectAssignments = new LinkedHashMap<String, String>();
+            selectAssignments.put( PROPERTY_UUID, PROPERTY_UUID );
+            level = Level.IDS;
+        }
+        else if ( isIdsOnly() ) {
+            selectAssignments = new LinkedHashMap<String, String>();
+            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 String getConnectionType() {
+        return connection;
+    }
+
+
+    public void setConnectionType( String connection ) {
+        this.connection = connection;
+    }
+
+
+    public List<String> getPermissions() {
+        return permissions;
+    }
+
+
+    public void setPermissions( List<String> permissions ) {
+        this.permissions = permissions;
+    }
+
+
+    public Query addSelect( String select ) {
+
+        return addSelect( select, null );
+    }
+
+
+    public Query addSelect( String select, String output ) {
+        // be paranoid with the null checks because
+        // the query parser sometimes flakes out
+        if ( select == null ) {
+            return this;
+        }
+        select = select.trim();
+
+        if ( select.equals( "*" ) ) {
+            return this;
+        }
+
+        mergeSelectResults = StringUtils.isNotEmpty( output );
+
+        if ( output == null ) {
+            output = "";
+        }
+
+        selectAssignments.put( select, output );
+
+        return this;
+    }
+
+
+    public boolean hasSelectSubjects() {
+        return !selectAssignments.isEmpty();
+    }
+
+
+    @JsonIgnore
+    public Set<String> getSelectSubjects() {
+        return selectAssignments.keySet();
+    }
+
+
+    public Map<String, String> getSelectAssignments() {
+        return selectAssignments;
+    }
+
+
+    boolean isMergeSelectResults() {
+        return mergeSelectResults;
+    }
+
+
+    public Query addSort( String propertyName ) {
+        if ( isBlank( propertyName ) ) {
+            return this;
+        }
+        propertyName = propertyName.trim();
+        if ( propertyName.indexOf( ',' ) >= 0 ) {
+            String[] propertyNames = split( propertyName, ',' );
+            for ( String s : propertyNames ) {
+                addSort( s );
+            }
+            return this;
+        }
+
+        SortDirection direction = SortDirection.ASCENDING;
+        if ( propertyName.indexOf( ' ' ) >= 0 ) {
+            String[] parts = split( propertyName, ' ' );
+            if ( parts.length > 1 ) {
+                propertyName = parts[0];
+                direction = SortDirection.find( parts[1] );
+            }
+        }
+        else if ( propertyName.startsWith( "-" ) ) {
+            propertyName = propertyName.substring( 1 );
+            direction = SortDirection.DESCENDING;
+        }
+        else if ( propertyName.startsWith( "+" ) ) {
+            propertyName = propertyName.substring( 1 );
+            direction = SortDirection.ASCENDING;
+        }
+
+        return addSort( propertyName, direction );
+    }
+
+
+    public Query addSort( String propertyName, SortDirection direction ) {
+        if ( isBlank( propertyName ) ) {
+            return this;
+        }
+        propertyName = propertyName.trim();
+        for ( SortPredicate s : sortPredicates ) {
+            if ( s.getPropertyName().equals( propertyName ) ) {
+                logger.error(
+                        "Attempted to set sort order for " + s.getPropertyName() + " more than once, discarding..." );
+                return this;
+            }
+        }
+        sortPredicates.add( new SortPredicate( propertyName, direction ) );
+        return this;
+    }
+
+
+    @JsonIgnore
+    public boolean isSortSet() {
+        return !sortPredicates.isEmpty();
+    }
+
+
+    public List<SortPredicate> getSortPredicates() {
+        return sortPredicates;
+    }
+
+
+    public Query addFilter( String filter ) {
+        ANTLRStringStream in = new ANTLRStringStream( filter );
+        QueryFilterLexer lexer = new QueryFilterLexer( in );
+        TokenRewriteStream tokens = new TokenRewriteStream( lexer );
+        QueryFilterParser parser = new QueryFilterParser( tokens );
+
+        Operand root;
+
+        try {
+            root = parser.ql().query.getRootOperand();
+        }
+        catch ( RecognitionException e ) {
+            // todo: should we create a specific Exception for this? checked?
+            throw new RuntimeException( "Unknown operation: " + filter, e );
+        }
+
+        if ( root != null ) {
+            addClause( root );
+        }
+
+        return this;
+    }
+
+
+    /** Add a less than filter to this query. && with existing clauses */
+    public Query addLessThanFilter( String propName, Object value ) {
+        LessThan equality = new LessThan( null );
+
+        addClause( equality, propName, value );
+
+        return this;
+    }
+
+
+    /** Add a less than equal filter to this query. && with existing clauses */
+    public Query addLessThanEqualFilter( String propName, Object value ) {
+        LessThanEqual equality = new LessThanEqual( null );
+
+        addClause( equality, propName, value );
+
+        return this;
+    }
+
+
+    /** Add a equal filter to this query. && with existing clauses */
+    public Query addEqualityFilter( String propName, Object value ) {
+        Equal equality = new Equal( new ClassicToken( 0, "=" ) );
+
+        addClause( equality, propName, value );
+
+        return this;
+    }
+
+
+    /** Add a greater than equal filter to this query. && with existing clauses */
+    public Query addGreaterThanEqualFilter( String propName, Object value ) {
+        GreaterThanEqual equality = new GreaterThanEqual( null );
+
+        addClause( equality, propName, value );
+
+        return this;
+    }
+
+
+    /** Add a less than filter to this query. && with existing clauses */
+    public Query addGreaterThanFilter( String propName, Object value ) {
+        GreaterThan equality = new GreaterThan( null );
+
+        addClause( equality, propName, value );
+
+        return this;
+    }
+
+
+    public Query addContainsFilter( String propName, String keyword ) {
+        ContainsOperand equality = new ContainsOperand( new ClassicToken( 0, "contains" ) );
+
+        equality.setProperty( propName );
+        equality.setLiteral( keyword );
+
+        addClause( equality );
+
+        return this;
+    }
+
+
+    private void addClause( EqualityOperand equals, String propertyName, Object value ) {
+        equals.setProperty( propertyName );
+        equals.setLiteral( value );
+        addClause( equals );
+    }
+
+
+    private void addClause( Operand equals ) {
+
+        if ( rootOperand == null ) {
+            rootOperand = equals;
+            return;
+        }
+
+        AndOperand and = new AndOperand();
+        and.addChild( rootOperand );
+        and.addChild( equals );
+
+        // redirect the root to new && clause
+        rootOperand = and;
+    }
+
+
+    @JsonIgnore
+    public Operand getRootOperand() {
+        if ( rootOperand == null ) { // attempt deserialization
+            if ( ql != null ) {
+                try {
+                    Query q = Query.fromQL( ql );
+                    rootOperand = q.rootOperand;
+                }
+                catch ( QueryParseException e ) {
+                    logger.error( "error parsing sql for rootOperand", e ); // shouldn't happen
+                }
+            }
+        }
+        return rootOperand;
+    }
+
+
+    public void setRootOperand( Operand root ) {
+        this.rootOperand = root;
+    }
+
+
+    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 = decodeBase64( cursor );
+            if ( ( cursorBytes != null ) && ( cursorBytes.length == 16 ) ) {
+                startResult = 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;
+    }
+
+
+    @Override
+    public String toString() {
+        if ( ql != null ) {
+            return ql;
+        }
+        StringBuilder s = new StringBuilder( "select " );
+        if ( selectAssignments.isEmpty() ) {
+            s.append( "*" );
+        }
+        else {
+            if ( mergeSelectResults ) {
+                s.append( "{ " );
+                boolean first = true;
+                for ( Map.Entry<String, String> select : selectAssignments.entrySet() ) {
+                    if ( !first ) {
+                        s.append( ", " );
+                    }
+                    s.append( select.getValue() ).append( " : " ).append( select.getKey() );
+                    first = false;
+                }
+                s.append( " }" );
+            }
+            else {
+                boolean first = true;
+                for ( String select : selectAssignments.keySet() ) {
+                    if ( !first ) {
+                        s.append( ", " );
+                    }
+                    s.append( select );
+                    first = false;
+                }
+            }
+        }
+        s.append( " from " );
+        s.append( type );
+        if ( !sortPredicates.isEmpty() ) {
+            boolean first = true;
+            s.append( " order by " );
+            for ( SortPredicate sp : sortPredicates ) {
+                if ( !first ) {
+                    s.append( ", " );
+                }
+                s.append( sp );
+                first = false;
+            }
+        }
+        //      if (!filterPredicates.isEmpty()) {
+        //        s.append(" where ");
+        //        boolean first = true;
+        //        for (FilterPredicate f : filterPredicates) {
+        //          if (!first) {
+        //            s.append(" and ");
+        //          }
+        //          s.append(f.toString());
+        //          first = false;
+        //        }
+        //      }
+        return s.toString();
+    }
+
+
+    public static enum SortDirection {
+        ASCENDING, DESCENDING;
+
+
+        public static SortDirection find( String s ) {
+            if ( s == null ) {
+                return ASCENDING;
+            }
+            s = s.toLowerCase();
+            if ( s.startsWith( "asc" ) ) {
+                return ASCENDING;
+            }
+            if ( s.startsWith( "des" ) ) {
+                return DESCENDING;
+            }
+            if ( s.equals( "+" ) ) {
+                return ASCENDING;
+            }
+            if ( s.equals( "-" ) ) {
+                return DESCENDING;
+            }
+            return ASCENDING;
+        }
+    }
+
+
+    public static final class SortPredicate implements Serializable {
+        private static final long serialVersionUID = 1L;
+        private final String propertyName;
+        private final Query.SortDirection direction;
+
+
+        public SortPredicate( String propertyName, Query.SortDirection direction ) {
+            if ( propertyName == null ) {
+                throw new NullPointerException( "Property name was null" );
+            }
+
+            if ( direction == null ) {
+                direction = SortDirection.ASCENDING;
+            }
+
+            this.propertyName = propertyName.trim();
+            this.direction = direction;
+        }
+
+
+        public SortPredicate( String propertyName, String direction ) {
+            this( propertyName, SortDirection.find( direction ) );
+        }
+
+
+        public String getPropertyName() {
+            return propertyName;
+        }
+
+
+        public Query.SortDirection getDirection() {
+            return direction;
+        }
+
+
+        @Override
+        public boolean equals( Object o ) {
+            if ( this == o ) {
+                return true;
+            }
+            if ( ( o == null ) || ( super.getClass() != o.getClass() ) ) {
+                return false;
+            }
+
+            SortPredicate that = ( SortPredicate ) o;
+
+            if ( direction != that.direction ) {
+                return false;
+            }
+
+            return ( propertyName.equals( that.propertyName ) );
+        }
+
+
+        @Override
+        public int hashCode() {
+            int result = propertyName.hashCode();
+            result = ( 31 * result ) + direction.hashCode();
+            return result;
+        }
+
+
+        @Override
+        public String toString() {
+            return propertyName + ( ( direction == Query.SortDirection.DESCENDING ) ? " DESC" : "" );
+        }
+    }
+
+
+    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 = 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 void setQl( String ql ) {
+        this.ql = ql;
+    }
+
+
+    public List<Identifier> getIdentifiers() {
+        return identifiers;
+    }
+
+
+    public String getConnection() {
+        return connection;
+    }
+
+
+    public String getType() {
+        return type;
+    }
+
+
+    public Level getLevel() {
+        return level;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/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
new file mode 100644
index 0000000..cfc7aac
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/QueryUtils.java
@@ -0,0 +1,34 @@
+package org.apache.usergrid.persistence;
+
+
+import java.util.List;
+import java.util.Map;
+
+import org.apache.usergrid.utils.ListUtils;
+
+
+/**
+ * Utilities to deal with query extraction and generation
+ *
+ * @author zznate
+ */
+public class QueryUtils {
+
+    public static final String PARAM_QL = "ql";
+    public static final String PARAM_Q = "q";
+    public static final String PARAM_QUERY = "query";
+
+
+    public static String queryStrFrom( Map<String, List<String>> params ) {
+        if ( params.containsKey( PARAM_QL ) ) {
+            return ListUtils.first( params.get( PARAM_QL ) );
+        }
+        else if ( params.containsKey( PARAM_Q ) ) {
+            return ListUtils.first( params.get( PARAM_Q ) );
+        }
+        else if ( params.containsKey( PARAM_QUERY ) ) {
+            return ListUtils.first( params.get( PARAM_QUERY ) );
+        }
+        return null;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/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
new file mode 100644
index 0000000..70b68d5
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/RelationManager.java
@@ -0,0 +1,113 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence;
+
+
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
+
+import org.apache.usergrid.persistence.Results.Level;
+
+
+public interface RelationManager {
+
+    public Set<String> getCollectionIndexes( String collectionName ) throws Exception;
+
+    public Map<String, Map<UUID, Set<String>>> getOwners() throws Exception;
+
+
+    /**
+     * Returns true if the entity ref if a member of the owner ref for the current relation manager
+     *
+     * @param collectionName The name of the collection
+     */
+    public boolean isCollectionMember( String collectionName, EntityRef entity ) throws Exception;
+
+    /** Returns true if the target entity is currently connected to the owner ref of this relation manager */
+    public boolean isConnectionMember( String connectionName, EntityRef entity ) throws Exception;
+
+    public Set<String> getCollections() throws Exception;
+
+    public Results getCollection( String collectionName, UUID startResult, int count, Results.Level resultsLevel,
+                                  boolean reversed ) throws Exception;
+
+    public Results getCollection( String collectionName, Query query, Results.Level resultsLevel ) throws Exception;
+
+    public Entity addToCollection( String collectionName, EntityRef itemRef ) throws Exception;
+
+    public Entity addToCollections( List<EntityRef> owners, String collectionName ) throws Exception;
+
+    public Entity createItemInCollection( String collectionName, String itemType, Map<String, Object> properties )
+            throws Exception;
+
+    public void removeFromCollection( String collectionName, EntityRef itemRef ) throws Exception;
+
+    public void copyRelationships( String srcRelationName, EntityRef dstEntityRef, String dstRelationName )
+            throws Exception;
+
+    public Results searchCollection( String collectionName, Query query ) throws Exception;
+
+    public ConnectionRef createConnection( ConnectionRef connection ) throws Exception;
+
+    public ConnectionRef createConnection( String connectionType, EntityRef connectedEntityRef ) throws Exception;
+
+    public ConnectionRef createConnection( String pairedConnectionType, EntityRef pairedEntity, String connectionType,
+                                           EntityRef connectedEntityRef ) throws Exception;
+
+    public ConnectionRef createConnection( ConnectedEntityRef... connections ) throws Exception;
+
+    public ConnectionRef connectionRef( String connectionType, EntityRef connectedEntityRef ) throws Exception;
+
+    public ConnectionRef connectionRef( String pairedConnectionType, EntityRef pairedEntity, String connectionType,
+                                        EntityRef connectedEntityRef ) throws Exception;
+
+    public ConnectionRef connectionRef( ConnectedEntityRef... connections );
+
+    public void deleteConnection( ConnectionRef connectionRef ) throws Exception;
+
+    public Set<String> getConnectionTypes( UUID connectedEntityId ) throws Exception;
+
+    public Set<String> getConnectionTypes() throws Exception;
+
+    public Set<String> getConnectionTypes( boolean filterConnection ) throws Exception;
+
+    /**
+     * Get all entities connected to this entity.  Also get all
+     *
+     * @param connectionType The type/name of the connection
+     * @param connectedEntityType The type of
+     */
+    public Results getConnectedEntities( String connectionType, String connectedEntityType, Results.Level resultsLevel )
+            throws Exception;
+
+    public Results getConnectingEntities( String connectionType, String connectedEntityType,
+                                          Results.Level resultsLevel ) throws Exception;
+
+    // public Results searchConnectedEntitiesForProperty(String connectionType,
+    // String connectedEntityType, String propertyName,
+    // Object searchStartValue, Object searchFinishValue,
+    // 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 searchConnectedEntities( Query query ) throws Exception;
+
+
+    public Set<String> getConnectionIndexes( String connectionType ) throws Exception;
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/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
new file mode 100644
index 0000000..585666a
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/Results.java
@@ -0,0 +1,1294 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence;
+
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+import java.util.UUID;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.apache.usergrid.persistence.cassandra.QueryProcessor;
+import org.apache.usergrid.persistence.query.ir.SearchVisitor;
+import org.apache.usergrid.utils.MapUtils;
+import org.apache.usergrid.utils.StringUtils;
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
+
+import static org.apache.commons.codec.binary.Base64.encodeBase64URLSafeString;
+import static org.apache.usergrid.persistence.SimpleEntityRef.ref;
+import static org.apache.usergrid.utils.ClassUtils.cast;
+import static org.apache.usergrid.utils.ConversionUtils.bytes;
+
+
+@XmlRootElement
+public class Results implements Iterable<Entity> {
+
+
+    public enum Level {
+        IDS, REFS, CORE_PROPERTIES, ALL_PROPERTIES, LINKED_PROPERTIES
+    }
+
+
+    Level level = Level.IDS;
+    UUID id;
+    List<UUID> ids;
+    Set<UUID> idSet;
+
+    EntityRef ref;
+    List<EntityRef> refs;
+    Map<UUID, EntityRef> refsMap;
+    Map<String, List<EntityRef>> refsByType;
+
+    Entity entity;
+    List<Entity> entities;
+    Map<UUID, Entity> entitiesMap;
+    Map<String, List<Entity>> entitiesByType;
+
+    List<ConnectionRef> connections;
+    boolean forwardConnections = true;
+
+    List<AggregateCounterSet> counters;
+
+    Set<String> types;
+
+    Map<UUID, Map<String, Object>> metadata;
+    boolean metadataMerged = true;
+
+    UUID nextResult;
+    String cursor;
+
+    Query query;
+    Object data;
+    String dataName;
+
+    private QueryProcessor queryProcessor;
+    private SearchVisitor searchVisitor;
+
+
+    public Results() {
+    }
+
+
+    public Results( Results r ) {
+        if ( r != null ) {
+            level = r.level;
+
+            id = r.id;
+            ids = r.ids;
+            idSet = r.idSet;
+
+            ref = r.ref;
+            refs = r.refs;
+            refsMap = r.refsMap;
+            refsByType = r.refsByType;
+
+            entity = r.entity;
+            entities = r.entities;
+            entitiesMap = r.entitiesMap;
+            entitiesByType = r.entitiesByType;
+
+            connections = r.connections;
+            forwardConnections = r.forwardConnections;
+
+            counters = r.counters;
+
+            types = r.types;
+
+            metadata = r.metadata;
+            metadataMerged = r.metadataMerged;
+
+            nextResult = r.nextResult;
+            cursor = r.cursor;
+
+            query = r.query;
+            data = r.data;
+            dataName = r.dataName;
+        }
+    }
+
+
+    public void init() {
+        level = Level.IDS;
+
+        id = null;
+        ids = null;
+        idSet = null;
+
+        ref = null;
+        refs = null;
+        refsMap = null;
+        refsByType = null;
+
+        entity = null;
+        entities = null;
+        entitiesMap = null;
+        entitiesByType = null;
+
+        connections = null;
+        forwardConnections = true;
+
+        counters = null;
+
+        types = null;
+
+        // metadata = null;
+        metadataMerged = false;
+
+        query = null;
+        data = null;
+        dataName = null;
+    }
+
+
+    public static Results fromIdList( List<UUID> l ) {
+        Results r = new Results();
+        r.setIds( l );
+        return r;
+    }
+
+
+    public static Results fromIdList( List<UUID> l, String type ) {
+        if ( type == null ) {
+            return fromIdList( l );
+        }
+        List<EntityRef> refs = new ArrayList<EntityRef>();
+        for ( UUID u : l ) {
+            refs.add( ref( type, u ) );
+        }
+        Results r = new Results();
+        r.setRefs( refs );
+        return r;
+    }
+
+
+    public static Results fromId( UUID id ) {
+        Results r = new Results();
+        if ( id != null ) {
+            List<UUID> l = new ArrayList<UUID>();
+            l.add( id );
+            r.setIds( l );
+        }
+        return r;
+    }
+
+
+    public static Results fromRefList( List<EntityRef> l ) {
+        Results r = new Results();
+        r.setRefs( l );
+        return r;
+    }
+
+
+    public static Results fromEntities( List<? extends Entity> l ) {
+        Results r = new Results();
+        r.setEntities( l );
+        return r;
+    }
+
+
+    public static Results fromEntity( Entity e ) {
+        Results r = new Results();
+        r.setEntity( e );
+        return r;
+    }
+
+
+    public static Results fromRef( EntityRef ref ) {
+        if ( ref instanceof Entity ) {
+            return fromEntity( ( Entity ) ref );
+        }
+        Results r = new Results();
+        r.setRef( ref );
+        return r;
+    }
+
+
+    public static Results fromData( Object obj ) {
+        Results r = new Results();
+        r.setData( obj );
+        return r;
+    }
+
+
+    public static Results fromCounters( AggregateCounterSet counters ) {
+        Results r = new Results();
+        List<AggregateCounterSet> l = new ArrayList<AggregateCounterSet>();
+        l.add( counters );
+        r.setCounters( l );
+        return r;
+    }
+
+
+    public static Results fromCounters( List<AggregateCounterSet> counters ) {
+        Results r = new Results();
+        r.setCounters( counters );
+        return r;
+    }
+
+
+    @SuppressWarnings("unchecked")
+    public static Results fromConnections( List<? extends ConnectionRef> connections ) {
+        Results r = new Results();
+        r.setConnections( ( List<ConnectionRef> ) connections, true );
+        return r;
+    }
+
+
+    @SuppressWarnings("unchecked")
+    public static Results fromConnections( List<? extends ConnectionRef> connections, boolean forward ) {
+        Results r = new Results();
+        r.setConnections( ( List<ConnectionRef> ) connections, forward );
+        return r;
+    }
+
+
+    public Level getLevel() {
+        return level;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public Query getQuery() {
+        return query;
+    }
+
+
+    public void setQuery( Query query ) {
+        this.query = query;
+    }
+
+
+    public Results withQuery( Query query ) {
+        this.query = query;
+        return this;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public UUID getId() {
+        if ( id != null ) {
+            return id;
+        }
+        if ( entity != null ) {
+            id = entity.getUuid();
+            return id;
+        }
+        if ( ( ids != null ) && ( ids.size() > 0 ) ) {
+            id = ids.get( 0 );
+            return id;
+        }
+        if ( ( entities != null ) && ( entities.size() > 0 ) ) {
+            entity = entities.get( 0 );
+            id = entity.getUuid();
+            return id;
+        }
+        if ( ( refs != null ) && ( refs.size() > 0 ) ) {
+            EntityRef ref = refs.get( 0 );
+            id = ref.getUuid();
+        }
+        return id;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public List<UUID> getIds() {
+        if ( ids != null ) {
+            return ids;
+        }
+        /*
+         * if (connectionTypeAndEntityTypeToEntityIdMap != null) { ids = new
+         * ArrayList<UUID>(); Set<UUID> entitySet = new LinkedHashSet<UUID>();
+         * for (String ctype : connectionTypeAndEntityTypeToEntityIdMap
+         * .keySet()) { Map<String, List<UUID>> m =
+         * connectionTypeAndEntityTypeToEntityIdMap .get(ctype); for (String
+         * etype : m.keySet()) { List<UUID> l = m.get(etype); for (UUID id : l)
+         * { if (!entitySet.contains(id)) { ids.add(id); } } } } return ids; }
+         */
+        if ( connections != null ) {
+            ids = new ArrayList<UUID>();
+            for ( ConnectionRef connection : connections ) {
+                if ( forwardConnections ) {
+                    ConnectedEntityRef c = connection.getConnectedEntity();
+                    if ( c != null ) {
+                        ids.add( c.getUuid() );
+                    }
+                }
+                else {
+                    EntityRef c = connection.getConnectingEntity();
+                    if ( c != null ) {
+                        ids.add( c.getUuid() );
+                    }
+                }
+            }
+            return ids;
+        }
+        if ( ( entities != null )
+        /* || (connectionTypeAndEntityTypeToEntityMap != null) */ ) {
+            // getEntities();
+            ids = new ArrayList<UUID>();
+            for ( Entity entity : entities ) {
+                ids.add( entity.getUuid() );
+            }
+            return ids;
+        }
+        if ( refs != null ) {
+            ids = new ArrayList<UUID>();
+            for ( EntityRef ref : refs ) {
+                ids.add( ref.getUuid() );
+            }
+            return ids;
+        }
+        if ( id != null ) {
+            ids = new ArrayList<UUID>();
+            ids.add( id );
+            return ids;
+        }
+        if ( entity != null ) {
+            ids = new ArrayList<UUID>();
+            ids.add( entity.getUuid() );
+            return ids;
+        }
+        return new ArrayList<UUID>();
+    }
+
+
+    public void setIds( List<UUID> resultsIds ) {
+        init();
+        ids = resultsIds;
+        level = Level.IDS;
+    }
+
+
+    public Results withIds( List<UUID> resultsIds ) {
+        setIds( resultsIds );
+        return this;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public Set<UUID> getIdSet() {
+        if ( idSet != null ) {
+            return idSet;
+        }
+        getIds();
+        if ( ids != null ) {
+            idSet = new LinkedHashSet<UUID>();
+            idSet.addAll( ids );
+            return idSet;
+        }
+        return new LinkedHashSet<UUID>();
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    @SuppressWarnings("unchecked")
+    public List<EntityRef> getRefs() {
+        if ( refs != null ) {
+            return refs;
+        }
+        List<?> l = getEntities();
+        if ( ( l != null ) && ( l.size() > 0 ) ) {
+            return ( List<EntityRef> ) l;
+        }
+        if ( connections != null ) {
+            refs = new ArrayList<EntityRef>();
+            for ( ConnectionRef connection : connections ) {
+                if ( forwardConnections ) {
+                    ConnectedEntityRef c = connection.getConnectedEntity();
+                    if ( c != null ) {
+                        refs.add( c );
+                    }
+                }
+                else {
+                    EntityRef c = connection.getConnectingEntity();
+                    if ( c != null ) {
+                        refs.add( c );
+                    }
+                }
+            }
+            return refs;
+        }
+        if ( ref != null ) {
+            refs = new ArrayList<EntityRef>();
+            refs.add( ref );
+            return refs;
+        }
+        return new ArrayList<EntityRef>();
+    }
+
+
+    public void setRefs( List<EntityRef> resultsRefs ) {
+        init();
+        refs = resultsRefs;
+        level = Level.REFS;
+    }
+
+
+    public Results withRefs( List<EntityRef> resultsRefs ) {
+        setRefs( resultsRefs );
+        return this;
+    }
+
+
+    public void setRef( EntityRef ref ) {
+        init();
+        this.ref = ref;
+        level = Level.REFS;
+    }
+
+
+    public Results withRef( EntityRef ref ) {
+        setRef( ref );
+        return this;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public EntityRef getRef() {
+        if ( ref != null ) {
+            return ref;
+        }
+        ref = getEntity();
+        if ( ref != null ) {
+            return ref;
+        }
+        UUID u = getId();
+        if ( u != null ) {
+            return ref( u );
+        }
+        return null;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public Map<UUID, EntityRef> getRefsMap() {
+        if ( refsMap != null ) {
+            return refsMap;
+        }
+        getEntitiesMap();
+        if ( entitiesMap != null ) {
+            refsMap = cast( entitiesMap );
+            return refsMap;
+        }
+        getRefs();
+        if ( refs != null ) {
+            refsMap = new LinkedHashMap<UUID, EntityRef>();
+            for ( EntityRef ref : refs ) {
+                refsMap.put( ref.getUuid(), ref );
+            }
+        }
+        return refsMap;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public Entity getEntity() {
+        mergeEntitiesWithMetadata();
+        if ( entity != null ) {
+            return entity;
+        }
+        if ( ( entities != null ) && ( entities.size() > 0 ) ) {
+            entity = entities.get( 0 );
+            return entity;
+        }
+        return null;
+    }
+
+
+    public void setEntity( Entity resultEntity ) {
+        init();
+        entity = resultEntity;
+        level = Level.CORE_PROPERTIES;
+    }
+
+
+    public Results withEntity( Entity resultEntity ) {
+        setEntity( resultEntity );
+        return this;
+    }
+
+
+    public Iterator<UUID> idIterator() {
+        List<UUID> l = getIds();
+        if ( l != null ) {
+            return l.iterator();
+        }
+        return ( new ArrayList<UUID>( 0 ) ).iterator();
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public List<Entity> getEntities() {
+        mergeEntitiesWithMetadata();
+        if ( entities != null ) {
+            return entities;
+        }
+        /*
+         * if (connectionTypeAndEntityTypeToEntityMap != null) { entities = new
+         * ArrayList<Entity>(); Map<UUID, Entity> eMap = new LinkedHashMap<UUID,
+         * Entity>(); for (String ctype :
+         * connectionTypeAndEntityTypeToEntityMap.keySet()) { Map<String,
+         * List<Entity>> m = connectionTypeAndEntityTypeToEntityMap .get(ctype);
+         * for (String etype : m.keySet()) { List<Entity> l = m.get(etype); for
+         * (Entity e : l) { if (!eMap.containsKey(e.getUuid())) { entities.add(e);
+         * eMap.put(e.getUuid(), e); } } } } return entities; }
+         */
+        if ( entity != null ) {
+            entities = new ArrayList<Entity>();
+            entities.add( entity );
+            return entities;
+        }
+        return new ArrayList<Entity>();
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public Map<UUID, Entity> getEntitiesMap() {
+        if ( entitiesMap != null ) {
+            return entitiesMap;
+        }
+        if ( entities != null ) {
+            entitiesMap = new LinkedHashMap<UUID, Entity>();
+            for ( Entity entity : entities ) {
+                entitiesMap.put( entity.getUuid(), entity );
+            }
+        }
+        return entitiesMap;
+    }
+
+
+    public List<EntityRef> getEntityRefsByType( String type ) {
+        if ( entitiesByType != null ) {
+            return refsByType.get( type );
+        }
+        List<EntityRef> l = cast( getEntitiesByType( type ) );
+        if ( l != null ) {
+            return l;
+        }
+        getRefs();
+        if ( refs == null ) {
+            return null;
+        }
+        refsByType = new LinkedHashMap<String, List<EntityRef>>();
+        for ( Entity entity : entities ) {
+            l = refsByType.get( entity.getType() );
+            if ( l == null ) {
+                l = new ArrayList<EntityRef>();
+                refsByType.put( entity.getType(), l );
+            }
+            l.add( entity );
+        }
+        return l;
+    }
+
+
+    public List<Entity> getEntitiesByType( String type ) {
+        if ( entitiesByType != null ) {
+            return entitiesByType.get( type );
+        }
+        getEntities();
+        if ( entities == null ) {
+            return null;
+        }
+        List<Entity> l = null;
+        entitiesByType = new LinkedHashMap<String, List<Entity>>();
+        for ( Entity entity : entities ) {
+            l = entitiesByType.get( entity.getType() );
+            if ( l == null ) {
+                l = new ArrayList<Entity>();
+                entitiesByType.put( entity.getType(), l );
+            }
+            l.add( entity );
+        }
+        return l;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public Set<String> getTypes() {
+        if ( types != null ) {
+            return types;
+        }
+        getEntityRefsByType( "entity" );
+        if ( entitiesByType != null ) {
+            types = entitiesByType.keySet();
+        }
+        else if ( refsByType != null ) {
+            types = refsByType.keySet();
+        }
+        return types;
+    }
+
+
+    public void merge( Results results ) {
+        getEntitiesMap();
+        results.getEntitiesMap();
+        if ( entitiesMap != null || results.entitiesMap != null ) {
+
+            level = Level.ALL_PROPERTIES;
+
+            // do nothing, nothing to union
+            if ( entitiesMap != null && results.entitiesMap == null ) {
+                return;
+                // other side has the results, assign and return
+            }
+            else if ( entitiesMap == null && results.entitiesMap != null ) {
+                entities = results.entities;
+                return;
+            }
+
+            entitiesMap.putAll( results.entitiesMap );
+            entities = new ArrayList<Entity>( entitiesMap.values() );
+
+            return;
+        }
+
+        getRefsMap();
+        results.getRefsMap();
+        if ( ( refsMap != null ) || ( results.refsMap != null ) ) {
+
+            level = Level.REFS;
+
+            // do nothing, nothing to union
+            if ( refsMap != null && results.refsMap == null ) {
+                return;
+                // other side has the results, assign and return
+            }
+            else if ( refsMap == null && results.refsMap != null ) {
+                refs = results.refs;
+                return;
+            }
+
+            refsMap.putAll( results.refsMap );
+            refs = new ArrayList<EntityRef>( refsMap.values() );
+
+            return;
+        }
+
+        getIdSet();
+        results.getIdSet();
+        if ( ( idSet != null ) && ( results.idSet != null ) ) {
+
+            level = Level.IDS;
+
+            // do nothing, nothing to union
+            if ( idSet != null && results.idSet == null ) {
+                return;
+                // other side has the results, assign and return
+            }
+            else if ( idSet == null && results.idSet != null ) {
+                ids = results.ids;
+                return;
+            }
+
+            idSet.addAll( results.idSet );
+            ids = new ArrayList<UUID>( idSet );
+
+            return;
+        }
+    }
+
+
+    /** Remove the passed in results from the current results */
+    public void subtract( Results results ) {
+        getEntitiesMap();
+        results.getEntitiesMap();
+
+        if ( ( entitiesMap != null ) && ( results.entitiesMap != null ) ) {
+            Map<UUID, Entity> newMap = new LinkedHashMap<UUID, Entity>();
+            for ( Map.Entry<UUID, Entity> e : entitiesMap.entrySet() ) {
+                if ( !results.entitiesMap.containsKey( e.getKey() ) ) {
+                    newMap.put( e.getKey(), e.getValue() );
+                }
+            }
+            entitiesMap = newMap;
+            entities = new ArrayList<Entity>( entitiesMap.values() );
+            level = Level.ALL_PROPERTIES;
+            return;
+        }
+
+        getRefsMap();
+        results.getRefsMap();
+        if ( ( refsMap != null ) && ( results.refsMap != null ) ) {
+            Map<UUID, EntityRef> newMap = new LinkedHashMap<UUID, EntityRef>();
+            for ( Map.Entry<UUID, EntityRef> e : refsMap.entrySet() ) {
+                if ( !results.refsMap.containsKey( e.getKey() ) ) {
+                    newMap.put( e.getKey(), e.getValue() );
+                }
+            }
+            refsMap = newMap;
+            refs = new ArrayList<EntityRef>( refsMap.values() );
+            level = Level.REFS;
+            return;
+        }
+
+        getIdSet();
+        results.getIdSet();
+        if ( ( idSet != null ) && ( results.idSet != null ) ) {
+            Set<UUID> newSet = new LinkedHashSet<UUID>();
+            for ( UUID uuid : idSet ) {
+                if ( !results.idSet.contains( uuid ) ) {
+                    newSet.add( uuid );
+                }
+            }
+            idSet = newSet;
+            ids = new ArrayList<UUID>( idSet );
+            level = Level.IDS;
+            return;
+        }
+    }
+
+
+    /** Perform an intersection of the 2 results */
+    public void and( Results results ) {
+        getEntitiesMap();
+        results.getEntitiesMap();
+
+        if ( ( entitiesMap != null ) && ( results.entitiesMap != null ) ) {
+            Map<UUID, Entity> newMap = new LinkedHashMap<UUID, Entity>();
+            for ( Map.Entry<UUID, Entity> e : entitiesMap.entrySet() ) {
+                if ( results.entitiesMap.containsKey( e.getKey() ) ) {
+                    newMap.put( e.getKey(), e.getValue() );
+                }
+            }
+            entitiesMap = newMap;
+            entities = new ArrayList<Entity>( entitiesMap.values() );
+            level = Level.ALL_PROPERTIES;
+            return;
+        }
+
+        getRefsMap();
+        results.getRefsMap();
+        if ( ( refsMap != null ) && ( results.refsMap != null ) ) {
+            Map<UUID, EntityRef> newMap = new LinkedHashMap<UUID, EntityRef>();
+            for ( Map.Entry<UUID, EntityRef> e : refsMap.entrySet() ) {
+                if ( results.refsMap.containsKey( e.getKey() ) ) {
+                    newMap.put( e.getKey(), e.getValue() );
+                }
+            }
+            refsMap = newMap;
+            refs = new ArrayList<EntityRef>( refsMap.values() );
+            level = Level.REFS;
+            ids = null;
+            return;
+        }
+
+        getIdSet();
+        results.getIdSet();
+        if ( ( idSet != null ) && ( results.idSet != null ) ) {
+            Set<UUID> newSet = new LinkedHashSet<UUID>();
+            for ( UUID uuid : idSet ) {
+                if ( results.idSet.contains( uuid ) ) {
+                    newSet.add( uuid );
+                }
+            }
+            idSet = newSet;
+            ids = new ArrayList<UUID>( idSet );
+            level = Level.IDS;
+            return;
+        }
+
+        // should be empty
+        init();
+    }
+
+
+    public void replace( Entity entity ) {
+        entitiesMap = null;
+        if ( ( this.entity != null ) && ( this.entity.getUuid().equals( entity.getUuid() ) ) ) {
+            this.entity = entity;
+        }
+        if ( entities != null ) {
+            ListIterator<Entity> i = entities.listIterator();
+            while ( i.hasNext() ) {
+                Entity e = i.next();
+                if ( e.getUuid().equals( entity.getUuid() ) ) {
+                    i.set( entity );
+                }
+            }
+        }
+    }
+
+
+    public Results startingFrom( UUID entityId ) {
+        if ( entities != null ) {
+            for ( int i = 0; i < entities.size(); i++ ) {
+                Entity entity = entities.get( i );
+                if ( entityId.equals( entity.getUuid() ) ) {
+                    if ( i == 0 ) {
+                        return this;
+                    }
+                    return Results.fromEntities( entities.subList( i, entities.size() ) );
+                }
+            }
+        }
+        if ( refs != null ) {
+            for ( int i = 0; i < refs.size(); i++ ) {
+                EntityRef entityRef = refs.get( i );
+                if ( entityId.equals( entityRef.getUuid() ) ) {
+                    if ( i == 0 ) {
+                        return this;
+                    }
+                    return Results.fromRefList( refs.subList( i, refs.size() ) );
+                }
+            }
+        }
+        if ( ids != null ) {
+            for ( int i = 0; i < ids.size(); i++ ) {
+                UUID uuid = ids.get( i );
+                if ( entityId.equals( uuid ) ) {
+                    if ( i == 0 ) {
+                        return this;
+                    }
+                    return Results.fromIdList( ids.subList( i, ids.size() ) );
+                }
+            }
+        }
+        return this;
+    }
+
+
+    @SuppressWarnings("unchecked")
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public <E extends Entity> List<E> getList() {
+        List<Entity> l = getEntities();
+        return ( List<E> ) l;
+    }
+
+
+    public <E extends Entity> Iterator<E> iterator( Class<E> cls ) {
+        List<E> l = getList();
+        if ( l != null ) {
+            return l.iterator();
+        }
+        return ( new ArrayList<E>( 0 ) ).iterator();
+    }
+
+
+    @Override
+    public Iterator<Entity> iterator() {
+        List<Entity> l = getEntities();
+        if ( l != null ) {
+            return l.iterator();
+        }
+        return ( new ArrayList<Entity>( 0 ) ).iterator();
+    }
+
+
+    public Results findForProperty( String propertyName, Object propertyValue ) {
+        return findForProperty( propertyName, propertyValue, 1 );
+    }
+
+
+    public Results findForProperty( String propertyName, Object propertyValue, int count ) {
+        if ( propertyValue == null ) {
+            return new Results();
+        }
+        List<Entity> l = getEntities();
+        if ( l == null ) {
+            return new Results();
+        }
+        List<Entity> found = new ArrayList<Entity>();
+        for ( Entity e : l ) {
+            if ( propertyValue.equals( e.getProperty( propertyName ) ) ) {
+                found.add( e );
+                if ( ( count > 0 ) && ( found.size() == count ) ) {
+                    break;
+                }
+            }
+        }
+        return Results.fromEntities( found );
+    }
+
+
+    @SuppressWarnings("unchecked")
+    public void setEntities( List<? extends Entity> resultsEntities ) {
+        init();
+        entities = ( List<Entity> ) resultsEntities;
+        level = Level.CORE_PROPERTIES;
+    }
+
+
+    public Results withEntities( List<? extends Entity> resultsEntities ) {
+        setEntities( resultsEntities );
+        return this;
+    }
+
+
+    public boolean hasConnections() {
+        return connections != null;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public List<ConnectionRef> getConnections() {
+        return connections;
+    }
+
+
+    private void setConnections( List<ConnectionRef> connections, boolean forwardConnections ) {
+        init();
+        this.connections = connections;
+        this.forwardConnections = forwardConnections;
+        level = Level.REFS;
+        for ( ConnectionRef connection : connections ) {
+            if ( forwardConnections ) {
+                this.setMetadata( connection.getConnectedEntity().getUuid(), "connection",
+                        connection.getConnectionType() );
+            }
+            else {
+                this.setMetadata( connection.getConnectingEntity().getUuid(), "connection",
+                        connection.getConnectionType() );
+            }
+        }
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public Object getObject() {
+        if ( data != null ) {
+            return data;
+        }
+        if ( entities != null ) {
+            return entities;
+        }
+        if ( ids != null ) {
+            return ids;
+        }
+        if ( entity != null ) {
+            return entity;
+        }
+        if ( id != null ) {
+            return id;
+        }
+        if ( counters != null ) {
+            return counters;
+        }
+        return null;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public String getObjectName() {
+        if ( dataName != null ) {
+            return dataName;
+        }
+        if ( entities != null ) {
+            return "entities";
+        }
+        if ( ids != null ) {
+            return "ids";
+        }
+        if ( entity != null ) {
+            return "entity";
+        }
+        if ( id != null ) {
+            return "id";
+        }
+        return null;
+    }
+
+
+    public void setDataName( String dataName ) {
+        this.dataName = dataName;
+    }
+
+
+    public Results withDataName( String dataName ) {
+        this.dataName = dataName;
+        return this;
+    }
+
+
+    public boolean hasData() {
+        return data != null;
+    }
+
+
+    public void setData( Object data ) {
+        this.data = data;
+    }
+
+
+    public Results withData( Object data ) {
+        this.data = data;
+        return this;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public Object getData() {
+        return data;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public List<AggregateCounterSet> getCounters() {
+        return counters;
+    }
+
+
+    public void setCounters( List<AggregateCounterSet> counters ) {
+        this.counters = counters;
+    }
+
+
+    public Results withCounters( List<AggregateCounterSet> counters ) {
+        this.counters = counters;
+        return this;
+    }
+
+
+    public int size() {
+        if ( entities != null ) {
+            return entities.size();
+        }
+        if ( refs != null ) {
+            return refs.size();
+        }
+        if ( ids != null ) {
+            return ids.size();
+        }
+        if ( entity != null ) {
+            return 1;
+        }
+        if ( ref != null ) {
+            return 1;
+        }
+        if ( id != null ) {
+            return 1;
+        }
+        return 0;
+    }
+
+
+    public boolean isEmpty() {
+        return size() == 0;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public UUID getNextResult() {
+        return nextResult;
+    }
+
+
+    public Results excludeCursorMetadataAttribute() {
+        if ( metadata != null ) {
+            for ( Entry<UUID, Map<String, Object>> entry : metadata.entrySet() ) {
+                Map<String, Object> map = entry.getValue();
+                if ( map != null ) {
+                    map.remove( Schema.PROPERTY_CURSOR );
+                }
+            }
+        }
+        return new Results( this );
+    }
+
+
+    public Results trim( int count ) {
+        if ( count == 0 ) {
+            return this;
+        }
+
+        int size = size();
+        if ( size <= count ) {
+            return this;
+        }
+
+        List<UUID> ids = getIds();
+        UUID nextResult = null;
+        String cursor = null;
+        if ( ids.size() > count ) {
+            nextResult = ids.get( count );
+            ids = ids.subList( 0, count );
+            if ( metadata != null ) {
+                cursor = StringUtils.toString( MapUtils.getMapMap( metadata, nextResult, "cursor" ) );
+            }
+            if ( cursor == null ) {
+                cursor = encodeBase64URLSafeString( bytes( nextResult ) );
+            }
+        }
+
+        Results r = new Results( this );
+        if ( r.entities != null ) {
+            r.entities = r.entities.subList( 0, count );
+        }
+        if ( r.refs != null ) {
+            r.refs = r.refs.subList( 0, count );
+        }
+        if ( r.ids != null ) {
+            r.ids = r.ids.subList( 0, count );
+        }
+        r.setNextResult( nextResult );
+        r.setCursor( cursor );
+
+        return r;
+    }
+
+
+    public boolean hasMoreResults() {
+        return nextResult != null;
+    }
+
+
+    public void setNextResult( UUID nextResult ) {
+        this.nextResult = nextResult;
+    }
+
+
+    public Results withNextResult( UUID nextResult ) {
+        this.nextResult = nextResult;
+        return this;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public String getCursor() {
+        return cursor;
+    }
+
+
+    public boolean hasCursor() {
+        return cursor != null && cursor.length() > 0;
+    }
+
+
+    public void setCursor( String cursor ) {
+        this.cursor = cursor;
+    }
+
+
+    public Results withCursor( String cursor ) {
+        this.cursor = cursor;
+        return this;
+    }
+
+
+    public void setMetadata( UUID id, String name, Object value ) {
+        if ( metadata == null ) {
+            metadata = new LinkedHashMap<UUID, Map<String, Object>>();
+        }
+        Map<String, Object> entityMetadata = metadata.get( id );
+        if ( entityMetadata == null ) {
+            entityMetadata = new LinkedHashMap<String, Object>();
+            metadata.put( id, entityMetadata );
+        }
+        entityMetadata.put( name, value );
+        metadataMerged = false;
+        // updateIndex(id, name, value);
+    }
+
+
+    public Results withMetadata( UUID id, String name, Object value ) {
+        setMetadata( id, name, value );
+        return this;
+    }
+
+
+    public void setMetadata( UUID id, Map<String, Object> data ) {
+        if ( metadata == null ) {
+            metadata = new LinkedHashMap<UUID, Map<String, Object>>();
+        }
+        Map<String, Object> entityMetadata = metadata.get( id );
+        if ( entityMetadata == null ) {
+            entityMetadata = new LinkedHashMap<String, Object>();
+            metadata.put( id, entityMetadata );
+        }
+        entityMetadata.putAll( data );
+        metadataMerged = false;
+        /*
+         * for (Entry<String, Object> m : data.entrySet()) { updateIndex(id,
+         * m.getKey(), m.getValue()); }
+         */
+    }
+
+
+    public Results withMetadata( UUID id, Map<String, Object> data ) {
+        setMetadata( id, data );
+        return this;
+    }
+
+
+    public void setMetadata( Map<UUID, Map<String, Object>> metadata ) {
+        this.metadata = metadata;
+    }
+
+
+    public Results withMetadata( Map<UUID, Map<String, Object>> metadata ) {
+        this.metadata = metadata;
+        return this;
+    }
+
+
+    public void mergeEntitiesWithMetadata() {
+        if ( metadataMerged ) {
+            return;
+        }
+        if ( metadata == null ) {
+            return;
+        }
+        metadataMerged = true;
+        getEntities();
+        if ( entities != null ) {
+            for ( Entity entity : entities ) {
+                entity.clearMetadata();
+                Map<String, Object> entityMetadata = metadata.get( entity.getUuid() );
+                if ( entityMetadata != null ) {
+                    entity.mergeMetadata( entityMetadata );
+                }
+            }
+        }
+    }
+
+
+    protected QueryProcessor getQueryProcessor() {
+        return queryProcessor;
+    }
+
+
+    public void setQueryProcessor( QueryProcessor queryProcessor ) {
+        this.queryProcessor = queryProcessor;
+    }
+
+
+    public void setSearchVisitor( SearchVisitor searchVisitor ) {
+        this.searchVisitor = searchVisitor;
+    }
+
+
+    /** uses cursor to get next batch of Results (returns null if no cursor) */
+    public Results getNextPageResults() throws Exception {
+        if ( !hasCursor() ) {
+            return null;
+        }
+
+        Query q = new Query( query );
+        q.setCursor( getCursor() );
+        queryProcessor.setQuery( q );
+
+        return queryProcessor.getResults( searchVisitor );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/RoleRef.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/RoleRef.java b/stack/core/src/main/java/org/apache/usergrid/persistence/RoleRef.java
new file mode 100644
index 0000000..f194a2b
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/RoleRef.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence;
+
+
+import java.util.UUID;
+
+
+public interface RoleRef extends EntityRef {
+
+    public UUID getGroupId();
+
+    public EntityRef getGroupRef();
+
+    public String getRoleName();
+
+    public String getApplicationRoleName();
+}


[51/96] [abbrv] [partial] git commit: Change package namespace to org.apache.usergrid

Posted by sn...@apache.org.
Change package namespace to org.apache.usergrid


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

Branch: refs/pull/39/merge
Commit: 2c2acbe4cd0ea27aab0cef95e5192c4ba52d93cf
Parents: 800c501
Author: Lewis John McGibbney <le...@apache.org>
Authored: Tue Jan 28 21:17:44 2014 +0000
Committer: Lewis John McGibbney <le...@apache.org>
Committed: Tue Jan 28 21:17:44 2014 +0000

----------------------------------------------------------------------
 stack/build-tools/pom.xml                       |      2 +-
 .../src/main/resources/usergrid/checkstyle.xml  |      2 +-
 stack/config/pom.xml                            |      2 +-
 stack/config/src/main/resources/log4j.xml       |     14 +-
 .../main/resources/usergrid-default.properties  |      2 +-
 .../config/src/test/resources/log4j.properties  |     14 +-
 stack/config/src/test/resources/log4j.xml       |      4 +-
 stack/core/pom.xml                              |     12 +-
 .../persistence/query/tree/QueryFilter.g        |     10 +-
 .../java/org/apache/usergrid/batch/AppArgs.java |     57 +
 .../java/org/apache/usergrid/batch/Job.java     |     20 +
 .../org/apache/usergrid/batch/JobExecution.java |     91 +
 .../apache/usergrid/batch/JobExecutionImpl.java |    202 +
 .../org/apache/usergrid/batch/JobFactory.java   |     19 +
 .../usergrid/batch/JobNotFoundException.java    |     23 +
 .../org/apache/usergrid/batch/JobRuntime.java   |     40 +
 .../usergrid/batch/JobRuntimeException.java     |     49 +
 .../usergrid/batch/UsergridJobFactory.java      |     37 +
 .../apache/usergrid/batch/job/OnlyOnceJob.java  |     85 +
 .../apache/usergrid/batch/job/package-info.java |     18 +
 .../usergrid/batch/repository/JobAccessor.java  |     36 +
 .../batch/repository/JobDescriptor.java         |     80 +
 .../usergrid/batch/repository/package-info.java |     18 +
 .../org/apache/usergrid/batch/service/App.java  |     70 +
 .../usergrid/batch/service/JobListener.java     |     50 +
 .../batch/service/JobRuntimeService.java        |     49 +
 .../batch/service/JobSchedulerService.java      |    315 +
 .../batch/service/SchedulerService.java         |     54 +
 .../batch/service/SchedulerServiceImpl.java     |    427 +
 .../usergrid/batch/service/package-info.java    |     18 +
 .../hazelcast/HazelcastLifecycleMonitor.java    |     78 +
 .../apache/usergrid/count/AbstractBatcher.java  |    176 +
 .../apache/usergrid/count/BatchSubmitter.java   |     30 +
 .../java/org/apache/usergrid/count/Batcher.java |     35 +
 .../usergrid/count/CassandraCounterStore.java   |     99 +
 .../usergrid/count/CassandraSubmitter.java      |     77 +
 .../apache/usergrid/count/CountProducer.java    |     25 +
 .../CounterProcessingUnavailableException.java  |     38 +
 .../org/apache/usergrid/count/CounterStore.java |     30 +
 .../apache/usergrid/count/SimpleBatcher.java    |     39 +
 .../usergrid/count/Slf4JBatchSubmitter.java     |     77 +
 .../org/apache/usergrid/count/common/Count.java |    139 +
 .../usergrid/count/common/CountSerDeUtils.java  |     51 +
 .../common/CountTransportSerDeException.java    |     38 +
 .../org/apache/usergrid/count/package-info.java |      1 +
 .../usergrid/exception/JsonReadException.java   |     27 +
 .../usergrid/exception/JsonWriteException.java  |     27 +
 .../exception/NotImplementedException.java      |     58 +
 .../java/org/apache/usergrid/locking/Lock.java  |     44 +
 .../org/apache/usergrid/locking/LockHelper.java |     50 +
 .../apache/usergrid/locking/LockManager.java    |     40 +
 .../usergrid/locking/LockPathBuilder.java       |     68 +
 .../locking/cassandra/HectorLockImpl.java       |     85 +
 .../cassandra/HectorLockManagerImpl.java        |    141 +
 .../locking/exception/UGLockException.java      |     49 +
 .../usergrid/locking/noop/NoOpLockImpl.java     |     61 +
 .../locking/noop/NoOpLockManagerImpl.java       |     40 +
 .../locking/singlenode/SingleNodeLockImpl.java  |     70 +
 .../singlenode/SingleNodeLockManagerImpl.java   |     93 +
 .../zookeeper/ZooKeeperLockManagerImpl.java     |    114 +
 .../locking/zookeeper/ZookeeperLockImpl.java    |     87 +
 .../org/apache/usergrid/mq/CounterQuery.java    |    314 +
 .../java/org/apache/usergrid/mq/Message.java    |    512 +
 .../main/java/org/apache/usergrid/mq/Query.java |   1856 +
 .../apache/usergrid/mq/QueryFilterLexer.java    |   1842 +
 .../apache/usergrid/mq/QueryFilterParser.java   |   1102 +
 .../org/apache/usergrid/mq/QueryProcessor.java  |    560 +
 .../main/java/org/apache/usergrid/mq/Queue.java |    289 +
 .../org/apache/usergrid/mq/QueueManager.java    |    130 +
 .../apache/usergrid/mq/QueueManagerFactory.java |     41 +
 .../org/apache/usergrid/mq/QueuePosition.java   |     59 +
 .../java/org/apache/usergrid/mq/QueueQuery.java |    305 +
 .../org/apache/usergrid/mq/QueueResults.java    |    128 +
 .../java/org/apache/usergrid/mq/QueueSet.java   |    192 +
 .../usergrid/mq/cassandra/CassandraMQUtils.java |    277 +
 .../mq/cassandra/MessageIndexUpdate.java        |    119 +
 .../usergrid/mq/cassandra/QueueIndexUpdate.java |    347 +
 .../mq/cassandra/QueueManagerFactoryImpl.java   |     85 +
 .../usergrid/mq/cassandra/QueueManagerImpl.java |   1390 +
 .../apache/usergrid/mq/cassandra/QueuesCF.java  |    155 +
 .../mq/cassandra/io/AbstractSearch.java         |    357 +
 .../mq/cassandra/io/ConsumerTransaction.java    |    470 +
 .../usergrid/mq/cassandra/io/EndSearch.java     |     69 +
 .../usergrid/mq/cassandra/io/FilterSearch.java  |    258 +
 .../mq/cassandra/io/NoTransactionSearch.java    |    131 +
 .../usergrid/mq/cassandra/io/QueueBounds.java   |     91 +
 .../usergrid/mq/cassandra/io/QueueSearch.java   |     29 +
 .../usergrid/mq/cassandra/io/StartSearch.java   |     68 +
 .../usergrid/persistence/AbstractEntity.java    |    342 +
 .../usergrid/persistence/AggregateCounter.java  |     48 +
 .../persistence/AggregateCounterSet.java        |    116 +
 .../persistence/AssociatedEntityRef.java        |     21 +
 .../usergrid/persistence/CollectionRef.java     |     26 +
 .../persistence/ConnectedEntityRef.java         |     22 +
 .../usergrid/persistence/ConnectionRef.java     |     34 +
 .../usergrid/persistence/CounterQuery.java      |    313 +
 .../usergrid/persistence/CounterResolution.java |     84 +
 .../usergrid/persistence/CredentialsInfo.java   |    176 +
 .../usergrid/persistence/DynamicEntity.java     |    111 +
 .../org/apache/usergrid/persistence/Entity.java |    103 +
 .../usergrid/persistence/EntityFactory.java     |    131 +
 .../usergrid/persistence/EntityManager.java     |    605 +
 .../persistence/EntityManagerFactory.java       |    108 +
 .../persistence/EntityPropertyComparator.java   |     55 +
 .../apache/usergrid/persistence/EntityRef.java  |     37 +
 .../usergrid/persistence/EntityUtils.java       |     53 +
 .../apache/usergrid/persistence/Identifier.java |    226 +
 .../persistence/IndexBucketLocator.java         |     75 +
 .../persistence/MultiQueryIterator.java         |    106 +
 .../persistence/PagingResultsIterator.java      |    109 +
 .../apache/usergrid/persistence/PathQuery.java  |    115 +
 .../org/apache/usergrid/persistence/Query.java  |   1309 +
 .../apache/usergrid/persistence/QueryUtils.java |     34 +
 .../usergrid/persistence/RelationManager.java   |    113 +
 .../apache/usergrid/persistence/Results.java    |   1294 +
 .../apache/usergrid/persistence/RoleRef.java    |     31 +
 .../org/apache/usergrid/persistence/Schema.java |   1786 +
 .../persistence/SimpleCollectionRef.java        |     84 +
 .../usergrid/persistence/SimpleEntityRef.java   |    149 +
 .../usergrid/persistence/SimpleRoleRef.java     |    125 +
 .../usergrid/persistence/TypedEntity.java       |     37 +
 .../org/apache/usergrid/persistence/Update.java |     75 +
 .../annotations/EntityCollection.java           |     43 +
 .../annotations/EntityDictionary.java           |     38 +
 .../persistence/annotations/EntityProperty.java |     54 +
 .../persistence/cassandra/ApplicationCF.java    |    159 +
 .../usergrid/persistence/cassandra/CFEnum.java  |     37 +
 .../cassandra/CassandraPersistenceUtils.java    |    483 +
 .../persistence/cassandra/CassandraService.java |   1134 +
 .../cassandra/ConnectedEntityRefImpl.java       |     61 +
 .../cassandra/ConnectionRefImpl.java            |    627 +
 .../persistence/cassandra/CounterUtils.java     |    397 +
 .../persistence/cassandra/CursorCache.java      |    120 +
 .../cassandra/EntityManagerFactoryImpl.java     |    408 +
 .../cassandra/EntityManagerImpl.java            |   2856 +
 .../cassandra/EntityValueSerializer.java        |     51 +
 .../persistence/cassandra/GeoIndexManager.java  |    322 +
 .../persistence/cassandra/IndexUpdate.java      |    448 +
 .../persistence/cassandra/QueryProcessor.java   |    719 +
 .../cassandra/RelationManagerImpl.java          |   2337 +
 .../usergrid/persistence/cassandra/Setup.java   |    205 +
 .../cassandra/SimpleIndexBucketLocatorImpl.java |    121 +
 .../cassandra/index/ConnectedIndexScanner.java  |    231 +
 .../cassandra/index/IndexBucketScanner.java     |    217 +
 .../index/IndexMultiBucketSetLoader.java        |    137 +
 .../cassandra/index/IndexScanner.java           |     39 +
 .../cassandra/index/NoOpIndexScanner.java       |     94 +
 .../cassandra/util/Slf4jTraceTagReporter.java   |     47 +
 .../cassandra/util/TaggedOpTimer.java           |     38 +
 .../persistence/cassandra/util/TimedOpTag.java  |    101 +
 .../cassandra/util/TraceParticipant.java        |     20 +
 .../persistence/cassandra/util/TraceTag.java    |     77 +
 .../cassandra/util/TraceTagAspect.java          |     41 +
 .../cassandra/util/TraceTagManager.java         |    156 +
 .../cassandra/util/TraceTagReporter.java        |     10 +
 .../usergrid/persistence/entities/Activity.java |    685 +
 .../persistence/entities/Application.java       |    609 +
 .../usergrid/persistence/entities/Asset.java    |     93 +
 .../usergrid/persistence/entities/Device.java   |    105 +
 .../usergrid/persistence/entities/Event.java    |    155 +
 .../usergrid/persistence/entities/Folder.java   |     93 +
 .../usergrid/persistence/entities/Group.java    |    168 +
 .../usergrid/persistence/entities/JobData.java  |     54 +
 .../usergrid/persistence/entities/JobStat.java  |    175 +
 .../usergrid/persistence/entities/Message.java  |     77 +
 .../usergrid/persistence/entities/Role.java     |    153 +
 .../usergrid/persistence/entities/User.java     |    348 +
 .../ApplicationAlreadyExistsException.java      |     37 +
 .../DuplicateUniquePropertyExistsException.java |     52 +
 .../exceptions/EntityNotFoundException.java     |     45 +
 .../exceptions/LockingException.java            |     65 +
 .../exceptions/NoFullTextIndexException.java    |     50 +
 .../exceptions/NoIndexException.java            |     50 +
 .../exceptions/PersistenceException.java        |     45 +
 .../PropertyTypeConversionException.java        |     71 +
 .../exceptions/QueryIterationException.java     |     13 +
 .../exceptions/QueryParseException.java         |     63 +
 .../exceptions/QueryTokenException.java         |     52 +
 .../persistence/exceptions/QueueException.java  |     61 +
 .../RequiredPropertyNotFoundException.java      |     41 +
 .../TransactionNotFoundException.java           |     45 +
 .../UnexpectedEntityTypeException.java          |     45 +
 .../persistence/geo/CollectionGeoSearch.java    |     51 +
 .../persistence/geo/ConnectionGeoSearch.java    |     50 +
 .../persistence/geo/EntityLocationRef.java      |    210 +
 .../EntityLocationRefDistanceComparator.java    |     77 +
 .../persistence/geo/GeoIndexSearcher.java       |    366 +
 .../persistence/geo/GeocellManager.java         |    179 +
 .../usergrid/persistence/geo/GeocellUtils.java  |    539 +
 .../geo/comparator/DoubleTupleComparator.java   |     23 +
 .../persistence/geo/model/BoundingBox.java      |     71 +
 .../persistence/geo/model/CostFunction.java     |     33 +
 .../geo/model/DefaultCostFunction.java          |     34 +
 .../usergrid/persistence/geo/model/Point.java   |     58 +
 .../usergrid/persistence/geo/model/Tuple.java   |     24 +
 .../usergrid/persistence/query/ir/AllNode.java  |     54 +
 .../usergrid/persistence/query/ir/AndNode.java  |     43 +
 .../persistence/query/ir/BooleanNode.java       |     48 +
 .../query/ir/EmailIdentifierNode.java           |     31 +
 .../query/ir/NameIdentifierNode.java            |     28 +
 .../persistence/query/ir/NodeVisitor.java       |     78 +
 .../usergrid/persistence/query/ir/NotNode.java  |     62 +
 .../usergrid/persistence/query/ir/OrNode.java   |     52 +
 .../persistence/query/ir/OrderByNode.java       |     92 +
 .../persistence/query/ir/QueryNode.java         |     28 +
 .../persistence/query/ir/QuerySlice.java        |    343 +
 .../persistence/query/ir/SearchVisitor.java     |    255 +
 .../persistence/query/ir/SliceNode.java         |    168 +
 .../query/ir/UuidIdentifierNode.java            |     32 +
 .../persistence/query/ir/WithinNode.java        |     96 +
 .../query/ir/result/AbstractScanColumn.java     |     70 +
 .../result/CollectionResultsLoaderFactory.java  |     23 +
 .../ir/result/ConnectionIndexSliceParser.java   |     86 +
 .../query/ir/result/ConnectionRefLoader.java    |     65 +
 .../result/ConnectionResultsLoaderFactory.java  |     32 +
 .../ir/result/ConnectionTypesIterator.java      |    178 +
 .../query/ir/result/EmptyIterator.java          |     47 +
 .../query/ir/result/EntityRefLoader.java        |     50 +
 .../query/ir/result/EntityResultsLoader.java    |     46 +
 .../query/ir/result/GeoIterator.java            |    355 +
 .../persistence/query/ir/result/IDLoader.java   |     24 +
 .../query/ir/result/IntersectionIterator.java   |    167 +
 .../query/ir/result/MergeIterator.java          |    137 +
 .../query/ir/result/MultiIterator.java          |     54 +
 .../query/ir/result/OrderByIterator.java        |    251 +
 .../query/ir/result/ResultIterator.java         |     43 +
 .../query/ir/result/ResultsLoader.java          |     29 +
 .../query/ir/result/ResultsLoaderFactory.java   |     21 +
 .../persistence/query/ir/result/ScanColumn.java |     16 +
 .../query/ir/result/ScanColumnTransformer.java  |     23 +
 .../ir/result/SecondaryIndexSliceParser.java    |     60 +
 .../query/ir/result/SliceIterator.java          |    251 +
 .../query/ir/result/SliceParser.java            |     31 +
 .../query/ir/result/StaticIdIterator.java       |     66 +
 .../query/ir/result/SubtractionIterator.java    |    108 +
 .../query/ir/result/UUIDIndexSliceParser.java   |     50 +
 .../query/ir/result/UnionIterator.java          |    252 +
 .../usergrid/persistence/query/tree/.gitignore  |      2 +
 .../persistence/query/tree/AndOperand.java      |     48 +
 .../persistence/query/tree/BooleanLiteral.java  |     48 +
 .../persistence/query/tree/BooleanOperand.java  |     48 +
 .../persistence/query/tree/ContainsOperand.java |     69 +
 .../query/tree/ContainsProperty.java            |     57 +
 .../usergrid/persistence/query/tree/Equal.java  |     52 +
 .../persistence/query/tree/EqualityOperand.java |     88 +
 .../persistence/query/tree/FloatLiteral.java    |     57 +
 .../persistence/query/tree/GreaterThan.java     |     52 +
 .../query/tree/GreaterThanEqual.java            |     56 +
 .../persistence/query/tree/LessThan.java        |     52 +
 .../persistence/query/tree/LessThanEqual.java   |     54 +
 .../persistence/query/tree/Literal.java         |     38 +
 .../persistence/query/tree/LiteralFactory.java  |     58 +
 .../persistence/query/tree/LongLiteral.java     |     64 +
 .../persistence/query/tree/NotOperand.java      |     45 +
 .../persistence/query/tree/NumericLiteral.java  |     24 +
 .../persistence/query/tree/Operand.java         |     47 +
 .../persistence/query/tree/OrOperand.java       |     53 +
 .../persistence/query/tree/Property.java        |     62 +
 .../persistence/query/tree/QueryVisitor.java    |     90 +
 .../persistence/query/tree/StringLiteral.java   |     82 +
 .../persistence/query/tree/UUIDLiteral.java     |     49 +
 .../persistence/query/tree/WithinOperand.java   |    111 +
 .../persistence/query/tree/WithinProperty.java  |     54 +
 .../persistence/schema/CollectionInfo.java      |    207 +
 .../persistence/schema/DictionaryInfo.java      |    117 +
 .../usergrid/persistence/schema/EntityInfo.java |    299 +
 .../persistence/schema/PropertyInfo.java        |    218 +
 .../usergrid/system/UsergridSystemMonitor.java  |     95 +
 .../org/apache/usergrid/utils/AESUtils.java     |     84 +
 .../java/org/apache/usergrid/utils/BCrypt.java  |    627 +
 .../org/apache/usergrid/utils/ClassUtils.java   |     58 +
 .../org/apache/usergrid/utils/CodecUtils.java   |     45 +
 .../apache/usergrid/utils/CompositeUtils.java   |     54 +
 .../apache/usergrid/utils/ConversionUtils.java  |    765 +
 .../org/apache/usergrid/utils/DateUtils.java    |     88 +
 .../org/apache/usergrid/utils/HttpUtils.java    |     51 +
 .../org/apache/usergrid/utils/IndexUtils.java   |    218 +
 .../apache/usergrid/utils/InflectionUtils.java  |     51 +
 .../org/apache/usergrid/utils/Inflector.java    |    553 +
 .../org/apache/usergrid/utils/JsonUtils.java    |    327 +
 .../org/apache/usergrid/utils/ListUtils.java    |    230 +
 .../org/apache/usergrid/utils/MailUtils.java    |    154 +
 .../org/apache/usergrid/utils/MapUtils.java     |    376 +
 .../org/apache/usergrid/utils/NumberUtils.java  |     35 +
 .../apache/usergrid/utils/PasswordUtils.java    |     28 +
 .../org/apache/usergrid/utils/StringUtils.java  |    171 +
 .../org/apache/usergrid/utils/TimeUtils.java    |     88 +
 .../org/apache/usergrid/utils/UUIDUtils.java    |    411 +
 .../java/org/apache/usergrid/utils/Version.java |    428 +
 .../org/apache/usergrid/utils/package-info.java |     18 +
 .../main/java/org/usergrid/batch/AppArgs.java   |     57 -
 .../src/main/java/org/usergrid/batch/Job.java   |     20 -
 .../java/org/usergrid/batch/JobExecution.java   |     91 -
 .../org/usergrid/batch/JobExecutionImpl.java    |    202 -
 .../java/org/usergrid/batch/JobFactory.java     |     19 -
 .../usergrid/batch/JobNotFoundException.java    |     23 -
 .../java/org/usergrid/batch/JobRuntime.java     |     40 -
 .../org/usergrid/batch/JobRuntimeException.java |     49 -
 .../org/usergrid/batch/UsergridJobFactory.java  |     37 -
 .../org/usergrid/batch/job/OnlyOnceJob.java     |     85 -
 .../org/usergrid/batch/job/package-info.java    |     18 -
 .../usergrid/batch/repository/JobAccessor.java  |     36 -
 .../batch/repository/JobDescriptor.java         |     80 -
 .../usergrid/batch/repository/package-info.java |     18 -
 .../java/org/usergrid/batch/service/App.java    |     70 -
 .../org/usergrid/batch/service/JobListener.java |     50 -
 .../batch/service/JobRuntimeService.java        |     49 -
 .../batch/service/JobSchedulerService.java      |    315 -
 .../batch/service/SchedulerService.java         |     54 -
 .../batch/service/SchedulerServiceImpl.java     |    428 -
 .../usergrid/batch/service/package-info.java    |     18 -
 .../hazelcast/HazelcastLifecycleMonitor.java    |     78 -
 .../org/usergrid/count/AbstractBatcher.java     |    175 -
 .../java/org/usergrid/count/BatchSubmitter.java |     30 -
 .../main/java/org/usergrid/count/Batcher.java   |     35 -
 .../usergrid/count/CassandraCounterStore.java   |    100 -
 .../org/usergrid/count/CassandraSubmitter.java  |     77 -
 .../java/org/usergrid/count/CountProducer.java  |     25 -
 .../CounterProcessingUnavailableException.java  |     38 -
 .../java/org/usergrid/count/CounterStore.java   |     30 -
 .../java/org/usergrid/count/SimpleBatcher.java  |     40 -
 .../org/usergrid/count/Slf4JBatchSubmitter.java |     77 -
 .../java/org/usergrid/count/common/Count.java   |    139 -
 .../usergrid/count/common/CountSerDeUtils.java  |     51 -
 .../common/CountTransportSerDeException.java    |     38 -
 .../java/org/usergrid/count/package-info.java   |      0
 .../usergrid/exception/JsonReadException.java   |     27 -
 .../usergrid/exception/JsonWriteException.java  |     27 -
 .../exception/NotImplementedException.java      |     58 -
 .../main/java/org/usergrid/locking/Lock.java    |     44 -
 .../java/org/usergrid/locking/LockHelper.java   |     51 -
 .../java/org/usergrid/locking/LockManager.java  |     40 -
 .../org/usergrid/locking/LockPathBuilder.java   |     68 -
 .../locking/cassandra/HectorLockImpl.java       |     85 -
 .../cassandra/HectorLockManagerImpl.java        |    141 -
 .../locking/exception/UGLockException.java      |     49 -
 .../org/usergrid/locking/noop/NoOpLockImpl.java |     61 -
 .../locking/noop/NoOpLockManagerImpl.java       |     40 -
 .../locking/singlenode/SingleNodeLockImpl.java  |     70 -
 .../singlenode/SingleNodeLockManagerImpl.java   |     93 -
 .../zookeeper/ZooKeeperLockManagerImpl.java     |    114 -
 .../locking/zookeeper/ZookeeperLockImpl.java    |     87 -
 .../main/java/org/usergrid/mq/CounterQuery.java |    314 -
 .../src/main/java/org/usergrid/mq/Message.java  |    512 -
 .../src/main/java/org/usergrid/mq/Query.java    |   1857 -
 .../java/org/usergrid/mq/QueryFilterLexer.java  |   1842 -
 .../java/org/usergrid/mq/QueryFilterParser.java |   1102 -
 .../java/org/usergrid/mq/QueryProcessor.java    |    562 -
 .../src/main/java/org/usergrid/mq/Queue.java    |    291 -
 .../main/java/org/usergrid/mq/QueueManager.java |    130 -
 .../org/usergrid/mq/QueueManagerFactory.java    |     41 -
 .../java/org/usergrid/mq/QueuePosition.java     |     59 -
 .../main/java/org/usergrid/mq/QueueQuery.java   |    306 -
 .../main/java/org/usergrid/mq/QueueResults.java |    128 -
 .../src/main/java/org/usergrid/mq/QueueSet.java |    192 -
 .../usergrid/mq/cassandra/CassandraMQUtils.java |    278 -
 .../mq/cassandra/MessageIndexUpdate.java        |    120 -
 .../usergrid/mq/cassandra/QueueIndexUpdate.java |    349 -
 .../mq/cassandra/QueueManagerFactoryImpl.java   |     85 -
 .../usergrid/mq/cassandra/QueueManagerImpl.java |   1391 -
 .../org/usergrid/mq/cassandra/QueuesCF.java     |    156 -
 .../mq/cassandra/io/AbstractSearch.java         |    358 -
 .../mq/cassandra/io/ConsumerTransaction.java    |    471 -
 .../org/usergrid/mq/cassandra/io/EndSearch.java |     69 -
 .../usergrid/mq/cassandra/io/FilterSearch.java  |    259 -
 .../mq/cassandra/io/NoTransactionSearch.java    |    132 -
 .../usergrid/mq/cassandra/io/QueueBounds.java   |     91 -
 .../usergrid/mq/cassandra/io/QueueSearch.java   |     29 -
 .../usergrid/mq/cassandra/io/StartSearch.java   |     68 -
 .../usergrid/persistence/AbstractEntity.java    |    342 -
 .../usergrid/persistence/AggregateCounter.java  |     48 -
 .../persistence/AggregateCounterSet.java        |    116 -
 .../persistence/AssociatedEntityRef.java        |     21 -
 .../org/usergrid/persistence/CollectionRef.java |     26 -
 .../persistence/ConnectedEntityRef.java         |     22 -
 .../org/usergrid/persistence/ConnectionRef.java |     34 -
 .../org/usergrid/persistence/CounterQuery.java  |    313 -
 .../usergrid/persistence/CounterResolution.java |     84 -
 .../usergrid/persistence/CredentialsInfo.java   |    176 -
 .../org/usergrid/persistence/DynamicEntity.java |    111 -
 .../java/org/usergrid/persistence/Entity.java   |    103 -
 .../org/usergrid/persistence/EntityFactory.java |    131 -
 .../org/usergrid/persistence/EntityManager.java |    620 -
 .../persistence/EntityManagerFactory.java       |    108 -
 .../persistence/EntityPropertyComparator.java   |     55 -
 .../org/usergrid/persistence/EntityRef.java     |     37 -
 .../org/usergrid/persistence/EntityUtils.java   |     53 -
 .../org/usergrid/persistence/Identifier.java    |    226 -
 .../persistence/IndexBucketLocator.java         |     75 -
 .../persistence/MultiQueryIterator.java         |    106 -
 .../persistence/PagingResultsIterator.java      |    109 -
 .../org/usergrid/persistence/PathQuery.java     |    115 -
 .../java/org/usergrid/persistence/Query.java    |   1310 -
 .../org/usergrid/persistence/QueryUtils.java    |     34 -
 .../usergrid/persistence/RelationManager.java   |    113 -
 .../java/org/usergrid/persistence/Results.java  |   1294 -
 .../java/org/usergrid/persistence/RoleRef.java  |     31 -
 .../java/org/usergrid/persistence/Schema.java   |   1788 -
 .../persistence/SimpleCollectionRef.java        |     84 -
 .../usergrid/persistence/SimpleEntityRef.java   |    149 -
 .../org/usergrid/persistence/SimpleRoleRef.java |    125 -
 .../org/usergrid/persistence/TypedEntity.java   |     37 -
 .../java/org/usergrid/persistence/Update.java   |     75 -
 .../annotations/EntityCollection.java           |     43 -
 .../annotations/EntityDictionary.java           |     38 -
 .../persistence/annotations/EntityProperty.java |     54 -
 .../persistence/cassandra/ApplicationCF.java    |    160 -
 .../usergrid/persistence/cassandra/CFEnum.java  |     37 -
 .../cassandra/CassandraPersistenceUtils.java    |    486 -
 .../persistence/cassandra/CassandraService.java |   1135 -
 .../cassandra/ConnectedEntityRefImpl.java       |     61 -
 .../cassandra/ConnectionRefImpl.java            |    628 -
 .../persistence/cassandra/CounterUtils.java     |    400 -
 .../persistence/cassandra/CursorCache.java      |    121 -
 .../cassandra/EntityManagerFactoryImpl.java     |    411 -
 .../cassandra/EntityManagerImpl.java            |   2858 -
 .../cassandra/EntityValueSerializer.java        |     52 -
 .../persistence/cassandra/GeoIndexManager.java  |    323 -
 .../persistence/cassandra/IndexUpdate.java      |    450 -
 .../persistence/cassandra/QueryProcessor.java   |    720 -
 .../cassandra/RelationManagerImpl.java          |   2339 -
 .../usergrid/persistence/cassandra/Setup.java   |    206 -
 .../cassandra/SimpleIndexBucketLocatorImpl.java |    121 -
 .../cassandra/index/ConnectedIndexScanner.java  |    232 -
 .../cassandra/index/IndexBucketScanner.java     |    218 -
 .../index/IndexMultiBucketSetLoader.java        |    138 -
 .../cassandra/index/IndexScanner.java           |     39 -
 .../cassandra/index/NoOpIndexScanner.java       |     94 -
 .../cassandra/util/Slf4jTraceTagReporter.java   |     47 -
 .../cassandra/util/TaggedOpTimer.java           |     38 -
 .../persistence/cassandra/util/TimedOpTag.java  |    101 -
 .../cassandra/util/TraceParticipant.java        |     20 -
 .../persistence/cassandra/util/TraceTag.java    |     77 -
 .../cassandra/util/TraceTagAspect.java          |     41 -
 .../cassandra/util/TraceTagManager.java         |    156 -
 .../cassandra/util/TraceTagReporter.java        |     10 -
 .../usergrid/persistence/entities/Activity.java |    685 -
 .../persistence/entities/Application.java       |    609 -
 .../usergrid/persistence/entities/Asset.java    |     93 -
 .../usergrid/persistence/entities/Device.java   |    105 -
 .../usergrid/persistence/entities/Event.java    |    155 -
 .../usergrid/persistence/entities/Folder.java   |     93 -
 .../usergrid/persistence/entities/Group.java    |    168 -
 .../usergrid/persistence/entities/JobData.java  |     54 -
 .../usergrid/persistence/entities/JobStat.java  |    175 -
 .../usergrid/persistence/entities/Message.java  |     77 -
 .../org/usergrid/persistence/entities/Role.java |    153 -
 .../org/usergrid/persistence/entities/User.java |    348 -
 .../ApplicationAlreadyExistsException.java      |     37 -
 .../DuplicateUniquePropertyExistsException.java |     52 -
 .../exceptions/EntityNotFoundException.java     |     45 -
 .../exceptions/LockingException.java            |     65 -
 .../exceptions/NoFullTextIndexException.java    |     50 -
 .../exceptions/NoIndexException.java            |     50 -
 .../exceptions/PersistenceException.java        |     45 -
 .../PropertyTypeConversionException.java        |     71 -
 .../exceptions/QueryIterationException.java     |     13 -
 .../exceptions/QueryParseException.java         |     63 -
 .../exceptions/QueryTokenException.java         |     52 -
 .../persistence/exceptions/QueueException.java  |     61 -
 .../RequiredPropertyNotFoundException.java      |     41 -
 .../TransactionNotFoundException.java           |     45 -
 .../UnexpectedEntityTypeException.java          |     45 -
 .../persistence/geo/CollectionGeoSearch.java    |     52 -
 .../persistence/geo/ConnectionGeoSearch.java    |     51 -
 .../persistence/geo/EntityLocationRef.java      |    211 -
 .../EntityLocationRefDistanceComparator.java    |     77 -
 .../persistence/geo/GeoIndexSearcher.java       |    368 -
 .../persistence/geo/GeocellManager.java         |    179 -
 .../usergrid/persistence/geo/GeocellUtils.java  |    539 -
 .../geo/comparator/DoubleTupleComparator.java   |     23 -
 .../persistence/geo/model/BoundingBox.java      |     71 -
 .../persistence/geo/model/CostFunction.java     |     33 -
 .../geo/model/DefaultCostFunction.java          |     34 -
 .../usergrid/persistence/geo/model/Point.java   |     58 -
 .../usergrid/persistence/geo/model/Tuple.java   |     24 -
 .../usergrid/persistence/query/ir/AllNode.java  |     54 -
 .../usergrid/persistence/query/ir/AndNode.java  |     43 -
 .../persistence/query/ir/BooleanNode.java       |     48 -
 .../query/ir/EmailIdentifierNode.java           |     31 -
 .../query/ir/NameIdentifierNode.java            |     28 -
 .../persistence/query/ir/NodeVisitor.java       |     78 -
 .../usergrid/persistence/query/ir/NotNode.java  |     62 -
 .../usergrid/persistence/query/ir/OrNode.java   |     52 -
 .../persistence/query/ir/OrderByNode.java       |     92 -
 .../persistence/query/ir/QueryNode.java         |     28 -
 .../persistence/query/ir/QuerySlice.java        |    344 -
 .../persistence/query/ir/SearchVisitor.java     |    255 -
 .../persistence/query/ir/SliceNode.java         |    168 -
 .../query/ir/UuidIdentifierNode.java            |     32 -
 .../persistence/query/ir/WithinNode.java        |     96 -
 .../query/ir/result/AbstractScanColumn.java     |     70 -
 .../result/CollectionResultsLoaderFactory.java  |     23 -
 .../ir/result/ConnectionIndexSliceParser.java   |     86 -
 .../query/ir/result/ConnectionRefLoader.java    |     65 -
 .../result/ConnectionResultsLoaderFactory.java  |     32 -
 .../ir/result/ConnectionTypesIterator.java      |    179 -
 .../query/ir/result/EmptyIterator.java          |     47 -
 .../query/ir/result/EntityRefLoader.java        |     50 -
 .../query/ir/result/EntityResultsLoader.java    |     46 -
 .../query/ir/result/GeoIterator.java            |    355 -
 .../persistence/query/ir/result/IDLoader.java   |     24 -
 .../query/ir/result/IntersectionIterator.java   |    167 -
 .../query/ir/result/MergeIterator.java          |    137 -
 .../query/ir/result/MultiIterator.java          |     54 -
 .../query/ir/result/OrderByIterator.java        |    252 -
 .../query/ir/result/ResultIterator.java         |     43 -
 .../query/ir/result/ResultsLoader.java          |     29 -
 .../query/ir/result/ResultsLoaderFactory.java   |     21 -
 .../persistence/query/ir/result/ScanColumn.java |     16 -
 .../query/ir/result/ScanColumnTransformer.java  |     23 -
 .../ir/result/SecondaryIndexSliceParser.java    |     60 -
 .../query/ir/result/SliceIterator.java          |    251 -
 .../query/ir/result/SliceParser.java            |     31 -
 .../query/ir/result/StaticIdIterator.java       |     66 -
 .../query/ir/result/SubtractionIterator.java    |    108 -
 .../query/ir/result/UUIDIndexSliceParser.java   |     50 -
 .../query/ir/result/UnionIterator.java          |    252 -
 .../usergrid/persistence/query/tree/.gitignore  |      2 -
 .../persistence/query/tree/AndOperand.java      |     48 -
 .../persistence/query/tree/BooleanLiteral.java  |     48 -
 .../persistence/query/tree/BooleanOperand.java  |     48 -
 .../persistence/query/tree/ContainsOperand.java |     69 -
 .../query/tree/ContainsProperty.java            |     57 -
 .../usergrid/persistence/query/tree/Equal.java  |     52 -
 .../persistence/query/tree/EqualityOperand.java |     88 -
 .../persistence/query/tree/FloatLiteral.java    |     57 -
 .../persistence/query/tree/GreaterThan.java     |     52 -
 .../query/tree/GreaterThanEqual.java            |     56 -
 .../persistence/query/tree/LessThan.java        |     52 -
 .../persistence/query/tree/LessThanEqual.java   |     54 -
 .../persistence/query/tree/Literal.java         |     38 -
 .../persistence/query/tree/LiteralFactory.java  |     58 -
 .../persistence/query/tree/LongLiteral.java     |     64 -
 .../persistence/query/tree/NotOperand.java      |     45 -
 .../persistence/query/tree/NumericLiteral.java  |     24 -
 .../persistence/query/tree/Operand.java         |     47 -
 .../persistence/query/tree/OrOperand.java       |     53 -
 .../persistence/query/tree/Property.java        |     62 -
 .../persistence/query/tree/QueryVisitor.java    |     90 -
 .../persistence/query/tree/StringLiteral.java   |     82 -
 .../persistence/query/tree/UUIDLiteral.java     |     49 -
 .../persistence/query/tree/WithinOperand.java   |    111 -
 .../persistence/query/tree/WithinProperty.java  |     54 -
 .../persistence/schema/CollectionInfo.java      |    207 -
 .../persistence/schema/DictionaryInfo.java      |    117 -
 .../usergrid/persistence/schema/EntityInfo.java |    299 -
 .../persistence/schema/PropertyInfo.java        |    218 -
 .../usergrid/system/UsergridSystemMonitor.java  |     95 -
 .../main/java/org/usergrid/utils/AESUtils.java  |     84 -
 .../main/java/org/usergrid/utils/BCrypt.java    |    627 -
 .../java/org/usergrid/utils/ClassUtils.java     |     58 -
 .../java/org/usergrid/utils/CodecUtils.java     |     45 -
 .../java/org/usergrid/utils/CompositeUtils.java |     54 -
 .../org/usergrid/utils/ConversionUtils.java     |    765 -
 .../main/java/org/usergrid/utils/DateUtils.java |     88 -
 .../main/java/org/usergrid/utils/HttpUtils.java |     51 -
 .../java/org/usergrid/utils/IndexUtils.java     |    218 -
 .../org/usergrid/utils/InflectionUtils.java     |     51 -
 .../main/java/org/usergrid/utils/Inflector.java |    553 -
 .../main/java/org/usergrid/utils/JsonUtils.java |    329 -
 .../main/java/org/usergrid/utils/ListUtils.java |    230 -
 .../main/java/org/usergrid/utils/MailUtils.java |    154 -
 .../main/java/org/usergrid/utils/MapUtils.java  |    377 -
 .../java/org/usergrid/utils/NumberUtils.java    |     35 -
 .../java/org/usergrid/utils/PasswordUtils.java  |     28 -
 .../java/org/usergrid/utils/StringUtils.java    |    172 -
 .../main/java/org/usergrid/utils/TimeUtils.java |     88 -
 .../main/java/org/usergrid/utils/UUIDUtils.java |    412 -
 .../main/java/org/usergrid/utils/Version.java   |    428 -
 .../java/org/usergrid/utils/package-info.java   |     18 -
 .../main/resources/usergrid-core-context.xml    |     52 +-
 .../resources/usergrid-scheduler-context.xml    |      8 +-
 stack/core/src/test/java/io/baas/Simple.java    |     19 -
 .../org/apache/usergrid/AbstractCoreIT.java     |     45 +
 .../java/org/apache/usergrid/Application.java   |    124 +
 .../apache/usergrid/ConcurrentCoreITSuite.java  |     50 +
 .../usergrid/ConcurrentCoreIteratorITSuite.java |     62 +
 .../usergrid/ConcurrentCoreTestSuite.java       |     33 +
 .../org/apache/usergrid/CoreApplication.java    |    171 +
 .../java/org/apache/usergrid/CoreITSetup.java   |     43 +
 .../org/apache/usergrid/CoreITSetupImpl.java    |    145 +
 .../java/org/apache/usergrid/CoreITSuite.java   |     34 +
 .../java/org/apache/usergrid/CoreTestSuite.java |     47 +
 .../org/apache/usergrid/batch/AppArgsTest.java  |     53 +
 .../batch/BulkJobExecutionUnitTest.java         |    211 +
 .../apache/usergrid/batch/BulkTestUtils.java    |     41 +
 .../batch/ConcurrentSchedulerITSuite.java       |     31 +
 .../batch/ConcurrentSchedulerTestSuite.java     |     19 +
 .../apache/usergrid/batch/SchedulerITSuite.java |     34 +
 .../usergrid/batch/SchedulerTestSuite.java      |     18 +
 .../usergrid/batch/UsergridJobFactoryTest.java  |     33 +
 .../batch/job/AbstractSchedulerRuntimeIT.java   |     77 +
 .../usergrid/batch/job/CountdownLatchJob.java   |     67 +
 .../usergrid/batch/job/DelayExecution.java      |    104 +
 .../usergrid/batch/job/DelayHeartbeat.java      |    106 +
 .../batch/job/FailureJobExceuction.java         |     74 +
 .../usergrid/batch/job/OnlyOnceExceution.java   |    117 +
 .../job/OnlyOnceUnlockOnFailExceution.java      |    127 +
 .../usergrid/batch/job/SchedulerRuntime1IT.java |     70 +
 .../usergrid/batch/job/SchedulerRuntime2IT.java |     98 +
 .../usergrid/batch/job/SchedulerRuntime3IT.java |     70 +
 .../usergrid/batch/job/SchedulerRuntime4IT.java |     67 +
 .../usergrid/batch/job/SchedulerRuntime5IT.java |     68 +
 .../usergrid/batch/job/SchedulerRuntime6IT.java |     96 +
 .../usergrid/batch/job/SchedulerRuntime7IT.java |     73 +
 .../usergrid/batch/job/SchedulerRuntime8IT.java |     94 +
 .../usergrid/batch/job/TestJobListener.java     |    121 +
 .../usergrid/batch/job/TestJobListenerTest.java |    143 +
 .../apache/usergrid/batch/job/package-info.java |     18 +
 .../clustering/hazelcast/HazelcastTest.java     |    111 +
 .../count/BatchCountParallelismTest.java        |    124 +
 .../usergrid/count/SimpleBatcherTest.java       |     52 +
 .../count/common/CountSerDeUtilsTest.java       |     70 +
 .../apache/usergrid/count/common/CountTest.java |     69 +
 .../org/apache/usergrid/io/baas/Simple.java     |     19 +
 .../locking/cassandra/HectorLockManagerIT.java  |    186 +
 .../SingleNodeLockTestSingleNode.java           |    169 +
 .../zookeeper/AbstractZooKeeperTest.java        |    126 +
 .../usergrid/locking/zookeeper/ZooPut.java      |    113 +
 .../zookeeper/ZookeeperLockManagerTest.java     |    183 +
 .../java/org/apache/usergrid/mq/MessagesIT.java |    285 +
 .../org/apache/usergrid/mq/QueuePathsTest.java  |     48 +
 .../usergrid/persistence/CollectionIT.java      |   1644 +
 .../usergrid/persistence/CoreSchemaManager.java |     66 +
 .../apache/usergrid/persistence/CounterIT.java  |    240 +
 .../persistence/EntityConnectionsIT.java        |    296 +
 .../persistence/EntityDictionaryIT.java         |    136 +
 .../usergrid/persistence/EntityManagerIT.java   |    569 +
 .../EntityPropertyComparatorTest.java           |    208 +
 .../apache/usergrid/persistence/EntityTest.java |    104 +
 .../org/apache/usergrid/persistence/GeoIT.java  |    529 +
 .../apache/usergrid/persistence/IndexIT.java    |    465 +
 .../usergrid/persistence/PathQueryIT.java       |    170 +
 .../usergrid/persistence/PermissionsIT.java     |    194 +
 .../apache/usergrid/persistence/QueryTest.java  |    312 +
 .../usergrid/persistence/QueryUtilsTest.java    |     42 +
 .../apache/usergrid/persistence/SchemaTest.java |    127 +
 .../apache/usergrid/persistence/UtilsTest.java  |     39 +
 .../cassandra/EntityManagerFactoryImplIT.java   |    176 +
 .../cassandra/QueryProcessorTest.java           |    727 +
 .../SimpleIndexBucketLocatorImplTest.java       |    177 +
 .../cassandra/util/TraceTagUnitTest.java        |     43 +
 .../persistence/entities/SampleEntity.java      |     58 +
 ...EntityLocationRefDistanceComparatorTest.java |    104 +
 .../query/AbstractIteratingQueryIT.java         |   1299 +
 .../persistence/query/AllInCollectionIT.java    |     28 +
 .../persistence/query/AllInConnectionIT.java    |     28 +
 .../query/AllInConnectionNoTypeIT.java          |     55 +
 .../query/IntersectionUnionPagingIT.java        |    163 +
 .../query/MultiOrderByCollectionIT.java         |     28 +
 .../MultiOrderByComplexUnionCollectionIT.java   |     28 +
 .../MultiOrderByComplexUnionConnectionIT.java   |     28 +
 .../query/MultiOrderByConnectionIT.java         |     31 +
 .../query/NotOrderByCollectionIT.java           |     28 +
 .../query/NotOrderByConnectionIT.java           |     28 +
 ...gleOrderByBoundRangeScanAscCollectionIT.java |     28 +
 ...gleOrderByBoundRangeScanAscConnectionIT.java |     28 +
 ...leOrderByBoundRangeScanDescCollectionIT.java |     28 +
 ...leOrderByBoundRangeScanDescConnectionIT.java |     28 +
 ...eOrderByComplexIntersectionCollectionIT.java |     28 +
 ...eOrderByComplexIntersectionConnectionIT.java |     29 +
 .../SingleOrderByComplexUnionCollectionIT.java  |     28 +
 .../SingleOrderByComplexUnionConnectionIT.java  |     28 +
 .../SingleOrderByIntersectionCollectionIT.java  |     30 +
 .../SingleOrderByIntersectionConnectionIT.java  |     30 +
 .../SingleOrderByLessThanLimitCollectionIT.java |     28 +
 .../SingleOrderByLessThanLimitConnectionIT.java |     28 +
 .../SingleOrderByMaxLimitCollectionIT.java      |     29 +
 .../SingleOrderByMaxLimitConnectionIT.java      |     29 +
 ...SingleOrderByNoIntersectionCollectionIT.java |     28 +
 ...SingleOrderByNoIntersectionConnectionIT.java |     28 +
 .../query/SingleOrderByNotCollectionIT.java     |     28 +
 .../query/SingleOrderByNotConnectionIT.java     |     28 +
 ...OrderBySameRangeScanGreaterCollectionIT.java |     28 +
 ...OrderBySameRangeScanGreaterConnectionIT.java |     28 +
 ...meRangeScanGreaterThanEqualCollectionIT.java |     28 +
 ...gleOrderBySameRangeScanLessCollectionIT.java |     28 +
 ...gleOrderBySameRangeScanLessConnectionIT.java |     28 +
 ...ySameRangeScanLessThanEqualCollectionIT.java |     28 +
 ...ySameRangeScanLessThanEqualConnectionIT.java |     28 +
 .../query/ir/result/AbstractScanColumnTest.java |     85 +
 .../query/ir/result/InOrderIterator.java        |    118 +
 .../ir/result/IntersectionIteratorTest.java     |    306 +
 .../query/ir/result/IteratorHelper.java         |     21 +
 .../ir/result/SubtractionIteratorTest.java      |    182 +
 .../query/ir/result/UnionIteratorTest.java      |    379 +
 .../persistence/query/tree/GrammarTreeTest.java |    607 +
 .../persistence/query/tree/LongLiteralTest.java |     62 +
 .../query/tree/StringLiteralTest.java           |     88 +
 .../system/UsergridSystemMonitorIT.java         |     51 +
 .../usergrid/utils/ConversionUtilsTest.java     |     50 +
 .../apache/usergrid/utils/IndexUtilsTest.java   |     71 +
 .../apache/usergrid/utils/JsonUtilsTest.java    |     88 +
 .../apache/usergrid/utils/ListUtilsTest.java    |     55 +
 .../apache/usergrid/utils/MailUtilsTest.java    |     92 +
 .../org/apache/usergrid/utils/MapUtilsTest.java |     43 +
 .../apache/usergrid/utils/TestInflector.java    |     82 +
 .../apache/usergrid/utils/TimeUtilsTest.java    |     61 +
 .../apache/usergrid/utils/UUIDUtilsTest.java    |    371 +
 .../org/apache/usergrid/utils/package-info.java |     18 +
 .../test/java/org/usergrid/AbstractCoreIT.java  |     45 -
 .../src/test/java/org/usergrid/Application.java |    124 -
 .../org/usergrid/ConcurrentCoreITSuite.java     |     50 -
 .../usergrid/ConcurrentCoreIteratorITSuite.java |     62 -
 .../org/usergrid/ConcurrentCoreTestSuite.java   |     33 -
 .../test/java/org/usergrid/CoreApplication.java |    171 -
 .../src/test/java/org/usergrid/CoreITSetup.java |     43 -
 .../test/java/org/usergrid/CoreITSetupImpl.java |    145 -
 .../src/test/java/org/usergrid/CoreITSuite.java |     34 -
 .../test/java/org/usergrid/CoreTestSuite.java   |     47 -
 .../java/org/usergrid/batch/AppArgsTest.java    |     52 -
 .../batch/BulkJobExecutionUnitTest.java         |    209 -
 .../java/org/usergrid/batch/BulkTestUtils.java  |     38 -
 .../batch/ConcurrentSchedulerITSuite.java       |     31 -
 .../batch/ConcurrentSchedulerTestSuite.java     |     19 -
 .../org/usergrid/batch/SchedulerITSuite.java    |     34 -
 .../org/usergrid/batch/SchedulerTestSuite.java  |     18 -
 .../usergrid/batch/UsergridJobFactoryTest.java  |     31 -
 .../batch/job/AbstractSchedulerRuntimeIT.java   |     78 -
 .../usergrid/batch/job/CountdownLatchJob.java   |     67 -
 .../org/usergrid/batch/job/DelayExecution.java  |    104 -
 .../org/usergrid/batch/job/DelayHeartbeat.java  |    106 -
 .../batch/job/FailureJobExceuction.java         |     74 -
 .../usergrid/batch/job/OnlyOnceExceution.java   |    116 -
 .../job/OnlyOnceUnlockOnFailExceution.java      |    126 -
 .../usergrid/batch/job/SchedulerRuntime1IT.java |     70 -
 .../usergrid/batch/job/SchedulerRuntime2IT.java |     98 -
 .../usergrid/batch/job/SchedulerRuntime3IT.java |     71 -
 .../usergrid/batch/job/SchedulerRuntime4IT.java |     68 -
 .../usergrid/batch/job/SchedulerRuntime5IT.java |     69 -
 .../usergrid/batch/job/SchedulerRuntime6IT.java |     97 -
 .../usergrid/batch/job/SchedulerRuntime7IT.java |     74 -
 .../usergrid/batch/job/SchedulerRuntime8IT.java |     95 -
 .../org/usergrid/batch/job/TestJobListener.java |    121 -
 .../usergrid/batch/job/TestJobListenerTest.java |    144 -
 .../org/usergrid/batch/job/package-info.java    |     18 -
 .../clustering/hazelcast/HazelcastTest.java     |    111 -
 .../count/BatchCountParallelismTest.java        |    122 -
 .../org/usergrid/count/SimpleBatcherTest.java   |     51 -
 .../count/common/CountSerDeUtilsTest.java       |     68 -
 .../org/usergrid/count/common/CountTest.java    |     68 -
 .../locking/cassandra/HectorLockManagerIT.java  |    185 -
 .../SingleNodeLockTestSingleNode.java           |    168 -
 .../zookeeper/AbstractZooKeeperTest.java        |    126 -
 .../org/usergrid/locking/zookeeper/ZooPut.java  |    113 -
 .../zookeeper/ZookeeperLockManagerTest.java     |    182 -
 .../test/java/org/usergrid/mq/MessagesIT.java   |    278 -
 .../java/org/usergrid/mq/QueuePathsTest.java    |     48 -
 .../org/usergrid/persistence/CollectionIT.java  |   1637 -
 .../usergrid/persistence/CoreSchemaManager.java |     66 -
 .../org/usergrid/persistence/CounterIT.java     |    235 -
 .../persistence/EntityConnectionsIT.java        |    292 -
 .../persistence/EntityDictionaryIT.java         |    133 -
 .../usergrid/persistence/EntityManagerIT.java   |    563 -
 .../EntityPropertyComparatorTest.java           |    206 -
 .../org/usergrid/persistence/EntityTest.java    |    100 -
 .../java/org/usergrid/persistence/GeoIT.java    |    524 -
 .../java/org/usergrid/persistence/IndexIT.java  |    462 -
 .../org/usergrid/persistence/PathQueryIT.java   |    164 -
 .../org/usergrid/persistence/PermissionsIT.java |    191 -
 .../org/usergrid/persistence/QueryTest.java     |    311 -
 .../usergrid/persistence/QueryUtilsTest.java    |     41 -
 .../org/usergrid/persistence/SchemaTest.java    |    127 -
 .../org/usergrid/persistence/UtilsTest.java     |     38 -
 .../cassandra/EntityManagerFactoryImplIT.java   |    175 -
 .../cassandra/QueryProcessorTest.java           |    726 -
 .../SimpleIndexBucketLocatorImplTest.java       |    176 -
 .../cassandra/util/TraceTagUnitTest.java        |     38 -
 .../persistence/entities/SampleEntity.java      |     58 -
 ...EntityLocationRefDistanceComparatorTest.java |    102 -
 .../query/AbstractIteratingQueryIT.java         |   1299 -
 .../persistence/query/AllInCollectionIT.java    |     28 -
 .../persistence/query/AllInConnectionIT.java    |     28 -
 .../query/AllInConnectionNoTypeIT.java          |     55 -
 .../query/IntersectionUnionPagingIT.java        |    163 -
 .../query/MultiOrderByCollectionIT.java         |     28 -
 .../MultiOrderByComplexUnionCollectionIT.java   |     28 -
 .../MultiOrderByComplexUnionConnectionIT.java   |     28 -
 .../query/MultiOrderByConnectionIT.java         |     31 -
 .../query/NotOrderByCollectionIT.java           |     28 -
 .../query/NotOrderByConnectionIT.java           |     28 -
 ...gleOrderByBoundRangeScanAscCollectionIT.java |     28 -
 ...gleOrderByBoundRangeScanAscConnectionIT.java |     28 -
 ...leOrderByBoundRangeScanDescCollectionIT.java |     28 -
 ...leOrderByBoundRangeScanDescConnectionIT.java |     28 -
 ...eOrderByComplexIntersectionCollectionIT.java |     28 -
 ...eOrderByComplexIntersectionConnectionIT.java |     29 -
 .../SingleOrderByComplexUnionCollectionIT.java  |     28 -
 .../SingleOrderByComplexUnionConnectionIT.java  |     28 -
 .../SingleOrderByIntersectionCollectionIT.java  |     30 -
 .../SingleOrderByIntersectionConnectionIT.java  |     30 -
 .../SingleOrderByLessThanLimitCollectionIT.java |     28 -
 .../SingleOrderByLessThanLimitConnectionIT.java |     28 -
 .../SingleOrderByMaxLimitCollectionIT.java      |     29 -
 .../SingleOrderByMaxLimitConnectionIT.java      |     29 -
 ...SingleOrderByNoIntersectionCollectionIT.java |     28 -
 ...SingleOrderByNoIntersectionConnectionIT.java |     28 -
 .../query/SingleOrderByNotCollectionIT.java     |     28 -
 .../query/SingleOrderByNotConnectionIT.java     |     28 -
 ...OrderBySameRangeScanGreaterCollectionIT.java |     28 -
 ...OrderBySameRangeScanGreaterConnectionIT.java |     28 -
 ...meRangeScanGreaterThanEqualCollectionIT.java |     28 -
 ...gleOrderBySameRangeScanLessCollectionIT.java |     28 -
 ...gleOrderBySameRangeScanLessConnectionIT.java |     28 -
 ...ySameRangeScanLessThanEqualCollectionIT.java |     28 -
 ...ySameRangeScanLessThanEqualConnectionIT.java |     28 -
 .../query/ir/result/AbstractScanColumnTest.java |     84 -
 .../query/ir/result/InOrderIterator.java        |    115 -
 .../ir/result/IntersectionIteratorTest.java     |    304 -
 .../query/ir/result/IteratorHelper.java         |     18 -
 .../ir/result/SubtractionIteratorTest.java      |    180 -
 .../query/ir/result/UnionIteratorTest.java      |    378 -
 .../persistence/query/tree/GrammarTreeTest.java |    592 -
 .../persistence/query/tree/LongLiteralTest.java |     61 -
 .../query/tree/StringLiteralTest.java           |     87 -
 .../system/UsergridSystemMonitorIT.java         |     51 -
 .../org/usergrid/utils/ConversionUtilsTest.java |     49 -
 .../java/org/usergrid/utils/IndexUtilsTest.java |     71 -
 .../java/org/usergrid/utils/JsonUtilsTest.java  |     85 -
 .../java/org/usergrid/utils/ListUtilsTest.java  |     53 -
 .../java/org/usergrid/utils/MailUtilsTest.java  |     90 -
 .../java/org/usergrid/utils/MapUtilsTest.java   |     41 -
 .../java/org/usergrid/utils/TestInflector.java  |     81 -
 .../java/org/usergrid/utils/TimeUtilsTest.java  |     60 -
 .../java/org/usergrid/utils/UUIDUtilsTest.java  |    371 -
 .../java/org/usergrid/utils/package-info.java   |     18 -
 stack/core/src/test/resources/log4j.properties  |     16 +-
 .../test/resources/usergrid-test-context.xml    |      4 +-
 stack/launcher/pom.xml                          |     10 +-
 .../java/org/apache/usergrid/launcher/App.java  |    288 +
 .../apache/usergrid/launcher/AppleUtils.java    |     38 +
 .../launcher/ClasspathStaticHttpHandler.java    |    320 +
 .../launcher/CustomJSPTemplateProcessor.java    |    137 +
 .../usergrid/launcher/EmbeddedServerHelper.java |    193 +
 .../org/apache/usergrid/launcher/JarMain.java   |     40 +
 .../apache/usergrid/launcher/LauncherFrame.java |    461 +
 .../usergrid/launcher/LogViewerFrame.java       |    104 +
 .../org/apache/usergrid/launcher/Server.java    |    618 +
 .../apache/usergrid/launcher/package-info.java  |     18 +
 .../main/java/org/usergrid/launcher/App.java    |    288 -
 .../java/org/usergrid/launcher/AppleUtils.java  |     38 -
 .../launcher/ClasspathStaticHttpHandler.java    |    320 -
 .../launcher/CustomJSPTemplateProcessor.java    |    137 -
 .../usergrid/launcher/EmbeddedServerHelper.java |    193 -
 .../java/org/usergrid/launcher/JarMain.java     |     40 -
 .../org/usergrid/launcher/LauncherFrame.java    |    461 -
 .../org/usergrid/launcher/LogViewerFrame.java   |    104 -
 .../main/java/org/usergrid/launcher/Server.java |    618 -
 .../org/usergrid/launcher/package-info.java     |     18 -
 .../src/main/resources/log4j.properties         |     14 +-
 .../org/apache/usergrid/launcher/dock_icon.png  |    Bin 0 -> 11592 bytes
 .../org/apache/usergrid/launcher/icon_16.png    |    Bin 0 -> 3273 bytes
 .../org/apache/usergrid/launcher/icon_256.png   |    Bin 0 -> 12578 bytes
 .../org/apache/usergrid/launcher/icon_32.png    |    Bin 0 -> 3862 bytes
 .../org/apache/usergrid/launcher/icon_64.png    |    Bin 0 -> 5079 bytes
 .../org/apache/usergrid/launcher/log_viewer.png |    Bin 0 -> 6610 bytes
 .../org/apache/usergrid/launcher/start.png      |    Bin 0 -> 9253 bytes
 .../apache/usergrid/launcher/start_active.png   |    Bin 0 -> 9334 bytes
 .../apache/usergrid/launcher/status_green.png   |    Bin 0 -> 2048 bytes
 .../org/apache/usergrid/launcher/status_off.png |    Bin 0 -> 1847 bytes
 .../org/apache/usergrid/launcher/status_red.png |    Bin 0 -> 2047 bytes
 .../apache/usergrid/launcher/status_yellow.png  |    Bin 0 -> 2092 bytes
 .../org/apache/usergrid/launcher/stop.png       |    Bin 0 -> 8858 bytes
 .../apache/usergrid/launcher/stop_active.png    |    Bin 0 -> 8844 bytes
 .../apache/usergrid/launcher/web_browser.png    |    Bin 0 -> 4531 bytes
 .../org/usergrid/launcher/dock_icon.png         |    Bin 11592 -> 0 bytes
 .../resources/org/usergrid/launcher/icon_16.png |    Bin 3273 -> 0 bytes
 .../org/usergrid/launcher/icon_256.png          |    Bin 12578 -> 0 bytes
 .../resources/org/usergrid/launcher/icon_32.png |    Bin 3862 -> 0 bytes
 .../resources/org/usergrid/launcher/icon_64.png |    Bin 5079 -> 0 bytes
 .../org/usergrid/launcher/log_viewer.png        |    Bin 6610 -> 0 bytes
 .../resources/org/usergrid/launcher/start.png   |    Bin 9253 -> 0 bytes
 .../org/usergrid/launcher/start_active.png      |    Bin 9334 -> 0 bytes
 .../org/usergrid/launcher/status_green.png      |    Bin 2048 -> 0 bytes
 .../org/usergrid/launcher/status_off.png        |    Bin 1847 -> 0 bytes
 .../org/usergrid/launcher/status_red.png        |    Bin 2047 -> 0 bytes
 .../org/usergrid/launcher/status_yellow.png     |    Bin 2092 -> 0 bytes
 .../resources/org/usergrid/launcher/stop.png    |    Bin 8858 -> 0 bytes
 .../org/usergrid/launcher/stop_active.png       |    Bin 8844 -> 0 bytes
 .../org/usergrid/launcher/web_browser.png       |    Bin 4531 -> 0 bytes
 .../resources/usergrid-standalone-context.xml   |      2 +-
 stack/mongo-emulator/README.txt                 |      2 +-
 stack/mongo-emulator/pom.xml                    |     12 +-
 .../usergrid/mongo/MongoChannelHandler.java     |    143 +
 .../usergrid/mongo/MongoMessageDecoder.java     |    115 +
 .../usergrid/mongo/MongoMessageEncoder.java     |     46 +
 .../org/apache/usergrid/mongo/MongoQuery.java   |     30 +
 .../org/apache/usergrid/mongo/MongoServer.java  |    170 +
 .../mongo/MongoServerPipelineFactory.java       |     54 +
 .../usergrid/mongo/commands/Buildinfo.java      |     43 +
 .../usergrid/mongo/commands/Collstats.java      |     58 +
 .../apache/usergrid/mongo/commands/Count.java   |     65 +
 .../apache/usergrid/mongo/commands/Dbstats.java |     40 +
 .../usergrid/mongo/commands/Getlasterror.java   |     48 +
 .../usergrid/mongo/commands/ListDatabases.java  |     51 +
 .../usergrid/mongo/commands/MongoCommand.java   |     81 +
 .../mongo/commands/ReplSetGetStatus.java        |     37 +
 .../usergrid/mongo/commands/ServerStatus.java   |     63 +
 .../usergrid/mongo/commands/Whatsmyuri.java     |     41 +
 .../apache/usergrid/mongo/protocol/Message.java |    191 +
 .../apache/usergrid/mongo/protocol/OpCrud.java  |     46 +
 .../usergrid/mongo/protocol/OpDelete.java       |    196 +
 .../usergrid/mongo/protocol/OpGetMore.java      |    112 +
 .../usergrid/mongo/protocol/OpInsert.java       |    180 +
 .../usergrid/mongo/protocol/OpKillCursors.java  |    115 +
 .../apache/usergrid/mongo/protocol/OpMsg.java   |     77 +
 .../apache/usergrid/mongo/protocol/OpQuery.java |    446 +
 .../apache/usergrid/mongo/protocol/OpReply.java |    189 +
 .../usergrid/mongo/protocol/OpUpdate.java       |    206 +
 .../usergrid/mongo/query/MongoQueryParser.java  |    291 +
 .../mongo/testproxy/MongoMessageFrame.java      |     55 +
 .../testproxy/MongoProxyInboundHandler.java     |    197 +
 .../testproxy/MongoProxyPipelineFactory.java    |     53 +
 .../mongo/testproxy/MongoProxyServer.java       |     55 +
 .../testproxy/MongoProxyServerHandler.java      |     58 +
 .../apache/usergrid/mongo/utils/BSONUtils.java  |     50 +
 .../org/usergrid/mongo/MongoChannelHandler.java |    144 -
 .../org/usergrid/mongo/MongoMessageDecoder.java |    115 -
 .../org/usergrid/mongo/MongoMessageEncoder.java |     46 -
 .../java/org/usergrid/mongo/MongoQuery.java     |     30 -
 .../java/org/usergrid/mongo/MongoServer.java    |    171 -
 .../mongo/MongoServerPipelineFactory.java       |     55 -
 .../org/usergrid/mongo/commands/Buildinfo.java  |     43 -
 .../org/usergrid/mongo/commands/Collstats.java  |     58 -
 .../java/org/usergrid/mongo/commands/Count.java |     65 -
 .../org/usergrid/mongo/commands/Dbstats.java    |     40 -
 .../usergrid/mongo/commands/Getlasterror.java   |     48 -
 .../usergrid/mongo/commands/ListDatabases.java  |     51 -
 .../usergrid/mongo/commands/MongoCommand.java   |     81 -
 .../mongo/commands/ReplSetGetStatus.java        |     37 -
 .../usergrid/mongo/commands/ServerStatus.java   |     63 -
 .../org/usergrid/mongo/commands/Whatsmyuri.java |     41 -
 .../org/usergrid/mongo/protocol/Message.java    |    191 -
 .../org/usergrid/mongo/protocol/OpCrud.java     |     46 -
 .../org/usergrid/mongo/protocol/OpDelete.java   |    196 -
 .../org/usergrid/mongo/protocol/OpGetMore.java  |    112 -
 .../org/usergrid/mongo/protocol/OpInsert.java   |    180 -
 .../usergrid/mongo/protocol/OpKillCursors.java  |    115 -
 .../java/org/usergrid/mongo/protocol/OpMsg.java |     77 -
 .../org/usergrid/mongo/protocol/OpQuery.java    |    447 -
 .../org/usergrid/mongo/protocol/OpReply.java    |    189 -
 .../org/usergrid/mongo/protocol/OpUpdate.java   |    206 -
 .../usergrid/mongo/query/MongoQueryParser.java  |    291 -
 .../mongo/testproxy/MongoMessageFrame.java      |     55 -
 .../testproxy/MongoProxyInboundHandler.java     |    197 -
 .../testproxy/MongoProxyPipelineFactory.java    |     53 -
 .../mongo/testproxy/MongoProxyServer.java       |     55 -
 .../testproxy/MongoProxyServerHandler.java      |     58 -
 .../org/usergrid/mongo/utils/BSONUtils.java     |     50 -
 .../usergrid/mongo/AbstractMongoTest.java       |     62 +
 .../apache/usergrid/mongo/BasicMongoTest.java   |    340 +
 .../usergrid/mongo/DatabaseInitializer.java     |    145 +
 .../apache/usergrid/mongo/MongoQueryTest.java   |    503 +
 .../org/usergrid/mongo/AbstractMongoTest.java   |     61 -
 .../java/org/usergrid/mongo/BasicMongoTest.java |    340 -
 .../org/usergrid/mongo/DatabaseInitializer.java |    145 -
 .../java/org/usergrid/mongo/MongoQueryTest.java |    503 -
 .../test/resources/usergrid-test-context.xml    |      4 +-
 stack/pom.xml                                   |      4 +-
 stack/query-validator/pom.xml                   |     22 +-
 .../query/validator/ApiServerRunner.java        |     24 +-
 .../usergrid/query/validator/QueryEntity.java   |      4 +-
 .../usergrid/query/validator/QueryRequest.java  |      2 +-
 .../usergrid/query/validator/QueryResponse.java |      4 +-
 .../usergrid/query/validator/QueryRunner.java   |      4 +-
 .../validator/QueryValidationConfiguration.java |      6 +-
 .../query/validator/QueryValidator.java         |      4 +-
 .../usergrid/query/validator/SqliteRunner.java  |      6 +-
 .../usergrid-query-validator-context.xml        |      2 +-
 .../query/validator/QueryValidationTest.java    |      2 +-
 .../query/validator/QueryValidatorRunner.java   |     14 +-
 .../src/test/resources/log4j.properties         |     18 +-
 .../test/resources/usergrid-test-context.xml    |      4 +-
 stack/rest/pom.xml                              |     18 +-
 .../usergrid/rest/AbstractContextResource.java  |    163 +
 .../org/apache/usergrid/rest/ApiResponse.java   |    635 +
 .../rest/JacksonCustomMapperProvider.java       |     65 +
 .../org/apache/usergrid/rest/RootResource.java  |    396 +
 .../rest/ServerEnvironmentProperties.java       |     47 +
 .../apache/usergrid/rest/SwaggerServlet.java    |    170 +
 .../apache/usergrid/rest/SystemResource.java    |    110 +
 .../usergrid/rest/TextToJsonSwapWriter.java     |    119 +
 .../rest/applications/ApplicationResource.java  |    608 +
 .../rest/applications/AuthResource.java         |    249 +
 .../rest/applications/ServiceResource.java      |    660 +
 .../applications/assets/AssetsResource.java     |    190 +
 .../applications/events/EventsResource.java     |     69 +
 .../rest/applications/queues/QueueResource.java |    203 +
 .../queues/QueueSubscriberResource.java         |    157 +
 .../queues/QueueSubscriptionResource.java       |    159 +
 .../queues/QueueTransactionsResource.java       |     99 +
 .../users/AbstractUserExtensionResource.java    |     47 +
 .../rest/applications/users/UserResource.java   |    577 +
 .../rest/applications/users/UsersResource.java  |    263 +
 .../exceptions/AbstractExceptionMapper.java     |    105 +
 .../usergrid/rest/exceptions/AuthErrorInfo.java |    111 +
 .../AuthorizationExceptionMapper.java           |     36 +
 ...cateUniquePropertyExistsExceptionMapper.java |     35 +
 .../EntityNotFoundExceptionMapper.java          |     34 +
 ...orbiddenServiceOperationExceptionMapper.java |     35 +
 .../IllegalArgumentExceptionMapper.java         |     32 +
 .../exceptions/JsonReadExceptionMapper.java     |     35 +
 .../exceptions/JsonWriteExceptionMapper.java    |     35 +
 .../exceptions/ManagementExceptionMapper.java   |     38 +
 .../usergrid/rest/exceptions/NoOpException.java |     50 +
 .../rest/exceptions/NoOpExceptionMapper.java    |     32 +
 .../NotImplementedExceptionMapper.java          |     32 +
 .../exceptions/OAuthProblemExceptionMapper.java |     51 +
 ...rganizationApplicationNotFoundException.java |     39 +
 ...ationApplicationNotFoundExceptionMapper.java |     16 +
 .../exceptions/PersistenceExceptionMapper.java  |     27 +
 .../exceptions/QueryParseExceptionMapper.java   |     33 +
 .../exceptions/QueryTokenExceptionMapper.java   |     35 +
 .../RecentlyUsedPasswordExceptionMapper.java    |     21 +
 .../rest/exceptions/RedirectionException.java   |     27 +
 .../exceptions/RedirectionExceptionMapper.java  |     30 +
 ...RequiredPropertyNotFoundExceptionMapper.java |     35 +
 .../rest/exceptions/SecurityException.java      |     88 +
 .../exceptions/SecurityExceptionMapper.java     |     45 +
 .../rest/exceptions/ServiceExceptionMapper.java |     28 +
 .../ServiceResourceNotFoundExceptionMapper.java |     41 +
 .../rest/exceptions/ThrowableMapper.java        |     26 +
 .../TransactionNotFoundExceptionMapper.java     |     34 +
 .../rest/filters/ContentTypeFilter.java         |    323 +
 .../rest/filters/JSONPCallbackFilter.java       |     66 +
 .../usergrid/rest/filters/MeteringFilter.java   |    343 +
 .../usergrid/rest/filters/TracingFilter.java    |     74 +
 .../rest/management/ManagementResource.java     |    476 +
 .../management/metrics/MetricsResource.java     |     39 +
 .../organizations/OrganizationResource.java     |    254 +
 .../organizations/OrganizationsResource.java    |    191 +
 .../applications/ApplicationResource.java       |    194 +
 .../applications/ApplicationsResource.java      |    158 +
 .../organizations/users/UsersResource.java      |    341 +
 .../rest/management/users/UserResource.java     |    422 +
 .../rest/management/users/UsersResource.java    |    210 +
 .../organizations/OrganizationsResource.java    |    206 +
 .../organizations/OrganizationResource.java     |    158 +
 .../rest/security/CrossOriginRequestFilter.java |     38 +
 .../security/SecuredResourceFilterFactory.java  |    325 +
 .../annotations/RequireAdminUserAccess.java     |     31 +
 .../annotations/RequireApplicationAccess.java   |     34 +
 .../annotations/RequireOrganizationAccess.java  |     34 +
 .../annotations/RequireSystemAccess.java        |     31 +
 .../security/shiro/RestSecurityManager.java     |     59 +
 .../ShiroAuthenticationExceptionMapper.java     |     58 +
 .../shiro/filters/BasicAuthSecurityFilter.java  |    111 +
 .../ClientCredentialsSecurityFilter.java        |     68 +
 .../OAuth2AccessTokenSecurityFilter.java        |    210 +
 .../security/shiro/filters/SecurityFilter.java  |    135 +
 .../session/HttpRequestSessionManager.java      |     87 +
 .../session/HttpServletRequestSession.java      |    132 +
 .../usergrid/rest/test/PropertiesResource.java  |     87 +
 .../apache/usergrid/rest/utils/CORSUtils.java   |    173 +
 .../apache/usergrid/rest/utils/JSONPUtils.java  |    102 +
 .../usergrid/rest/utils/PathingUtils.java       |     35 +
 .../usergrid/rest/AbstractContextResource.java  |    164 -
 .../java/org/usergrid/rest/ApiResponse.java     |    636 -
 .../rest/JacksonCustomMapperProvider.java       |     65 -
 .../java/org/usergrid/rest/RootResource.java    |    397 -
 .../rest/ServerEnvironmentProperties.java       |     47 -
 .../java/org/usergrid/rest/SwaggerServlet.java  |    171 -
 .../java/org/usergrid/rest/SystemResource.java  |    110 -
 .../org/usergrid/rest/TextToJsonSwapWriter.java |    119 -
 .../rest/applications/ApplicationResource.java  |    610 -
 .../rest/applications/AuthResource.java         |    251 -
 .../rest/applications/ServiceResource.java      |    662 -
 .../applications/assets/AssetsResource.java     |    190 -
 .../applications/events/EventsResource.java     |     69 -
 .../rest/applications/queues/QueueResource.java |    204 -
 .../queues/QueueSubscriberResource.java         |    158 -
 .../queues/QueueSubscriptionResource.java       |    160 -
 .../queues/QueueTransactionsResource.java       |     99 -
 .../users/AbstractUserExtensionResource.java    |     47 -
 .../rest/applications/users/UserResource.java   |    580 -
 .../rest/applications/users/UsersResource.java  |    264 -
 .../exceptions/AbstractExceptionMapper.java     |    106 -
 .../usergrid/rest/exceptions/AuthErrorInfo.java |    111 -
 .../AuthorizationExceptionMapper.java           |     36 -
 ...cateUniquePropertyExistsExceptionMapper.java |     35 -
 .../EntityNotFoundExceptionMapper.java          |     34 -
 ...orbiddenServiceOperationExceptionMapper.java |     35 -
 .../IllegalArgumentExceptionMapper.java         |     32 -
 .../exceptions/JsonReadExceptionMapper.java     |     35 -
 .../exceptions/JsonWriteExceptionMapper.java    |     35 -
 .../exceptions/ManagementExceptionMapper.java   |     38 -
 .../usergrid/rest/exceptions/NoOpException.java |     50 -
 .../rest/exceptions/NoOpExceptionMapper.java    |     32 -
 .../NotImplementedExceptionMapper.java          |     32 -
 .../exceptions/OAuthProblemExceptionMapper.java |     51 -
 ...rganizationApplicationNotFoundException.java |     39 -
 ...ationApplicationNotFoundExceptionMapper.java |     16 -
 .../exceptions/PersistenceExceptionMapper.java  |     27 -
 .../exceptions/QueryParseExceptionMapper.java   |     34 -
 .../exceptions/QueryTokenExceptionMapper.java   |     36 -
 .../RecentlyUsedPasswordExceptionMapper.java    |     21 -
 .../rest/exceptions/RedirectionException.java   |     27 -
 .../exceptions/RedirectionExceptionMapper.java  |     30 -
 ...RequiredPropertyNotFoundExceptionMapper.java |     35 -
 .../rest/exceptions/SecurityException.java      |     88 -
 .../exceptions/SecurityExceptionMapper.java     |     45 -
 .../rest/exceptions/ServiceExceptionMapper.java |     28 -
 .../ServiceResourceNotFoundExceptionMapper.java |     41 -
 .../rest/exceptions/ThrowableMapper.java        |     26 -
 .../TransactionNotFoundExceptionMapper.java     |     34 -
 .../rest/filters/ContentTypeFilter.java         |    323 -
 .../rest/filters/JSONPCallbackFilter.java       |     66 -
 .../usergrid/rest/filters/MeteringFilter.java   |    343 -
 .../usergrid/rest/filters/TracingFilter.java    |     74 -
 .../rest/management/ManagementResource.java     |    478 -
 .../management/metrics/MetricsResource.java     |     39 -
 .../organizations/OrganizationResource.java     |    254 -
 .../organizations/OrganizationsResource.java    |    192 -
 .../applications/ApplicationResource.java       |    195 -
 .../applications/ApplicationsResource.java      |    158 -
 .../organizations/users/UsersResource.java      |    341 -
 .../rest/management/users/UserResource.java     |    423 -
 .../rest/management/users/UsersResource.java    |    211 -
 .../organizations/OrganizationsResource.java    |    206 -
 .../organizations/OrganizationResource.java     |    159 -
 .../rest/security/CrossOriginRequestFilter.java |     38 -
 .../security/SecuredResourceFilterFactory.java  |    325 -
 .../annotations/RequireAdminUserAccess.java     |     31 -
 .../annotations/RequireApplicationAccess.java   |     34 -
 .../annotations/RequireOrganizationAccess.java  |     34 -
 .../annotations/RequireSystemAccess.java        |     31 -
 .../security/shiro/RestSecurityManager.java     |     60 -
 .../ShiroAuthenticationExceptionMapper.java     |     59 -
 .../shiro/filters/BasicAuthSecurityFilter.java  |    111 -
 .../ClientCredentialsSecurityFilter.java        |     69 -
 .../OAuth2AccessTokenSecurityFilter.java        |    211 -
 .../security/shiro/filters/SecurityFilter.java  |    136 -
 .../session/HttpRequestSessionManager.java      |     87 -
 .../session/HttpServletRequestSession.java      |    132 -
 .../usergrid/rest/test/PropertiesResource.java  |     87 -
 .../java/org/usergrid/rest/utils/CORSUtils.java |    173 -
 .../org/usergrid/rest/utils/JSONPUtils.java     |    103 -
 .../org/usergrid/rest/utils/PathingUtils.java   |     35 -
 .../main/resources/usergrid-rest-context.xml    |     12 +-
 .../org/usergrid/rest/TestResource/error.jsp    |      2 +-
 .../ApplicationResource/authorize_form.jsp      |      2 +-
 .../applications/ApplicationResource/error.jsp  |      2 +-
 .../applications/users/UserResource/error.jsp   |      2 +-
 .../UserResource/resetpw_email_success.jsp      |      2 +-
 .../users/UserResource/resetpw_set_form.jsp     |      2 +-
 .../users/UserResource/resetpw_set_success.jsp  |      2 +-
 .../applications/users/UsersResource/error.jsp  |      2 +-
 .../UsersResource/resetpw_email_success.jsp     |      2 +-
 .../ManagementResource/authorize_form.jsp       |      2 +-
 .../management/ManagementResource/error.jsp     |      2 +-
 .../OrganizationResource/error.jsp              |      2 +-
 .../management/users/UserResource/error.jsp     |      2 +-
 .../UserResource/resetpw_email_success.jsp      |      2 +-
 .../users/UserResource/resetpw_set_form.jsp     |      2 +-
 .../users/UserResource/resetpw_set_success.jsp  |      2 +-
 .../management/users/UsersResource/error.jsp    |      2 +-
 .../UsersResource/resetpw_email_success.jsp     |      2 +-
 stack/rest/src/main/webapp/WEB-INF/web.xml      |     12 +-
 .../apache/usergrid/rest/AbstractRestIT.java    |    355 +
 .../java/org/apache/usergrid/rest/BasicIT.java  |    310 +
 .../usergrid/rest/ConcurrentRestITSuite.java    |     47 +
 .../usergrid/rest/DatabaseInitializer.java      |    145 +
 .../java/org/apache/usergrid/rest/ITSetup.java  |    166 +
 .../org/apache/usergrid/rest/RestITSuite.java   |     55 +
 .../apache/usergrid/rest/TestContextSetup.java  |     58 +
 .../apache/usergrid/rest/TomcatResource.java    |     73 +
 .../ApplicationRequestCounterIT.java            |     93 +
 .../applications/ApplicationResourceIT.java     |    530 +
 .../rest/applications/DevicesResourceIT.java    |     62 +
 .../applications/assets/AssetResourceIT.java    |    259 +
 .../collection/BadGrammarQueryTest.java         |     60 +
 .../collection/BrowserCompatibilityTest.java    |     86 +
 .../collection/PagingResourceIT.java            |    218 +
 .../collection/activities/AndOrQueryTest.java   |    176 +
 .../collection/activities/OrderByTest.java      |    149 +
 .../activities/PagingEntitiesTest.java          |    118 +
 .../collection/activities/PutTest.java          |     64 +
 .../collection/groups/GeoPagingTest.java        |    124 +
 .../collection/groups/UpdateGroupIT.java        |    106 +
 .../applications/events/EventsResourceIT.java   |    109 +
 .../queues/AbstractQueueResourceIT.java         |    468 +
 .../queues/QueueResourceLong1IT.java            |    130 +
 .../queues/QueueResourceLong2IT.java            |     82 +
 .../queues/QueueResourceLong3IT.java            |    184 +
 .../queues/QueueResourceShortIT.java            |    415 +
 .../applications/users/ActivityResourceIT.java  |    180 +
 .../users/CollectionsResourceIT.java            |    199 +
 .../users/ConnectionResourceTest.java           |    193 +
 .../applications/users/GroupResourceIT.java     |    270 +
 .../applications/users/OwnershipResourceIT.java |    344 +
 .../users/PermissionsResourceIT.java            |    699 +
 .../applications/users/RetrieveUsersTest.java   |     66 +
 .../rest/applications/users/UserResourceIT.java |   1286 +
 .../users/extensions/TestResource.java          |     50 +
 .../rest/applications/utils/TestUtils.java      |     46 +
 .../rest/applications/utils/UserRepo.java       |     65 +
 .../rest/filters/ContentTypeResourceIT.java     |    309 +
 .../rest/management/ManagementResourceIT.java   |    530 +
 .../rest/management/RegistrationIT.java         |    350 +
 .../organizations/AdminEmailEncodingIT.java     |    101 +
 .../organizations/OrganizationResourceIT.java   |     70 +
 .../organizations/OrganizationsResourceIT.java  |    257 +
 .../rest/management/users/MUUserResourceIT.java |    601 +
 .../UsersOrganizationsResourceIT.java           |     56 +
 .../rest/test/PropertiesResourceIT.java         |     75 +
 .../rest/test/resource/CollectionResource.java  |     26 +
 .../usergrid/rest/test/resource/Connection.java |     51 +
 .../rest/test/resource/CustomCollection.java    |     31 +
 .../rest/test/resource/EntityResource.java      |    104 +
 .../apache/usergrid/rest/test/resource/Me.java  |     35 +
 .../rest/test/resource/NamedResource.java       |    185 +
 .../rest/test/resource/ResultsParser.java       |     22 +
 .../rest/test/resource/RootResource.java        |     64 +
 .../rest/test/resource/SetResource.java         |     82 +
 .../rest/test/resource/TestContext.java         |    170 +
 .../rest/test/resource/ValueResource.java       |    307 +
 .../rest/test/resource/app/Application.java     |     72 +
 .../usergrid/rest/test/resource/app/Device.java |     48 +
 .../usergrid/rest/test/resource/app/User.java   |     54 +
 .../rest/test/resource/app/UsersCollection.java |     62 +
 .../resource/app/queue/DevicesCollection.java   |     36 +
 .../rest/test/resource/app/queue/Queue.java     |    183 +
 .../resource/app/queue/QueuesCollection.java    |     35 +
 .../app/queue/SubscribersCollection.java        |     59 +
 .../test/resource/app/queue/Transaction.java    |     76 +
 .../app/queue/TransactionsCollection.java       |     35 +
 .../rest/test/resource/mgmt/Application.java    |     48 +
 .../resource/mgmt/ApplicationsCollection.java   |     51 +
 .../rest/test/resource/mgmt/Management.java     |     93 +
 .../rest/test/resource/mgmt/Organization.java   |     59 +
 .../resource/mgmt/OrganizationsCollection.java  |     54 +
 .../rest/test/security/TestAdminUser.java       |     53 +
 .../rest/test/security/TestAppUser.java         |     53 +
 .../usergrid/rest/test/security/TestUser.java   |    126 +
 .../java/org/usergrid/rest/AbstractRestIT.java  |    355 -
 .../test/java/org/usergrid/rest/BasicIT.java    |    310 -
 .../usergrid/rest/ConcurrentRestITSuite.java    |     47 -
 .../org/usergrid/rest/DatabaseInitializer.java  |    145 -
 .../test/java/org/usergrid/rest/ITSetup.java    |    166 -
 .../java/org/usergrid/rest/RestITSuite.java     |     55 -
 .../org/usergrid/rest/TestContextSetup.java     |     58 -
 .../java/org/usergrid/rest/TomcatResource.java  |     74 -
 .../ApplicationRequestCounterIT.java            |     93 -
 .../applications/ApplicationResourceIT.java     |    531 -
 .../rest/applications/DevicesResourceIT.java    |     62 -
 .../applications/assets/AssetResourceIT.java    |    260 -
 .../collection/BadGrammarQueryTest.java         |     60 -
 .../collection/BrowserCompatibilityTest.java    |     86 -
 .../collection/PagingResourceIT.java            |    218 -
 .../collection/activities/AndOrQueryTest.java   |    176 -
 .../collection/activities/OrderByTest.java      |    149 -
 .../activities/PagingEntitiesTest.java          |    119 -
 .../collection/activities/PutTest.java          |     64 -
 .../collection/groups/GeoPagingTest.java        |    124 -
 .../collection/groups/UpdateGroupIT.java        |    108 -
 .../applications/events/EventsResourceIT.java   |    109 -
 .../queues/AbstractQueueResourceIT.java         |    468 -
 .../queues/QueueResourceLong1IT.java            |    130 -
 .../queues/QueueResourceLong2IT.java            |     82 -
 .../queues/QueueResourceLong3IT.java            |    184 -
 .../queues/QueueResourceShortIT.java            |    415 -
 .../applications/users/ActivityResourceIT.java  |    180 -
 .../users/CollectionsResourceIT.java            |    199 -
 .../users/ConnectionResourceTest.java           |    193 -
 .../applications/users/GroupResourceIT.java     |    270 -
 .../applications/users/OwnershipResourceIT.java |    344 -
 .../users/PermissionsResourceIT.java            |    699 -
 .../applications/users/RetrieveUsersTest.java   |     66 -
 .../rest/applications/users/UserResourceIT.java |   1286 -
 .../users/extensions/TestResource.java          |     50 -
 .../rest/applications/utils/TestUtils.java      |     46 -
 .../rest/applications/utils/UserRepo.java       |     65 -
 .../rest/filters/ContentTypeResourceIT.java     |    310 -
 .../rest/management/ManagementResourceIT.java   |    531 -
 .../rest/management/RegistrationIT.java         |    351 -
 .../organizations/AdminEmailEncodingIT.java     |    101 -
 .../organizations/OrganizationResourceIT.java   |     70 -
 .../organizations/OrganizationsResourceIT.java  |    256 -
 .../rest/management/users/MUUserResourceIT.java |    602 -
 .../UsersOrganizationsResourceIT.java           |     56 -
 .../rest/test/PropertiesResourceIT.java         |     75 -
 .../rest/test/resource/CollectionResource.java  |     26 -
 .../usergrid/rest/test/resource/Connection.java |     51 -
 .../rest/test/resource/CustomCollection.java    |     31 -
 .../rest/test/resource/EntityResource.java      |    104 -
 .../org/usergrid/rest/test/resource/Me.java     |     35 -
 .../rest/test/resource/NamedResource.java       |    185 -
 .../rest/test/resource/ResultsParser.java       |     22 -
 .../rest/test/resource/RootResource.java        |     64 -
 .../rest/test/resource/SetResource.java         |     82 -
 .../rest/test/resource/TestContext.java         |    170 -
 .../rest/test/resource/ValueResource.java       |    307 -
 .../rest/test/resource/app/Application.java     |     72 -
 .../usergrid/rest/test/resource/app/Device.java |     48 -
 .../usergrid/rest/test/resource/app/User.java   |     54 -
 .../rest/test/resource/app/UsersCollection.java |     62 -
 .../resource/app/queue/DevicesCollection.java   |     36 -
 .../rest/test/resource/app/queue/Queue.java     |    183 -
 .../resource/app/queue/QueuesCollection.java    |     35 -
 .../app/queue/SubscribersCollection.java        |     59 -
 .../test/resource/app/queue/Transaction.java    |     76 -
 .../app/queue/TransactionsCollection.java       |     35 -
 .../rest/test/resource/mgmt/Application.java    |     48 -
 .../resource/mgmt/ApplicationsCollection.java   |     51 -
 .../rest/test/resource/mgmt/Management.java     |     93 -
 .../rest/test/resource/mgmt/Organization.java   |     59 -
 .../resource/mgmt/OrganizationsCollection.java  |     54 -
 .../rest/test/security/TestAdminUser.java       |     53 -
 .../rest/test/security/TestAppUser.java         |     53 -
 .../usergrid/rest/test/security/TestUser.java   |    126 -
 stack/rest/src/test/resources/log4j.properties  |     14 +-
 .../test/resources/usergrid-test-context.xml    |     12 +-
 stack/services/groupstest.out                   | 126088 ++++++++--------
 stack/services/pom.xml                          |     12 +-
 .../management/AccountCreationProps.java        |    119 +
 .../usergrid/management/ActivationState.java    |      8 +
 .../usergrid/management/ApplicationCreator.java |     14 +
 .../usergrid/management/ApplicationInfo.java    |    134 +
 .../usergrid/management/ManagementService.java  |    319 +
 .../usergrid/management/OrganizationInfo.java   |    185 +
 .../management/OrganizationOwnerInfo.java       |     53 +
 .../management/OrganizationProfile.java         |     87 +
 .../apache/usergrid/management/UserInfo.java    |    149 +
 .../cassandra/AccountCreationPropsImpl.java     |    111 +
 .../cassandra/ApplicationCreatorImpl.java       |     77 +
 .../cassandra/ManagementServiceImpl.java        |   2907 +
 .../ApplicationCreationException.java           |     26 +
 .../exceptions/DisabledAdminUserException.java  |     42 +
 .../exceptions/DisabledAppUserException.java    |     42 +
 .../exceptions/IncorrectPasswordException.java  |     42 +
 .../exceptions/ManagementException.java         |     42 +
 .../RecentlyUsedPasswordException.java          |     27 +
 .../UnableToLeaveOrganizationException.java     |     42 +
 .../UnactivatedAdminUserException.java          |     42 +
 .../exceptions/UnactivatedAppUserException.java |     42 +
 .../UnactivatedOrganizationException.java       |     42 +
 .../UnconfirmedAdminUserException.java          |     42 +
 .../usergrid/management/utils/AccountUtils.java |     42 +
 .../usergrid/security/AuthPrincipalInfo.java    |     71 +
 .../usergrid/security/AuthPrincipalType.java    |    115 +
 .../security/crypto/EncryptionService.java      |     70 +
 .../security/crypto/EncryptionServiceImpl.java  |    208 +
 .../security/crypto/command/BcryptCommand.java  |     92 +
 .../crypto/command/EncryptionCommand.java       |     49 +
 .../security/crypto/command/Md5HashCommand.java |     60 +
 .../crypto/command/PlainTextCommand.java        |     64 +
 .../crypto/command/SaltedHasherCommand.java     |     67 +
 .../crypto/command/Sha1HashCommand.java         |     73 +
 .../usergrid/security/oauth/AccessInfo.java     |    187 +
 .../security/oauth/ClientCredentialsInfo.java   |     93 +
 .../usergrid/security/oauth/OAuthProxy.java     |     43 +
 .../security/oauth/OAuthProxyFactory.java       |     31 +
 .../security/providers/AbstractProvider.java    |     61 +
 .../security/providers/FacebookProvider.java    |    183 +
 .../security/providers/FoursquareProvider.java  |    159 +
 .../providers/PingIdentityProvider.java         |    143 +
 .../security/providers/SignInAsProvider.java    |     19 +
 .../providers/SignInProviderFactory.java        |     51 +
 .../security/salt/NoOpSaltProvider.java         |     36 +
 .../security/salt/PropertiesSaltProvider.java   |     53 +
 .../usergrid/security/salt/SaltProvider.java    |     31 +
 .../security/shiro/CustomPermission.java        |    224 +
 .../shiro/CustomPermissionResolver.java         |     29 +
 .../shiro/PrincipalCredentialsToken.java        |    139 +
 .../apache/usergrid/security/shiro/Realm.java   |    539 +
 .../AbstractAccessTokenCredentials.java         |     33 +
 .../credentials/AbstractClientCredentials.java  |     28 +
 .../AbstractPasswordCredentials.java            |     33 +
 .../credentials/AccessTokenCredentials.java     |     22 +
 .../shiro/credentials/AdminUserAccessToken.java |     24 +
 .../shiro/credentials/AdminUserCredentials.java |     21 +
 .../shiro/credentials/AdminUserPassword.java    |     24 +
 .../credentials/ApplicationAccessToken.java     |     24 +
 .../ApplicationClientCredentials.java           |     24 +
 .../credentials/ApplicationCredentials.java     |     21 +
 .../shiro/credentials/ApplicationGuest.java     |     24 +
 .../credentials/ApplicationUserAccessToken.java |     24 +
 .../credentials/ApplicationUserCredentials.java |     21 +
 .../credentials/ApplicationUserPassword.java    |     24 +
 .../shiro/credentials/ClientCredentials.java    |     24 +
 .../credentials/OrganizationAccessToken.java    |     24 +
 .../OrganizationClientCredentials.java          |     24 +
 .../credentials/OrganizationCredentials.java    |     21 +
 .../shiro/credentials/PasswordCredentials.java  |     22 +
 .../shiro/credentials/PrincipalCredentials.java |     21 +
 .../shiro/principals/AdminUserPrincipal.java    |     29 +
 .../principals/ApplicationGuestPrincipal.java   |     48 +
 .../shiro/principals/ApplicationPrincipal.java  |     48 +
 .../principals/ApplicationUserPrincipal.java    |     35 +
 .../shiro/principals/OrganizationPrincipal.java |     48 +
 .../shiro/principals/PrincipalIdentifier.java   |     51 +
 .../shiro/principals/UserPrincipal.java         |     69 +
 .../security/shiro/utils/SubjectUtils.java      |    448 +
 .../usergrid/security/tokens/TokenCategory.java |     83 +
 .../usergrid/security/tokens/TokenInfo.java     |    125 +
 .../usergrid/security/tokens/TokenService.java  |     39 +
 .../tokens/cassandra/TokenServiceImpl.java      |    625 +
 .../tokens/exceptions/BadTokenException.java    |     32 +
 .../exceptions/ExpiredTokenException.java       |     32 +
 .../exceptions/InvalidTokenException.java       |     32 +
 .../tokens/exceptions/TokenException.java       |     35 +
 .../services/AbstractCollectionService.java     |    571 +
 .../services/AbstractConnectionsService.java    |    521 +
 .../AbstractPathBasedColllectionService.java    |    149 +
 .../usergrid/services/AbstractService.java      |   1305 +
 .../org/apache/usergrid/services/Service.java   |     49 +
 .../apache/usergrid/services/ServiceAction.java |     21 +
 .../ServiceCollectionEventListener.java         |     22 +
 .../usergrid/services/ServiceContext.java       |    449 +
 .../services/ServiceExecutionEvent.java         |     79 +
 .../services/ServiceExecutionEventListener.java |     22 +
 .../apache/usergrid/services/ServiceInfo.java   |    438 +
 .../usergrid/services/ServiceManager.java       |    430 +
 .../services/ServiceManagerFactory.java         |    131 +
 .../usergrid/services/ServiceParameter.java     |    452 +
 .../usergrid/services/ServicePayload.java       |    198 +
 .../usergrid/services/ServiceRequest.java       |    371 +
 .../usergrid/services/ServiceResults.java       |    304 +
 .../apache/usergrid/services/ServiceUtils.java  |     21 +
 .../services/activities/ActivitiesService.java  |     33 +
 .../applications/ApplicationsService.java       |    214 +
 .../usergrid/services/assets/AssetsService.java |     57 +
 .../services/assets/data/AssetMimeHandler.java  |     89 +
 .../services/assets/data/AssetUtils.java        |    106 +
 .../services/assets/data/BinaryStore.java       |     27 +
 .../assets/data/LocalFileBinaryStore.java       |     84 +
 .../services/assets/data/S3BinaryStore.java     |    201 +
 .../services/devices/DevicesService.java        |     51 +
 .../services/devices/users/UsersService.java    |     32 +
 .../ForbiddenServiceOperationException.java     |     41 +
 .../services/exceptions/ServiceException.java   |     45 +
 .../exceptions/ServiceInvocationException.java  |     83 +
 .../ServiceResourceNotFoundException.java       |     39 +
 .../UndefinedServiceEntityTypeException.java    |     45 +
 .../UnsupportedServiceOperationException.java   |     39 +
 .../generic/GenericCollectionService.java       |     27 +
 .../generic/GenericConnectionsService.java      |     27 +
 .../services/generic/RootCollectionService.java |     27 +
 .../usergrid/services/groups/GroupsService.java |    224 +
 .../groups/activities/ActivitiesService.java    |     74 +
 .../services/groups/roles/RolesService.java     |     32 +
 .../services/groups/users/UsersService.java     |     32 +
 .../users/activities/ActivitiesService.java     |     84 +
 .../groups/users/devices/DevicesService.java    |     32 +
 .../services/messages/MessagesService.java      |     33 +
 .../usergrid/services/roles/RolesService.java   |    236 +
 .../services/roles/groups/GroupsService.java    |     32 +
 .../services/roles/users/UsersService.java      |     84 +
 .../usergrid/services/users/UsersService.java   |    287 +
 .../users/activities/ActivitiesService.java     |    142 +
 .../services/users/devices/DevicesService.java  |     32 +
 .../users/following/FollowingService.java       |     47 +
 .../services/users/groups/GroupsService.java    |     32 +
 .../services/users/roles/RolesService.java      |     84 +
 .../org/apache/usergrid/utils/PythonUtils.java  |    102 +
 .../management/AccountCreationProps.java        |    119 -
 .../usergrid/management/ActivationState.java    |      8 -
 .../usergrid/management/ApplicationCreator.java |     14 -
 .../usergrid/management/ApplicationInfo.java    |    134 -
 .../usergrid/management/ManagementService.java  |    319 -
 .../usergrid/management/OrganizationInfo.java   |    185 -
 .../management/OrganizationOwnerInfo.java       |     53 -
 .../management/OrganizationProfile.java         |     87 -
 .../java/org/usergrid/management/UserInfo.java  |    149 -
 .../cassandra/AccountCreationPropsImpl.java     |    112 -
 .../cassandra/ApplicationCreatorImpl.java       |     77 -
 .../cassandra/ManagementServiceImpl.java        |   2909 -
 .../ApplicationCreationException.java           |     26 -
 .../exceptions/DisabledAdminUserException.java  |     42 -
 .../exceptions/DisabledAppUserException.java    |     42 -
 .../exceptions/IncorrectPasswordException.java  |     42 -
 .../exceptions/ManagementException.java         |     42 -
 .../RecentlyUsedPasswordException.java          |     27 -
 .../UnableToLeaveOrganizationException.java     |     42 -
 .../UnactivatedAdminUserException.java          |     42 -
 .../exceptions/UnactivatedAppUserException.java |     42 -
 .../UnactivatedOrganizationException.java       |     42 -
 .../UnconfirmedAdminUserException.java          |     42 -
 .../usergrid/management/utils/AccountUtils.java |     42 -
 .../usergrid/security/AuthPrincipalInfo.java    |     71 -
 .../usergrid/security/AuthPrincipalType.java    |    115 -
 .../security/crypto/EncryptionService.java      |     70 -
 .../security/crypto/EncryptionServiceImpl.java  |    208 -
 .../security/crypto/command/BcryptCommand.java  |     92 -
 .../crypto/command/EncryptionCommand.java       |     49 -
 .../security/crypto/command/Md5HashCommand.java |     61 -
 .../crypto/command/PlainTextCommand.java        |     64 -
 .../crypto/command/SaltedHasherCommand.java     |     67 -
 .../crypto/command/Sha1HashCommand.java         |     73 -
 .../org/usergrid/security/oauth/AccessInfo.java |    187 -
 .../security/oauth/ClientCredentialsInfo.java   |     93 -
 .../org/usergrid/security/oauth/OAuthProxy.java |     43 -
 .../security/oauth/OAuthProxyFactory.java       |     31 -
 .../security/providers/AbstractProvider.java    |     61 -
 .../security/providers/FacebookProvider.java    |    183 -
 .../security/providers/FoursquareProvider.java  |    159 -
 .../providers/PingIdentityProvider.java         |    143 -
 .../security/providers/SignInAsProvider.java    |     19 -
 .../providers/SignInProviderFactory.java        |     51 -
 .../security/salt/NoOpSaltProvider.java         |     36 -
 .../security/salt/PropertiesSaltProvider.java   |     53 -
 .../usergrid/security/salt/SaltProvider.java    |     31 -
 .../security/shiro/CustomPermission.java        |    225 -
 .../shiro/CustomPermissionResolver.java         |     29 -
 .../shiro/PrincipalCredentialsToken.java        |    139 -
 .../java/org/usergrid/security/shiro/Realm.java |    540 -
 .../AbstractAccessTokenCredentials.java         |     33 -
 .../credentials/AbstractClientCredentials.java  |     28 -
 .../AbstractPasswordCredentials.java            |     33 -
 .../credentials/AccessTokenCredentials.java     |     22 -
 .../shiro/credentials/AdminUserAccessToken.java |     24 -
 .../shiro/credentials/AdminUserCredentials.java |     21 -
 .../shiro/credentials/AdminUserPassword.java    |     24 -
 .../credentials/ApplicationAccessToken.java     |     24 -
 .../ApplicationClientCredentials.java           |     24 -
 .../credentials/ApplicationCredentials.java     |     21 -
 .../shiro/credentials/ApplicationGuest.java     |     24 -
 .../credentials/ApplicationUserAccessToken.java |     24 -
 .../credentials/ApplicationUserCredentials.java |     21 -
 .../credentials/ApplicationUserPassword.java    |     24 -
 .../shiro/credentials/ClientCredentials.java    |     24 -
 .../credentials/OrganizationAccessToken.java    |     24 -
 .../OrganizationClientCredentials.java          |     24 -
 .../credentials/OrganizationCredentials.java    |     21 -
 .../shiro/credentials/PasswordCredentials.java  |     22 -
 .../shiro/credentials/PrincipalCredentials.java |     21 -
 .../shiro/principals/AdminUserPrincipal.java    |     29 -
 .../principals/ApplicationGuestPrincipal.java   |     48 -
 .../shiro/principals/ApplicationPrincipal.java  |     48 -
 .../principals/ApplicationUserPrincipal.java    |     35 -
 .../shiro/principals/OrganizationPrincipal.java |     48 -
 .../shiro/principals/PrincipalIdentifier.java   |     51 -
 .../shiro/principals/UserPrincipal.java         |     69 -
 .../security/shiro/utils/SubjectUtils.java      |    449 -
 .../usergrid/security/tokens/TokenCategory.java |     83 -
 .../org/usergrid/security/tokens/TokenInfo.java |    125 -
 .../usergrid/security/tokens/TokenService.java  |     39 -
 .../tokens/cassandra/TokenServiceImpl.java      |    627 -
 .../tokens/exceptions/BadTokenException.java    |     32 -
 .../exceptions/ExpiredTokenException.java       |     32 -
 .../exceptions/InvalidTokenException.java       |     32 -
 .../tokens/exceptions/TokenException.java       |     35 -
 .../services/AbstractCollectionService.java     |    571 -
 .../services/AbstractConnectionsService.java    |    521 -
 .../AbstractPathBasedColllectionService.java    |    149 -
 .../org/usergrid/services/AbstractService.java  |   1306 -
 .../java/org/usergrid/services/Service.java     |     49 -
 .../org/usergrid/services/ServiceAction.java    |     21 -
 .../ServiceCollectionEventListener.java         |     22 -
 .../org/usergrid/services/ServiceContext.java   |    449 -
 .../services/ServiceExecutionEvent.java         |     79 -
 .../services/ServiceExecutionEventListener.java |     22 -
 .../java/org/usergrid/services/ServiceInfo.java |    438 -
 .../org/usergrid/services/ServiceManager.java   |    431 -
 .../services/ServiceManagerFactory.java         |    131 -
 .../org/usergrid/services/ServiceParameter.java |    452 -
 .../org/usergrid/services/ServicePayload.java   |    199 -
 .../org/usergrid/services/ServiceRequest.java   |    372 -
 .../org/usergrid/services/ServiceResults.java   |    304 -
 .../org/usergrid/services/ServiceUtils.java     |     21 -
 .../services/activities/ActivitiesService.java  |     33 -
 .../applications/ApplicationsService.java       |    215 -
 .../usergrid/services/assets/AssetsService.java |     57 -
 .../services/assets/data/AssetMimeHandler.java  |     90 -
 .../services/assets/data/AssetUtils.java        |    107 -
 .../services/assets/data/BinaryStore.java       |     27 -
 .../assets/data/LocalFileBinaryStore.java       |     85 -
 .../services/assets/data/S3BinaryStore.java     |    202 -
 .../services/devices/DevicesService.java        |     51 -
 .../services/devices/users/UsersService.java    |     32 -
 .../ForbiddenServiceOperationException.java     |     41 -
 .../services/exceptions/ServiceException.java   |     45 -
 .../exceptions/ServiceInvocationException.java  |     83 -
 .../ServiceResourceNotFoundException.java       |     39 -
 .../UndefinedServiceEntityTypeException.java    |     45 -
 .../UnsupportedServiceOperationException.java   |     39 -
 .../generic/GenericCollectionService.java       |     27 -
 .../generic/GenericConnectionsService.java      |     27 -
 .../services/generic/RootCollectionService.java |     27 -
 .../usergrid/services/groups/GroupsService.java |    224 -
 .../groups/activities/ActivitiesService.java    |     74 -
 .../services/groups/roles/RolesService.java     |     32 -
 .../services/groups/users/UsersService.java     |     32 -
 .../users/activities/ActivitiesService.java     |     84 -
 .../groups/users/devices/DevicesService.java    |     32 -
 .../services/messages/MessagesService.java      |     33 -
 .../usergrid/services/roles/RolesService.java   |    236 -
 .../services/roles/groups/GroupsService.java    |     32 -
 .../services/roles/users/UsersService.java      |     84 -
 .../usergrid/services/users/UsersService.java   |    287 -
 .../users/activities/ActivitiesService.java     |    142 -
 .../services/users/devices/DevicesService.java  |     32 -
 .../users/following/FollowingService.java       |     47 -
 .../services/users/groups/GroupsService.java    |     32 -
 .../services/users/roles/RolesService.java      |     84 -
 .../java/org/usergrid/utils/PythonUtils.java    |    102 -
 .../org/apache/usergrid/pyusergrid/__init__.py  |      0
 .../usergrid/pyusergrid/services/__init__.py    |      0
 .../pyusergrid/services/pytest/PytestService.py |     15 +
 .../pyusergrid/services/pytest/__init__.py      |      0
 .../usergrid/pyusergrid/services/pytest/test.py |     13 +
 .../python/org/apache/usergrid/test/__init__.py |      0
 .../python/org/apache/usergrid/test/test.py     |     13 +
 .../src/main/python/pyusergrid/__init__.py      |      0
 .../main/python/pyusergrid/services/__init__.py |      0
 .../pyusergrid/services/pytest/PytestService.py |     15 -
 .../pyusergrid/services/pytest/__init__.py      |      0
 .../python/pyusergrid/services/pytest/test.py   |     13 -
 stack/services/src/main/python/test/__init__.py |      0
 stack/services/src/main/python/test/test.py     |     13 -
 .../resources/usergrid-services-context.xml     |     18 +-
 .../test/java/baas/io/simple/SimpleService.java |     18 -
 .../usergrid/ConcurrentServiceITSuite.java      |     43 +
 .../org/apache/usergrid/ServiceApplication.java |    189 +
 .../org/apache/usergrid/ServiceITSetup.java     |     45 +
 .../org/apache/usergrid/ServiceITSetupImpl.java |    130 +
 .../org/apache/usergrid/ServiceITSuite.java     |     41 +
 .../usergrid/baas/io/simple/SimpleService.java  |     18 +
 .../apache/usergrid/management/EmailFlowIT.java |    421 +
 .../management/ManagementTestHelper.java        |     41 +
 .../usergrid/management/MockImapClient.java     |     83 +
 .../usergrid/management/OrganizationIT.java     |    231 +
 .../org/apache/usergrid/management/RoleIT.java  |     99 +
 .../cassandra/ApplicationCreatorIT.java         |     67 +
 .../cassandra/ManagementServiceIT.java          |    729 +
 .../cassandra/ManagementTestHelperImpl.java     |     85 +
 .../org/apache/usergrid/python/JythonTest.java  |     38 +
 .../usergrid/security/CustomResolverTest.java   |    168 +
 .../crypto/EncryptionServiceImplTest.java       |    171 +
 .../crypto/command/BcryptCommandTest.java       |    166 +
 .../crypto/command/Md5HashCommandTest.java      |     71 +
 .../crypto/command/Sha1HashCommandTest.java     |     68 +
 .../security/providers/FacebookProviderIT.java  |     83 +
 .../providers/PingIdentityProviderIT.java       |     64 +
 .../security/tokens/TokenServiceIT.java         |    442 +
 .../usergrid/services/AbstractServiceIT.java    |     38 +
 .../usergrid/services/ActivitiesServiceIT.java  |    112 +
 .../services/ApplicationsServiceIT.java         |     36 +
 .../usergrid/services/CollectionServiceIT.java  |    292 +
 .../usergrid/services/ConnectionsServiceIT.java |     83 +
 .../usergrid/services/GroupServiceIT.java       |     81 +
 .../usergrid/services/RolesServiceIT.java       |    281 +
 .../usergrid/services/ServiceFactoryIT.java     |     58 +
 .../usergrid/services/ServiceInfoTest.java      |    109 +
 .../usergrid/services/ServiceInvocationIT.java  |    146 +
 .../usergrid/services/ServiceRequestIT.java     |     82 +
 .../usergrid/services/UsersServiceIT.java       |     53 +
 .../services/assets/data/AssetUtilsTest.java    |     45 +
 .../org/usergrid/ConcurrentServiceITSuite.java  |     43 -
 .../java/org/usergrid/ServiceApplication.java   |    188 -
 .../test/java/org/usergrid/ServiceITSetup.java  |     44 -
 .../java/org/usergrid/ServiceITSetupImpl.java   |    129 -
 .../test/java/org/usergrid/ServiceITSuite.java  |     41 -
 .../org/usergrid/management/EmailFlowIT.java    |    419 -
 .../management/ManagementTestHelper.java        |     40 -
 .../org/usergrid/management/MockImapClient.java |     83 -
 .../org/usergrid/management/OrganizationIT.java |    229 -
 .../java/org/usergrid/management/RoleIT.java    |     97 -
 .../cassandra/ApplicationCreatorIT.java         |     66 -
 .../cassandra/ManagementServiceIT.java          |    729 -
 .../cassandra/ManagementTestHelperImpl.java     |     85 -
 .../java/org/usergrid/python/JythonTest.java    |     38 -
 .../usergrid/security/CustomResolverTest.java   |    169 -
 .../crypto/EncryptionServiceImplTest.java       |    170 -
 .../crypto/command/BcryptCommandTest.java       |    165 -
 .../crypto/command/Md5HashCommandTest.java      |     71 -
 .../crypto/command/Sha1HashCommandTest.java     |     67 -
 .../security/providers/FacebookProviderIT.java  |     81 -
 .../providers/PingIdentityProviderIT.java       |     63 -
 .../security/tokens/TokenServiceIT.java         |    440 -
 .../usergrid/services/AbstractServiceIT.java    |     38 -
 .../usergrid/services/ActivitiesServiceIT.java  |    111 -
 .../services/ApplicationsServiceIT.java         |     35 -
 .../usergrid/services/CollectionServiceIT.java  |    290 -
 .../usergrid/services/ConnectionsServiceIT.java |     82 -
 .../org/usergrid/services/GroupServiceIT.java   |     80 -
 .../org/usergrid/services/RolesServiceIT.java   |    279 -
 .../org/usergrid/services/ServiceFactoryIT.java |     57 -
 .../org/usergrid/services/ServiceInfoTest.java  |    108 -
 .../usergrid/services/ServiceInvocationIT.java  |    145 -
 .../org/usergrid/services/ServiceRequestIT.java |     78 -
 .../org/usergrid/services/UsersServiceIT.java   |     52 -
 .../services/assets/data/AssetUtilsTest.java    |     44 -
 .../src/test/resources/log4j.properties         |     14 +-
 .../test/resources/usergrid-test-context.xml    |      8 +-
 stack/test-utils/pom.xml                        |      6 +-
 .../apache/usergrid/NoExitSecurityManager.java  |     64 +
 .../usergrid/cassandra/AvailablePortFinder.java |    211 +
 .../usergrid/cassandra/CassandraResource.java   |    505 +
 .../usergrid/cassandra/ClearShiroSubject.java   |     31 +
 .../apache/usergrid/cassandra/Concurrent.java   |     15 +
 .../cassandra/ConcurrentJunitRunner.java        |     75 +
 .../usergrid/cassandra/ConcurrentSuite.java     |    101 +
 .../apache/usergrid/cassandra/DataControl.java  |     17 +
 .../apache/usergrid/cassandra/DataLoader.java   |      9 +
 .../usergrid/cassandra/SchemaManager.java       |     18 +
 .../org/usergrid/NoExitSecurityManager.java     |     64 -
 .../usergrid/cassandra/AvailablePortFinder.java |    211 -
 .../usergrid/cassandra/CassandraResource.java   |    505 -
 .../usergrid/cassandra/ClearShiroSubject.java   |     31 -
 .../java/org/usergrid/cassandra/Concurrent.java |     15 -
 .../cassandra/ConcurrentJunitRunner.java        |     75 -
 .../org/usergrid/cassandra/ConcurrentSuite.java |    101 -
 .../org/usergrid/cassandra/DataControl.java     |     17 -
 .../java/org/usergrid/cassandra/DataLoader.java |      9 -
 .../org/usergrid/cassandra/SchemaManager.java   |     18 -
 .../cassandra/AnotherCassandraResourceIT.java   |     69 +
 .../cassandra/CassandraResourceITSuite.java     |     28 +
 .../cassandra/CassandraResourceTest.java        |    107 +
 .../usergrid/cassandra/FakeSchemaManager.java   |     33 +
 .../usergrid/cassandra/OkThisIsTheLastIT.java   |     78 +
 .../YetAnotherCassandraResourceIT.java          |     72 +
 .../cassandra/AnotherCassandraResourceIT.java   |     68 -
 .../cassandra/CassandraResourceITSuite.java     |     25 -
 .../cassandra/CassandraResourceTest.java        |    104 -
 .../usergrid/cassandra/FakeSchemaManager.java   |     32 -
 .../usergrid/cassandra/OkThisIsTheLastIT.java   |     76 -
 .../YetAnotherCassandraResourceIT.java          |     70 -
 .../test/resources/usergrid-test-context.xml    |      6 +-
 stack/tools/README.md                           |      4 +-
 stack/tools/pom.xml                             |     12 +-
 .../java/org/apache/usergrid/tools/ApiDoc.java  |    113 +
 .../org/apache/usergrid/tools/AppAudit.java     |    230 +
 .../org/apache/usergrid/tools/AppNameFix.java   |    108 +
 .../java/org/apache/usergrid/tools/Cli.java     |    268 +
 .../java/org/apache/usergrid/tools/Command.java |     99 +
 .../org/apache/usergrid/tools/CredExport.java   |    121 +
 .../apache/usergrid/tools/DupAdminRepair.java   |    309 +
 .../org/apache/usergrid/tools/DupOrgRepair.java |    265 +
 .../apache/usergrid/tools/EntityCleanup.java    |    174 +
 .../usergrid/tools/EntityInsertBenchMark.java   |    271 +
 .../usergrid/tools/EntityReadBenchMark.java     |    358 +
 .../org/apache/usergrid/tools/EntityUpdate.java |    190 +
 .../java/org/apache/usergrid/tools/Export.java  |    430 +
 .../usergrid/tools/ExportDataCreator.java       |    105 +
 .../usergrid/tools/ExportingToolBase.java       |    182 +
 .../java/org/apache/usergrid/tools/Import.java  |    544 +
 .../org/apache/usergrid/tools/ImportFB.java     |    100 +
 .../org/apache/usergrid/tools/IndexRebuild.java |    205 +
 .../java/org/apache/usergrid/tools/Metrics.java |    212 +
 .../usergrid/tools/OrganizationExport.java      |    115 +
 .../apache/usergrid/tools/PopulateSample.java   |    141 +
 .../apache/usergrid/tools/ResetSuperUser.java   |    103 +
 .../java/org/apache/usergrid/tools/SetupDB.java |     57 +
 .../java/org/apache/usergrid/tools/Test.java    |     53 +
 .../org/apache/usergrid/tools/ToolBase.java     |    244 +
 .../usergrid/tools/UniqueIndexCleanup.java      |    379 +
 .../org/apache/usergrid/tools/UserManager.java  |     44 +
 .../apache/usergrid/tools/WarehouseExport.java  |    514 +
 .../apache/usergrid/tools/WarehouseUpsert.java  |    153 +
 .../usergrid/tools/apidoc/swagger/Api.java      |     92 +
 .../tools/apidoc/swagger/ApiListing.java        |    145 +
 .../tools/apidoc/swagger/ApiOperation.java      |    247 +
 .../tools/apidoc/swagger/ApiOperationError.java |     60 +
 .../usergrid/tools/apidoc/swagger/ApiParam.java |    184 +
 .../apidoc/swagger/ApiParamAllowableValues.java |     62 +
 .../apache/usergrid/tools/bean/AppScore.java    |     82 +
 .../apache/usergrid/tools/bean/ExportOrg.java   |     58 +
 .../apache/usergrid/tools/bean/MetricLine.java  |     82 +
 .../apache/usergrid/tools/bean/MetricQuery.java |     93 +
 .../apache/usergrid/tools/bean/MetricSort.java  |     26 +
 .../apache/usergrid/tools/bean/OrgScore.java    |     93 +
 .../main/java/org/usergrid/tools/ApiDoc.java    |    114 -
 .../main/java/org/usergrid/tools/AppAudit.java  |    231 -
 .../java/org/usergrid/tools/AppNameFix.java     |    109 -
 .../src/main/java/org/usergrid/tools/Cli.java   |    269 -
 .../main/java/org/usergrid/tools/Command.java   |     99 -
 .../java/org/usergrid/tools/CredExport.java     |    122 -
 .../java/org/usergrid/tools/DupAdminRepair.java |    310 -
 .../java/org/usergrid/tools/DupOrgRepair.java   |    266 -
 .../java/org/usergrid/tools/EntityCleanup.java  |    176 -
 .../usergrid/tools/EntityInsertBenchMark.java   |    273 -
 .../org/usergrid/tools/EntityReadBenchMark.java |    360 -
 .../java/org/usergrid/tools/EntityUpdate.java   |    191 -
 .../main/java/org/usergrid/tools/Export.java    |    431 -
 .../org/usergrid/tools/ExportDataCreator.java   |    105 -
 .../org/usergrid/tools/ExportingToolBase.java   |    183 -
 .../main/java/org/usergrid/tools/Import.java    |    545 -
 .../main/java/org/usergrid/tools/ImportFB.java  |    101 -
 .../java/org/usergrid/tools/IndexRebuild.java   |    206 -
 .../main/java/org/usergrid/tools/Metrics.java   |    213 -
 .../org/usergrid/tools/OrganizationExport.java  |    117 -
 .../java/org/usergrid/tools/PopulateSample.java |    142 -
 .../java/org/usergrid/tools/ResetSuperUser.java |    105 -
 .../main/java/org/usergrid/tools/SetupDB.java   |     57 -
 .../src/main/java/org/usergrid/tools/Test.java  |     53 -
 .../main/java/org/usergrid/tools/ToolBase.java  |    246 -
 .../org/usergrid/tools/UniqueIndexCleanup.java  |    381 -
 .../java/org/usergrid/tools/UserManager.java    |     45 -
 .../org/usergrid/tools/WarehouseExport.java     |    516 -
 .../org/usergrid/tools/WarehouseUpsert.java     |    153 -
 .../org/usergrid/tools/apidoc/swagger/Api.java  |     92 -
 .../tools/apidoc/swagger/ApiListing.java        |    145 -
 .../tools/apidoc/swagger/ApiOperation.java      |    247 -
 .../tools/apidoc/swagger/ApiOperationError.java |     60 -
 .../usergrid/tools/apidoc/swagger/ApiParam.java |    184 -
 .../apidoc/swagger/ApiParamAllowableValues.java |     62 -
 .../java/org/usergrid/tools/bean/AppScore.java  |     82 -
 .../java/org/usergrid/tools/bean/ExportOrg.java |     58 -
 .../org/usergrid/tools/bean/MetricLine.java     |     82 -
 .../org/usergrid/tools/bean/MetricQuery.java    |     93 -
 .../org/usergrid/tools/bean/MetricSort.java     |     26 -
 .../java/org/usergrid/tools/bean/OrgScore.java  |     93 -
 stack/tools/src/main/resources/log4j.xml        |      2 +-
 stack/websocket/pom.xml                         |     10 +-
 .../websocket/WebSocketChannelHandler.java      |    356 +
 .../usergrid/websocket/WebSocketKeyStore.java   |     49 +
 .../usergrid/websocket/WebSocketServer.java     |    194 +
 .../websocket/WebSocketServerIndexPage.java     |     71 +
 .../WebSocketServerPipelineFactory.java         |     74 +
 .../websocket/WebSocketSslContextFactory.java   |     62 +
 .../websocket/WebSocketChannelHandler.java      |    357 -
 .../usergrid/websocket/WebSocketKeyStore.java   |     49 -
 .../org/usergrid/websocket/WebSocketServer.java |    195 -
 .../websocket/WebSocketServerIndexPage.java     |     71 -
 .../WebSocketServerPipelineFactory.java         |     75 -
 .../websocket/WebSocketSslContextFactory.java   |     62 -
 .../usergrid/websocket/ExampleListener.java     |     41 +
 .../websocket/SimpleMessageProducer.java        |     61 +
 .../usergrid/websocket/WebSocketServerTest.java |     43 +
 .../org/usergrid/websocket/ExampleListener.java |     41 -
 .../websocket/SimpleMessageProducer.java        |     61 -
 .../usergrid/websocket/WebSocketServerTest.java |     42 -
 .../test/resources/testApplicationContext.xml   |     20 +-
 1825 files changed, 194250 insertions(+), 194255 deletions(-)
----------------------------------------------------------------------



[15/96] [abbrv] [partial] Change package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/cassandra/ApplicationCF.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/cassandra/ApplicationCF.java b/stack/core/src/main/java/org/usergrid/persistence/cassandra/ApplicationCF.java
deleted file mode 100644
index 0cca4c5..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/cassandra/ApplicationCF.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.cassandra;
-
-
-import java.util.List;
-
-import me.prettyprint.hector.api.ddl.ColumnDefinition;
-
-import static me.prettyprint.hector.api.ddl.ComparatorType.COUNTERTYPE;
-import static org.usergrid.persistence.cassandra.CassandraPersistenceUtils.getIndexMetadata;
-
-
-public enum ApplicationCF implements CFEnum {
-
-    /** This is where the entity objects are stored */
-    ENTITY_PROPERTIES( "Entity_Properties", "BytesType" ),
-
-    /** each row models name:value pairs. {@see org.usergrid.persistence.Schema} for the list of dictionary types */
-    ENTITY_DICTIONARIES( "Entity_Dictionaries", "BytesType" ),
-
-    /**
-     * Rows that are full of UUIDs. Used when we want to have a row full of references to other entities. Mainly, this
-     * is for collections. Collections are represented by this CF.
-     */
-    ENTITY_ID_SETS( "Entity_Id_Sets", "UUIDType" ),
-
-    /**
-     * Typed vs. untyped dictionary. Dynamic entity dictionaries end up here. {@link
-     * EntityManagerImpl#getDictionaryAsMap(org.usergrid.persistence.EntityRef, String)}
-     */
-    ENTITY_COMPOSITE_DICTIONARIES( "Entity_Composite_Dictionaries",
-            "DynamicCompositeType(a=>AsciiType,b=>BytesType,i=>IntegerType,x=>LexicalUUIDType,l=>LongType," +
-                    "t=>TimeUUIDType,s=>UTF8Type,u=>UUIDType,A=>AsciiType(reversed=true),B=>BytesType(reversed=true)," +
-                    "I=>IntegerType(reversed=true),X=>LexicalUUIDType(reversed=true),L=>LongType(reversed=true)," +
-                    "T=>TimeUUIDType(reversed=true),S=>UTF8Type(reversed=true),U=>UUIDType(reversed=true))" ),
-
-    /** No longer used? */
-    ENTITY_METADATA( "Entity_Metadata", "BytesType" ),
-
-    /** Contains all secondary indexes for entities */
-    ENTITY_INDEX( "Entity_Index",
-            "DynamicCompositeType(a=>AsciiType,b=>BytesType,i=>IntegerType,x=>LexicalUUIDType,l=>LongType," +
-                    "t=>TimeUUIDType,s=>UTF8Type,u=>UUIDType,A=>AsciiType(reversed=true),B=>BytesType(reversed=true)," +
-                    "I=>IntegerType(reversed=true),X=>LexicalUUIDType(reversed=true),L=>LongType(reversed=true)," +
-                    "T=>TimeUUIDType(reversed=true),S=>UTF8Type(reversed=true),U=>UUIDType(reversed=true))" ),
-
-    /** Unique index for properties that must remain the same */
-    ENTITY_UNIQUE( "Entity_Unique", "UUIDType" ),
-
-    /** Contains all properties that have ever been indexed for an entity */
-    ENTITY_INDEX_ENTRIES( "Entity_Index_Entries",
-            "DynamicCompositeType(a=>AsciiType,b=>BytesType,i=>IntegerType,x=>LexicalUUIDType,l=>LongType," +
-                    "t=>TimeUUIDType,s=>UTF8Type,u=>UUIDType,A=>AsciiType(reversed=true),B=>BytesType(reversed=true)," +
-                    "I=>IntegerType(reversed=true),X=>LexicalUUIDType(reversed=true),L=>LongType(reversed=true)," +
-                    "T=>TimeUUIDType(reversed=true),S=>UTF8Type(reversed=true),U=>UUIDType(reversed=true))" ),
-
-    /** All roles that exist within an application */
-    APPLICATION_ROLES( "Application_Roles", "BytesType" ),
-
-    /** Application counters */
-    APPLICATION_AGGREGATE_COUNTERS( "Application_Aggregate_Counters", "LongType", COUNTERTYPE.getClassName() ),
-
-    /** Entity counters */
-    ENTITY_COUNTERS( "Entity_Counters", "BytesType", COUNTERTYPE.getClassName() ),;
-    public final static String DEFAULT_DYNAMIC_COMPOSITE_ALIASES =
-            "(a=>AsciiType,b=>BytesType,i=>IntegerType,x=>LexicalUUIDType,l=>LongType,t=>TimeUUIDType,s=>UTF8Type," +
-                    "u=>UUIDType,A=>AsciiType(reversed=true),B=>BytesType(reversed=true)," +
-                    "I=>IntegerType(reversed=true),X=>LexicalUUIDType(reversed=true),L=>LongType(reversed=true)," +
-                    "T=>TimeUUIDType(reversed=true),S=>UTF8Type(reversed=true),U=>UUIDType(reversed=true))";
-
-    private final String cf;
-    private final String comparator;
-    private final String validator;
-    private final String indexes;
-    private final boolean create;
-
-
-    ApplicationCF( String cf, String comparator ) {
-        this.cf = cf;
-        this.comparator = comparator;
-        validator = null;
-        indexes = null;
-        create = true;
-    }
-
-
-    ApplicationCF( String cf, String comparator, String validator ) {
-        this.cf = cf;
-        this.comparator = comparator;
-        this.validator = validator;
-        indexes = null;
-        create = true;
-    }
-
-
-    ApplicationCF( String cf, String comparator, String validator, String indexes ) {
-        this.cf = cf;
-        this.comparator = comparator;
-        this.validator = validator;
-        this.indexes = indexes;
-        create = true;
-    }
-
-
-    @Override
-    public String toString() {
-        return cf;
-    }
-
-
-    @Override
-    public String getColumnFamily() {
-        return cf;
-    }
-
-
-    @Override
-    public String getComparator() {
-        return comparator;
-    }
-
-
-    @Override
-    public String getValidator() {
-        return validator;
-    }
-
-
-    @Override
-    public boolean isComposite() {
-        return comparator.startsWith( "DynamicCompositeType" );
-    }
-
-
-    @Override
-    public List<ColumnDefinition> getMetadata() {
-        return getIndexMetadata( indexes );
-    }
-
-
-    @Override
-    public boolean create() {
-        return create;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/cassandra/CFEnum.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/cassandra/CFEnum.java b/stack/core/src/main/java/org/usergrid/persistence/cassandra/CFEnum.java
deleted file mode 100644
index 859dd1a..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/cassandra/CFEnum.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.cassandra;
-
-
-import java.util.List;
-
-import me.prettyprint.hector.api.ddl.ColumnDefinition;
-
-
-public interface CFEnum {
-
-    public String getColumnFamily();
-
-    public String getComparator();
-
-    public String getValidator();
-
-    public boolean isComposite();
-
-    public List<ColumnDefinition> getMetadata();
-
-    public boolean create();
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/cassandra/CassandraPersistenceUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/cassandra/CassandraPersistenceUtils.java b/stack/core/src/main/java/org/usergrid/persistence/cassandra/CassandraPersistenceUtils.java
deleted file mode 100644
index 00dc4bc..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/cassandra/CassandraPersistenceUtils.java
+++ /dev/null
@@ -1,486 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.cassandra;
-
-
-import java.io.IOException;
-import java.math.BigInteger;
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.TreeMap;
-import java.util.UUID;
-
-import org.codehaus.jackson.JsonNode;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.usergrid.utils.JsonUtils;
-
-import org.apache.cassandra.thrift.ColumnDef;
-import org.apache.cassandra.thrift.IndexType;
-import org.apache.commons.lang.StringUtils;
-
-import me.prettyprint.cassandra.serializers.ByteBufferSerializer;
-import me.prettyprint.cassandra.serializers.StringSerializer;
-import me.prettyprint.cassandra.serializers.UUIDSerializer;
-import me.prettyprint.cassandra.service.ThriftColumnDef;
-import me.prettyprint.hector.api.ClockResolution;
-import me.prettyprint.hector.api.beans.DynamicComposite;
-import me.prettyprint.hector.api.beans.HColumn;
-import me.prettyprint.hector.api.ddl.ColumnDefinition;
-import me.prettyprint.hector.api.ddl.ColumnFamilyDefinition;
-import me.prettyprint.hector.api.ddl.ComparatorType;
-import me.prettyprint.hector.api.ddl.KeyspaceDefinition;
-import me.prettyprint.hector.api.factory.HFactory;
-import me.prettyprint.hector.api.mutation.MutationResult;
-import me.prettyprint.hector.api.mutation.Mutator;
-
-import static java.nio.ByteBuffer.wrap;
-
-import static me.prettyprint.hector.api.factory.HFactory.createClockResolution;
-import static me.prettyprint.hector.api.factory.HFactory.createColumn;
-import static org.apache.commons.beanutils.MethodUtils.invokeStaticMethod;
-import static org.apache.commons.lang.StringUtils.removeEnd;
-import static org.apache.commons.lang.StringUtils.removeStart;
-import static org.apache.commons.lang.StringUtils.split;
-import static org.apache.commons.lang.StringUtils.substringAfterLast;
-import static org.usergrid.persistence.Schema.PROPERTY_TYPE;
-import static org.usergrid.persistence.Schema.PROPERTY_UUID;
-import static org.usergrid.persistence.Schema.serializeEntityProperty;
-import static org.usergrid.utils.ClassUtils.isBasicType;
-import static org.usergrid.utils.ConversionUtils.bytebuffer;
-import static org.usergrid.utils.JsonUtils.toJsonNode;
-import static org.usergrid.utils.StringUtils.replaceAll;
-import static org.usergrid.utils.StringUtils.stringOrSubstringBeforeFirst;
-
-
-/** @author edanuff */
-public class CassandraPersistenceUtils {
-
-    private static final Logger logger = LoggerFactory.getLogger( CassandraPersistenceUtils.class );
-
-    /** Logger for batch operations */
-    private static final Logger batch_logger =
-            LoggerFactory.getLogger( CassandraPersistenceUtils.class.getPackage().getName() + ".BATCH" );
-
-    /**
-     *
-     */
-    public static final ByteBuffer PROPERTY_TYPE_AS_BYTES = bytebuffer( PROPERTY_TYPE );
-
-    /**
-     *
-     */
-    public static final ByteBuffer PROPERTY_ID_AS_BYTES = bytebuffer( PROPERTY_UUID );
-
-    /**
-     *
-     */
-    public static final char KEY_DELIM = ':';
-
-    /**
-     *
-     */
-    public static final UUID NULL_ID = new UUID( 0, 0 );
-
-    public static final StringSerializer se = new StringSerializer();
-    public static final UUIDSerializer ue = new UUIDSerializer();
-    public static final ByteBufferSerializer be = new ByteBufferSerializer();
-
-
-    /**
-     * @param operation
-     * @param columnFamily
-     * @param key
-     * @param columnName
-     * @param columnValue
-     * @param timestamp
-     */
-    public static void logBatchOperation( String operation, Object columnFamily, Object key, Object columnName,
-                                          Object columnValue, long timestamp ) {
-
-        if ( batch_logger.isDebugEnabled() ) {
-            batch_logger.debug( "{} cf={} key={} name={} value={}",
-                    new Object[] { operation, columnFamily, key, columnName, columnValue } );
-        }
-    }
-
-
-    public static void addInsertToMutator( Mutator<ByteBuffer> m, Object columnFamily, Object key, Object columnName,
-                                           Object columnValue, long timestamp ) {
-
-        logBatchOperation( "Insert", columnFamily, key, columnName, columnValue, timestamp );
-
-        if ( columnName instanceof List<?> ) {
-            columnName = DynamicComposite.toByteBuffer( ( List<?> ) columnName );
-        }
-        if ( columnValue instanceof List<?> ) {
-            columnValue = DynamicComposite.toByteBuffer( ( List<?> ) columnValue );
-        }
-
-        HColumn<ByteBuffer, ByteBuffer> column =
-                createColumn( bytebuffer( columnName ), bytebuffer( columnValue ), timestamp, be, be );
-        m.addInsertion( bytebuffer( key ), columnFamily.toString(), column );
-    }
-
-
-    public static void addInsertToMutator( Mutator<ByteBuffer> m, Object columnFamily, Object key, Map<?, ?> columns,
-                                           long timestamp ) throws Exception {
-
-        for ( Entry<?, ?> entry : columns.entrySet() ) {
-            addInsertToMutator( m, columnFamily, key, entry.getKey(), entry.getValue(), timestamp );
-        }
-    }
-
-
-    public static void addPropertyToMutator( Mutator<ByteBuffer> m, Object key, String entityType, String propertyName,
-                                             Object propertyValue, long timestamp ) {
-
-        logBatchOperation( "Insert", ApplicationCF.ENTITY_PROPERTIES, key, propertyName, propertyValue, timestamp );
-
-        HColumn<ByteBuffer, ByteBuffer> column = createColumn( bytebuffer( propertyName ),
-                serializeEntityProperty( entityType, propertyName, propertyValue ), timestamp, be, be );
-        m.addInsertion( bytebuffer( key ), ApplicationCF.ENTITY_PROPERTIES.toString(), column );
-    }
-
-
-    public static void addPropertyToMutator( Mutator<ByteBuffer> m, Object key, String entityType,
-                                             Map<String, ?> columns, long timestamp ) throws Exception {
-
-        for ( Entry<String, ?> entry : columns.entrySet() ) {
-            addPropertyToMutator( m, key, entityType, entry.getKey(), entry.getValue(), timestamp );
-        }
-    }
-
-
-    /** Delete the row */
-    public static void addDeleteToMutator( Mutator<ByteBuffer> m, Object columnFamily, Object key, long timestamp )
-            throws Exception {
-
-        logBatchOperation( "Delete", columnFamily, key, null, null, timestamp );
-
-        m.addDeletion( bytebuffer( key ), columnFamily.toString(), timestamp );
-    }
-
-
-    public static void addDeleteToMutator( Mutator<ByteBuffer> m, Object columnFamily, Object key, Object columnName,
-                                           long timestamp ) throws Exception {
-
-        logBatchOperation( "Delete", columnFamily, key, columnName, null, timestamp );
-
-        if ( columnName instanceof List<?> ) {
-            columnName = DynamicComposite.toByteBuffer( ( List<?> ) columnName );
-        }
-
-        m.addDeletion( bytebuffer( key ), columnFamily.toString(), bytebuffer( columnName ), be, timestamp );
-    }
-
-
-    public static void addDeleteToMutator( Mutator<ByteBuffer> m, Object columnFamily, Object key, long timestamp,
-                                           Object... columnNames ) throws Exception {
-
-        for ( Object columnName : columnNames ) {
-            logBatchOperation( "Delete", columnFamily, key, columnName, null, timestamp );
-
-            if ( columnName instanceof List<?> ) {
-                columnName = DynamicComposite.toByteBuffer( ( List<?> ) columnName );
-            }
-
-            m.addDeletion( bytebuffer( key ), columnFamily.toString(), bytebuffer( columnName ), be, timestamp );
-        }
-    }
-
-
-    public static Map<String, ByteBuffer> getColumnMap( List<HColumn<String, ByteBuffer>> columns ) {
-        Map<String, ByteBuffer> column_map = new TreeMap<String, ByteBuffer>( String.CASE_INSENSITIVE_ORDER );
-        if ( columns != null ) {
-            for ( HColumn<String, ByteBuffer> column : columns ) {
-                String column_name = column.getName();
-                column_map.put( column_name, column.getValue() );
-            }
-        }
-        return column_map;
-    }
-
-
-    public static <K, V> Map<K, V> asMap( List<HColumn<K, V>> columns ) {
-        if ( columns == null ) {
-            return null;
-        }
-        Map<K, V> column_map = new LinkedHashMap<K, V>();
-        for ( HColumn<K, V> column : columns ) {
-            K column_name = column.getName();
-            column_map.put( column_name, column.getValue() );
-        }
-        return column_map;
-    }
-
-
-    public static List<ByteBuffer> getAsByteKeys( List<UUID> ids ) {
-        List<ByteBuffer> keys = new ArrayList<ByteBuffer>();
-        for ( UUID id : ids ) {
-            keys.add( bytebuffer( key( id ) ) );
-        }
-        return keys;
-    }
-
-
-    /** @return timestamp value for current time */
-    public static long createTimestamp() {
-        return createClockResolution( ClockResolution.MICROSECONDS ).createClock();
-    }
-
-
-    /** @return normalized group path */
-    public static String normalizeGroupPath( String path ) {
-        path = replaceAll( path.toLowerCase().trim(), "//", "/" );
-        path = removeStart( path, "/" );
-        path = removeEnd( path, "/" );
-        return path;
-    }
-
-
-    /** @return a composite key */
-    public static Object key( Object... objects ) {
-        if ( objects.length == 1 ) {
-            Object obj = objects[0];
-            if ( ( obj instanceof UUID ) || ( obj instanceof ByteBuffer ) ) {
-                return obj;
-            }
-        }
-        StringBuilder s = new StringBuilder();
-        for ( Object obj : objects ) {
-            if ( obj instanceof String ) {
-                s.append( ( ( String ) obj ).toLowerCase() );
-            }
-            else if ( obj instanceof List<?> ) {
-                s.append( key( ( ( List<?> ) obj ).toArray() ) );
-            }
-            else if ( obj instanceof Object[] ) {
-                s.append( key( ( Object[] ) obj ) );
-            }
-            else if ( obj != null ) {
-                s.append( obj );
-            }
-            else {
-                s.append( "*" );
-            }
-
-            s.append( KEY_DELIM );
-        }
-
-        s.deleteCharAt( s.length() - 1 );
-
-        return s.toString();
-    }
-
-
-    /** @return UUID for composite key */
-    public static UUID keyID( Object... objects ) {
-        if ( objects.length == 1 ) {
-            Object obj = objects[0];
-            if ( obj instanceof UUID ) {
-                return ( UUID ) obj;
-            }
-        }
-        String keyStr = key( objects ).toString();
-        if ( keyStr.length() == 0 ) {
-            return NULL_ID;
-        }
-        UUID uuid = UUID.nameUUIDFromBytes( keyStr.getBytes() );
-        logger.debug( "Key {} equals UUID {}", keyStr, uuid );
-        return uuid;
-    }
-
-
-    /** @return UUID for entity alias */
-    public static UUID aliasID( UUID ownerId, String aliasType, String alias ) {
-        return keyID( ownerId, aliasType, alias );
-    }
-
-
-    public static Mutator<ByteBuffer> buildSetIdListMutator( Mutator<ByteBuffer> batch, UUID targetId,
-                                                             String columnFamily, String keyPrefix, String keySuffix,
-                                                             List<UUID> keyIds, long timestamp ) throws Exception {
-        for ( UUID keyId : keyIds ) {
-            ByteBuffer key = null;
-            if ( ( StringUtils.isNotEmpty( keyPrefix ) ) || ( StringUtils.isNotEmpty( keySuffix ) ) ) {
-                key = bytebuffer( keyPrefix + keyId.toString() + keySuffix );
-            }
-            else {
-                key = bytebuffer( keyId );
-            }
-            addInsertToMutator( batch, columnFamily, key, targetId, ByteBuffer.allocate( 0 ), timestamp );
-        }
-        return batch;
-    }
-
-
-    public static MutationResult batchExecute( Mutator<?> m, int retries ) {
-        for ( int i = 0; i < retries; i++ ) {
-            try {
-                return m.execute();
-            }
-            catch ( Exception e ) {
-                logger.error( "Unable to execute mutation, retrying...", e );
-            }
-        }
-        return m.execute();
-    }
-
-
-    public static Object toStorableValue( Object obj ) {
-        if ( obj == null ) {
-            return null;
-        }
-
-        if ( isBasicType( obj.getClass() ) ) {
-            return obj;
-        }
-
-        if ( obj instanceof ByteBuffer ) {
-            return obj;
-        }
-
-        JsonNode json = toJsonNode( obj );
-        if ( ( json != null ) && json.isValueNode() ) {
-            if ( json.isBigInteger() ) {
-                return json.getBigIntegerValue();
-            }
-            else if ( json.isNumber() || json.isBoolean() ) {
-                return BigInteger.valueOf( json.getValueAsLong() );
-            }
-            else if ( json.isTextual() ) {
-                return json.getTextValue();
-            }
-            else if ( json.isBinary() ) {
-                try {
-                    return wrap( json.getBinaryValue() );
-                }
-                catch ( IOException e ) {
-                }
-            }
-        }
-
-        return json;
-    }
-
-
-    public static ByteBuffer toStorableBinaryValue( Object obj ) {
-        obj = toStorableValue( obj );
-        if ( obj instanceof JsonNode ) {
-            return JsonUtils.toByteBuffer( obj );
-        }
-        else {
-            return bytebuffer( obj );
-        }
-    }
-
-
-    public static ByteBuffer toStorableBinaryValue( Object obj, boolean forceJson ) {
-        obj = toStorableValue( obj );
-        if ( ( obj instanceof JsonNode ) || ( forceJson && ( obj != null ) && !( obj instanceof ByteBuffer ) ) ) {
-            return JsonUtils.toByteBuffer( obj );
-        }
-        else {
-            return bytebuffer( obj );
-        }
-    }
-
-
-    public static List<ColumnDefinition> getIndexMetadata( String indexes ) {
-        if ( indexes == null ) {
-            return null;
-        }
-        String[] index_entries = split( indexes, ',' );
-        List<ColumnDef> columns = new ArrayList<ColumnDef>();
-        for ( String index_entry : index_entries ) {
-            String column_name = stringOrSubstringBeforeFirst( index_entry, ':' ).trim();
-            String comparer = substringAfterLast( index_entry, ":" ).trim();
-            if ( StringUtils.isBlank( comparer ) ) {
-                comparer = "UUIDType";
-            }
-            if ( StringUtils.isNotBlank( column_name ) ) {
-                ColumnDef cd = new ColumnDef( bytebuffer( column_name ), comparer );
-                cd.setIndex_name( column_name );
-                cd.setIndex_type( IndexType.KEYS );
-                columns.add( cd );
-            }
-        }
-        return ThriftColumnDef.fromThriftList( columns );
-    }
-
-
-    public static List<ColumnFamilyDefinition> getCfDefs( Class<? extends CFEnum> cfEnum, String keyspace ) {
-        return getCfDefs( cfEnum, null, keyspace );
-    }
-
-
-    public static List<ColumnFamilyDefinition> getCfDefs( Class<? extends CFEnum> cfEnum,
-                                                          List<ColumnFamilyDefinition> cf_defs, String keyspace ) {
-
-        if ( cf_defs == null ) {
-            cf_defs = new ArrayList<ColumnFamilyDefinition>();
-        }
-
-        CFEnum[] values = null;
-        try {
-            values = ( CFEnum[] ) invokeStaticMethod( cfEnum, "values", ( Object[] ) null );
-        }
-        catch ( Exception e ) {
-            logger.error( "Couldn't get CFEnum values", e );
-        }
-        if ( values == null ) {
-            return null;
-        }
-
-        for ( CFEnum cf : values ) {
-            if ( !cf.create() ) {
-                continue;
-            }
-            String defaultValidationClass = cf.getValidator();
-            List<ColumnDefinition> metadata = cf.getMetadata();
-
-            ColumnFamilyDefinition cf_def = HFactory.createColumnFamilyDefinition( keyspace, cf.getColumnFamily(),
-                    ComparatorType.getByClassName( cf.getComparator() ), metadata );
-
-            if ( defaultValidationClass != null ) {
-                cf_def.setDefaultValidationClass( defaultValidationClass );
-            }
-
-            cf_defs.add( cf_def );
-        }
-
-        return cf_defs;
-    }
-
-
-    public static void validateKeyspace( CFEnum[] cf_enums, KeyspaceDefinition ksDef ) {
-        Map<String, ColumnFamilyDefinition> cfs = new HashMap<String, ColumnFamilyDefinition>();
-        for ( ColumnFamilyDefinition cf : ksDef.getCfDefs() ) {
-            cfs.put( cf.getName(), cf );
-        }
-        for ( CFEnum c : cf_enums ) {
-            if ( !cfs.keySet().contains( c.getColumnFamily() ) ) {
-
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/cassandra/CassandraService.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/cassandra/CassandraService.java b/stack/core/src/main/java/org/usergrid/persistence/cassandra/CassandraService.java
deleted file mode 100644
index a6b6268..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/cassandra/CassandraService.java
+++ /dev/null
@@ -1,1135 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.cassandra;
-
-
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.LinkedHashMap;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-import java.util.UUID;
-import java.util.concurrent.Executors;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.TimeUnit;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.usergrid.locking.LockManager;
-import org.usergrid.persistence.IndexBucketLocator;
-import org.usergrid.persistence.IndexBucketLocator.IndexType;
-import org.usergrid.persistence.cassandra.index.IndexBucketScanner;
-import org.usergrid.persistence.cassandra.index.IndexScanner;
-
-import me.prettyprint.cassandra.connection.HConnectionManager;
-import me.prettyprint.cassandra.model.ConfigurableConsistencyLevel;
-import me.prettyprint.cassandra.serializers.ByteBufferSerializer;
-import me.prettyprint.cassandra.serializers.BytesArraySerializer;
-import me.prettyprint.cassandra.serializers.DynamicCompositeSerializer;
-import me.prettyprint.cassandra.serializers.LongSerializer;
-import me.prettyprint.cassandra.serializers.StringSerializer;
-import me.prettyprint.cassandra.serializers.UUIDSerializer;
-import me.prettyprint.cassandra.service.CassandraHostConfigurator;
-import me.prettyprint.cassandra.service.ThriftKsDef;
-import me.prettyprint.hector.api.Cluster;
-import me.prettyprint.hector.api.ConsistencyLevelPolicy;
-import me.prettyprint.hector.api.HConsistencyLevel;
-import me.prettyprint.hector.api.Keyspace;
-import me.prettyprint.hector.api.Serializer;
-import me.prettyprint.hector.api.beans.ColumnSlice;
-import me.prettyprint.hector.api.beans.DynamicComposite;
-import me.prettyprint.hector.api.beans.HColumn;
-import me.prettyprint.hector.api.beans.OrderedRows;
-import me.prettyprint.hector.api.beans.Row;
-import me.prettyprint.hector.api.beans.Rows;
-import me.prettyprint.hector.api.ddl.ColumnFamilyDefinition;
-import me.prettyprint.hector.api.ddl.KeyspaceDefinition;
-import me.prettyprint.hector.api.factory.HFactory;
-import me.prettyprint.hector.api.mutation.Mutator;
-import me.prettyprint.hector.api.query.ColumnQuery;
-import me.prettyprint.hector.api.query.CountQuery;
-import me.prettyprint.hector.api.query.MultigetSliceQuery;
-import me.prettyprint.hector.api.query.QueryResult;
-import me.prettyprint.hector.api.query.RangeSlicesQuery;
-import me.prettyprint.hector.api.query.SliceQuery;
-
-import static me.prettyprint.cassandra.service.FailoverPolicy.ON_FAIL_TRY_ALL_AVAILABLE;
-import static me.prettyprint.hector.api.factory.HFactory.createColumn;
-import static me.prettyprint.hector.api.factory.HFactory.createMultigetSliceQuery;
-import static me.prettyprint.hector.api.factory.HFactory.createMutator;
-import static me.prettyprint.hector.api.factory.HFactory.createRangeSlicesQuery;
-import static me.prettyprint.hector.api.factory.HFactory.createSliceQuery;
-import static me.prettyprint.hector.api.factory.HFactory.createVirtualKeyspace;
-import static org.apache.commons.collections.MapUtils.getIntValue;
-import static org.apache.commons.collections.MapUtils.getString;
-import static org.usergrid.persistence.cassandra.ApplicationCF.ENTITY_ID_SETS;
-import static org.usergrid.persistence.cassandra.CassandraPersistenceUtils.batchExecute;
-import static org.usergrid.persistence.cassandra.CassandraPersistenceUtils.buildSetIdListMutator;
-import static org.usergrid.utils.ConversionUtils.bytebuffer;
-import static org.usergrid.utils.ConversionUtils.bytebuffers;
-import static org.usergrid.utils.JsonUtils.mapToFormattedJsonString;
-import static org.usergrid.utils.MapUtils.asMap;
-import static org.usergrid.utils.MapUtils.filter;
-
-
-public class CassandraService {
-
-    public static String SYSTEM_KEYSPACE = "Usergrid";
-
-    public static String STATIC_APPLICATION_KEYSPACE = "Usergrid_Applications";
-
-    public static final boolean USE_VIRTUAL_KEYSPACES = true;
-
-    public static final String APPLICATIONS_CF = "Applications";
-    public static final String PROPERTIES_CF = "Properties";
-    public static final String TOKENS_CF = "Tokens";
-    public static final String PRINCIPAL_TOKEN_CF = "PrincipalTokens";
-
-    public static final int DEFAULT_COUNT = 1000;
-    public static final int ALL_COUNT = 100000;
-    public static final int INDEX_ENTRY_LIST_COUNT = 1000;
-    public static final int DEFAULT_SEARCH_COUNT = 10000;
-
-    public static final int RETRY_COUNT = 5;
-
-    public static final String DEFAULT_APPLICATION = "default-app";
-    public static final String DEFAULT_ORGANIZATION = "usergrid";
-    public static final String MANAGEMENT_APPLICATION = "management";
-
-    public static final UUID MANAGEMENT_APPLICATION_ID = new UUID( 0, 1 );
-    public static final UUID DEFAULT_APPLICATION_ID = new UUID( 0, 16 );
-
-    private static final Logger logger = LoggerFactory.getLogger( CassandraService.class );
-
-    private static final Logger db_logger =
-            LoggerFactory.getLogger( CassandraService.class.getPackage().getName() + ".DB" );
-
-    Cluster cluster;
-    CassandraHostConfigurator chc;
-    Properties properties;
-    LockManager lockManager;
-
-    ConsistencyLevelPolicy consistencyLevelPolicy;
-
-    private Keyspace systemKeyspace;
-
-    private Map<String, String> accessMap;
-
-    public static final StringSerializer se = new StringSerializer();
-    public static final ByteBufferSerializer be = new ByteBufferSerializer();
-    public static final UUIDSerializer ue = new UUIDSerializer();
-    public static final BytesArraySerializer bae = new BytesArraySerializer();
-    public static final DynamicCompositeSerializer dce = new DynamicCompositeSerializer();
-    public static final LongSerializer le = new LongSerializer();
-
-    public static final UUID NULL_ID = new UUID( 0, 0 );
-
-
-    public CassandraService( Properties properties, Cluster cluster,
-                             CassandraHostConfigurator cassandraHostConfigurator, LockManager lockManager ) {
-        this.properties = properties;
-        this.cluster = cluster;
-        chc = cassandraHostConfigurator;
-        this.lockManager = lockManager;
-        db_logger.info( "" + cluster.getKnownPoolHosts( false ) );
-    }
-
-
-    public void init() throws Exception {
-        if ( consistencyLevelPolicy == null ) {
-            consistencyLevelPolicy = new ConfigurableConsistencyLevel();
-            ( ( ConfigurableConsistencyLevel ) consistencyLevelPolicy )
-                    .setDefaultReadConsistencyLevel( HConsistencyLevel.ONE );
-        }
-        accessMap = new HashMap<String, String>( 2 );
-        accessMap.put( "username", properties.getProperty( "cassandra.username" ) );
-        accessMap.put( "password", properties.getProperty( "cassandra.password" ) );
-        systemKeyspace =
-                HFactory.createKeyspace( SYSTEM_KEYSPACE, cluster, consistencyLevelPolicy, ON_FAIL_TRY_ALL_AVAILABLE,
-                        accessMap );
-    }
-
-
-    public Cluster getCluster() {
-        return cluster;
-    }
-
-
-    public void setCluster( Cluster cluster ) {
-        this.cluster = cluster;
-    }
-
-
-    public CassandraHostConfigurator getCassandraHostConfigurator() {
-        return chc;
-    }
-
-
-    public void setCassandraHostConfigurator( CassandraHostConfigurator chc ) {
-        this.chc = chc;
-    }
-
-
-    public Properties getProperties() {
-        return properties;
-    }
-
-
-    public void setProperties( Properties properties ) {
-        this.properties = properties;
-    }
-
-
-    public Map<String, String> getPropertiesMap() {
-        if ( properties != null ) {
-            return asMap( properties );
-        }
-        return null;
-    }
-
-
-    public LockManager getLockManager() {
-        return lockManager;
-    }
-
-
-    public void setLockManager( LockManager lockManager ) {
-        this.lockManager = lockManager;
-    }
-
-
-    public ConsistencyLevelPolicy getConsistencyLevelPolicy() {
-        return consistencyLevelPolicy;
-    }
-
-
-    public void setConsistencyLevelPolicy( ConsistencyLevelPolicy consistencyLevelPolicy ) {
-        this.consistencyLevelPolicy = consistencyLevelPolicy;
-    }
-
-
-    /** @return keyspace for application UUID */
-    public static String keyspaceForApplication( UUID applicationId ) {
-        if ( USE_VIRTUAL_KEYSPACES ) {
-            return STATIC_APPLICATION_KEYSPACE;
-        }
-        else {
-            return "Application_" + applicationId.toString().replace( '-', '_' );
-        }
-    }
-
-
-    public static UUID prefixForApplication( UUID applicationId ) {
-        if ( USE_VIRTUAL_KEYSPACES ) {
-            return applicationId;
-        }
-        else {
-            return null;
-        }
-    }
-
-
-    public Keyspace getKeyspace( String keyspace, UUID prefix ) {
-        Keyspace ko = null;
-        if ( USE_VIRTUAL_KEYSPACES && ( prefix != null ) ) {
-            ko = createVirtualKeyspace( keyspace, prefix, ue, cluster, consistencyLevelPolicy,
-                    ON_FAIL_TRY_ALL_AVAILABLE, accessMap );
-        }
-        else {
-            ko = HFactory.createKeyspace( keyspace, cluster, consistencyLevelPolicy, ON_FAIL_TRY_ALL_AVAILABLE,
-                    accessMap );
-        }
-        return ko;
-    }
-
-
-    public Keyspace getApplicationKeyspace( UUID applicationId ) {
-        assert applicationId != null;
-        Keyspace ko = getKeyspace( keyspaceForApplication( applicationId ), prefixForApplication( applicationId ) );
-        return ko;
-    }
-
-
-    /** The Usergrid_Applications keyspace directly */
-    public Keyspace getUsergridApplicationKeyspace() {
-        return getKeyspace( STATIC_APPLICATION_KEYSPACE, null );
-    }
-
-
-    public Keyspace getSystemKeyspace() {
-        return systemKeyspace;
-    }
-
-
-    public boolean checkKeyspacesExist() {
-        boolean exists = false;
-        try {
-            exists = cluster.describeKeyspace( SYSTEM_KEYSPACE ) != null
-                    && cluster.describeKeyspace( STATIC_APPLICATION_KEYSPACE ) != null;
-        }
-        catch ( Exception ex ) {
-            logger.error( "could not describe keyspaces", ex );
-        }
-        return exists;
-    }
-
-
-    /**
-     * Lazy creates a column family in the keyspace. If it doesn't exist, it will be created, then the call will sleep
-     * until all nodes have acknowledged the schema change
-     */
-    public void createColumnFamily( String keyspace, ColumnFamilyDefinition cfDef ) {
-
-        if ( !keySpaceExists( keyspace ) ) {
-            createKeySpace( keyspace );
-        }
-
-
-        //add the cf
-
-        if ( !cfExists( keyspace, cfDef.getName() ) ) {
-
-            //default read repair chance to 0.1
-            cfDef.setReadRepairChance( 0.1d );
-
-            cluster.addColumnFamily( cfDef, true );
-            logger.info( "Created column family {} in keyspace {}", cfDef.getName(), keyspace );
-        }
-    }
-
-
-    /** Create the column families in the list */
-    public void createColumnFamilies( String keyspace, List<ColumnFamilyDefinition> cfDefs ) {
-        for ( ColumnFamilyDefinition cfDef : cfDefs ) {
-            createColumnFamily( keyspace, cfDef );
-        }
-    }
-
-
-    /** Check if the keyspace exsts */
-    public boolean keySpaceExists( String keyspace ) {
-        KeyspaceDefinition ksDef = cluster.describeKeyspace( keyspace );
-
-        return ksDef != null;
-    }
-
-
-    /** Create the keyspace */
-    private void createKeySpace( String keyspace ) {
-        logger.info( "Creating keyspace: {}", keyspace );
-
-        String strategy_class =
-                getString( properties, "cassandra.keyspace.strategy", "org.apache.cassandra.locator.SimpleStrategy" );
-        logger.info( "Using strategy: {}", strategy_class );
-
-        int replication_factor = getIntValue( properties, "cassandra.keyspace.replication", 1 );
-        logger.info( "Using replication (may be overriden by strategy options): {}", replication_factor );
-
-        // try {
-        ThriftKsDef ks_def = ( ThriftKsDef ) HFactory
-                .createKeyspaceDefinition( keyspace, strategy_class, replication_factor,
-                        new ArrayList<ColumnFamilyDefinition>() );
-
-        @SuppressWarnings({ "unchecked", "rawtypes" }) Map<String, String> strategy_options =
-                filter( ( Map ) properties, "cassandra.keyspace.strategy.options.", true );
-        if ( strategy_options.size() > 0 ) {
-            logger.info( "Strategy options: {}", mapToFormattedJsonString( strategy_options ) );
-            ks_def.setStrategyOptions( strategy_options );
-        }
-
-        cluster.addKeyspace( ks_def );
-
-        waitForCreation( keyspace );
-
-        logger.info( "Created keyspace {}", keyspace );
-    }
-
-
-    /** Wait until all nodes agree on the same schema version */
-    private void waitForCreation( String keyspace ) {
-
-        while ( true ) {
-            Map<String, List<String>> versions = cluster.describeSchemaVersions();
-            // only 1 version, return
-            if ( versions != null && versions.size() == 1 ) {
-                return;
-            }
-            // sleep and try again
-            try {
-                Thread.sleep( 100 );
-            }
-            catch ( InterruptedException e ) {
-            }
-        }
-    }
-
-
-    /** Return true if the column family exists */
-    public boolean cfExists( String keyspace, String cfName ) {
-        KeyspaceDefinition ksDef = cluster.describeKeyspace( keyspace );
-
-        if ( ksDef == null ) {
-            return false;
-        }
-
-        for ( ColumnFamilyDefinition cf : ksDef.getCfDefs() ) {
-            if ( cfName.equals( cf.getName() ) ) {
-                return true;
-            }
-        }
-
-        return false;
-    }
-
-
-    /**
-     * Gets the columns.
-     *
-     * @param keyspace the keyspace
-     * @param columnFamily the column family
-     * @param key the key
-     *
-     * @return columns
-     *
-     * @throws Exception the exception
-     */
-    public <N, V> List<HColumn<N, V>> getAllColumns( Keyspace ko, Object columnFamily, Object key,
-                                                     Serializer<N> nameSerializer, Serializer<V> valueSerializer )
-            throws Exception {
-
-        if ( db_logger.isInfoEnabled() ) {
-            db_logger.info( "getColumns cf={} key={}", columnFamily, key );
-        }
-
-        SliceQuery<ByteBuffer, N, V> q = createSliceQuery( ko, be, nameSerializer, valueSerializer );
-        q.setColumnFamily( columnFamily.toString() );
-        q.setKey( bytebuffer( key ) );
-        q.setRange( null, null, false, ALL_COUNT );
-        QueryResult<ColumnSlice<N, V>> r = q.execute();
-        ColumnSlice<N, V> slice = r.get();
-        List<HColumn<N, V>> results = slice.getColumns();
-
-        if ( db_logger.isInfoEnabled() ) {
-            if ( results == null ) {
-                db_logger.info( "getColumns returned null" );
-            }
-            else {
-                db_logger.info( "getColumns returned {} columns", results.size() );
-            }
-        }
-
-        return results;
-    }
-
-
-    public List<HColumn<String, ByteBuffer>> getAllColumns( Keyspace ko, Object columnFamily, Object key )
-            throws Exception {
-        return getAllColumns( ko, columnFamily, key, se, be );
-    }
-
-
-    public Set<String> getAllColumnNames( Keyspace ko, Object columnFamily, Object key ) throws Exception {
-        List<HColumn<String, ByteBuffer>> columns = getAllColumns( ko, columnFamily, key );
-        Set<String> set = new LinkedHashSet<String>();
-        for ( HColumn<String, ByteBuffer> column : columns ) {
-            set.add( column.getName() );
-        }
-        return set;
-    }
-
-
-    /**
-     * Gets the columns.
-     *
-     * @param keyspace the keyspace
-     * @param columnFamily the column family
-     * @param key the key
-     * @param start the start
-     * @param finish the finish
-     * @param count the count
-     * @param reversed the reversed
-     *
-     * @return columns
-     *
-     * @throws Exception the exception
-     */
-    public List<HColumn<ByteBuffer, ByteBuffer>> getColumns( Keyspace ko, Object columnFamily, Object key, Object start,
-                                                             Object finish, int count, boolean reversed )
-            throws Exception {
-
-        if ( db_logger.isDebugEnabled() ) {
-            db_logger.debug( "getColumns cf=" + columnFamily + " key=" + key + " start=" + start + " finish=" + finish
-                    + " count=" + count + " reversed=" + reversed );
-        }
-
-        SliceQuery<ByteBuffer, ByteBuffer, ByteBuffer> q = createSliceQuery( ko, be, be, be );
-        q.setColumnFamily( columnFamily.toString() );
-        q.setKey( bytebuffer( key ) );
-
-        ByteBuffer start_bytes = null;
-        if ( start instanceof DynamicComposite ) {
-            start_bytes = ( ( DynamicComposite ) start ).serialize();
-        }
-        else if ( start instanceof List ) {
-            start_bytes = DynamicComposite.toByteBuffer( ( List<?> ) start );
-        }
-        else {
-            start_bytes = bytebuffer( start );
-        }
-
-        ByteBuffer finish_bytes = null;
-        if ( finish instanceof DynamicComposite ) {
-            finish_bytes = ( ( DynamicComposite ) finish ).serialize();
-        }
-        else if ( finish instanceof List ) {
-            finish_bytes = DynamicComposite.toByteBuffer( ( List<?> ) finish );
-        }
-        else {
-            finish_bytes = bytebuffer( finish );
-        }
-
-    /*
-     * if (reversed) { q.setRange(finish_bytes, start_bytes, reversed, count); }
-     * else { q.setRange(start_bytes, finish_bytes, reversed, count); }
-     */
-        q.setRange( start_bytes, finish_bytes, reversed, count );
-        QueryResult<ColumnSlice<ByteBuffer, ByteBuffer>> r = q.execute();
-        ColumnSlice<ByteBuffer, ByteBuffer> slice = r.get();
-        List<HColumn<ByteBuffer, ByteBuffer>> results = slice.getColumns();
-
-        if ( db_logger.isDebugEnabled() ) {
-            if ( results == null ) {
-                db_logger.debug( "getColumns returned null" );
-            }
-            else {
-                db_logger.debug( "getColumns returned " + results.size() + " columns" );
-            }
-        }
-
-        return results;
-    }
-
-
-    public Map<ByteBuffer, List<HColumn<ByteBuffer, ByteBuffer>>> multiGetColumns( Keyspace ko, Object columnFamily,
-                                                                                   List<?> keys, Object start,
-                                                                                   Object finish, int count,
-                                                                                   boolean reversed ) throws Exception {
-
-        if ( db_logger.isDebugEnabled() ) {
-            db_logger.debug( "multiGetColumns cf=" + columnFamily + " keys=" + keys + " start=" + start + " finish="
-                    + finish + " count=" + count + " reversed=" + reversed );
-        }
-
-        MultigetSliceQuery<ByteBuffer, ByteBuffer, ByteBuffer> q = createMultigetSliceQuery( ko, be, be, be );
-        q.setColumnFamily( columnFamily.toString() );
-        q.setKeys( bytebuffers( keys ) );
-
-        ByteBuffer start_bytes = null;
-        if ( start instanceof DynamicComposite ) {
-            start_bytes = ( ( DynamicComposite ) start ).serialize();
-        }
-        else if ( start instanceof List ) {
-            start_bytes = DynamicComposite.toByteBuffer( ( List<?> ) start );
-        }
-        else {
-            start_bytes = bytebuffer( start );
-        }
-
-        ByteBuffer finish_bytes = null;
-        if ( finish instanceof DynamicComposite ) {
-            finish_bytes = ( ( DynamicComposite ) finish ).serialize();
-        }
-        else if ( finish instanceof List ) {
-            finish_bytes = DynamicComposite.toByteBuffer( ( List<?> ) finish );
-        }
-        else {
-            finish_bytes = bytebuffer( finish );
-        }
-
-        q.setRange( start_bytes, finish_bytes, reversed, count );
-        QueryResult<Rows<ByteBuffer, ByteBuffer, ByteBuffer>> r = q.execute();
-        Rows<ByteBuffer, ByteBuffer, ByteBuffer> rows = r.get();
-
-        Map<ByteBuffer, List<HColumn<ByteBuffer, ByteBuffer>>> results =
-                new LinkedHashMap<ByteBuffer, List<HColumn<ByteBuffer, ByteBuffer>>>();
-        for ( Row<ByteBuffer, ByteBuffer, ByteBuffer> row : rows ) {
-            results.put( row.getKey(), row.getColumnSlice().getColumns() );
-        }
-
-        return results;
-    }
-
-
-    /**
-     * Gets the columns.
-     *
-     * @param keyspace the keyspace
-     * @param columnFamily the column family
-     * @param keys the keys
-     *
-     * @return map of keys to columns
-     *
-     * @throws Exception the exception
-     */
-    public <K, N, V> Rows<K, N, V> getRows( Keyspace ko, Object columnFamily, Collection<K> keys,
-                                            Serializer<K> keySerializer, Serializer<N> nameSerializer,
-                                            Serializer<V> valueSerializer ) throws Exception {
-
-        if ( db_logger.isDebugEnabled() ) {
-            db_logger.debug( "getColumns cf=" + columnFamily + " keys=" + keys );
-        }
-
-        MultigetSliceQuery<K, N, V> q = createMultigetSliceQuery( ko, keySerializer, nameSerializer, valueSerializer );
-        q.setColumnFamily( columnFamily.toString() );
-        q.setKeys( keys );
-        q.setRange( null, null, false, ALL_COUNT );
-        QueryResult<Rows<K, N, V>> r = q.execute();
-        Rows<K, N, V> results = r.get();
-
-        if ( db_logger.isInfoEnabled() ) {
-            if ( results == null ) {
-                db_logger.info( "getColumns returned null" );
-            }
-            else {
-                db_logger.info( "getColumns returned " + results.getCount() + " columns" );
-            }
-        }
-
-        return results;
-    }
-
-
-    /**
-     * Gets the columns.
-     *
-     * @param keyspace the keyspace
-     * @param columnFamily the column family
-     * @param key the key
-     * @param columnNames the column names
-     *
-     * @return columns
-     *
-     * @throws Exception the exception
-     */
-    @SuppressWarnings("unchecked")
-    public <N, V> List<HColumn<N, V>> getColumns( Keyspace ko, Object columnFamily, Object key, Set<String> columnNames,
-                                                  Serializer<N> nameSerializer, Serializer<V> valueSerializer )
-            throws Exception {
-
-        if ( db_logger.isDebugEnabled() ) {
-            db_logger.debug( "getColumns cf=" + columnFamily + " key=" + key + " names=" + columnNames );
-        }
-
-        SliceQuery<ByteBuffer, N, V> q = createSliceQuery( ko, be, nameSerializer, valueSerializer );
-        q.setColumnFamily( columnFamily.toString() );
-        q.setKey( bytebuffer( key ) );
-        // q.setColumnNames(columnNames.toArray(new String[0]));
-        q.setColumnNames( ( N[] ) nameSerializer.fromBytesSet( se.toBytesSet( new ArrayList<String>( columnNames ) ) )
-                                                .toArray() );
-
-        QueryResult<ColumnSlice<N, V>> r = q.execute();
-        ColumnSlice<N, V> slice = r.get();
-        List<HColumn<N, V>> results = slice.getColumns();
-
-        if ( db_logger.isInfoEnabled() ) {
-            if ( results == null ) {
-                db_logger.info( "getColumns returned null" );
-            }
-            else {
-                db_logger.info( "getColumns returned " + results.size() + " columns" );
-            }
-        }
-
-        return results;
-    }
-
-
-    /**
-     * Gets the columns.
-     *
-     * @param keyspace the keyspace
-     * @param columnFamily the column family
-     * @param keys the keys
-     * @param columnNames the column names
-     *
-     * @return map of keys to columns
-     *
-     * @throws Exception the exception
-     */
-    @SuppressWarnings("unchecked")
-    public <K, N, V> Rows<K, N, V> getRows( Keyspace ko, Object columnFamily, Collection<K> keys,
-                                            Collection<String> columnNames, Serializer<K> keySerializer,
-                                            Serializer<N> nameSerializer, Serializer<V> valueSerializer )
-            throws Exception {
-
-        if ( db_logger.isDebugEnabled() ) {
-            db_logger.debug( "getColumns cf=" + columnFamily + " keys=" + keys + " names=" + columnNames );
-        }
-
-        MultigetSliceQuery<K, N, V> q = createMultigetSliceQuery( ko, keySerializer, nameSerializer, valueSerializer );
-        q.setColumnFamily( columnFamily.toString() );
-        q.setKeys( keys );
-        q.setColumnNames( ( N[] ) nameSerializer.fromBytesSet( se.toBytesSet( new ArrayList<String>( columnNames ) ) )
-                                                .toArray() );
-        QueryResult<Rows<K, N, V>> r = q.execute();
-        Rows<K, N, V> results = r.get();
-
-        if ( db_logger.isInfoEnabled() ) {
-            if ( results == null ) {
-                db_logger.info( "getColumns returned null" );
-            }
-            else {
-                db_logger.info( "getColumns returned " + results.getCount() + " columns" );
-            }
-        }
-
-        return results;
-    }
-
-
-    /**
-     * Gets the column.
-     *
-     * @param keyspace the keyspace
-     * @param columnFamily the column family
-     * @param key the key
-     * @param column the column
-     *
-     * @return column
-     *
-     * @throws Exception the exception
-     */
-    public <N, V> HColumn<N, V> getColumn( Keyspace ko, Object columnFamily, Object key, N column,
-                                           Serializer<N> nameSerializer, Serializer<V> valueSerializer )
-            throws Exception {
-
-        if ( db_logger.isDebugEnabled() ) {
-            db_logger.debug( "getColumn cf=" + columnFamily + " key=" + key + " column=" + column );
-        }
-
-    /*
-     * ByteBuffer column_bytes = null; if (column instanceof List) {
-     * column_bytes = Composite.serializeToByteBuffer((List<?>) column); } else
-     * { column_bytes = bytebuffer(column); }
-     */
-
-        ColumnQuery<ByteBuffer, N, V> q = HFactory.createColumnQuery( ko, be, nameSerializer, valueSerializer );
-        QueryResult<HColumn<N, V>> r =
-                q.setKey( bytebuffer( key ) ).setName( column ).setColumnFamily( columnFamily.toString() ).execute();
-        HColumn<N, V> result = r.get();
-
-        if ( db_logger.isInfoEnabled() ) {
-            if ( result == null ) {
-                db_logger.info( "getColumn returned null" );
-            }
-        }
-
-        return result;
-    }
-
-
-    public <N, V> ColumnSlice<N, V> getColumns( Keyspace ko, Object columnFamily, Object key, N[] columns,
-                                                Serializer<N> nameSerializer, Serializer<V> valueSerializer )
-            throws Exception {
-
-        if ( db_logger.isDebugEnabled() ) {
-            db_logger.debug( "getColumn cf=" + columnFamily + " key=" + key + " column=" + columns );
-        }
-
-    /*
-     * ByteBuffer column_bytes = null; if (column instanceof List) {
-     * column_bytes = Composite.serializeToByteBuffer((List<?>) column); } else
-     * { column_bytes = bytebuffer(column); }
-     */
-
-        SliceQuery<ByteBuffer, N, V> q = HFactory.createSliceQuery( ko, be, nameSerializer, valueSerializer );
-        QueryResult<ColumnSlice<N, V>> r =
-                q.setKey( bytebuffer( key ) ).setColumnNames( columns ).setColumnFamily( columnFamily.toString() )
-                 .execute();
-        ColumnSlice<N, V> result = r.get();
-
-        if ( db_logger.isDebugEnabled() ) {
-            if ( result == null ) {
-                db_logger.debug( "getColumn returned null" );
-            }
-        }
-
-        return result;
-    }
-
-
-    public HColumn<String, ByteBuffer> getColumn( Keyspace ko, Object columnFamily, Object key, String column )
-            throws Exception {
-        return getColumn( ko, columnFamily, key, column, se, be );
-    }
-
-
-    public void setColumn( Keyspace ko, Object columnFamily, Object key, Object columnName, Object columnValue )
-            throws Exception {
-        this.setColumn( ko, columnFamily, key, columnName, columnValue, 0 );
-    }
-
-
-    public void setColumn( Keyspace ko, Object columnFamily, Object key, Object columnName, Object columnValue,
-                           int ttl ) throws Exception {
-
-        if ( db_logger.isDebugEnabled() ) {
-            db_logger.debug( "setColumn cf=" + columnFamily + " key=" + key + " name=" + columnName + " value="
-                    + columnValue );
-        }
-
-        ByteBuffer name_bytes = null;
-        if ( columnName instanceof List ) {
-            name_bytes = DynamicComposite.toByteBuffer( ( List<?> ) columnName );
-        }
-        else {
-            name_bytes = bytebuffer( columnName );
-        }
-
-        ByteBuffer value_bytes = null;
-        if ( columnValue instanceof List ) {
-            value_bytes = DynamicComposite.toByteBuffer( ( List<?> ) columnValue );
-        }
-        else {
-            value_bytes = bytebuffer( columnValue );
-        }
-
-        HColumn<ByteBuffer, ByteBuffer> col = createColumn( name_bytes, value_bytes, be, be );
-        if ( ttl != 0 ) {
-            col.setTtl( ttl );
-        }
-        Mutator<ByteBuffer> m = createMutator( ko, be );
-        m.insert( bytebuffer( key ), columnFamily.toString(), col );
-    }
-
-
-    /**
-     * Sets the columns.
-     *
-     * @param keyspace the keyspace
-     * @param columnFamily the column family
-     * @param key the key
-     * @param map the map
-     *
-     * @throws Exception the exception
-     */
-    public void setColumns( Keyspace ko, Object columnFamily, byte[] key, Map<?, ?> map ) throws Exception {
-        this.setColumns( ko, columnFamily, key, map, 0 );
-    }
-
-
-    public void setColumns( Keyspace ko, Object columnFamily, byte[] key, Map<?, ?> map, int ttl ) throws Exception {
-
-        if ( db_logger.isDebugEnabled() ) {
-            db_logger.debug( "setColumns cf=" + columnFamily + " key=" + key + " map=" + map + ( ttl != 0 ?
-                                                                                                 " ttl=" + ttl : "" ) );
-        }
-
-        Mutator<ByteBuffer> m = createMutator( ko, be );
-        long timestamp = createTimestamp();
-
-        for ( Object name : map.keySet() ) {
-            Object value = map.get( name );
-            if ( value != null ) {
-
-                ByteBuffer name_bytes = null;
-                if ( name instanceof List ) {
-                    name_bytes = DynamicComposite.toByteBuffer( ( List<?> ) name );
-                }
-                else {
-                    name_bytes = bytebuffer( name );
-                }
-
-                ByteBuffer value_bytes = null;
-                if ( value instanceof List ) {
-                    value_bytes = DynamicComposite.toByteBuffer( ( List<?> ) value );
-                }
-                else {
-                    value_bytes = bytebuffer( value );
-                }
-
-                HColumn<ByteBuffer, ByteBuffer> col = createColumn( name_bytes, value_bytes, timestamp, be, be );
-                if ( ttl != 0 ) {
-                    col.setTtl( ttl );
-                }
-                m.addInsertion( bytebuffer( key ), columnFamily.toString(),
-                        createColumn( name_bytes, value_bytes, timestamp, be, be ) );
-            }
-        }
-        batchExecute( m, CassandraService.RETRY_COUNT );
-    }
-
-
-    /**
-     * Create a timestamp based on the TimeResolution set to the cluster.
-     *
-     * @return a timestamp
-     */
-    public long createTimestamp() {
-        return chc.getClockResolution().createClock();
-    }
-
-
-    /**
-     * Delete column.
-     *
-     * @param keyspace the keyspace
-     * @param columnFamily the column family
-     * @param key the key
-     * @param column the column
-     *
-     * @throws Exception the exception
-     */
-    public void deleteColumn( Keyspace ko, Object columnFamily, Object key, Object column ) throws Exception {
-
-        if ( db_logger.isDebugEnabled() ) {
-            db_logger.debug( "deleteColumn cf=" + columnFamily + " key=" + key + " name=" + column );
-        }
-
-        Mutator<ByteBuffer> m = createMutator( ko, be );
-        m.delete( bytebuffer( key ), columnFamily.toString(), bytebuffer( column ), be );
-    }
-
-
-    /**
-     * Gets the row keys.
-     *
-     * @param keyspace the keyspace
-     * @param columnFamily the column family
-     *
-     * @return set of keys
-     *
-     * @throws Exception the exception
-     */
-    public <K> Set<K> getRowKeySet( Keyspace ko, Object columnFamily, Serializer<K> keySerializer ) throws Exception {
-
-        if ( db_logger.isDebugEnabled() ) {
-            db_logger.debug( "getRowKeys cf=" + columnFamily );
-        }
-
-        RangeSlicesQuery<K, ByteBuffer, ByteBuffer> q = createRangeSlicesQuery( ko, keySerializer, be, be );
-        q.setColumnFamily( columnFamily.toString() );
-        q.setKeys( null, null );
-        q.setColumnNames( new ByteBuffer[0] );
-        QueryResult<OrderedRows<K, ByteBuffer, ByteBuffer>> r = q.execute();
-        OrderedRows<K, ByteBuffer, ByteBuffer> rows = r.get();
-
-        Set<K> results = new LinkedHashSet<K>();
-        for ( Row<K, ByteBuffer, ByteBuffer> row : rows ) {
-            results.add( row.getKey() );
-        }
-
-        if ( db_logger.isDebugEnabled() ) {
-            {
-                db_logger.debug( "getRowKeys returned " + results.size() + " rows" );
-            }
-        }
-
-        return results;
-    }
-
-
-    /**
-     * Gets the row keys as uui ds.
-     *
-     * @param keyspace the keyspace
-     * @param columnFamily the column family
-     *
-     * @return list of row key UUIDs
-     *
-     * @throws Exception the exception
-     */
-    public <K> List<K> getRowKeyList( Keyspace ko, Object columnFamily, Serializer<K> keySerializer ) throws Exception {
-
-        RangeSlicesQuery<K, ByteBuffer, ByteBuffer> q = createRangeSlicesQuery( ko, keySerializer, be, be );
-        q.setColumnFamily( columnFamily.toString() );
-        q.setKeys( null, null );
-        q.setColumnNames( new ByteBuffer[0] );
-        QueryResult<OrderedRows<K, ByteBuffer, ByteBuffer>> r = q.execute();
-        OrderedRows<K, ByteBuffer, ByteBuffer> rows = r.get();
-
-        List<K> list = new ArrayList<K>();
-        for ( Row<K, ByteBuffer, ByteBuffer> row : rows ) {
-            list.add( row.getKey() );
-            // K uuid = row.getKey();
-            // if (uuid != UUIDUtils.ZERO_UUID) {
-            // list.add(uuid);
-            // }
-        }
-
-        return list;
-    }
-
-
-    /**
-     * Delete row.
-     *
-     * @param keyspace the keyspace
-     * @param columnFamily the column family
-     * @param key the key
-     *
-     * @throws Exception the exception
-     */
-    public void deleteRow( Keyspace ko, final Object columnFamily, final Object key ) throws Exception {
-
-        if ( db_logger.isDebugEnabled() ) {
-            db_logger.debug( "deleteRow cf=" + columnFamily + " key=" + key );
-        }
-
-        createMutator( ko, be ).addDeletion( bytebuffer( key ), columnFamily.toString() ).execute();
-    }
-
-
-    public void deleteRow( Keyspace ko, final Object columnFamily, final String key ) throws Exception {
-
-        if ( db_logger.isDebugEnabled() ) {
-            db_logger.debug( "deleteRow cf=" + columnFamily + " key=" + key );
-        }
-
-        createMutator( ko, se ).addDeletion( key, columnFamily.toString() ).execute();
-    }
-
-
-    /**
-     * Delete row.
-     *
-     * @param keyspace the keyspace
-     * @param columnFamily the column family
-     * @param key the key
-     * @param timestamp the timestamp
-     *
-     * @throws Exception the exception
-     */
-    public void deleteRow( Keyspace ko, final Object columnFamily, final Object key, final long timestamp )
-            throws Exception {
-
-        if ( db_logger.isDebugEnabled() ) {
-            db_logger.debug( "deleteRow cf=" + columnFamily + " key=" + key + " timestamp=" + timestamp );
-        }
-
-        createMutator( ko, be ).addDeletion( bytebuffer( key ), columnFamily.toString(), timestamp ).execute();
-    }
-
-
-    /**
-     * Gets the id list.
-     *
-     * @param ko the keyspace
-     * @param key the key
-     * @param start the start
-     * @param finish the finish
-     * @param count the count
-     * @param reversed True if the scan should be reversed
-     * @param locator The index locator instance
-     * @param applicationId The applicationId
-     * @param collectionName The name of the collection to get the Ids for
-     *
-     * @return list of columns as UUIDs
-     *
-     * @throws Exception the exception
-     */
-    public IndexScanner getIdList( Keyspace ko, Object key, UUID start, UUID finish, int count, boolean reversed,
-                                   IndexBucketLocator locator, UUID applicationId, String collectionName )
-            throws Exception {
-
-        if ( count <= 0 ) {
-            count = DEFAULT_COUNT;
-        }
-
-        if ( NULL_ID.equals( start ) ) {
-            start = null;
-        }
-
-        IndexScanner scanner =
-                new IndexBucketScanner( this, locator, ENTITY_ID_SETS, applicationId, IndexType.COLLECTION, key, start,
-                        finish, reversed, count, collectionName );
-
-        return scanner;
-    }
-
-
-    public int countColumns( Keyspace ko, Object columnFamily, Object key ) throws Exception {
-
-
-        CountQuery<ByteBuffer, ByteBuffer> cq = HFactory.createCountQuery( ko, be, be );
-        cq.setColumnFamily( columnFamily.toString() );
-        cq.setKey( bytebuffer( key ) );
-        cq.setRange( ByteBuffer.allocate( 0 ), ByteBuffer.allocate( 0 ), 100000000 );
-        QueryResult<Integer> r = cq.execute();
-        if ( r == null ) {
-            return 0;
-        }
-        return r.get();
-    }
-
-
-    /**
-     * Sets the id list.
-     *
-     * @param keyspace the keyspace
-     * @param targetId the target id
-     * @param columnFamily the column family
-     * @param keyPrefix the key prefix
-     * @param keySuffix the key suffix
-     * @param keyIds the key ids
-     * @param setColumnValue the set column value
-     *
-     * @throws Exception the exception
-     */
-    public void setIdList( Keyspace ko, UUID targetId, String keyPrefix, String keySuffix, List<UUID> keyIds )
-            throws Exception {
-        long timestamp = createTimestamp();
-        Mutator<ByteBuffer> batch = createMutator( ko, be );
-        batch = buildSetIdListMutator( batch, targetId, ENTITY_ID_SETS.toString(), keyPrefix, keySuffix, keyIds,
-                timestamp );
-        batchExecute( batch, CassandraService.RETRY_COUNT );
-    }
-
-
-    boolean clusterUp = false;
-
-
-    public void startClusterHealthCheck() {
-
-        ScheduledExecutorService executorService = Executors.newSingleThreadScheduledExecutor();
-        executorService.scheduleWithFixedDelay( new Runnable() {
-            @Override
-            public void run() {
-                if ( cluster != null ) {
-                    HConnectionManager connectionManager = cluster.getConnectionManager();
-                    if ( connectionManager != null ) {
-                        clusterUp = !connectionManager.getHosts().isEmpty();
-                    }
-                }
-            }
-        }, 1, 5, TimeUnit.SECONDS );
-    }
-    
-    public void destroy() throws Exception {
-    	if (cluster != null) {
-    		HConnectionManager connectionManager = cluster.getConnectionManager();
-    		if (connectionManager != null) {
-    			connectionManager.shutdown();
-    		}
-    	}
-    	cluster = null;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/cassandra/ConnectedEntityRefImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/cassandra/ConnectedEntityRefImpl.java b/stack/core/src/main/java/org/usergrid/persistence/cassandra/ConnectedEntityRefImpl.java
deleted file mode 100644
index c093329..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/cassandra/ConnectedEntityRefImpl.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.cassandra;
-
-
-import java.util.UUID;
-
-import org.usergrid.persistence.ConnectedEntityRef;
-import org.usergrid.persistence.EntityRef;
-import org.usergrid.persistence.SimpleEntityRef;
-
-
-public class ConnectedEntityRefImpl extends SimpleEntityRef implements ConnectedEntityRef {
-
-    final String connectionType;
-
-
-    public ConnectedEntityRefImpl() {
-        super( null, null );
-        connectionType = null;
-    }
-
-
-    public ConnectedEntityRefImpl( String connectionType, EntityRef connectedEntity ) {
-        super( connectedEntity.getType(), connectedEntity.getUuid() );
-        this.connectionType = connectionType;
-    }
-
-
-    public ConnectedEntityRefImpl( String connectionType, String entityType, UUID entityId ) {
-        super( entityType, entityId );
-        this.connectionType = connectionType;
-    }
-
-
-    @Override
-    public String getConnectionType() {
-        return connectionType;
-    }
-
-
-    public static String getConnectionType( ConnectedEntityRef connection ) {
-        if ( connection == null ) {
-            return null;
-        }
-        return connection.getConnectionType();
-    }
-}


[35/96] [abbrv] [partial] Change package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/RelationManagerImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/RelationManagerImpl.java b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/RelationManagerImpl.java
new file mode 100644
index 0000000..b110178
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/RelationManagerImpl.java
@@ -0,0 +1,2337 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.cassandra;
+
+
+import java.nio.ByteBuffer;
+import java.util.AbstractMap;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.TreeSet;
+import java.util.UUID;
+
+import org.apache.usergrid.persistence.CollectionRef;
+import org.apache.usergrid.persistence.ConnectedEntityRef;
+import org.apache.usergrid.persistence.ConnectionRef;
+import org.apache.usergrid.persistence.Entity;
+import org.apache.usergrid.persistence.EntityRef;
+import org.apache.usergrid.persistence.IndexBucketLocator;
+import org.apache.usergrid.persistence.PagingResultsIterator;
+import org.apache.usergrid.persistence.Query;
+import org.apache.usergrid.persistence.RelationManager;
+import org.apache.usergrid.persistence.Results;
+import org.apache.usergrid.persistence.RoleRef;
+import org.apache.usergrid.persistence.Schema;
+import org.apache.usergrid.persistence.SimpleCollectionRef;
+import org.apache.usergrid.persistence.SimpleEntityRef;
+import org.apache.usergrid.persistence.SimpleRoleRef;
+import org.apache.usergrid.persistence.IndexBucketLocator.IndexType;
+import org.apache.usergrid.persistence.Results.Level;
+import org.apache.usergrid.persistence.cassandra.IndexUpdate.IndexEntry;
+import org.apache.usergrid.persistence.cassandra.index.ConnectedIndexScanner;
+import org.apache.usergrid.persistence.cassandra.index.IndexBucketScanner;
+import org.apache.usergrid.persistence.cassandra.index.IndexScanner;
+import org.apache.usergrid.persistence.cassandra.index.NoOpIndexScanner;
+import org.apache.usergrid.persistence.entities.Group;
+import org.apache.usergrid.persistence.geo.CollectionGeoSearch;
+import org.apache.usergrid.persistence.geo.ConnectionGeoSearch;
+import org.apache.usergrid.persistence.geo.EntityLocationRef;
+import org.apache.usergrid.persistence.geo.model.Point;
+import org.apache.usergrid.persistence.query.ir.AllNode;
+import org.apache.usergrid.persistence.query.ir.NameIdentifierNode;
+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.query.ir.WithinNode;
+import org.apache.usergrid.persistence.query.ir.result.CollectionResultsLoaderFactory;
+import org.apache.usergrid.persistence.query.ir.result.ConnectionIndexSliceParser;
+import org.apache.usergrid.persistence.query.ir.result.ConnectionResultsLoaderFactory;
+import org.apache.usergrid.persistence.query.ir.result.ConnectionTypesIterator;
+import org.apache.usergrid.persistence.query.ir.result.EmptyIterator;
+import org.apache.usergrid.persistence.query.ir.result.GeoIterator;
+import org.apache.usergrid.persistence.query.ir.result.SliceIterator;
+import org.apache.usergrid.persistence.query.ir.result.StaticIdIterator;
+import org.apache.usergrid.persistence.query.ir.result.UUIDIndexSliceParser;
+import org.apache.usergrid.persistence.schema.CollectionInfo;
+import org.apache.usergrid.utils.IndexUtils;
+import org.apache.usergrid.utils.MapUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.util.Assert;
+
+import com.yammer.metrics.annotation.Metered;
+
+import me.prettyprint.cassandra.serializers.ByteBufferSerializer;
+import me.prettyprint.cassandra.serializers.StringSerializer;
+import me.prettyprint.cassandra.serializers.UUIDSerializer;
+import me.prettyprint.hector.api.Keyspace;
+import me.prettyprint.hector.api.beans.DynamicComposite;
+import me.prettyprint.hector.api.beans.HColumn;
+import me.prettyprint.hector.api.mutation.Mutator;
+import static java.lang.String.CASE_INSENSITIVE_ORDER;
+import static java.util.Arrays.asList;
+import static me.prettyprint.hector.api.factory.HFactory.createMutator;
+import static org.apache.usergrid.persistence.Schema.COLLECTION_ROLES;
+import static org.apache.usergrid.persistence.Schema.DICTIONARY_COLLECTIONS;
+import static org.apache.usergrid.persistence.Schema.DICTIONARY_CONNECTED_ENTITIES;
+import static org.apache.usergrid.persistence.Schema.DICTIONARY_CONNECTED_TYPES;
+import static org.apache.usergrid.persistence.Schema.DICTIONARY_CONNECTING_ENTITIES;
+import static org.apache.usergrid.persistence.Schema.DICTIONARY_CONNECTING_TYPES;
+import static org.apache.usergrid.persistence.Schema.INDEX_CONNECTIONS;
+import static org.apache.usergrid.persistence.Schema.PROPERTY_COLLECTION_NAME;
+import static org.apache.usergrid.persistence.Schema.PROPERTY_INACTIVITY;
+import static org.apache.usergrid.persistence.Schema.PROPERTY_ITEM;
+import static org.apache.usergrid.persistence.Schema.PROPERTY_ITEM_TYPE;
+import static org.apache.usergrid.persistence.Schema.PROPERTY_NAME;
+import static org.apache.usergrid.persistence.Schema.PROPERTY_TITLE;
+import static org.apache.usergrid.persistence.Schema.PROPERTY_TYPE;
+import static org.apache.usergrid.persistence.Schema.TYPE_APPLICATION;
+import static org.apache.usergrid.persistence.Schema.TYPE_ENTITY;
+import static org.apache.usergrid.persistence.Schema.TYPE_MEMBER;
+import static org.apache.usergrid.persistence.Schema.TYPE_ROLE;
+import static org.apache.usergrid.persistence.Schema.defaultCollectionName;
+import static org.apache.usergrid.persistence.Schema.getDefaultSchema;
+import static org.apache.usergrid.persistence.cassandra.ApplicationCF.ENTITY_COMPOSITE_DICTIONARIES;
+import static org.apache.usergrid.persistence.cassandra.ApplicationCF.ENTITY_DICTIONARIES;
+import static org.apache.usergrid.persistence.cassandra.ApplicationCF.ENTITY_ID_SETS;
+import static org.apache.usergrid.persistence.cassandra.ApplicationCF.ENTITY_INDEX;
+import static org.apache.usergrid.persistence.cassandra.ApplicationCF.ENTITY_INDEX_ENTRIES;
+import static org.apache.usergrid.persistence.cassandra.CassandraPersistenceUtils.addDeleteToMutator;
+import static org.apache.usergrid.persistence.cassandra.CassandraPersistenceUtils.addInsertToMutator;
+import static org.apache.usergrid.persistence.cassandra.CassandraPersistenceUtils.batchExecute;
+import static org.apache.usergrid.persistence.cassandra.CassandraPersistenceUtils.key;
+import static org.apache.usergrid.persistence.cassandra.CassandraService.INDEX_ENTRY_LIST_COUNT;
+import static org.apache.usergrid.persistence.cassandra.ConnectionRefImpl.CONNECTION_ENTITY_CONNECTION_TYPE;
+import static org.apache.usergrid.persistence.cassandra.GeoIndexManager.batchDeleteLocationInConnectionsIndex;
+import static org.apache.usergrid.persistence.cassandra.GeoIndexManager.batchRemoveLocationFromCollectionIndex;
+import static org.apache.usergrid.persistence.cassandra.GeoIndexManager.batchStoreLocationInCollectionIndex;
+import static org.apache.usergrid.persistence.cassandra.GeoIndexManager.batchStoreLocationInConnectionsIndex;
+import static org.apache.usergrid.persistence.cassandra.IndexUpdate.indexValueCode;
+import static org.apache.usergrid.persistence.cassandra.IndexUpdate.toIndexableValue;
+import static org.apache.usergrid.persistence.cassandra.IndexUpdate.validIndexableValue;
+import static org.apache.usergrid.utils.ClassUtils.cast;
+import static org.apache.usergrid.utils.CompositeUtils.setGreaterThanEqualityFlag;
+import static org.apache.usergrid.utils.ConversionUtils.string;
+import static org.apache.usergrid.utils.InflectionUtils.singularize;
+import static org.apache.usergrid.utils.MapUtils.addMapSet;
+import static org.apache.usergrid.utils.UUIDUtils.getTimestampInMicros;
+import static org.apache.usergrid.utils.UUIDUtils.newTimeUUID;
+
+
+public class RelationManagerImpl implements RelationManager {
+
+    private static final Logger logger = LoggerFactory.getLogger( RelationManagerImpl.class );
+
+    private EntityManagerImpl em;
+    private CassandraService cass;
+    private UUID applicationId;
+    private EntityRef headEntity;
+    private IndexBucketLocator indexBucketLocator;
+
+    public static final StringSerializer se = new StringSerializer();
+    public static final ByteBufferSerializer be = new ByteBufferSerializer();
+    public static final UUIDSerializer ue = new UUIDSerializer();
+
+
+    public RelationManagerImpl() {
+    }
+
+
+    public RelationManagerImpl init( EntityManagerImpl em, CassandraService cass, UUID applicationId,
+                                     EntityRef headEntity, IndexBucketLocator indexBucketLocator ) {
+
+        Assert.notNull( em, "Entity manager cannot be null" );
+        Assert.notNull( cass, "Cassandra service cannot be null" );
+        Assert.notNull( applicationId, "Application Id cannot be null" );
+        Assert.notNull( headEntity, "Head entity cannot be null" );
+        Assert.notNull( headEntity.getUuid(), "Head entity uuid cannot be null" );
+        Assert.notNull( indexBucketLocator, "Index bucket locator cannot be null" );
+
+        this.em = em;
+        this.applicationId = applicationId;
+        this.cass = cass;
+        this.headEntity = headEntity;
+        this.indexBucketLocator = indexBucketLocator;
+
+        return this;
+    }
+
+
+    private RelationManagerImpl getRelationManager( EntityRef headEntity ) {
+        RelationManagerImpl rmi = new RelationManagerImpl();
+        rmi.init( em, cass, applicationId, headEntity, indexBucketLocator );
+        return rmi;
+    }
+
+
+    /** side effect: converts headEntity into an Entity if it is an EntityRef! */
+    private Entity getHeadEntity() throws Exception {
+        Entity entity = null;
+        if ( headEntity instanceof Entity ) {
+            entity = ( Entity ) headEntity;
+        }
+        else {
+            entity = em.get( headEntity );
+            headEntity = entity;
+        }
+        return entity;
+    }
+
+
+    /**
+     * Batch update collection index.
+     *
+     * @param indexUpdate The update to apply
+     * @param owner The entity that is the owner context of this entity update.  Can either be an application, or
+     * another entity
+     * @param collectionName the collection name
+     *
+     * @return The indexUpdate with batch mutations
+     *
+     * @throws Exception the exception
+     */
+    @Metered(group = "core", name = "RelationManager_batchUpdateCollectionIndex")
+    public IndexUpdate batchUpdateCollectionIndex( IndexUpdate indexUpdate, EntityRef owner, String collectionName )
+            throws Exception {
+
+        logger.debug( "batchUpdateCollectionIndex" );
+
+        Entity indexedEntity = indexUpdate.getEntity();
+
+        String bucketId = indexBucketLocator
+                .getBucket( applicationId, IndexType.COLLECTION, indexedEntity.getUuid(), indexedEntity.getType(),
+                        indexUpdate.getEntryName() );
+
+        // the root name without the bucket
+        // entity_id,collection_name,prop_name,
+        Object index_name = null;
+        // entity_id,collection_name,prop_name, bucketId
+        Object index_key = null;
+
+        // entity_id,collection_name,collected_entity_id,prop_name
+
+        for ( IndexEntry entry : indexUpdate.getPrevEntries() ) {
+
+            if ( entry.getValue() != null ) {
+
+                index_name = key( owner.getUuid(), collectionName, entry.getPath() );
+
+                index_key = key( index_name, bucketId );
+
+                addDeleteToMutator( indexUpdate.getBatch(), ENTITY_INDEX, index_key, entry.getIndexComposite(),
+                        indexUpdate.getTimestamp() );
+
+                if ( "location.coordinates".equals( entry.getPath() ) ) {
+                    EntityLocationRef loc = new EntityLocationRef( indexUpdate.getEntity(), entry.getTimestampUuid(),
+                            entry.getValue().toString() );
+                    batchRemoveLocationFromCollectionIndex( indexUpdate.getBatch(), indexBucketLocator, applicationId,
+                            index_name, loc );
+                }
+            }
+            else {
+                logger.error( "Unexpected condition - deserialized property value is null" );
+            }
+        }
+
+        if ( ( indexUpdate.getNewEntries().size() > 0 ) && ( !indexUpdate.isMultiValue() || ( indexUpdate.isMultiValue()
+                && !indexUpdate.isRemoveListEntry() ) ) ) {
+
+            for ( IndexEntry indexEntry : indexUpdate.getNewEntries() ) {
+
+                // byte valueCode = indexEntry.getValueCode();
+
+                index_name = key( owner.getUuid(), collectionName, indexEntry.getPath() );
+
+                index_key = key( index_name, bucketId );
+
+                // int i = 0;
+
+                addInsertToMutator( indexUpdate.getBatch(), ENTITY_INDEX, index_key, indexEntry.getIndexComposite(),
+                        null, indexUpdate.getTimestamp() );
+
+                if ( "location.coordinates".equals( indexEntry.getPath() ) ) {
+                    EntityLocationRef loc =
+                            new EntityLocationRef( indexUpdate.getEntity(), indexEntry.getTimestampUuid(),
+                                    indexEntry.getValue().toString() );
+                    batchStoreLocationInCollectionIndex( indexUpdate.getBatch(), indexBucketLocator, applicationId,
+                            index_name, indexedEntity.getUuid(), loc );
+                }
+
+                // i++;
+            }
+        }
+
+        for ( String index : indexUpdate.getIndexesSet() ) {
+            addInsertToMutator( indexUpdate.getBatch(), ENTITY_DICTIONARIES,
+                    key( owner.getUuid(), collectionName, Schema.DICTIONARY_INDEXES ), index, null,
+                    indexUpdate.getTimestamp() );
+        }
+
+        return indexUpdate;
+    }
+
+
+    @Override
+    @Metered(group = "core", name = "RelationManager_getCollectionIndexes")
+    public Set<String> getCollectionIndexes( String collectionName ) throws Exception {
+
+        // TODO TN, read all buckets here
+        List<HColumn<String, String>> results =
+                cass.getAllColumns( cass.getApplicationKeyspace( applicationId ), ENTITY_DICTIONARIES,
+                        key( headEntity.getUuid(), collectionName, Schema.DICTIONARY_INDEXES ), se, se );
+        Set<String> indexes = new TreeSet<String>();
+        if ( results != null ) {
+            for ( HColumn<String, String> column : results ) {
+                String propertyName = column.getName();
+                if ( !propertyName.endsWith( ".keywords" ) ) {
+                    indexes.add( column.getName() );
+                }
+            }
+        }
+        return indexes;
+    }
+
+
+    public Map<EntityRef, Set<String>> getContainingCollections() throws Exception {
+        Map<EntityRef, Set<String>> results = new LinkedHashMap<EntityRef, Set<String>>();
+
+        Keyspace ko = cass.getApplicationKeyspace( applicationId );
+
+        // TODO TN get all buckets here
+
+        List<HColumn<DynamicComposite, ByteBuffer>> containers = cass.getAllColumns( ko, ENTITY_COMPOSITE_DICTIONARIES,
+                key( headEntity.getUuid(), Schema.DICTIONARY_CONTAINER_ENTITIES ), EntityManagerFactoryImpl.dce, be );
+        if ( containers != null ) {
+            for ( HColumn<DynamicComposite, ByteBuffer> container : containers ) {
+                DynamicComposite composite = container.getName();
+                if ( composite != null ) {
+                    String ownerType = ( String ) composite.get( 0 );
+                    String collectionName = ( String ) composite.get( 1 );
+                    UUID ownerId = ( UUID ) composite.get( 2 );
+                    addMapSet( results, new SimpleEntityRef( ownerType, ownerId ), collectionName );
+                    if ( logger.isDebugEnabled() ) {
+                        logger.debug( " {} ( {} ) is in collection {} ( {} ).", new Object[] {
+                                headEntity.getType(), headEntity.getUuid(), ownerType, collectionName, ownerId
+                        } );
+                    }
+                }
+            }
+        }
+        EntityRef applicationRef = new SimpleEntityRef( TYPE_APPLICATION, applicationId );
+        if ( !results.containsKey( applicationRef ) ) {
+            addMapSet( results, applicationRef, defaultCollectionName( headEntity.getType() ) );
+        }
+        return results;
+    }
+
+
+    @SuppressWarnings("unchecked")
+    public void batchCreateCollectionMembership( Mutator<ByteBuffer> batch, EntityRef ownerRef, String collectionName,
+                                                 EntityRef itemRef, EntityRef membershipRef, UUID timestampUuid )
+            throws Exception {
+
+        long timestamp = getTimestampInMicros( timestampUuid );
+
+        if ( membershipRef == null ) {
+            membershipRef = new SimpleCollectionRef( ownerRef, collectionName, itemRef );
+        }
+
+        Map<String, Object> properties = new TreeMap<String, Object>( CASE_INSENSITIVE_ORDER );
+        properties.put( PROPERTY_TYPE, membershipRef.getType() );
+        properties.put( PROPERTY_COLLECTION_NAME, collectionName );
+        properties.put( PROPERTY_ITEM, itemRef.getUuid() );
+        properties.put( PROPERTY_ITEM_TYPE, itemRef.getType() );
+
+        em.batchCreate( batch, membershipRef.getType(), null, properties, membershipRef.getUuid(), timestampUuid );
+
+        addInsertToMutator( batch, ENTITY_COMPOSITE_DICTIONARIES,
+                key( membershipRef.getUuid(), Schema.DICTIONARY_CONTAINER_ENTITIES ),
+                asList( ownerRef.getType(), collectionName, ownerRef.getUuid() ), membershipRef.getUuid(), timestamp );
+    }
+
+
+    /**
+     * Batch add to collection.
+     *
+     * @param batch the batch
+     * @param collectionName the collection name
+     * @param entity The entity to add to the batch
+     * @param timestampUuid The timestamp of this update in a time uuid
+     *
+     * @return batch
+     *
+     * @throws Exception the exception
+     */
+    public Mutator<ByteBuffer> batchAddToCollection( Mutator<ByteBuffer> batch, String collectionName, Entity entity,
+                                                     UUID timestampUuid ) throws Exception {
+        List<UUID> ids = new ArrayList<UUID>( 1 );
+        ids.add( headEntity.getUuid() );
+        return batchAddToCollections( batch, headEntity.getType(), ids, collectionName, entity, timestampUuid );
+    }
+
+
+    @SuppressWarnings("unchecked")
+    @Metered(group = "core", name = "RelationManager_batchAddToCollections")
+    public Mutator<ByteBuffer> batchAddToCollections( Mutator<ByteBuffer> batch, String ownerType, List<UUID> ownerIds,
+                                                      String collectionName, Entity entity, UUID timestampUuid )
+            throws Exception {
+
+        long timestamp = getTimestampInMicros( timestampUuid );
+
+        if ( Schema.isAssociatedEntityType( entity.getType() ) ) {
+            logger.error( "Cant add an extended type to any collection", new Throwable() );
+            return batch;
+        }
+
+        Map<UUID, CollectionRef> membershipRefs = new LinkedHashMap<UUID, CollectionRef>();
+
+        for ( UUID ownerId : ownerIds ) {
+
+            CollectionRef membershipRef =
+                    new SimpleCollectionRef( new SimpleEntityRef( ownerType, ownerId ), collectionName, entity );
+
+            membershipRefs.put( ownerId, membershipRef );
+
+            // get the bucket this entityId needs to be inserted into
+            String bucketId = indexBucketLocator
+                    .getBucket( applicationId, IndexType.COLLECTION, entity.getUuid(), collectionName );
+
+            Object collections_key = key( ownerId, Schema.DICTIONARY_COLLECTIONS, collectionName, bucketId );
+
+            // Insert in main collection
+
+            addInsertToMutator( batch, ENTITY_ID_SETS, collections_key, entity.getUuid(), membershipRef.getUuid(),
+                    timestamp );
+
+            addInsertToMutator( batch, ENTITY_COMPOSITE_DICTIONARIES,
+                    key( entity.getUuid(), Schema.DICTIONARY_CONTAINER_ENTITIES ),
+                    asList( ownerType, collectionName, ownerId ), membershipRef.getUuid(), timestamp );
+        }
+
+
+        Schema schema = getDefaultSchema();
+
+        // Add property indexes
+        for ( String propertyName : entity.getProperties().keySet() ) {
+            boolean indexed_property = schema.isPropertyIndexed( entity.getType(), propertyName );
+            if ( indexed_property ) {
+                boolean collection_indexes_property =
+                        schema.isPropertyIndexedInCollection( ownerType, collectionName, propertyName );
+                boolean item_schema_has_property = schema.hasProperty( entity.getType(), propertyName );
+                boolean fulltext_indexed = schema.isPropertyFulltextIndexed( entity.getType(), propertyName );
+                if ( collection_indexes_property || !item_schema_has_property ) {
+                    Object propertyValue = entity.getProperty( propertyName );
+                    IndexUpdate indexUpdate =
+                            batchStartIndexUpdate( batch, entity, propertyName, propertyValue, timestampUuid,
+                                    item_schema_has_property, false, false, fulltext_indexed, true );
+                    for ( UUID ownerId : ownerIds ) {
+                        EntityRef owner = new SimpleEntityRef( ownerType, ownerId );
+                        batchUpdateCollectionIndex( indexUpdate, owner, collectionName );
+                    }
+                }
+            }
+        }
+
+        // Add set property indexes
+
+        Set<String> dictionaryNames = em.getDictionaryNames( entity );
+
+        for ( String dictionaryName : dictionaryNames ) {
+            boolean has_dictionary = schema.hasDictionary( entity.getType(), dictionaryName );
+            boolean dictionary_indexed =
+                    schema.isDictionaryIndexedInCollection( ownerType, collectionName, dictionaryName );
+
+            if ( dictionary_indexed || !has_dictionary ) {
+                Set<Object> elementValues = em.getDictionaryAsSet( entity, dictionaryName );
+                for ( Object elementValue : elementValues ) {
+                    IndexUpdate indexUpdate =
+                            batchStartIndexUpdate( batch, entity, dictionaryName, elementValue, timestampUuid,
+                                    has_dictionary, true, false, false, true );
+                    for ( UUID ownerId : ownerIds ) {
+                        EntityRef owner = new SimpleEntityRef( ownerType, ownerId );
+                        batchUpdateCollectionIndex( indexUpdate, owner, collectionName );
+                    }
+                }
+            }
+        }
+
+        for ( UUID ownerId : ownerIds ) {
+            EntityRef owner = new SimpleEntityRef( ownerType, ownerId );
+            batchCreateCollectionMembership( batch, owner, collectionName, entity, membershipRefs.get( ownerId ),
+                    timestampUuid );
+        }
+
+        return batch;
+    }
+
+
+    /**
+     * Batch remove from collection.
+     * <p/>
+     * * Batch add to collection.
+     *
+     * @param batch the batch
+     * @param collectionName the collection name
+     * @param entity The entity to add to the batch
+     * @param timestampUuid The timestamp of this update in a time uuid
+     *
+     * @return The mutation with the delete operations added
+     *
+     * @throws Exception the exception
+     */
+    public Mutator<ByteBuffer> batchRemoveFromCollection( Mutator<ByteBuffer> batch, String collectionName,
+                                                          Entity entity, UUID timestampUuid ) throws Exception {
+        return this.batchRemoveFromCollection( batch, collectionName, entity, false, timestampUuid );
+    }
+
+
+    @SuppressWarnings("unchecked")
+    @Metered(group = "core", name = "RelationManager_batchRemoveFromCollection")
+    public Mutator<ByteBuffer> batchRemoveFromCollection( Mutator<ByteBuffer> batch, String collectionName,
+                                                          Entity entity, boolean force, UUID timestampUuid )
+            throws Exception {
+
+        long timestamp = getTimestampInMicros( timestampUuid );
+
+        if ( !force && headEntity.getUuid().equals( applicationId ) ) {
+            // Can't remove entities from root collections
+            return batch;
+        }
+
+        Object collections_key = key( headEntity.getUuid(), Schema.DICTIONARY_COLLECTIONS, collectionName,
+                indexBucketLocator.getBucket( applicationId, IndexType.COLLECTION, entity.getUuid(), collectionName ) );
+
+        // Remove property indexes
+
+        Schema schema = getDefaultSchema();
+        for ( String propertyName : entity.getProperties().keySet() ) {
+            boolean collection_indexes_property =
+                    schema.isPropertyIndexedInCollection( headEntity.getType(), collectionName, propertyName );
+            boolean item_schema_has_property = schema.hasProperty( entity.getType(), propertyName );
+            boolean fulltext_indexed = schema.isPropertyFulltextIndexed( entity.getType(), propertyName );
+            if ( collection_indexes_property || !item_schema_has_property ) {
+                IndexUpdate indexUpdate = batchStartIndexUpdate( batch, entity, propertyName, null, timestampUuid,
+                        item_schema_has_property, false, false, fulltext_indexed );
+                batchUpdateCollectionIndex( indexUpdate, headEntity, collectionName );
+            }
+        }
+
+        // Remove set indexes
+
+        Set<String> dictionaryNames = em.getDictionaryNames( entity );
+
+        for ( String dictionaryName : dictionaryNames ) {
+            boolean has_dictionary = schema.hasDictionary( entity.getType(), dictionaryName );
+            boolean dictionary_indexed =
+                    schema.isDictionaryIndexedInCollection( headEntity.getType(), collectionName, dictionaryName );
+
+            if ( dictionary_indexed || !has_dictionary ) {
+                Set<Object> elementValues = em.getDictionaryAsSet( entity, dictionaryName );
+                for ( Object elementValue : elementValues ) {
+                    IndexUpdate indexUpdate =
+                            batchStartIndexUpdate( batch, entity, dictionaryName, elementValue, timestampUuid,
+                                    has_dictionary, true, true, false );
+                    batchUpdateCollectionIndex( indexUpdate, headEntity, collectionName );
+                }
+            }
+        }
+
+        // Delete actual property
+
+        addDeleteToMutator( batch, ENTITY_ID_SETS, collections_key, entity.getUuid(), timestamp );
+
+        addDeleteToMutator( batch, ENTITY_COMPOSITE_DICTIONARIES,
+                key( entity.getUuid(), Schema.DICTIONARY_CONTAINER_ENTITIES ),
+                asList( headEntity.getType(), collectionName, headEntity.getUuid() ), timestamp );
+
+        if ( !headEntity.getType().equalsIgnoreCase( TYPE_APPLICATION ) && !Schema
+                .isAssociatedEntityType( entity.getType() ) ) {
+            em.deleteEntity( new SimpleCollectionRef( headEntity, collectionName, entity ).getUuid() );
+        }
+
+        return batch;
+    }
+
+
+    @Metered(group = "core", name = "RelationManager_batchDeleteConnectionIndexEntries")
+    public Mutator<ByteBuffer> batchDeleteConnectionIndexEntries( IndexUpdate indexUpdate, IndexEntry entry,
+                                                                  ConnectionRefImpl connection, UUID[] index_keys )
+            throws Exception {
+
+        // entity_id,prop_name
+        Object property_index_key = key( index_keys[ConnectionRefImpl.ALL], INDEX_CONNECTIONS, entry.getPath(),
+                indexBucketLocator.getBucket( applicationId, IndexType.CONNECTION, index_keys[ConnectionRefImpl.ALL],
+                        entry.getPath() ) );
+
+        // entity_id,entity_type,prop_name
+        Object entity_type_prop_index_key =
+                key( index_keys[ConnectionRefImpl.BY_ENTITY_TYPE], INDEX_CONNECTIONS, entry.getPath(),
+                        indexBucketLocator.getBucket( applicationId, IndexType.CONNECTION,
+                                index_keys[ConnectionRefImpl.BY_ENTITY_TYPE], entry.getPath() ) );
+
+        // entity_id,connection_type,prop_name
+        Object connection_type_prop_index_key =
+                key( index_keys[ConnectionRefImpl.BY_CONNECTION_TYPE], INDEX_CONNECTIONS, entry.getPath(),
+                        indexBucketLocator.getBucket( applicationId, IndexType.CONNECTION,
+                                index_keys[ConnectionRefImpl.BY_CONNECTION_TYPE], entry.getPath() ) );
+
+        // entity_id,connection_type,entity_type,prop_name
+        Object connection_type_and_entity_type_prop_index_key =
+                key( index_keys[ConnectionRefImpl.BY_CONNECTION_AND_ENTITY_TYPE], INDEX_CONNECTIONS, entry.getPath(),
+                        indexBucketLocator.getBucket( applicationId, IndexType.CONNECTION,
+                                index_keys[ConnectionRefImpl.BY_CONNECTION_AND_ENTITY_TYPE], entry.getPath() ) );
+
+        // composite(property_value,connected_entity_id,connection_type,entity_type,entry_timestamp)
+        addDeleteToMutator( indexUpdate.getBatch(), ENTITY_INDEX, property_index_key,
+                entry.getIndexComposite( connection.getConnectedEntityId(), connection.getConnectionType(),
+                        connection.getConnectedEntityType() ), indexUpdate.getTimestamp() );
+
+        // composite(property_value,connected_entity_id,connection_type,entry_timestamp)
+        addDeleteToMutator( indexUpdate.getBatch(), ENTITY_INDEX, entity_type_prop_index_key,
+                entry.getIndexComposite( connection.getConnectedEntityId(), connection.getConnectionType() ),
+                indexUpdate.getTimestamp() );
+
+        // composite(property_value,connected_entity_id,entity_type,entry_timestamp)
+        addDeleteToMutator( indexUpdate.getBatch(), ENTITY_INDEX, connection_type_prop_index_key,
+                entry.getIndexComposite( connection.getConnectedEntityId(), connection.getConnectedEntityType() ),
+                indexUpdate.getTimestamp() );
+
+        // composite(property_value,connected_entity_id,entry_timestamp)
+        addDeleteToMutator( indexUpdate.getBatch(), ENTITY_INDEX, connection_type_and_entity_type_prop_index_key,
+                entry.getIndexComposite( connection.getConnectedEntityId() ), indexUpdate.getTimestamp() );
+
+        return indexUpdate.getBatch();
+    }
+
+
+    @Metered(group = "core", name = "RelationManager_batchAddConnectionIndexEntries")
+    public Mutator<ByteBuffer> batchAddConnectionIndexEntries( IndexUpdate indexUpdate, IndexEntry entry,
+                                                               ConnectionRefImpl connection, UUID[] index_keys ) {
+
+        // entity_id,prop_name
+        Object property_index_key = key( index_keys[ConnectionRefImpl.ALL], INDEX_CONNECTIONS, entry.getPath(),
+                indexBucketLocator.getBucket( applicationId, IndexType.CONNECTION, index_keys[ConnectionRefImpl.ALL],
+                        entry.getPath() ) );
+
+        // entity_id,entity_type,prop_name
+        Object entity_type_prop_index_key =
+                key( index_keys[ConnectionRefImpl.BY_ENTITY_TYPE], INDEX_CONNECTIONS, entry.getPath(),
+                        indexBucketLocator.getBucket( applicationId, IndexType.CONNECTION,
+                                index_keys[ConnectionRefImpl.BY_ENTITY_TYPE], entry.getPath() ) );
+
+        // entity_id,connection_type,prop_name
+        Object connection_type_prop_index_key =
+                key( index_keys[ConnectionRefImpl.BY_CONNECTION_TYPE], INDEX_CONNECTIONS, entry.getPath(),
+                        indexBucketLocator.getBucket( applicationId, IndexType.CONNECTION,
+                                index_keys[ConnectionRefImpl.BY_CONNECTION_TYPE], entry.getPath() ) );
+
+        // entity_id,connection_type,entity_type,prop_name
+        Object connection_type_and_entity_type_prop_index_key =
+                key( index_keys[ConnectionRefImpl.BY_CONNECTION_AND_ENTITY_TYPE], INDEX_CONNECTIONS, entry.getPath(),
+                        indexBucketLocator.getBucket( applicationId, IndexType.CONNECTION,
+                                index_keys[ConnectionRefImpl.BY_CONNECTION_AND_ENTITY_TYPE], entry.getPath() ) );
+
+        // composite(property_value,connected_entity_id,connection_type,entity_type,entry_timestamp)
+        addInsertToMutator( indexUpdate.getBatch(), ENTITY_INDEX, property_index_key,
+                entry.getIndexComposite( connection.getConnectedEntityId(), connection.getConnectionType(),
+                        connection.getConnectedEntityType() ), connection.getUuid(), indexUpdate.getTimestamp() );
+
+        // composite(property_value,connected_entity_id,connection_type,entry_timestamp)
+        addInsertToMutator( indexUpdate.getBatch(), ENTITY_INDEX, entity_type_prop_index_key,
+                entry.getIndexComposite( connection.getConnectedEntityId(), connection.getConnectionType() ),
+                connection.getUuid(), indexUpdate.getTimestamp() );
+
+        // composite(property_value,connected_entity_id,entity_type,entry_timestamp)
+        addInsertToMutator( indexUpdate.getBatch(), ENTITY_INDEX, connection_type_prop_index_key,
+                entry.getIndexComposite( connection.getConnectedEntityId(), connection.getConnectedEntityType() ),
+                connection.getUuid(), indexUpdate.getTimestamp() );
+
+        // composite(property_value,connected_entity_id,entry_timestamp)
+        addInsertToMutator( indexUpdate.getBatch(), ENTITY_INDEX, connection_type_and_entity_type_prop_index_key,
+                entry.getIndexComposite( connection.getConnectedEntityId() ), connection.getUuid(),
+                indexUpdate.getTimestamp() );
+
+        return indexUpdate.getBatch();
+    }
+
+
+    /**
+     * Batch update connection index.
+     *
+     * @param indexUpdate The update operation to perform
+     * @param connection The connection to update
+     *
+     * @return The index with the batch mutation udpated
+     *
+     * @throws Exception the exception
+     */
+    @Metered(group = "core", name = "RelationManager_batchUpdateConnectionIndex")
+    public IndexUpdate batchUpdateConnectionIndex( IndexUpdate indexUpdate, ConnectionRefImpl connection )
+            throws Exception {
+
+        // UUID connection_id = connection.getUuid();
+
+        UUID[] index_keys = connection.getIndexIds();
+
+        // Delete all matching entries from entry list
+        for ( IndexEntry entry : indexUpdate.getPrevEntries() ) {
+
+            if ( entry.getValue() != null ) {
+
+                batchDeleteConnectionIndexEntries( indexUpdate, entry, connection, index_keys );
+
+                if ( "location.coordinates".equals( entry.getPath() ) ) {
+                    EntityLocationRef loc = new EntityLocationRef( indexUpdate.getEntity(), entry.getTimestampUuid(),
+                            entry.getValue().toString() );
+                    batchDeleteLocationInConnectionsIndex( indexUpdate.getBatch(), indexBucketLocator, applicationId,
+                            index_keys, entry.getPath(), loc );
+                }
+            }
+            else {
+                logger.error( "Unexpected condition - deserialized property value is null" );
+            }
+        }
+
+        if ( ( indexUpdate.getNewEntries().size() > 0 ) && ( !indexUpdate.isMultiValue() || ( indexUpdate.isMultiValue()
+                && !indexUpdate.isRemoveListEntry() ) ) ) {
+
+            for ( IndexEntry indexEntry : indexUpdate.getNewEntries() ) {
+
+                batchAddConnectionIndexEntries( indexUpdate, indexEntry, connection, index_keys );
+
+                if ( "location.coordinates".equals( indexEntry.getPath() ) ) {
+                    EntityLocationRef loc =
+                            new EntityLocationRef( indexUpdate.getEntity(), indexEntry.getTimestampUuid(),
+                                    indexEntry.getValue().toString() );
+                    batchStoreLocationInConnectionsIndex( indexUpdate.getBatch(), indexBucketLocator, applicationId,
+                            index_keys, indexEntry.getPath(), loc );
+                }
+            }
+
+      /*
+       * addInsertToMutator(batch, EntityCF.SETS, key(connection_id,
+       * Schema.INDEXES_SET), indexEntry.getKey(), null, false, timestamp); }
+       * 
+       * addInsertToMutator(batch, EntityCF.SETS, key(connection_id,
+       * Schema.INDEXES_SET), entryName, null, false, timestamp);
+       */
+        }
+
+        for ( String index : indexUpdate.getIndexesSet() ) {
+            addInsertToMutator( indexUpdate.getBatch(), ENTITY_DICTIONARIES,
+                    key( connection.getConnectingIndexId(), Schema.DICTIONARY_INDEXES ), index, null,
+                    indexUpdate.getTimestamp() );
+        }
+
+        return indexUpdate;
+    }
+
+
+    public Set<String> getConnectionIndexes( ConnectionRefImpl connection ) throws Exception {
+        List<HColumn<String, String>> results =
+                cass.getAllColumns( cass.getApplicationKeyspace( applicationId ), ENTITY_DICTIONARIES,
+                        key( connection.getConnectingIndexId(), Schema.DICTIONARY_INDEXES ), se, se );
+        Set<String> indexes = new TreeSet<String>();
+        if ( results != null ) {
+            for ( HColumn<String, String> column : results ) {
+                String propertyName = column.getName();
+                if ( !propertyName.endsWith( ".keywords" ) ) {
+                    indexes.add( column.getName() );
+                }
+            }
+        }
+        return indexes;
+    }
+
+
+    /**
+     * Batch update backward connections property indexes.
+     *
+     * @param indexUpdate The update to run for incoming connections
+     *
+     * @return The index update to run
+     *
+     * @throws Exception the exception
+     */
+    @Metered(group = "core", name = "RelationManager_batchUpdateBackwardConnectionsPropertyIndexes")
+    public IndexUpdate batchUpdateBackwardConnectionsPropertyIndexes( IndexUpdate indexUpdate ) throws Exception {
+
+        logger.debug( "batchUpdateBackwordConnectionsPropertyIndexes" );
+
+        boolean entitySchemaHasProperty = indexUpdate.isSchemaHasProperty();
+
+        if ( entitySchemaHasProperty ) {
+            if ( !getDefaultSchema()
+                    .isPropertyIndexed( indexUpdate.getEntity().getType(), indexUpdate.getEntryName() ) ) {
+                return indexUpdate;
+            }
+        }
+
+
+        return doBackwardConnectionsUpdate( indexUpdate );
+    }
+
+
+    /**
+     * Search each reverse connection type in the graph for connections.  If one is found, update the index
+     * appropriately
+     *
+     * @param indexUpdate The index update to use
+     *
+     * @return The updated index update
+     */
+    private IndexUpdate doBackwardConnectionsUpdate( IndexUpdate indexUpdate ) throws Exception {
+        final Entity targetEntity = indexUpdate.getEntity();
+
+        final ConnectionTypesIterator connectionTypes =
+                new ConnectionTypesIterator( cass, applicationId, targetEntity.getUuid(), false, 100 );
+
+        for ( String connectionType : connectionTypes ) {
+
+            PagingResultsIterator itr = getReversedConnectionsIterator( targetEntity, connectionType );
+
+            for ( Object connection : itr ) {
+
+                final ConnectedEntityRef sourceEntity = ( ConnectedEntityRef ) connection;
+
+                //we need to create a connection ref from the source entity (found via reverse edge) to the entity
+                // we're about to update.  This is the index that needs updated
+                final ConnectionRefImpl connectionRef =
+                        new ConnectionRefImpl( sourceEntity, connectionType, indexUpdate.getEntity() );
+
+                batchUpdateConnectionIndex( indexUpdate, connectionRef );
+            }
+        }
+
+        return indexUpdate;
+    }
+
+
+    /**
+     * Get a paging results iterator.  Should return an iterator for all results
+     *
+     * @param targetEntity The target entity search connections from
+     *
+     * @return connectionType The name of the edges to search
+     */
+    private PagingResultsIterator getReversedConnectionsIterator( EntityRef targetEntity, String connectionType )
+            throws Exception {
+        return new PagingResultsIterator( getConnectingEntities( targetEntity, connectionType, null, Level.REFS ) );
+    }
+
+
+    /**
+     * Batch update backward connections set indexes.
+     *
+     * @param indexUpdate The index to update in the dictionary
+     *
+     * @return The index update
+     *
+     * @throws Exception the exception
+     */
+    @Metered(group = "core", name = "RelationManager_batchUpdateBackwardConnectionsDictionaryIndexes")
+    public IndexUpdate batchUpdateBackwardConnectionsDictionaryIndexes( IndexUpdate indexUpdate ) throws Exception {
+
+        logger.debug( "batchUpdateBackwardConnectionsListIndexes" );
+
+        boolean entityHasDictionary = getDefaultSchema()
+                .isDictionaryIndexedInConnections( indexUpdate.getEntity().getType(), indexUpdate.getEntryName() );
+
+        if ( !entityHasDictionary ) {
+            return indexUpdate;
+        }
+
+
+        return doBackwardConnectionsUpdate( indexUpdate );
+    }
+
+
+    @SuppressWarnings("unchecked")
+    @Metered(group = "core", name = "RelationManager_batchUpdateEntityConnection")
+    public Mutator<ByteBuffer> batchUpdateEntityConnection( Mutator<ByteBuffer> batch, boolean disconnect,
+                                                            ConnectionRefImpl connection, UUID timestampUuid )
+            throws Exception {
+
+        long timestamp = getTimestampInMicros( timestampUuid );
+
+        Entity connectedEntity = em.get( connection.getConnectedEntityId() );
+
+        if ( connectedEntity == null ) {
+            return batch;
+        }
+
+        // Create connection for requested params
+
+
+        if ( disconnect ) {
+            addDeleteToMutator( batch, ENTITY_COMPOSITE_DICTIONARIES,
+                    key( connection.getConnectingEntityId(), DICTIONARY_CONNECTED_ENTITIES,
+                            connection.getConnectionType() ),
+                    asList( connection.getConnectedEntityId(), connection.getConnectedEntityType() ), timestamp );
+
+            addDeleteToMutator( batch, ENTITY_COMPOSITE_DICTIONARIES,
+                    key( connection.getConnectedEntityId(), DICTIONARY_CONNECTING_ENTITIES,
+                            connection.getConnectionType() ),
+                    asList( connection.getConnectingEntityId(), connection.getConnectingEntityType() ), timestamp );
+
+            // delete the connection path if there will be no connections left
+
+            boolean delete = true;
+
+            //check out outbound edges of the given type.  If we have more than the 1 specified,
+            // we shouldn't delete the connection types from our outbound index
+            PagingResultsIterator itr = new PagingResultsIterator(
+                    getConnectedEntities( connection.getConnectingEntity(), connection.getConnectionType(), null,
+                            Level.REFS ) );
+
+            ConnectedEntityRef c;
+
+            while ( itr.hasNext() ) {
+                c = ( ConnectedEntityRef ) itr.next();
+
+                if ( !connection.getConnectedEntityId().equals( c.getUuid() ) ) {
+                    delete = false;
+                    break;
+                }
+
+
+                //        c = (ConnectionRef) itr.next();
+                //        if (c.getConnectedEntity().getConnectionType().equals(connection.getConnectedEntity()
+                // .getConnectionType()) &&!c.getConnectedEntity().getUuid().equals(connection.getConnectedEntity()
+                // .getUuid())) {
+                //            delete = false;
+                //            break;
+                //        }
+
+            }
+            //      for (ConnectionRefImpl c : getConnectionsWithEntity(connection.getConnectingEntityId())) {
+            //        if (c.getConnectedEntity().getConnectionType().equals(connection.getConnectedEntity()
+            // .getConnectionType())) {
+            //          if (!c.getConnectedEntity().getUuid().equals(connection.getConnectedEntity().getUuid())) {
+            //            delete = false;
+            //            break;
+            //          }
+            //        }
+            //      }
+            if ( delete ) {
+                addDeleteToMutator( batch, ENTITY_DICTIONARIES,
+                        key( connection.getConnectingEntityId(), DICTIONARY_CONNECTED_TYPES ),
+                        connection.getConnectionType(), timestamp );
+            }
+
+            // delete the connection path if there will be no connections left
+            delete = true;
+
+
+            //check out inbound edges of the given type.  If we have more than the 1 specified,
+            // we shouldn't delete the connection types from our outbound index
+            itr = new PagingResultsIterator(
+                    getConnectingEntities( connection.getConnectingEntity(), connection.getConnectionType(), null,
+                            Level.REFS ) );
+
+            while ( itr.hasNext() ) {
+                c = ( ConnectedEntityRef ) itr.next();
+
+                if ( !connection.getConnectedEntityId().equals( c.getUuid() ) ) {
+                    delete = false;
+                    break;
+                }
+                //        if (c.getConnectedEntity().getConnectionType().equals(connection.getConnectedEntity()
+                // .getConnectionType()) && !c.getConnectingEntity().getUuid().equals(connection.getConnectingEntity
+                // ().getUuid())) {
+                //            delete = false;
+                //            break;
+                //        }
+
+            }
+
+            //      for (ConnectionRefImpl c : getConnectionsWithEntity(connection.getConnectedEntityId())) {
+            //        if (c.getConnectedEntity().getConnectionType().equals(connection.getConnectedEntity()
+            // .getConnectionType())) {
+            //          if (!c.getConnectingEntity().getUuid().equals(connection.getConnectingEntity().getUuid())) {
+            //            delete = false;
+            //            break;
+            //          }
+            //        }
+            //      }
+            if ( delete ) {
+                addDeleteToMutator( batch, ENTITY_DICTIONARIES,
+                        key( connection.getConnectedEntityId(), DICTIONARY_CONNECTING_TYPES ),
+                        connection.getConnectionType(), timestamp );
+            }
+        }
+        else {
+            addInsertToMutator( batch, ENTITY_COMPOSITE_DICTIONARIES,
+                    key( connection.getConnectingEntityId(), DICTIONARY_CONNECTED_ENTITIES,
+                            connection.getConnectionType() ),
+                    asList( connection.getConnectedEntityId(), connection.getConnectedEntityType() ), timestamp,
+                    timestamp );
+
+            addInsertToMutator( batch, ENTITY_COMPOSITE_DICTIONARIES,
+                    key( connection.getConnectedEntityId(), DICTIONARY_CONNECTING_ENTITIES,
+                            connection.getConnectionType() ),
+                    asList( connection.getConnectingEntityId(), connection.getConnectingEntityType() ), timestamp,
+                    timestamp );
+
+            // Add connection type to connections set
+            addInsertToMutator( batch, ENTITY_DICTIONARIES,
+                    key( connection.getConnectingEntityId(), DICTIONARY_CONNECTED_TYPES ),
+                    connection.getConnectionType(), null, timestamp );
+
+            // Add connection type to connections set
+            addInsertToMutator( batch, ENTITY_DICTIONARIES,
+                    key( connection.getConnectedEntityId(), DICTIONARY_CONNECTING_TYPES ),
+                    connection.getConnectionType(), null, timestamp );
+        }
+
+        // Add property indexes
+
+        // Iterate though all the properties of the connected entity
+
+        Schema schema = getDefaultSchema();
+        for ( String propertyName : connectedEntity.getProperties().keySet() ) {
+            Object propertyValue = connectedEntity.getProperties().get( propertyName );
+
+            boolean indexed = schema.isPropertyIndexed( connectedEntity.getType(), propertyName );
+
+            boolean connection_indexes_property = schema.isPropertyIndexed( connectedEntity.getType(), propertyName );
+            boolean item_schema_has_property = schema.hasProperty( connectedEntity.getType(), propertyName );
+            boolean fulltext_indexed = schema.isPropertyFulltextIndexed( connectedEntity.getType(), propertyName );
+            // For each property, if the schema says it's indexed, update its
+            // index
+
+            if ( indexed && ( connection_indexes_property || !item_schema_has_property ) ) {
+                IndexUpdate indexUpdate =
+                        batchStartIndexUpdate( batch, connectedEntity, propertyName, disconnect ? null : propertyValue,
+                                timestampUuid, item_schema_has_property, false, false, fulltext_indexed );
+                batchUpdateConnectionIndex( indexUpdate, connection );
+            }
+        }
+
+        // Add indexes for the connected entity's list properties
+
+        // Get the names of the list properties in the connected entity
+        Set<String> dictionaryNames = em.getDictionaryNames( connectedEntity );
+
+        // For each list property, get the values in the list and
+        // update the index with those values
+
+        for ( String dictionaryName : dictionaryNames ) {
+            boolean has_dictionary = schema.hasDictionary( connectedEntity.getType(), dictionaryName );
+            boolean dictionary_indexed =
+                    schema.isDictionaryIndexedInConnections( connectedEntity.getType(), dictionaryName );
+
+            if ( dictionary_indexed || !has_dictionary ) {
+                Set<Object> elementValues = em.getDictionaryAsSet( connectedEntity, dictionaryName );
+                for ( Object elementValue : elementValues ) {
+                    IndexUpdate indexUpdate =
+                            batchStartIndexUpdate( batch, connectedEntity, dictionaryName, elementValue, timestampUuid,
+                                    has_dictionary, true, disconnect, false );
+                    batchUpdateConnectionIndex( indexUpdate, connection );
+                }
+            }
+        }
+
+        return batch;
+    }
+
+
+    public void updateEntityConnection( boolean disconnect, ConnectionRefImpl connection ) throws Exception {
+
+        UUID timestampUuid = newTimeUUID();
+        Mutator<ByteBuffer> batch = createMutator( cass.getApplicationKeyspace( applicationId ), be );
+
+        // Make or break the connection
+
+        batchUpdateEntityConnection( batch, disconnect, connection, timestampUuid );
+
+        // Make or break a connection from the connecting entity
+        // to the connection itself
+
+        ConnectionRefImpl loopback = connection.getConnectionToConnectionEntity();
+        if ( !disconnect ) {
+            em.insertEntity( CONNECTION_ENTITY_CONNECTION_TYPE, loopback.getConnectedEntityId() );
+        }
+
+        batchUpdateEntityConnection( batch, disconnect, loopback, timestampUuid );
+
+        batchExecute( batch, CassandraService.RETRY_COUNT );
+    }
+
+
+    @Metered(group = "core", name = "RelationManager_batchDisconnect")
+    public void batchDisconnect( Mutator<ByteBuffer> batch, UUID timestampUuid ) throws Exception {
+
+
+        PagingResultsIterator itr =
+                new PagingResultsIterator( getConnectingEntities( headEntity, null, null, Level.REFS ) );
+
+        ConnectionRefImpl connection;
+
+        while ( itr.hasNext() ) {
+            connection = ( ConnectionRefImpl ) itr.next();
+
+            batchUpdateEntityConnection( batch, true, connection, timestampUuid );
+        }
+        //
+        //    List<ConnectionRefImpl> connections = getConnectionsWithEntity(headEntity.getUuid());
+        //    if (connections != null) {
+        //      for (ConnectionRefImpl connection : connections) {
+        //        batchUpdateEntityConnection(batch, true, connection, timestampUuid);
+        //      }
+        //    }
+    }
+
+
+    public IndexUpdate batchStartIndexUpdate( Mutator<ByteBuffer> batch, Entity entity, String entryName,
+                                              Object entryValue, UUID timestampUuid, boolean schemaHasProperty,
+                                              boolean isMultiValue, boolean removeListEntry, boolean fulltextIndexed )
+            throws Exception {
+        return batchStartIndexUpdate( batch, entity, entryName, entryValue, timestampUuid, schemaHasProperty,
+                isMultiValue, removeListEntry, fulltextIndexed, false );
+    }
+
+
+    @Metered(group = "core", name = "RelationManager_batchStartIndexUpdate")
+    public IndexUpdate batchStartIndexUpdate( Mutator<ByteBuffer> batch, Entity entity, String entryName,
+                                              Object entryValue, UUID timestampUuid, boolean schemaHasProperty,
+                                              boolean isMultiValue, boolean removeListEntry, boolean fulltextIndexed,
+                                              boolean skipRead ) throws Exception {
+
+        long timestamp = getTimestampInMicros( timestampUuid );
+
+        IndexUpdate indexUpdate =
+                new IndexUpdate( batch, entity, entryName, entryValue, schemaHasProperty, isMultiValue, removeListEntry,
+                        timestampUuid );
+
+        // entryName = entryName.toLowerCase();
+
+        // entity_id,connection_type,connected_entity_id,prop_name
+
+        if ( !skipRead ) {
+
+            List<HColumn<ByteBuffer, ByteBuffer>> entries = null;
+
+            if ( isMultiValue && validIndexableValue( entryValue ) ) {
+                entries = cass.getColumns( cass.getApplicationKeyspace( applicationId ), ENTITY_INDEX_ENTRIES,
+                        entity.getUuid(),
+                        new DynamicComposite( entryName, indexValueCode( entryValue ), toIndexableValue( entryValue ) ),
+                        setGreaterThanEqualityFlag( new DynamicComposite( entryName, indexValueCode( entryValue ),
+                                toIndexableValue( entryValue ) ) ), INDEX_ENTRY_LIST_COUNT, false );
+            }
+            else {
+                entries = cass.getColumns( cass.getApplicationKeyspace( applicationId ), ENTITY_INDEX_ENTRIES,
+                        entity.getUuid(), new DynamicComposite( entryName ),
+                        setGreaterThanEqualityFlag( new DynamicComposite( entryName ) ), INDEX_ENTRY_LIST_COUNT,
+                        false );
+            }
+
+            if ( logger.isDebugEnabled() ) {
+                logger.debug( "Found {} previous index entries for {} of entity {}", new Object[] {
+                        entries.size(), entryName, entity.getUuid()
+                } );
+            }
+
+            // Delete all matching entries from entry list
+            for ( HColumn<ByteBuffer, ByteBuffer> entry : entries ) {
+                UUID prev_timestamp = null;
+                Object prev_value = null;
+                String prev_obj_path = null;
+
+                // new format:
+                // composite(entryName,
+                // value_code,prev_value,prev_timestamp,prev_obj_path) = null
+                DynamicComposite composite = DynamicComposite.fromByteBuffer( entry.getName().duplicate() );
+                prev_value = composite.get( 2 );
+                prev_timestamp = ( UUID ) composite.get( 3 );
+                if ( composite.size() > 4 ) {
+                    prev_obj_path = ( String ) composite.get( 4 );
+                }
+
+                if ( prev_value != null ) {
+
+                    String entryPath = entryName;
+                    if ( ( prev_obj_path != null ) && ( prev_obj_path.length() > 0 ) ) {
+                        entryPath = entryName + "." + prev_obj_path;
+                    }
+
+                    indexUpdate.addPrevEntry( entryPath, prev_value, prev_timestamp, entry.getName().duplicate() );
+
+                    // composite(property_value,connected_entity_id,entry_timestamp)
+                    // addDeleteToMutator(batch, ENTITY_INDEX_ENTRIES,
+                    // entity.getUuid(), entry.getName(), timestamp);
+
+                }
+                else {
+                    logger.error( "Unexpected condition - deserialized property value is null" );
+                }
+            }
+        }
+
+        if ( !isMultiValue || ( isMultiValue && !removeListEntry ) ) {
+
+            List<Map.Entry<String, Object>> list = IndexUtils.getKeyValueList( entryName, entryValue, fulltextIndexed );
+
+            if ( entryName.equalsIgnoreCase( "location" ) && ( entryValue instanceof Map ) ) {
+                @SuppressWarnings("rawtypes") double latitude =
+                        MapUtils.getDoubleValue( ( Map ) entryValue, "latitude" );
+                @SuppressWarnings("rawtypes") double longitude =
+                        MapUtils.getDoubleValue( ( Map ) entryValue, "longitude" );
+                list.add( new AbstractMap.SimpleEntry<String, Object>( "location.coordinates",
+                        latitude + "," + longitude ) );
+            }
+
+            for ( Map.Entry<String, Object> indexEntry : list ) {
+
+                if ( validIndexableValue( indexEntry.getValue() ) ) {
+                    indexUpdate.addNewEntry( indexEntry.getKey(), toIndexableValue( indexEntry.getValue() ) );
+                }
+            }
+
+            if ( isMultiValue ) {
+                addInsertToMutator( batch, ENTITY_INDEX_ENTRIES, entity.getUuid(),
+                        asList( entryName, indexValueCode( entryValue ), toIndexableValue( entryValue ),
+                                indexUpdate.getTimestampUuid() ), null, timestamp );
+            }
+            else {
+                // int i = 0;
+
+                for ( Map.Entry<String, Object> indexEntry : list ) {
+
+                    String name = indexEntry.getKey();
+                    if ( name.startsWith( entryName + "." ) ) {
+                        name = name.substring( entryName.length() + 1 );
+                    }
+                    else if ( name.startsWith( entryName ) ) {
+                        name = name.substring( entryName.length() );
+                    }
+
+                    byte code = indexValueCode( indexEntry.getValue() );
+                    Object val = toIndexableValue( indexEntry.getValue() );
+                    addInsertToMutator( batch, ENTITY_INDEX_ENTRIES, entity.getUuid(),
+                            asList( entryName, code, val, indexUpdate.getTimestampUuid(), name ), null, timestamp );
+
+                    indexUpdate.addIndex( indexEntry.getKey() );
+                }
+            }
+
+            indexUpdate.addIndex( entryName );
+        }
+
+        return indexUpdate;
+    }
+
+
+    @Metered(group = "core", name = "RelationManager_batchUpdatePropertyIndexes")
+    public void batchUpdatePropertyIndexes( Mutator<ByteBuffer> batch, String propertyName, Object propertyValue,
+                                            boolean entitySchemaHasProperty, boolean noRead, UUID timestampUuid )
+            throws Exception {
+
+        Entity entity = getHeadEntity();
+
+        UUID associatedId = null;
+        String associatedType = null;
+
+        if ( Schema.isAssociatedEntityType( entity.getType() ) ) {
+            Object item = entity.getProperty( PROPERTY_ITEM );
+            if ( ( item instanceof UUID ) && ( entity.getProperty( PROPERTY_COLLECTION_NAME ) instanceof String ) ) {
+                associatedId = ( UUID ) item;
+                associatedType = string( entity.getProperty( PROPERTY_ITEM_TYPE ) );
+                String entryName = TYPE_MEMBER + "." + propertyName;
+                if ( logger.isDebugEnabled() ) {
+                    logger.debug( "Extended property {} ( {} ).{} indexed as {} ({})." + entryName, new Object[] {
+                            entity.getType(), entity.getUuid(), propertyName, associatedType, associatedId
+                    } );
+                }
+                propertyName = entryName;
+            }
+        }
+
+        IndexUpdate indexUpdate = batchStartIndexUpdate( batch, entity, propertyName, propertyValue, timestampUuid,
+                entitySchemaHasProperty, false, false,
+                getDefaultSchema().isPropertyFulltextIndexed( entity.getType(), propertyName ), noRead );
+
+        // Update collections
+
+        String effectiveType = entity.getType();
+        if ( associatedType != null ) {
+            indexUpdate.setAssociatedId( associatedId );
+            effectiveType = associatedType;
+        }
+
+        Map<String, Set<CollectionInfo>> containers = getDefaultSchema().getContainers( effectiveType );
+        if ( containers != null ) {
+
+            Map<EntityRef, Set<String>> containerEntities = null;
+            if ( noRead ) {
+                containerEntities = new LinkedHashMap<EntityRef, Set<String>>();
+                EntityRef applicationRef = new SimpleEntityRef( TYPE_APPLICATION, applicationId );
+                addMapSet( containerEntities, applicationRef, defaultCollectionName( entity.getType() ) );
+            }
+            else {
+                containerEntities = getContainingCollections();
+            }
+
+            for ( EntityRef containerEntity : containerEntities.keySet() ) {
+                if ( containerEntity.getType().equals( TYPE_APPLICATION ) && Schema
+                        .isAssociatedEntityType( entity.getType() ) ) {
+                    logger.debug( "Extended properties for {} not indexed by application", entity.getType() );
+                    continue;
+                }
+                Set<String> collectionNames = containerEntities.get( containerEntity );
+                Set<CollectionInfo> collections = containers.get( containerEntity.getType() );
+
+                if ( collections != null ) {
+                    for ( CollectionInfo collection : collections ) {
+                        if ( collectionNames.contains( collection.getName() ) ) {
+                            batchUpdateCollectionIndex( indexUpdate, containerEntity, collection.getName() );
+                        }
+                    }
+                }
+            }
+        }
+
+        if ( !noRead ) {
+            batchUpdateBackwardConnectionsPropertyIndexes( indexUpdate );
+        }
+
+        /**
+         * We've updated the properties, add the deletes to the ledger
+         *
+         */
+
+        for ( IndexEntry entry : indexUpdate.getPrevEntries() ) {
+            addDeleteToMutator( batch, ENTITY_INDEX_ENTRIES, entity.getUuid(), entry.getLedgerColumn(),
+                    indexUpdate.getTimestamp() );
+        }
+    }
+
+
+    public void batchUpdateSetIndexes( Mutator<ByteBuffer> batch, String setName, Object elementValue,
+                                       boolean removeFromSet, UUID timestampUuid ) throws Exception {
+
+        Entity entity = getHeadEntity();
+
+        elementValue = getDefaultSchema().validateEntitySetValue( entity.getType(), setName, elementValue );
+
+        IndexUpdate indexUpdate =
+                batchStartIndexUpdate( batch, entity, setName, elementValue, timestampUuid, true, true, removeFromSet,
+                        false );
+
+        // Update collections
+        Map<String, Set<CollectionInfo>> containers =
+                getDefaultSchema().getContainersIndexingDictionary( entity.getType(), setName );
+
+        if ( containers != null ) {
+            Map<EntityRef, Set<String>> containerEntities = getContainingCollections();
+            for ( EntityRef containerEntity : containerEntities.keySet() ) {
+                if ( containerEntity.getType().equals( TYPE_APPLICATION ) && Schema
+                        .isAssociatedEntityType( entity.getType() ) ) {
+                    logger.debug( "Extended properties for {} not indexed by application", entity.getType() );
+                    continue;
+                }
+                Set<String> collectionNames = containerEntities.get( containerEntity );
+                Set<CollectionInfo> collections = containers.get( containerEntity.getType() );
+
+                if ( collections != null ) {
+
+                    for ( CollectionInfo collection : collections ) {
+                        if ( collectionNames.contains( collection.getName() ) ) {
+
+                            batchUpdateCollectionIndex( indexUpdate, containerEntity, collection.getName() );
+                        }
+                    }
+                }
+            }
+        }
+
+        batchUpdateBackwardConnectionsDictionaryIndexes( indexUpdate );
+    }
+
+
+    private IndexScanner searchIndex( Object indexKey, QuerySlice slice, int pageSize ) throws Exception {
+
+        DynamicComposite[] range = slice.getRange();
+
+        Object keyPrefix = key( indexKey, slice.getPropertyName() );
+
+        IndexScanner scanner =
+                new IndexBucketScanner( cass, indexBucketLocator, ENTITY_INDEX, applicationId, IndexType.CONNECTION,
+                        keyPrefix, range[0], range[1], slice.isReversed(), pageSize, slice.getPropertyName() );
+
+        return scanner;
+    }
+
+
+    /**
+     * Search the collection index using all the buckets for the given collection
+     *
+     * @param indexKey The index key to read
+     * @param slice Slice set in the query
+     * @param collectionName The name of the collection to search
+     * @param pageSize The page size to load when iterating
+     */
+    private IndexScanner searchIndexBuckets( Object indexKey, QuerySlice slice, String collectionName, int pageSize )
+            throws Exception {
+
+        DynamicComposite[] range = slice.getRange();
+
+        Object keyPrefix = key( indexKey, slice.getPropertyName() );
+
+        // we have a cursor, so the first record should be discarded
+        if ( slice.hasCursor() ) {
+            pageSize++;
+        }
+
+        IndexScanner scanner =
+                new IndexBucketScanner( cass, indexBucketLocator, ENTITY_INDEX, applicationId, IndexType.COLLECTION,
+                        keyPrefix, range[0], range[1], slice.isReversed(), pageSize, collectionName );
+
+        return scanner;
+    }
+
+
+    @SuppressWarnings("unchecked")
+    @Override
+    @Metered(group = "core", name = "RelationManager_isOwner")
+    public boolean isCollectionMember( String collectionName, EntityRef entity ) throws Exception {
+
+        Keyspace ko = cass.getApplicationKeyspace( applicationId );
+
+        ByteBuffer col = DynamicComposite
+                .toByteBuffer( asList( this.headEntity.getType(), collectionName, headEntity.getUuid() ) );
+
+        HColumn<ByteBuffer, ByteBuffer> result = cass.getColumn( ko, ENTITY_COMPOSITE_DICTIONARIES,
+                key( entity.getUuid(), Schema.DICTIONARY_CONTAINER_ENTITIES ), col, be, be );
+
+        return result != null;
+    }
+
+
+    /** @param connectionName The name of hte connection */
+    public boolean isConnectionMember( String connectionName, EntityRef entity ) throws Exception {
+        Keyspace ko = cass.getApplicationKeyspace( applicationId );
+
+        Object key = key( this.headEntity.getUuid(), DICTIONARY_CONNECTED_ENTITIES, connectionName );
+
+        DynamicComposite start = new DynamicComposite( entity.getUuid() );
+
+        List<HColumn<ByteBuffer, ByteBuffer>> cols =
+                cass.getColumns( ko, ENTITY_COMPOSITE_DICTIONARIES, key, start, null, 1, false );
+
+        if ( cols == null || cols.size() == 0 ) {
+            return false;
+        }
+
+        UUID returnedUUID = ( UUID ) DynamicComposite.fromByteBuffer( cols.get( 0 ).getName() ).get( 0 );
+
+        return entity.getUuid().equals( returnedUUID );
+
+
+        //    addDeleteToMutator(batch, ENTITY_COMPOSITE_DICTIONARIES,
+        //        key(connection.getConnectedEntityId(), DICTIONARY_CONNECTING_ENTITIES,
+        // connection.getConnectionType()),
+        //        asList(connection.getConnectingEntityId(), connection.getConnectingEntityType()), timestamp);
+        //
+        //
+        //    ConnectionRefImpl ref = new ConnectionRefImpl(this.headEntity, connectionName, entity);
+        //
+        //
+        //
+        //
+        //
+        //
+        //    HColumn<String, UUID> col = cass.getColumn(ko, ENTITY_CONNECTIONS, ref.getUuid(),
+        //        ConnectionRefImpl.CONNECTED_ENTITY_ID, se, ue);
+        //
+        //
+        //    getConnectedEntities(this.headEntity, connectionName, )
+        //
+        //    return col != null && entity.getUuid().equals(col.getValue());
+    }
+
+
+    @Override
+    @Metered(group = "core", name = "RelationManager_getOwners")
+    public Map<String, Map<UUID, Set<String>>> getOwners() throws Exception {
+        Map<EntityRef, Set<String>> containerEntities = getContainingCollections();
+        Map<String, Map<UUID, Set<String>>> owners = new LinkedHashMap<String, Map<UUID, Set<String>>>();
+
+        for ( EntityRef owner : containerEntities.keySet() ) {
+            Set<String> collections = containerEntities.get( owner );
+            for ( String collection : collections ) {
+                MapUtils.addMapMapSet( owners, owner.getType(), owner.getUuid(), collection );
+            }
+        }
+
+        return owners;
+    }
+
+
+    @Override
+    @Metered(group = "core", name = "RelationManager_getCollections")
+    public Set<String> getCollections() throws Exception {
+
+        Map<String, CollectionInfo> collections = getDefaultSchema().getCollections( headEntity.getType() );
+        if ( collections == null ) {
+            return null;
+        }
+
+        return collections.keySet();
+    }
+
+
+    @Override
+    @Metered(group = "core", name = "RelationManager_getCollection_start_result")
+    public Results getCollection( String collectionName, UUID startResult, int count, Results.Level resultsLevel,
+                                  boolean reversed ) throws Exception {
+        // changed intentionally to delegate to search so that behavior is
+        // consistent across all index access.
+
+        // TODO T.N fix cursor parsing here so startResult can be used in this
+        // context. Needs a bit of refactor
+        // for accommodating cursor I/O USERGRID-1750. A bit hacky, but until a
+        // furthur refactor this works.
+
+        Query query = new Query().withResultsLevel( resultsLevel ).withReversed( reversed ).withLimit( count )
+                                 .withStartResult( startResult );
+
+        return searchCollection( collectionName, query );
+    }
+
+
+    @Override
+    @Metered(group = "core", name = "RelationManager_getCollecitonForQuery")
+    public Results getCollection( String collectionName, Query query, Results.Level resultsLevel ) throws Exception {
+
+        // changed intentionally to delegate to search so that behavior is
+        // consistent across all index access.
+
+        return searchCollection( collectionName, query );
+    }
+
+
+    @Override
+    @Metered(group = "core", name = "RelationManager_addToCollection")
+    public Entity addToCollection( String collectionName, EntityRef itemRef ) throws Exception {
+
+        Entity itemEntity = em.get( itemRef );
+
+        if ( itemEntity == null ) {
+            return null;
+        }
+
+        CollectionInfo collection = getDefaultSchema().getCollection( headEntity.getType(), collectionName );
+        if ( ( collection != null ) && !collection.getType().equals( itemRef.getType() ) ) {
+            return null;
+        }
+
+        UUID timestampUuid = newTimeUUID();
+        Mutator<ByteBuffer> batch = createMutator( cass.getApplicationKeyspace( applicationId ), be );
+
+        batchAddToCollection( batch, collectionName, itemEntity, timestampUuid );
+
+        if ( collection.getLinkedCollection() != null ) {
+            getRelationManager( itemEntity )
+                    .batchAddToCollection( batch, collection.getLinkedCollection(), getHeadEntity(), timestampUuid );
+        }
+
+        batchExecute( batch, CassandraService.RETRY_COUNT );
+
+        return itemEntity;
+    }
+
+
+    @Override
+    @Metered(group = "core", name = "RelationManager_addToCollections")
+    public Entity addToCollections( List<EntityRef> owners, String collectionName ) throws Exception {
+
+        Entity itemEntity = getHeadEntity();
+
+        Map<String, List<UUID>> collectionsByType = new LinkedHashMap<String, List<UUID>>();
+        for ( EntityRef owner : owners ) {
+            MapUtils.addMapList( collectionsByType, owner.getType(), owner.getUuid() );
+        }
+
+        UUID timestampUuid = newTimeUUID();
+        Mutator<ByteBuffer> batch = createMutator( cass.getApplicationKeyspace( applicationId ), be );
+
+        Schema schema = getDefaultSchema();
+        for ( Entry<String, List<UUID>> entry : collectionsByType.entrySet() ) {
+            CollectionInfo collection = schema.getCollection( entry.getKey(), collectionName );
+            if ( ( collection != null ) && !collection.getType().equals( headEntity.getType() ) ) {
+                continue;
+            }
+            batchAddToCollections( batch, entry.getKey(), entry.getValue(), collectionName, itemEntity, timestampUuid );
+
+            if ( collection.getLinkedCollection() != null ) {
+                logger.error(
+                        "Bulk add to collections used on a linked collection, linked connection will not be updated" );
+            }
+        }
+
+        batchExecute( batch, CassandraService.RETRY_COUNT );
+
+        return null;
+    }
+
+
+    @Override
+    @Metered(group = "core", name = "RelationManager_createItemInCollection")
+    public Entity createItemInCollection( String collectionName, String itemType, Map<String, Object> properties )
+            throws Exception {
+
+        if ( headEntity.getUuid().equals( applicationId ) ) {
+            if ( itemType.equals( TYPE_ENTITY ) ) {
+                itemType = singularize( collectionName );
+            }
+            if ( itemType.equals( TYPE_ROLE ) ) {
+                Long inactivity = ( Long ) properties.get( PROPERTY_INACTIVITY );
+                if ( inactivity == null ) {
+                    inactivity = 0L;
+                }
+                return em.createRole( ( String ) properties.get( PROPERTY_NAME ),
+                        ( String ) properties.get( PROPERTY_TITLE ), inactivity );
+            }
+            return em.create( itemType, properties );
+        }
+        else if ( headEntity.getType().equals( Group.ENTITY_TYPE ) && ( collectionName.equals( COLLECTION_ROLES ) ) ) {
+            UUID groupId = headEntity.getUuid();
+            String roleName = ( String ) properties.get( PROPERTY_NAME );
+            return em.createGroupRole( groupId, roleName, ( Long ) properties.get( PROPERTY_INACTIVITY ) );
+        }
+
+        CollectionInfo collection = getDefaultSchema().getCollection( headEntity.getType(), collectionName );
+        if ( ( collection != null ) && !collection.getType().equals( itemType ) ) {
+            return null;
+        }
+
+        properties = getDefaultSchema().cleanUpdatedProperties( itemType, properties, true );
+
+        Entity itemEntity = em.create( itemType, properties );
+
+        if ( itemEntity != null ) {
+            UUID timestampUuid = newTimeUUID();
+            Mutator<ByteBuffer> batch = createMutator( cass.getApplicationKeyspace( applicationId ), be );
+
+            batchAddToCollection( batch, collectionName, itemEntity, timestampUuid );
+
+            if ( collection.getLinkedCollection() != null ) {
+                getRelationManager( itemEntity )
+                        .batchAddToCollection( batch, collection.getLinkedCollection(), getHeadEntity(),
+                                timestampUuid );
+            }
+
+            batchExecute( batch, CassandraService.RETRY_COUNT );
+        }
+
+        return itemEntity;
+    }
+
+
+    @Override
+    @Metered(group = "core", name = "RelationManager_removeFromCollection")
+    public void removeFromCollection( String collectionName, EntityRef itemRef ) throws Exception {
+
+        if ( headEntity.getUuid().equals( applicationId ) ) {
+            if ( collectionName.equals( COLLECTION_ROLES ) ) {
+                Entity itemEntity = em.get( itemRef );
+                if ( itemEntity != null ) {
+                    RoleRef roleRef = SimpleRoleRef.forRoleEntity( itemEntity );
+                    em.deleteRole( roleRef.getApplicationRoleName() );
+                    return;
+                }
+                em.delete( itemEntity );
+                return;
+            }
+            em.delete( itemRef );
+            return;
+        }
+
+        Entity itemEntity = em.get( itemRef );
+
+        if ( itemEntity == null ) {
+            return;
+        }
+
+        UUID timestampUuid = newTimeUUID();
+        Mutator<ByteBuffer> batch = createMutator( cass.getApplicationKeyspace( applicationId ), be );
+
+        batchRemoveFromCollection( batch, collectionName, itemEntity, timestampUuid );
+
+        CollectionInfo collection = getDefaultSchema().getCollection( headEntity.getType(), collectionName );
+        if ( ( collection != null ) && ( collection.getLinkedCollection() != null ) ) {
+            getRelationManager( itemEntity )
+                    .batchRemoveFromCollection( batch, collection.getLinkedCollection(), getHeadEntity(),
+                            timestampUuid );
+        }
+
+        batchExecute( batch, CassandraService.RETRY_COUNT );
+
+        if ( headEntity.getType().equals( Group.ENTITY_TYPE ) ) {
+            if ( collectionName.equals( COLLECTION_ROLES ) ) {
+                String path = ( String ) ( ( Entity ) itemRef ).getMetadata( "path" );
+                if ( path.startsWith( "/roles/" ) ) {
+                    RoleRef roleRef = SimpleRoleRef.forRoleEntity( itemEntity );
+                    em.deleteRole( roleRef.getApplicationRoleName() );
+                }
+            }
+        }
+    }
+
+
+    @Metered(group = "core", name = "RelationManager_batchRemoveFromContainers")
+    public void batchRemoveFromContainers( Mutator<ByteBuffer> m, UUID timestampUuid ) throws Exception {
+        Entity entity = getHeadEntity();
+        // find all the containing collections
+        Map<EntityRef, Set<String>> containers = getContainingCollections();
+        if ( containers != null ) {
+            for ( Entry<EntityRef, Set<String>> container : containers.entrySet() ) {
+                for ( String collectionName : container.getValue() ) {
+                    getRelationManager( container.getKey() )
+                            .batchRemoveFromCollection( m, collectionName, entity, true, timestampUuid );
+                }
+            }
+        }
+    }
+
+
+    @Override
+    @Metered(group = "core", name = "RelationManager_copyRelationships")
+    public void copyRelationships( String srcRelationName, EntityRef dstEntityRef, String dstRelationName )
+            throws Exception {
+
+        headEntity = em.validate( headEntity );
+        dstEntityRef = em.validate( dstEntityRef );
+
+        CollectionInfo srcCollection = getDefaultSchema().getCollection( headEntity.getType(), srcRelationName );
+
+        CollectionInfo dstCollection = getDefaultSchema().getCollection( dstEntityRef.getType(), dstRelationName );
+
+        Results results = null;
+        do {
+            if ( srcCollection != null ) {
+                results = em.getCollection( headEntity, srcRelationName, null, 5000, Level.REFS, false );
+            }
+            else {
+                results = em.getConnectedEntities( headEntity.getUuid(), srcRelationName, null, Level.REFS );
+            }
+
+            if ( ( results != null ) && ( results.size() > 0 ) ) {
+                List<EntityRef> refs = results.getRefs();
+                for ( EntityRef ref : refs ) {
+                    if ( dstCollection != null ) {
+                        em.addToCollection( dstEntityRef, dstRelationName, ref );
+                    }
+                    else {
+                        em.createConnection( dstEntityRef, dstRelationName, ref );
+                    }
+                }
+            }
+        }
+        while ( ( results != null ) && ( results.hasMoreResults() ) );
+    }
+
+
+    @Override
+    @Metered(group = "core", name = "RelationManager_searchCollection")
+    public Results searchCollection( String collectionName, Query query ) throws Exception {
+
+        if ( query == null ) {
+            query = new Query();
+        }
+
+        headEntity = em.validate( headEntity );
+
+        CollectionInfo collection = getDefaultSchema().getCollection( headEntity.getType(), collectionName );
+
+        query.setEntityType( collection.getType() );
+
+        final CollectionResultsLoaderFactory factory = new CollectionResultsLoaderFactory();
+
+        // we have something to search with, visit our tree and evaluate the
+        // results
+        QueryProcessor qp = new QueryProcessor( query, collection, em, factory );
+        SearchCollectionVisitor visitor = new SearchCollectionVisitor( qp );
+
+        return qp.getResults( visitor );
+    }
+
+
+    @Override
+    @Metered(group = "core", name = "RelationManager_createConnection_connection_ref")
+    public ConnectionRef createConnection( ConnectionRef connection ) throws Exception {
+        ConnectionRefImpl connectionImpl = new ConnectionRefImpl( connection );
+
+        updateEntityConnection( false, connectionImpl );
+
+        return connection;
+    }
+
+
+    @Override
+    @Metered(group = "core", name = "RelationManager_createConnection_connectionType")
+    public ConnectionRef createConnection( String connectionType, EntityRef connectedEntityRef ) throws Exception {
+
+        headEntity = em.validate( headEntity );
+        connectedEntityRef = em.validate( connectedEntityRef );
+
+        ConnectionRefImpl connection = new ConnectionRefImpl( headEntity, connectionType, connectedEntityRef );
+
+        updateEntityConnection( false, connection );
+
+        return connection;
+    }
+
+
+    @Override
+    @Metered(group = "core", name = "RelationManager_createConnection_paired_connection_type")
+    public ConnectionRef createConnection( String pairedConnectionType, EntityRef pairedEntity, String connectionType,
+                                           EntityRef connectedEntityRef ) throws Exception {
+
+        ConnectionRefImpl connection =
+                new ConnectionRefImpl( headEntity, new ConnectedEntityRefImpl( pairedConnectionType, pairedEntity ),
+                        new ConnectedEntityRefImpl( connectionType, connectedEntityRef ) );
+
+        updateEntityConnection( false, connection );
+
+        return connection;
+    }
+
+
+    @Override
+    @Metered(group = "core", name = "RelationManager_createConnection_connected_entity_ref")
+    public ConnectionRef createConnection( ConnectedEntityRef... connections ) throws Exception {
+
+        ConnectionRefImpl connection = new ConnectionRefImpl( headEntity, connections );
+
+        updateEntityConnection( false, connection );
+
+        return connection;
+    }
+
+
+    @Override
+    @Metered(group = "core", name = "RelationManager_connectionRef_type_entity")
+    public ConnectionRef connectionRef( String connectionType, EntityRef connectedEntityRef ) throws Exception {
+
+        ConnectionRef connection = new ConnectionRefImpl( headEntity, connectionType, connectedEntityRef );
+
+        return connection;
+    }
+
+
+    @Override
+    @Metered(group = "core", name = "RelationManager_connectionRef_entity_to_entity")
+    public ConnectionRef connectionRef( String pairedConnectionType, EntityRef pairedEntity, String connectionType,
+                                        EntityRef connectedEntityRef ) throws Exception {
+
+        ConnectionRef connection =
+                new ConnectionRefImpl( headEntity, new ConnectedEntityRefImpl( pairedConnectionType, pairedEntity ),
+                        new ConnectedEntityRefImpl( connectionType, connectedEntityRef ) );
+
+        return connection;
+    }
+
+
+    @Override
+    @Metered(group = "core", name = "RelationManager_connectionRef_connections")
+    public ConnectionRef connectionRef( ConnectedEntityRef... connections ) {
+
+        ConnectionRef connection = new ConnectionRefImpl( headEntity, connections );
+
+        return connection;
+    }
+
+
+    @Override
+    @Metered(group = "core", name = "RelationManager_deleteConnection")
+    public void deleteConnection( ConnectionRef connectionRef ) throws Exception {
+        updateEntityConnection( true, new ConnectionRefImpl( connectionRef ) );
+    }
+
+
+    @Override
+    @Metered(group = "core", name = "RelationManager_getConnectionTypes_entity_id")
+    public Set<String> getConnectionTypes( UUID connectedEntityId ) throws Exception {
+        // Add connection type to connections set
+        //    addInsertToMutator(batch, ENTITY_DICTIONARIES,
+        //        key(connection.getConnectingEntityId(), DICTIONARY_CONNECTED_TYPES),
+        // connection.getConnectionType(), null,
+        //        timestamp);
+        //
+        //    // Add connection type to connections set
+        //    addInsertToMutator(batch, ENTITY_DICTIONARIES,
+        //        key(connection.getConnectedEntityId(), DICTIONARY_CONNECTING_TYPES),
+        // connection.getConnectionType(), null,
+        //        timestamp);
+        //
+        //
+        //    Object key = key(connectedEntityId, DICTIONARY_CONNECTED_TYPES);
+
+        Set<String> connections = cast( em.getDictionaryAsSet( new SimpleEntityRef( connectedEntityId ),
+                Schema.DICTIONARY_CONNECTED_TYPES ) );
+
+        return connections;
+
+        //    Set<String> connection_types = new TreeSet<String>(CASE_INSENSITIVE_ORDER);
+        //
+        //    //TODO T.N. get this from the dictionary
+        //    List<ConnectionRefImpl> connections = getConnections(new ConnectionRefImpl(headEntity,
+        // new ConnectedEntityRefImpl(
+        //        NULL_ID), new ConnectedEntityRefImpl(connectedEntityId)), false);
+        //
+        //    for (ConnectionRefImpl connection : connections) {
+        //      if ((connection.getConnectionType() != null) && (connection.getFirstPairedConnectedEntityId() ==
+        // null)) {
+        //        connection_types.add(connection.getConnectionType());
+        //      }
+        //    }
+        //
+        //    return connection_types;
+    }
+
+
+    // <<<<<<< HEAD
+    @Override
+    public Set<String> getConnectionTypes() throws Exception {
+        return getConnectionTypes( false );
+    }
+
+
+    @Override
+    @Metered(group = "core", name = "RelationManager_getConnectionTypes")
+    public Set<String> getConnectionTypes( boolean filterConnection ) throws Exception {
+        S

<TRUNCATED>

[74/96] [abbrv] git commit: USERGRID-2 package namespace to org.apache.usergrid

Posted by sn...@apache.org.
USERGRID-2 package namespace to org.apache.usergrid


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

Branch: refs/pull/39/merge
Commit: 3ccbfd8a68dceebd8d19af40586c38a4d74ed2c3
Parents: b8c01f3
Author: Lewis John McGibbney <le...@apache.org>
Authored: Tue Jan 28 21:38:56 2014 +0000
Committer: Lewis John McGibbney <le...@apache.org>
Committed: Tue Jan 28 21:38:56 2014 +0000

----------------------------------------------------------------------
 sdks/android/README.txt                         |    4 +-
 sdks/android/doc/allclasses-frame.html          |   56 +-
 sdks/android/doc/allclasses-noframe.html        |   56 +-
 sdks/android/doc/constant-values.html           |  180 +--
 sdks/android/doc/index-files/index-1.html       |   72 +-
 sdks/android/doc/index-files/index-10.html      |    6 +-
 sdks/android/doc/index-files/index-11.html      |   14 +-
 sdks/android/doc/index-files/index-12.html      |    8 +-
 sdks/android/doc/index-files/index-13.html      |   60 +-
 sdks/android/doc/index-files/index-14.html      |   96 +-
 sdks/android/doc/index-files/index-15.html      |   62 +-
 sdks/android/doc/index-files/index-16.html      |    8 +-
 sdks/android/doc/index-files/index-17.html      |  238 ++--
 sdks/android/doc/index-files/index-18.html      |   30 +-
 sdks/android/doc/index-files/index-19.html      |   16 +-
 sdks/android/doc/index-files/index-2.html       |   54 +-
 sdks/android/doc/index-files/index-20.html      |   64 +-
 sdks/android/doc/index-files/index-21.html      |    8 +-
 sdks/android/doc/index-files/index-3.html       |   20 +-
 sdks/android/doc/index-files/index-4.html       |   18 +-
 sdks/android/doc/index-files/index-5.html       |    6 +-
 sdks/android/doc/index-files/index-6.html       |  280 ++--
 sdks/android/doc/index-files/index-7.html       |    2 +-
 sdks/android/doc/index-files/index-8.html       |   12 +-
 sdks/android/doc/index-files/index-9.html       |    4 +-
 .../usergrid/android/client/Client.Query.html   |   20 +-
 .../android/client/Client.QueuePosition.html    |   38 +-
 .../doc/org/usergrid/android/client/Client.html |  440 +++---
 .../client/callbacks/ApiResponseCallback.html   |   20 +-
 .../client/callbacks/ClientAsyncTask.html       |   18 +-
 .../client/callbacks/ClientCallback.html        |   12 +-
 .../callbacks/DeviceRegistrationCallback.html   |   22 +-
 .../callbacks/GroupsRetrievedCallback.html      |   20 +-
 .../client/callbacks/QueryResultsCallback.html  |   18 +-
 .../class-use/ApiResponseCallback.html          |   84 +-
 .../callbacks/class-use/ClientAsyncTask.html    |   12 +-
 .../callbacks/class-use/ClientCallback.html     |   32 +-
 .../class-use/DeviceRegistrationCallback.html   |   24 +-
 .../class-use/GroupsRetrievedCallback.html      |   24 +-
 .../class-use/QueryResultsCallback.html         |   52 +-
 .../android/client/callbacks/package-frame.html |   16 +-
 .../client/callbacks/package-summary.html       |   18 +-
 .../android/client/callbacks/package-tree.html  |   12 +-
 .../android/client/callbacks/package-use.html   |   30 +-
 .../android/client/class-use/Client.Query.html  |   52 +-
 .../client/class-use/Client.QueuePosition.html  |   34 +-
 .../android/client/class-use/Client.html        |   28 +-
 .../entities/Activity.ActivityCollection.html   |   24 +-
 .../entities/Activity.ActivityObject.html       |   44 +-
 .../client/entities/Activity.MediaLink.html     |   14 +-
 .../android/client/entities/Activity.html       |  206 +--
 .../android/client/entities/Device.html         |   36 +-
 .../android/client/entities/Entity.html         |   40 +-
 .../usergrid/android/client/entities/Group.html |   38 +-
 .../android/client/entities/Message.html        |   50 +-
 .../usergrid/android/client/entities/User.html  |   48 +-
 .../class-use/Activity.ActivityCollection.html  |   12 +-
 .../class-use/Activity.ActivityObject.html      |   46 +-
 .../entities/class-use/Activity.MediaLink.html  |   30 +-
 .../client/entities/class-use/Activity.html     |   48 +-
 .../client/entities/class-use/Device.html       |   32 +-
 .../client/entities/class-use/Entity.html       |  156 +--
 .../client/entities/class-use/Group.html        |   32 +-
 .../client/entities/class-use/Message.html      |   30 +-
 .../android/client/entities/class-use/User.html |   88 +-
 .../android/client/entities/package-frame.html  |   22 +-
 .../client/entities/package-summary.html        |   24 +-
 .../android/client/entities/package-tree.html   |   10 +-
 .../android/client/entities/package-use.html    |   62 +-
 .../usergrid/android/client/package-frame.html  |   10 +-
 .../android/client/package-summary.html         |   12 +-
 .../usergrid/android/client/package-tree.html   |   12 +-
 .../usergrid/android/client/package-use.html    |   28 +-
 .../client/response/AggregateCounter.html       |    8 +-
 .../client/response/AggregateCounterSet.html    |   28 +-
 .../android/client/response/ApiResponse.html    |  100 +-
 .../client/response/ClientCredentialsInfo.html  |   12 +-
 .../android/client/response/QueueInfo.html      |    8 +-
 .../response/class-use/AggregateCounter.html    |   32 +-
 .../response/class-use/AggregateCounterSet.html |   26 +-
 .../client/response/class-use/ApiResponse.html  |  102 +-
 .../class-use/ClientCredentialsInfo.html        |   26 +-
 .../client/response/class-use/QueueInfo.html    |   32 +-
 .../android/client/response/package-frame.html  |   14 +-
 .../client/response/package-summary.html        |   16 +-
 .../android/client/response/package-tree.html   |    8 +-
 .../android/client/response/package-use.html    |   38 +-
 .../android/client/utils/DeviceUuidFactory.html |    8 +-
 .../android/client/utils/JsonUtils.html         |   12 +-
 .../usergrid/android/client/utils/MapUtils.html |   12 +-
 .../android/client/utils/ObjectUtils.html       |   12 +-
 .../usergrid/android/client/utils/UrlUtils.html |    8 +-
 .../utils/class-use/DeviceUuidFactory.html      |   12 +-
 .../client/utils/class-use/JsonUtils.html       |   12 +-
 .../client/utils/class-use/MapUtils.html        |   12 +-
 .../client/utils/class-use/ObjectUtils.html     |   12 +-
 .../client/utils/class-use/UrlUtils.html        |   12 +-
 .../android/client/utils/package-frame.html     |   14 +-
 .../android/client/utils/package-summary.html   |   16 +-
 .../android/client/utils/package-tree.html      |    8 +-
 .../android/client/utils/package-use.html       |    8 +-
 sdks/android/doc/overview-frame.html            |   10 +-
 sdks/android/doc/overview-summary.html          |   10 +-
 sdks/android/doc/overview-tree.html             |   18 +-
 sdks/android/doc/package-list                   |   10 +-
 sdks/android/pom.xml                            |   11 +-
 .../apache/usergrid/android/client/Client.java  |  591 ++++++++
 .../client/callbacks/ApiResponseCallback.java   |   10 +
 .../client/callbacks/ClientAsyncTask.java       |   38 +
 .../client/callbacks/ClientCallback.java        |    9 +
 .../callbacks/DeviceRegistrationCallback.java   |    9 +
 .../callbacks/GroupsRetrievedCallback.java      |   13 +
 .../client/callbacks/QueryResultsCallback.java  |    9 +
 .../android/client/utils/DeviceUuidFactory.java |  154 +++
 .../android/client/utils/ObjectUtils.java       |   20 +
 .../org/usergrid/android/client/Client.java     |  590 --------
 .../client/callbacks/ApiResponseCallback.java   |   10 -
 .../client/callbacks/ClientAsyncTask.java       |   38 -
 .../client/callbacks/ClientCallback.java        |    9 -
 .../callbacks/DeviceRegistrationCallback.java   |    9 -
 .../callbacks/GroupsRetrievedCallback.java      |   13 -
 .../client/callbacks/QueryResultsCallback.java  |    9 -
 .../android/client/utils/DeviceUuidFactory.java |  154 ---
 .../android/client/utils/ObjectUtils.java       |   20 -
 sdks/java/README.txt                            |    5 +-
 sdks/java/pom.xml                               |    9 +-
 .../org/apache/usergrid/java/client/Client.java | 1277 ++++++++++++++++++
 .../usergrid/java/client/entities/Activity.java |  627 +++++++++
 .../usergrid/java/client/entities/Device.java   |   52 +
 .../usergrid/java/client/entities/Entity.java   |  172 +++
 .../usergrid/java/client/entities/Group.java    |   63 +
 .../usergrid/java/client/entities/Message.java  |  132 ++
 .../usergrid/java/client/entities/User.java     |  142 ++
 .../java/client/exception/ClientException.java  |   40 +
 .../java/client/response/AggregateCounter.java  |   36 +
 .../client/response/AggregateCounterSet.java    |   95 ++
 .../java/client/response/ApiResponse.java       |  406 ++++++
 .../client/response/ClientCredentialsInfo.java  |   42 +
 .../java/client/response/QueueInfo.java         |   28 +
 .../usergrid/java/client/utils/JsonUtils.java   |  167 +++
 .../usergrid/java/client/utils/MapUtils.java    |   23 +
 .../usergrid/java/client/utils/ObjectUtils.java |   20 +
 .../usergrid/java/client/utils/UrlUtils.java    |  108 ++
 .../java/org/usergrid/java/client/Client.java   | 1276 -----------------
 .../usergrid/java/client/entities/Activity.java |  627 ---------
 .../usergrid/java/client/entities/Device.java   |   52 -
 .../usergrid/java/client/entities/Entity.java   |  175 ---
 .../usergrid/java/client/entities/Group.java    |   63 -
 .../usergrid/java/client/entities/Message.java  |  132 --
 .../org/usergrid/java/client/entities/User.java |  142 --
 .../java/client/exception/ClientException.java  |   40 -
 .../java/client/response/AggregateCounter.java  |   36 -
 .../client/response/AggregateCounterSet.java    |   95 --
 .../java/client/response/ApiResponse.java       |  405 ------
 .../client/response/ClientCredentialsInfo.java  |   42 -
 .../java/client/response/QueueInfo.java         |   28 -
 .../usergrid/java/client/utils/JsonUtils.java   |  166 ---
 .../usergrid/java/client/utils/MapUtils.java    |   23 -
 .../usergrid/java/client/utils/ObjectUtils.java |   20 -
 .../usergrid/java/client/utils/UrlUtils.java    |  108 --
 160 files changed, 6395 insertions(+), 6405 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/README.txt
----------------------------------------------------------------------
diff --git a/sdks/android/README.txt b/sdks/android/README.txt
index 5540ba4..056bb49 100644
--- a/sdks/android/README.txt
+++ b/sdks/android/README.txt
@@ -1,7 +1,7 @@
 
-Usergrid Android Client
+Apache Usergrid Android Client
 
-Experimental Android client for Usergrid. Basically uses Spring Android and
+Experimental Android client for Apache Usergrid. Basically uses Spring Android and
 Jackson to wrap calls to Usergrid REST API. Loosely based on the Usergrid
 Javascript client.
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/allclasses-frame.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/allclasses-frame.html b/sdks/android/doc/allclasses-frame.html
index 904fee4..5568794 100644
--- a/sdks/android/doc/allclasses-frame.html
+++ b/sdks/android/doc/allclasses-frame.html
@@ -21,61 +21,61 @@ All Classes
 
 <TABLE BORDER="0" WIDTH="100%" SUMMARY="">
 <TR>
-<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities" target="classFrame">Activity</A>
+<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities" target="classFrame">Activity</A>
 <BR>
-<A HREF="org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.usergrid.android.client.entities" target="classFrame">Activity.ActivityCollection</A>
+<A HREF="org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.apache.usergrid.android.client.entities" target="classFrame">Activity.ActivityCollection</A>
 <BR>
-<A HREF="org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities" target="classFrame">Activity.ActivityObject</A>
+<A HREF="org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities" target="classFrame">Activity.ActivityObject</A>
 <BR>
-<A HREF="org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities" target="classFrame">Activity.MediaLink</A>
+<A HREF="org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities" target="classFrame">Activity.MediaLink</A>
 <BR>
-<A HREF="org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response" target="classFrame">AggregateCounter</A>
+<A HREF="org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response" target="classFrame">AggregateCounter</A>
 <BR>
-<A HREF="org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response" target="classFrame">AggregateCounterSet</A>
+<A HREF="org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response" target="classFrame">AggregateCounterSet</A>
 <BR>
-<A HREF="org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response" target="classFrame">ApiResponse</A>
+<A HREF="org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response" target="classFrame">ApiResponse</A>
 <BR>
-<A HREF="org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks" target="classFrame"><I>ApiResponseCallback</I></A>
+<A HREF="org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks" target="classFrame"><I>ApiResponseCallback</I></A>
 <BR>
-<A HREF="org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client" target="classFrame">Client</A>
+<A HREF="org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client" target="classFrame">Client</A>
 <BR>
-<A HREF="org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client" target="classFrame"><I>Client.Query</I></A>
+<A HREF="org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client" target="classFrame"><I>Client.Query</I></A>
 <BR>
-<A HREF="org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client" target="classFrame">Client.QueuePosition</A>
+<A HREF="org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client" target="classFrame">Client.QueuePosition</A>
 <BR>
-<A HREF="org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.usergrid.android.client.callbacks" target="classFrame">ClientAsyncTask</A>
+<A HREF="org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.apache.usergrid.android.client.callbacks" target="classFrame">ClientAsyncTask</A>
 <BR>
-<A HREF="org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks" target="classFrame"><I>ClientCallback</I></A>
+<A HREF="org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks" target="classFrame"><I>ClientCallback</I></A>
 <BR>
-<A HREF="org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response" target="classFrame">ClientCredentialsInfo</A>
+<A HREF="org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response" target="classFrame">ClientCredentialsInfo</A>
 <BR>
-<A HREF="org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities" target="classFrame">Device</A>
+<A HREF="org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities" target="classFrame">Device</A>
 <BR>
-<A HREF="org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.usergrid.android.client.callbacks" target="classFrame"><I>DeviceRegistrationCallback</I></A>
+<A HREF="org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.apache.usergrid.android.client.callbacks" target="classFrame"><I>DeviceRegistrationCallback</I></A>
 <BR>
-<A HREF="org/usergrid/android/client/utils/DeviceUuidFactory.html" title="class in org.usergrid.android.client.utils" target="classFrame">DeviceUuidFactory</A>
+<A HREF="org/usergrid/android/client/utils/DeviceUuidFactory.html" title="class in org.apache.usergrid.android.client.utils" target="classFrame">DeviceUuidFactory</A>
 <BR>
-<A HREF="org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities" target="classFrame">Entity</A>
+<A HREF="org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities" target="classFrame">Entity</A>
 <BR>
-<A HREF="org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities" target="classFrame">Group</A>
+<A HREF="org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities" target="classFrame">Group</A>
 <BR>
-<A HREF="org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.usergrid.android.client.callbacks" target="classFrame"><I>GroupsRetrievedCallback</I></A>
+<A HREF="org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.apache.usergrid.android.client.callbacks" target="classFrame"><I>GroupsRetrievedCallback</I></A>
 <BR>
-<A HREF="org/usergrid/android/client/utils/JsonUtils.html" title="class in org.usergrid.android.client.utils" target="classFrame">JsonUtils</A>
+<A HREF="org/usergrid/android/client/utils/JsonUtils.html" title="class in org.apache.usergrid.android.client.utils" target="classFrame">JsonUtils</A>
 <BR>
-<A HREF="org/usergrid/android/client/utils/MapUtils.html" title="class in org.usergrid.android.client.utils" target="classFrame">MapUtils</A>
+<A HREF="org/usergrid/android/client/utils/MapUtils.html" title="class in org.apache.usergrid.android.client.utils" target="classFrame">MapUtils</A>
 <BR>
-<A HREF="org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities" target="classFrame">Message</A>
+<A HREF="org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities" target="classFrame">Message</A>
 <BR>
-<A HREF="org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.usergrid.android.client.utils" target="classFrame">ObjectUtils</A>
+<A HREF="org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.apache.usergrid.android.client.utils" target="classFrame">ObjectUtils</A>
 <BR>
-<A HREF="org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks" target="classFrame"><I>QueryResultsCallback</I></A>
+<A HREF="org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks" target="classFrame"><I>QueryResultsCallback</I></A>
 <BR>
-<A HREF="org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response" target="classFrame">QueueInfo</A>
+<A HREF="org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response" target="classFrame">QueueInfo</A>
 <BR>
-<A HREF="org/usergrid/android/client/utils/UrlUtils.html" title="class in org.usergrid.android.client.utils" target="classFrame">UrlUtils</A>
+<A HREF="org/usergrid/android/client/utils/UrlUtils.html" title="class in org.apache.usergrid.android.client.utils" target="classFrame">UrlUtils</A>
 <BR>
-<A HREF="org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities" target="classFrame">User</A>
+<A HREF="org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities" target="classFrame">User</A>
 <BR>
 </FONT></TD>
 </TR>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/allclasses-noframe.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/allclasses-noframe.html b/sdks/android/doc/allclasses-noframe.html
index c174488..0d74cf7 100644
--- a/sdks/android/doc/allclasses-noframe.html
+++ b/sdks/android/doc/allclasses-noframe.html
@@ -21,61 +21,61 @@ All Classes
 
 <TABLE BORDER="0" WIDTH="100%" SUMMARY="">
 <TR>
-<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <BR>
-<A HREF="org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.usergrid.android.client.entities">Activity.ActivityCollection</A>
+<A HREF="org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityCollection</A>
 <BR>
-<A HREF="org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+<A HREF="org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <BR>
-<A HREF="org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A>
+<A HREF="org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A>
 <BR>
-<A HREF="org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response">AggregateCounter</A>
+<A HREF="org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response">AggregateCounter</A>
 <BR>
-<A HREF="org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response">AggregateCounterSet</A>
+<A HREF="org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response">AggregateCounterSet</A>
 <BR>
-<A HREF="org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+<A HREF="org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <BR>
-<A HREF="org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks"><I>ApiResponseCallback</I></A>
+<A HREF="org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><I>ApiResponseCallback</I></A>
 <BR>
-<A HREF="org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<A HREF="org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <BR>
-<A HREF="org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client"><I>Client.Query</I></A>
+<A HREF="org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client"><I>Client.Query</I></A>
 <BR>
-<A HREF="org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A>
+<A HREF="org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A>
 <BR>
-<A HREF="org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.usergrid.android.client.callbacks">ClientAsyncTask</A>
+<A HREF="org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.apache.usergrid.android.client.callbacks">ClientAsyncTask</A>
 <BR>
-<A HREF="org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks"><I>ClientCallback</I></A>
+<A HREF="org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><I>ClientCallback</I></A>
 <BR>
-<A HREF="org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response">ClientCredentialsInfo</A>
+<A HREF="org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response">ClientCredentialsInfo</A>
 <BR>
-<A HREF="org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities">Device</A>
+<A HREF="org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities">Device</A>
 <BR>
-<A HREF="org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.usergrid.android.client.callbacks"><I>DeviceRegistrationCallback</I></A>
+<A HREF="org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><I>DeviceRegistrationCallback</I></A>
 <BR>
-<A HREF="org/usergrid/android/client/utils/DeviceUuidFactory.html" title="class in org.usergrid.android.client.utils">DeviceUuidFactory</A>
+<A HREF="org/usergrid/android/client/utils/DeviceUuidFactory.html" title="class in org.apache.usergrid.android.client.utils">DeviceUuidFactory</A>
 <BR>
-<A HREF="org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>
+<A HREF="org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>
 <BR>
-<A HREF="org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A>
+<A HREF="org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A>
 <BR>
-<A HREF="org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.usergrid.android.client.callbacks"><I>GroupsRetrievedCallback</I></A>
+<A HREF="org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><I>GroupsRetrievedCallback</I></A>
 <BR>
-<A HREF="org/usergrid/android/client/utils/JsonUtils.html" title="class in org.usergrid.android.client.utils">JsonUtils</A>
+<A HREF="org/usergrid/android/client/utils/JsonUtils.html" title="class in org.apache.usergrid.android.client.utils">JsonUtils</A>
 <BR>
-<A HREF="org/usergrid/android/client/utils/MapUtils.html" title="class in org.usergrid.android.client.utils">MapUtils</A>
+<A HREF="org/usergrid/android/client/utils/MapUtils.html" title="class in org.apache.usergrid.android.client.utils">MapUtils</A>
 <BR>
-<A HREF="org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+<A HREF="org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <BR>
-<A HREF="org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.usergrid.android.client.utils">ObjectUtils</A>
+<A HREF="org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.apache.usergrid.android.client.utils">ObjectUtils</A>
 <BR>
-<A HREF="org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks"><I>QueryResultsCallback</I></A>
+<A HREF="org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><I>QueryResultsCallback</I></A>
 <BR>
-<A HREF="org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response">QueueInfo</A>
+<A HREF="org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response">QueueInfo</A>
 <BR>
-<A HREF="org/usergrid/android/client/utils/UrlUtils.html" title="class in org.usergrid.android.client.utils">UrlUtils</A>
+<A HREF="org/usergrid/android/client/utils/UrlUtils.html" title="class in org.apache.usergrid.android.client.utils">UrlUtils</A>
 <BR>
-<A HREF="org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+<A HREF="org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <BR>
 </FONT></TD>
 </TR>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/constant-values.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/constant-values.html b/sdks/android/doc/constant-values.html
index 19caa3a..04435d0 100644
--- a/sdks/android/doc/constant-values.html
+++ b/sdks/android/doc/constant-values.html
@@ -100,352 +100,352 @@ org.usergrid.*</FONT></TH>
 
 <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="3">org.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A></TH>
+<TH ALIGN="left" COLSPAN="3">org.apache.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.ENTITY_TYPE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.ENTITY_TYPE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#ENTITY_TYPE">ENTITY_TYPE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"activity"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.OBJECT_TYPE_ARTICLE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_ARTICLE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_ARTICLE">OBJECT_TYPE_ARTICLE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"article"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.OBJECT_TYPE_AUDIO"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_AUDIO"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_AUDIO">OBJECT_TYPE_AUDIO</A></CODE></TD>
 <TD ALIGN="right"><CODE>"audio"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.OBJECT_TYPE_BADGE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_BADGE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_BADGE">OBJECT_TYPE_BADGE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"badge"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.OBJECT_TYPE_BOOKMARK"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_BOOKMARK"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_BOOKMARK">OBJECT_TYPE_BOOKMARK</A></CODE></TD>
 <TD ALIGN="right"><CODE>"bookmark"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.OBJECT_TYPE_COLLECTION"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_COLLECTION"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_COLLECTION">OBJECT_TYPE_COLLECTION</A></CODE></TD>
 <TD ALIGN="right"><CODE>"collection"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.OBJECT_TYPE_COMMENT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_COMMENT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_COMMENT">OBJECT_TYPE_COMMENT</A></CODE></TD>
 <TD ALIGN="right"><CODE>"comment"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.OBJECT_TYPE_EVENT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_EVENT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_EVENT">OBJECT_TYPE_EVENT</A></CODE></TD>
 <TD ALIGN="right"><CODE>"event"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.OBJECT_TYPE_FILE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_FILE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_FILE">OBJECT_TYPE_FILE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"file"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.OBJECT_TYPE_GROUP"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_GROUP"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_GROUP">OBJECT_TYPE_GROUP</A></CODE></TD>
 <TD ALIGN="right"><CODE>"group"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.OBJECT_TYPE_IMAGE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_IMAGE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_IMAGE">OBJECT_TYPE_IMAGE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"image"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.OBJECT_TYPE_NOTE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_NOTE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_NOTE">OBJECT_TYPE_NOTE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"note"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.OBJECT_TYPE_PERSON"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_PERSON"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_PERSON">OBJECT_TYPE_PERSON</A></CODE></TD>
 <TD ALIGN="right"><CODE>"person"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.OBJECT_TYPE_PLACE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_PLACE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_PLACE">OBJECT_TYPE_PLACE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"place"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.OBJECT_TYPE_PRODUCT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_PRODUCT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_PRODUCT">OBJECT_TYPE_PRODUCT</A></CODE></TD>
 <TD ALIGN="right"><CODE>"product"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.OBJECT_TYPE_QUESTION"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_QUESTION"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_QUESTION">OBJECT_TYPE_QUESTION</A></CODE></TD>
 <TD ALIGN="right"><CODE>"question"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.OBJECT_TYPE_REVIEW"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_REVIEW"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_REVIEW">OBJECT_TYPE_REVIEW</A></CODE></TD>
 <TD ALIGN="right"><CODE>"review"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.OBJECT_TYPE_SERVICE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_SERVICE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_SERVICE">OBJECT_TYPE_SERVICE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"service"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.OBJECT_TYPE_VIDEO"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_VIDEO"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_VIDEO">OBJECT_TYPE_VIDEO</A></CODE></TD>
 <TD ALIGN="right"><CODE>"video"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.PROPERTY_ACTOR"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.PROPERTY_ACTOR"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#PROPERTY_ACTOR">PROPERTY_ACTOR</A></CODE></TD>
 <TD ALIGN="right"><CODE>"actor"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.PROPERTY_CATEGORY"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.PROPERTY_CATEGORY"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#PROPERTY_CATEGORY">PROPERTY_CATEGORY</A></CODE></TD>
 <TD ALIGN="right"><CODE>"category"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.PROPERTY_CONTENT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.PROPERTY_CONTENT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#PROPERTY_CONTENT">PROPERTY_CONTENT</A></CODE></TD>
 <TD ALIGN="right"><CODE>"content"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.PROPERTY_GENERATOR"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.PROPERTY_GENERATOR"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#PROPERTY_GENERATOR">PROPERTY_GENERATOR</A></CODE></TD>
 <TD ALIGN="right"><CODE>"generator"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.PROPERTY_ICON"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.PROPERTY_ICON"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#PROPERTY_ICON">PROPERTY_ICON</A></CODE></TD>
 <TD ALIGN="right"><CODE>"icon"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.PROPERTY_OBJECT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.PROPERTY_OBJECT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#PROPERTY_OBJECT">PROPERTY_OBJECT</A></CODE></TD>
 <TD ALIGN="right"><CODE>"object"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.PROPERTY_PUBLISHED"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.PROPERTY_PUBLISHED"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#PROPERTY_PUBLISHED">PROPERTY_PUBLISHED</A></CODE></TD>
 <TD ALIGN="right"><CODE>"published"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.PROPERTY_TITLE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.PROPERTY_TITLE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#PROPERTY_TITLE">PROPERTY_TITLE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"title"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.PROPERTY_VERB"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.PROPERTY_VERB"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#PROPERTY_VERB">PROPERTY_VERB</A></CODE></TD>
 <TD ALIGN="right"><CODE>"verb"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_ADD"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_ADD"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_ADD">VERB_ADD</A></CODE></TD>
 <TD ALIGN="right"><CODE>"add"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_CANCEL"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_CANCEL"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_CANCEL">VERB_CANCEL</A></CODE></TD>
 <TD ALIGN="right"><CODE>"cancel"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_CHECKIN"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_CHECKIN"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_CHECKIN">VERB_CHECKIN</A></CODE></TD>
 <TD ALIGN="right"><CODE>"checkin"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_DELETE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_DELETE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_DELETE">VERB_DELETE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"delete"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_FAVORITE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_FAVORITE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_FAVORITE">VERB_FAVORITE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"favorite"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_FOLLOW"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_FOLLOW"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_FOLLOW">VERB_FOLLOW</A></CODE></TD>
 <TD ALIGN="right"><CODE>"follow"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_GIVE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_GIVE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_GIVE">VERB_GIVE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"give"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_IGNORE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_IGNORE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_IGNORE">VERB_IGNORE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"ignore"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_INVITE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_INVITE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_INVITE">VERB_INVITE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"invite"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_JOIN"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_JOIN"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_JOIN">VERB_JOIN</A></CODE></TD>
 <TD ALIGN="right"><CODE>"join"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_LEAVE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_LEAVE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_LEAVE">VERB_LEAVE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"leave"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_LIKE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_LIKE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_LIKE">VERB_LIKE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"like"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_MAKE_FRIEND"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_MAKE_FRIEND"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_MAKE_FRIEND">VERB_MAKE_FRIEND</A></CODE></TD>
 <TD ALIGN="right"><CODE>"make-friend"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_PLAY"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_PLAY"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_PLAY">VERB_PLAY</A></CODE></TD>
 <TD ALIGN="right"><CODE>"play"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_POST"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_POST"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_POST">VERB_POST</A></CODE></TD>
 <TD ALIGN="right"><CODE>"post"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_RECEIVE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_RECEIVE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_RECEIVE">VERB_RECEIVE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"receive"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_REMOVE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_REMOVE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_REMOVE">VERB_REMOVE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"remove"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_REMOVE_FRIEND"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_REMOVE_FRIEND"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_REMOVE_FRIEND">VERB_REMOVE_FRIEND</A></CODE></TD>
 <TD ALIGN="right"><CODE>"remove-friend"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_REQUEST_FRIEND"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_REQUEST_FRIEND"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_REQUEST_FRIEND">VERB_REQUEST_FRIEND</A></CODE></TD>
 <TD ALIGN="right"><CODE>"request-friend"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_RSVP_MAYBE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_RSVP_MAYBE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_RSVP_MAYBE">VERB_RSVP_MAYBE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"rsvp-maybe"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_RSVP_NO"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_RSVP_NO"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_RSVP_NO">VERB_RSVP_NO</A></CODE></TD>
 <TD ALIGN="right"><CODE>"rsvp-no"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_RSVP_YES"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_RSVP_YES"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_RSVP_YES">VERB_RSVP_YES</A></CODE></TD>
 <TD ALIGN="right"><CODE>"rsvp-yes"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_SAVE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_SAVE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_SAVE">VERB_SAVE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"save"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_SHARE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_SHARE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_SHARE">VERB_SHARE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"share"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_STOP_FOLLOWING"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_STOP_FOLLOWING"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_STOP_FOLLOWING">VERB_STOP_FOLLOWING</A></CODE></TD>
 <TD ALIGN="right"><CODE>"stop-following"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_TAG"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_TAG"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_TAG">VERB_TAG</A></CODE></TD>
 <TD ALIGN="right"><CODE>"tag"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_UNFAVORITE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_UNFAVORITE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_UNFAVORITE">VERB_UNFAVORITE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"unfavorite"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_UNLIKE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_UNLIKE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_UNLIKE">VERB_UNLIKE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"unlike"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_UNSAVE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_UNSAVE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_UNSAVE">VERB_UNSAVE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"unsave"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_UPDATE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_UPDATE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_UPDATE">VERB_UPDATE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"update"</CODE></TD>
@@ -460,16 +460,16 @@ org.usergrid.*</FONT></TH>
 
 <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="3">org.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities">Device</A></TH>
+<TH ALIGN="left" COLSPAN="3">org.apache.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities">Device</A></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Device.ENTITY_TYPE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Device.ENTITY_TYPE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Device.html#ENTITY_TYPE">ENTITY_TYPE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"device"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Device.PROPERTY_NAME"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Device.PROPERTY_NAME"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Device.html#PROPERTY_NAME">PROPERTY_NAME</A></CODE></TD>
 <TD ALIGN="right"><CODE>"name"</CODE></TD>
@@ -484,16 +484,16 @@ org.usergrid.*</FONT></TH>
 
 <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="3">org.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></TH>
+<TH ALIGN="left" COLSPAN="3">org.apache.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Entity.PROPERTY_TYPE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Entity.PROPERTY_TYPE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Entity.html#PROPERTY_TYPE">PROPERTY_TYPE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"type"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Entity.PROPERTY_UUID"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Entity.PROPERTY_UUID"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Entity.html#PROPERTY_UUID">PROPERTY_UUID</A></CODE></TD>
 <TD ALIGN="right"><CODE>"uuid"</CODE></TD>
@@ -508,22 +508,22 @@ org.usergrid.*</FONT></TH>
 
 <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="3">org.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A></TH>
+<TH ALIGN="left" COLSPAN="3">org.apache.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Group.ENTITY_TYPE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Group.ENTITY_TYPE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Group.html#ENTITY_TYPE">ENTITY_TYPE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"group"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Group.PROPERTY_PATH"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Group.PROPERTY_PATH"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Group.html#PROPERTY_PATH">PROPERTY_PATH</A></CODE></TD>
 <TD ALIGN="right"><CODE>"path"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Group.PROPERTY_TITLE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Group.PROPERTY_TITLE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Group.html#PROPERTY_TITLE">PROPERTY_TITLE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"title"</CODE></TD>
@@ -538,58 +538,58 @@ org.usergrid.*</FONT></TH>
 
 <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="3">org.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A></TH>
+<TH ALIGN="left" COLSPAN="3">org.apache.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Message.ENTITY_TYPE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Message.ENTITY_TYPE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Message.html#ENTITY_TYPE">ENTITY_TYPE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"message"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Message.PROPERTY_CATEGORY"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Message.PROPERTY_CATEGORY"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Message.html#PROPERTY_CATEGORY">PROPERTY_CATEGORY</A></CODE></TD>
 <TD ALIGN="right"><CODE>"category"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Message.PROPERTY_CORRELATION_ID"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Message.PROPERTY_CORRELATION_ID"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Message.html#PROPERTY_CORRELATION_ID">PROPERTY_CORRELATION_ID</A></CODE></TD>
 <TD ALIGN="right"><CODE>"correlation_id"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Message.PROPERTY_DESTINATION"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Message.PROPERTY_DESTINATION"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Message.html#PROPERTY_DESTINATION">PROPERTY_DESTINATION</A></CODE></TD>
 <TD ALIGN="right"><CODE>"destination"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Message.PROPERTY_INDEXED"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Message.PROPERTY_INDEXED"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Message.html#PROPERTY_INDEXED">PROPERTY_INDEXED</A></CODE></TD>
 <TD ALIGN="right"><CODE>"indexed"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Message.PROPERTY_PERSISTENT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Message.PROPERTY_PERSISTENT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Message.html#PROPERTY_PERSISTENT">PROPERTY_PERSISTENT</A></CODE></TD>
 <TD ALIGN="right"><CODE>"persistent"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Message.PROPERTY_REPLY_TO"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Message.PROPERTY_REPLY_TO"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Message.html#PROPERTY_REPLY_TO">PROPERTY_REPLY_TO</A></CODE></TD>
 <TD ALIGN="right"><CODE>"reply_to"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Message.PROPERTY_TIMESTAMP"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Message.PROPERTY_TIMESTAMP"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Message.html#PROPERTY_TIMESTAMP">PROPERTY_TIMESTAMP</A></CODE></TD>
 <TD ALIGN="right"><CODE>"timestamp"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Message.PROPERTY_TYPE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Message.PROPERTY_TYPE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Message.html#PROPERTY_TYPE">PROPERTY_TYPE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"type"</CODE></TD>
@@ -604,64 +604,64 @@ org.usergrid.*</FONT></TH>
 
 <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="3">org.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A></TH>
+<TH ALIGN="left" COLSPAN="3">org.apache.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.User.ENTITY_TYPE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.User.ENTITY_TYPE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/User.html#ENTITY_TYPE">ENTITY_TYPE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"user"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.User.PROPERTY_ACTIVATED"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.User.PROPERTY_ACTIVATED"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/User.html#PROPERTY_ACTIVATED">PROPERTY_ACTIVATED</A></CODE></TD>
 <TD ALIGN="right"><CODE>"activated"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.User.PROPERTY_DISABLED"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.User.PROPERTY_DISABLED"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/User.html#PROPERTY_DISABLED">PROPERTY_DISABLED</A></CODE></TD>
 <TD ALIGN="right"><CODE>"disabled"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.User.PROPERTY_EMAIL"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.User.PROPERTY_EMAIL"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/User.html#PROPERTY_EMAIL">PROPERTY_EMAIL</A></CODE></TD>
 <TD ALIGN="right"><CODE>"email"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.User.PROPERTY_FIRSTNAME"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.User.PROPERTY_FIRSTNAME"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/User.html#PROPERTY_FIRSTNAME">PROPERTY_FIRSTNAME</A></CODE></TD>
 <TD ALIGN="right"><CODE>"firstname"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.User.PROPERTY_LASTNAME"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.User.PROPERTY_LASTNAME"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/User.html#PROPERTY_LASTNAME">PROPERTY_LASTNAME</A></CODE></TD>
 <TD ALIGN="right"><CODE>"lastname"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.User.PROPERTY_MIDDLENAME"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.User.PROPERTY_MIDDLENAME"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/User.html#PROPERTY_MIDDLENAME">PROPERTY_MIDDLENAME</A></CODE></TD>
 <TD ALIGN="right"><CODE>"middlename"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.User.PROPERTY_NAME"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.User.PROPERTY_NAME"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/User.html#PROPERTY_NAME">PROPERTY_NAME</A></CODE></TD>
 <TD ALIGN="right"><CODE>"name"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.User.PROPERTY_PICTURE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.User.PROPERTY_PICTURE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/User.html#PROPERTY_PICTURE">PROPERTY_PICTURE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"picture"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.User.PROPERTY_USERNAME"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.User.PROPERTY_USERNAME"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/User.html#PROPERTY_USERNAME">PROPERTY_USERNAME</A></CODE></TD>
 <TD ALIGN="right"><CODE>"username"</CODE></TD>


[84/96] [abbrv] USERGRID-2 package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/entities/Group.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/entities/Group.html b/sdks/android/doc/org/usergrid/android/client/entities/Group.html
index 45fce5a..aa18d91 100644
--- a/sdks/android/doc/org/usergrid/android/client/entities/Group.html
+++ b/sdks/android/doc/org/usergrid/android/client/entities/Group.html
@@ -55,8 +55,8 @@ function windowTitle()
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/entities/Group.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="Group.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
@@ -88,17 +88,17 @@ DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client.entities</FONT>
+org.apache.usergrid.android.client.entities</FONT>
 <BR>
 Class Group</H2>
 <PRE>
 java.lang.Object
-  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">org.usergrid.android.client.entities.Entity</A>
-      <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.usergrid.android.client.entities.Group</B>
+  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">org.apache.usergrid.android.client.entities.Entity</A>
+      <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.usergrid.android.client.entities.Group</B>
 </PRE>
 <HR>
 <DL>
-<DT><PRE>public class <B>Group</B><DT>extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></DL>
+<DT><PRE>public class <B>Group</B><DT>extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></DL>
 </PRE>
 
 <P>
@@ -141,7 +141,7 @@ java.lang.Object
 &nbsp;<A NAME="fields_inherited_from_class_org.usergrid.android.client.entities.Entity"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left"><B>Fields inherited from class org.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></B></TH>
+<TH ALIGN="left"><B>Fields inherited from class org.apache.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></B></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#CLASS_FOR_ENTITY_TYPE">CLASS_FOR_ENTITY_TYPE</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#PROPERTY_TYPE">PROPERTY_TYPE</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#PROPERTY_UUID">PROPERTY_UUID</A></CODE></TD>
@@ -163,7 +163,7 @@ java.lang.Object
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Group.html#Group(org.usergrid.android.client.entities.Entity)">Group</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;entity)</CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Group.html#Group(org.apache.usergrid.android.client.entities.Entity)">Group</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;entity)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -230,10 +230,10 @@ java.lang.Object
 &nbsp;<A NAME="methods_inherited_from_class_org.usergrid.android.client.entities.Entity"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left"><B>Methods inherited from class org.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></B></TH>
+<TH ALIGN="left"><B>Methods inherited from class org.apache.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></B></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getProperties()">getProperties</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getType()">getType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getUuid()">getUuid</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setProperty(java.lang.String, org.codehaus.jackson.JsonNode)">setProperty</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setType(java.lang.String)">setType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setUuid(java.util.UUID)">setUuid</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toString()">toString</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(java.lang.Class)">toType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(org.usergrid.androi
 d.client.entities.Entity, java.lang.Class)">toType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(java.util.List, java.lang.Class)">toType</A></CODE></TD>
+<TD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getProperties()">getProperties</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getType()">getType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getUuid()">getUuid</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setProperty(java.lang.String, org.codehaus.jackson.JsonNode)">setProperty</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setType(java.lang.String)">setType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setUuid(java.util.UUID)">setUuid</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toString()">toString</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(java.lang.Class)">toType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(org.apache.usergrid
 .android.client.entities.Entity, java.lang.Class)">toType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(java.util.List, java.lang.Class)">toType</A></CODE></TD>
 </TR>
 </TABLE>
 &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
@@ -264,7 +264,7 @@ ENTITY_TYPE</H3>
 public static final java.lang.String <B>ENTITY_TYPE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Group.ENTITY_TYPE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Group.ENTITY_TYPE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -274,7 +274,7 @@ PROPERTY_PATH</H3>
 public static final java.lang.String <B>PROPERTY_PATH</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Group.PROPERTY_PATH">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Group.PROPERTY_PATH">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -284,7 +284,7 @@ PROPERTY_TITLE</H3>
 public static final java.lang.String <B>PROPERTY_TITLE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Group.PROPERTY_TITLE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Group.PROPERTY_TITLE">Constant Field Values</A></DL>
 </DL>
 
 <!-- ========= CONSTRUCTOR DETAIL ======== -->
@@ -305,10 +305,10 @@ public <B>Group</B>()</PRE>
 </DL>
 <HR>
 
-<A NAME="Group(org.usergrid.android.client.entities.Entity)"><!-- --></A><H3>
+<A NAME="Group(org.apache.usergrid.android.client.entities.Entity)"><!-- --></A><H3>
 Group</H3>
 <PRE>
-public <B>Group</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;entity)</PRE>
+public <B>Group</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;entity)</PRE>
 <DL>
 </DL>
 
@@ -328,7 +328,7 @@ getNativeType</H3>
 public java.lang.String <B>getNativeType</B>()</PRE>
 <DL>
 <DD><DL>
-<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getNativeType()">getNativeType</A></CODE> in class <CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></CODE></DL>
+<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getNativeType()">getNativeType</A></CODE> in class <CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></CODE></DL>
 </DD>
 <DD><DL>
 </DL>
@@ -342,7 +342,7 @@ getPropertyNames</H3>
 public java.util.List&lt;java.lang.String&gt; <B>getPropertyNames</B>()</PRE>
 <DL>
 <DD><DL>
-<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getPropertyNames()">getPropertyNames</A></CODE> in class <CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></CODE></DL>
+<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getPropertyNames()">getPropertyNames</A></CODE> in class <CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></CODE></DL>
 </DD>
 <DD><DL>
 </DL>
@@ -423,8 +423,8 @@ public void <B>setTitle</B>(java.lang.String&nbsp;title)</PRE>
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/entities/Group.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="Group.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/entities/Message.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/entities/Message.html b/sdks/android/doc/org/usergrid/android/client/entities/Message.html
index f9c09bb..290c3dd 100644
--- a/sdks/android/doc/org/usergrid/android/client/entities/Message.html
+++ b/sdks/android/doc/org/usergrid/android/client/entities/Message.html
@@ -55,8 +55,8 @@ function windowTitle()
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/entities/Message.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="Message.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
@@ -88,17 +88,17 @@ DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client.entities</FONT>
+org.apache.usergrid.android.client.entities</FONT>
 <BR>
 Class Message</H2>
 <PRE>
 java.lang.Object
-  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">org.usergrid.android.client.entities.Entity</A>
-      <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.usergrid.android.client.entities.Message</B>
+  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">org.apache.usergrid.android.client.entities.Entity</A>
+      <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.usergrid.android.client.entities.Message</B>
 </PRE>
 <HR>
 <DL>
-<DT><PRE>public class <B>Message</B><DT>extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></DL>
+<DT><PRE>public class <B>Message</B><DT>extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></DL>
 </PRE>
 
 <P>
@@ -189,7 +189,7 @@ java.lang.Object
 &nbsp;<A NAME="fields_inherited_from_class_org.usergrid.android.client.entities.Entity"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left"><B>Fields inherited from class org.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></B></TH>
+<TH ALIGN="left"><B>Fields inherited from class org.apache.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></B></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#CLASS_FOR_ENTITY_TYPE">CLASS_FOR_ENTITY_TYPE</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#PROPERTY_UUID">PROPERTY_UUID</A></CODE></TD>
@@ -211,7 +211,7 @@ java.lang.Object
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Message.html#Message(org.usergrid.android.client.entities.Entity)">Message</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;entity)</CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Message.html#Message(org.apache.usergrid.android.client.entities.Entity)">Message</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;entity)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -358,10 +358,10 @@ java.lang.Object
 &nbsp;<A NAME="methods_inherited_from_class_org.usergrid.android.client.entities.Entity"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left"><B>Methods inherited from class org.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></B></TH>
+<TH ALIGN="left"><B>Methods inherited from class org.apache.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></B></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getProperties()">getProperties</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getType()">getType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getUuid()">getUuid</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setProperty(java.lang.String, org.codehaus.jackson.JsonNode)">setProperty</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setType(java.lang.String)">setType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setUuid(java.util.UUID)">setUuid</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toString()">toString</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(java.lang.Class)">toType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(org.usergrid.androi
 d.client.entities.Entity, java.lang.Class)">toType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(java.util.List, java.lang.Class)">toType</A></CODE></TD>
+<TD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getProperties()">getProperties</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getType()">getType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getUuid()">getUuid</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setProperty(java.lang.String, org.codehaus.jackson.JsonNode)">setProperty</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setType(java.lang.String)">setType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setUuid(java.util.UUID)">setUuid</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toString()">toString</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(java.lang.Class)">toType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(org.apache.usergrid
 .android.client.entities.Entity, java.lang.Class)">toType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(java.util.List, java.lang.Class)">toType</A></CODE></TD>
 </TR>
 </TABLE>
 &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
@@ -392,7 +392,7 @@ ENTITY_TYPE</H3>
 public static final java.lang.String <B>ENTITY_TYPE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Message.ENTITY_TYPE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Message.ENTITY_TYPE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -402,7 +402,7 @@ PROPERTY_CORRELATION_ID</H3>
 public static final java.lang.String <B>PROPERTY_CORRELATION_ID</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Message.PROPERTY_CORRELATION_ID">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Message.PROPERTY_CORRELATION_ID">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -412,7 +412,7 @@ PROPERTY_DESTINATION</H3>
 public static final java.lang.String <B>PROPERTY_DESTINATION</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Message.PROPERTY_DESTINATION">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Message.PROPERTY_DESTINATION">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -422,7 +422,7 @@ PROPERTY_REPLY_TO</H3>
 public static final java.lang.String <B>PROPERTY_REPLY_TO</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Message.PROPERTY_REPLY_TO">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Message.PROPERTY_REPLY_TO">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -432,7 +432,7 @@ PROPERTY_TIMESTAMP</H3>
 public static final java.lang.String <B>PROPERTY_TIMESTAMP</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Message.PROPERTY_TIMESTAMP">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Message.PROPERTY_TIMESTAMP">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -442,7 +442,7 @@ PROPERTY_TYPE</H3>
 public static final java.lang.String <B>PROPERTY_TYPE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Message.PROPERTY_TYPE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Message.PROPERTY_TYPE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -452,7 +452,7 @@ PROPERTY_CATEGORY</H3>
 public static final java.lang.String <B>PROPERTY_CATEGORY</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Message.PROPERTY_CATEGORY">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Message.PROPERTY_CATEGORY">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -462,7 +462,7 @@ PROPERTY_INDEXED</H3>
 public static final java.lang.String <B>PROPERTY_INDEXED</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Message.PROPERTY_INDEXED">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Message.PROPERTY_INDEXED">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -472,7 +472,7 @@ PROPERTY_PERSISTENT</H3>
 public static final java.lang.String <B>PROPERTY_PERSISTENT</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Message.PROPERTY_PERSISTENT">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Message.PROPERTY_PERSISTENT">Constant Field Values</A></DL>
 </DL>
 
 <!-- ========= CONSTRUCTOR DETAIL ======== -->
@@ -493,10 +493,10 @@ public <B>Message</B>()</PRE>
 </DL>
 <HR>
 
-<A NAME="Message(org.usergrid.android.client.entities.Entity)"><!-- --></A><H3>
+<A NAME="Message(org.apache.usergrid.android.client.entities.Entity)"><!-- --></A><H3>
 Message</H3>
 <PRE>
-public <B>Message</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;entity)</PRE>
+public <B>Message</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;entity)</PRE>
 <DL>
 </DL>
 
@@ -516,7 +516,7 @@ getNativeType</H3>
 public java.lang.String <B>getNativeType</B>()</PRE>
 <DL>
 <DD><DL>
-<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getNativeType()">getNativeType</A></CODE> in class <CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></CODE></DL>
+<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getNativeType()">getNativeType</A></CODE> in class <CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></CODE></DL>
 </DD>
 <DD><DL>
 </DL>
@@ -530,7 +530,7 @@ getPropertyNames</H3>
 public java.util.List&lt;java.lang.String&gt; <B>getPropertyNames</B>()</PRE>
 <DL>
 <DD><DL>
-<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getPropertyNames()">getPropertyNames</A></CODE> in class <CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></CODE></DL>
+<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getPropertyNames()">getPropertyNames</A></CODE> in class <CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></CODE></DL>
 </DD>
 <DD><DL>
 </DL>
@@ -721,8 +721,8 @@ public void <B>setPersistent</B>(java.lang.Boolean&nbsp;persistent)</PRE>
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/entities/Message.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="Message.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/entities/User.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/entities/User.html b/sdks/android/doc/org/usergrid/android/client/entities/User.html
index 75686b1..1157a9b 100644
--- a/sdks/android/doc/org/usergrid/android/client/entities/User.html
+++ b/sdks/android/doc/org/usergrid/android/client/entities/User.html
@@ -55,7 +55,7 @@ function windowTitle()
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
 &nbsp;NEXT CLASS</FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/entities/User.html" target="_top"><B>FRAMES</B></A>  &nbsp;
@@ -88,17 +88,17 @@ DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client.entities</FONT>
+org.apache.usergrid.android.client.entities</FONT>
 <BR>
 Class User</H2>
 <PRE>
 java.lang.Object
-  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">org.usergrid.android.client.entities.Entity</A>
-      <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.usergrid.android.client.entities.User</B>
+  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">org.apache.usergrid.android.client.entities.Entity</A>
+      <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.usergrid.android.client.entities.User</B>
 </PRE>
 <HR>
 <DL>
-<DT><PRE>public class <B>User</B><DT>extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></DL>
+<DT><PRE>public class <B>User</B><DT>extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></DL>
 </PRE>
 
 <P>
@@ -197,7 +197,7 @@ java.lang.Object
 &nbsp;<A NAME="fields_inherited_from_class_org.usergrid.android.client.entities.Entity"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left"><B>Fields inherited from class org.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></B></TH>
+<TH ALIGN="left"><B>Fields inherited from class org.apache.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></B></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#CLASS_FOR_ENTITY_TYPE">CLASS_FOR_ENTITY_TYPE</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#PROPERTY_TYPE">PROPERTY_TYPE</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#PROPERTY_UUID">PROPERTY_UUID</A></CODE></TD>
@@ -219,7 +219,7 @@ java.lang.Object
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/User.html#User(org.usergrid.android.client.entities.Entity)">User</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;entity)</CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/User.html#User(org.apache.usergrid.android.client.entities.Entity)">User</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;entity)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -398,10 +398,10 @@ java.lang.Object
 &nbsp;<A NAME="methods_inherited_from_class_org.usergrid.android.client.entities.Entity"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left"><B>Methods inherited from class org.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></B></TH>
+<TH ALIGN="left"><B>Methods inherited from class org.apache.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></B></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getProperties()">getProperties</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getType()">getType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getUuid()">getUuid</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setProperty(java.lang.String, org.codehaus.jackson.JsonNode)">setProperty</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setType(java.lang.String)">setType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setUuid(java.util.UUID)">setUuid</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toString()">toString</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(java.lang.Class)">toType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(org.usergrid.androi
 d.client.entities.Entity, java.lang.Class)">toType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(java.util.List, java.lang.Class)">toType</A></CODE></TD>
+<TD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getProperties()">getProperties</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getType()">getType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getUuid()">getUuid</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setProperty(java.lang.String, org.codehaus.jackson.JsonNode)">setProperty</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setType(java.lang.String)">setType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setUuid(java.util.UUID)">setUuid</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toString()">toString</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(java.lang.Class)">toType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(org.apache.usergrid
 .android.client.entities.Entity, java.lang.Class)">toType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(java.util.List, java.lang.Class)">toType</A></CODE></TD>
 </TR>
 </TABLE>
 &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
@@ -432,7 +432,7 @@ ENTITY_TYPE</H3>
 public static final java.lang.String <B>ENTITY_TYPE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.User.ENTITY_TYPE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.User.ENTITY_TYPE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -442,7 +442,7 @@ PROPERTY_USERNAME</H3>
 public static final java.lang.String <B>PROPERTY_USERNAME</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.User.PROPERTY_USERNAME">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.User.PROPERTY_USERNAME">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -452,7 +452,7 @@ PROPERTY_EMAIL</H3>
 public static final java.lang.String <B>PROPERTY_EMAIL</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.User.PROPERTY_EMAIL">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.User.PROPERTY_EMAIL">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -462,7 +462,7 @@ PROPERTY_NAME</H3>
 public static final java.lang.String <B>PROPERTY_NAME</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.User.PROPERTY_NAME">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.User.PROPERTY_NAME">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -472,7 +472,7 @@ PROPERTY_FIRSTNAME</H3>
 public static final java.lang.String <B>PROPERTY_FIRSTNAME</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.User.PROPERTY_FIRSTNAME">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.User.PROPERTY_FIRSTNAME">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -482,7 +482,7 @@ PROPERTY_MIDDLENAME</H3>
 public static final java.lang.String <B>PROPERTY_MIDDLENAME</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.User.PROPERTY_MIDDLENAME">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.User.PROPERTY_MIDDLENAME">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -492,7 +492,7 @@ PROPERTY_LASTNAME</H3>
 public static final java.lang.String <B>PROPERTY_LASTNAME</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.User.PROPERTY_LASTNAME">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.User.PROPERTY_LASTNAME">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -502,7 +502,7 @@ PROPERTY_ACTIVATED</H3>
 public static final java.lang.String <B>PROPERTY_ACTIVATED</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.User.PROPERTY_ACTIVATED">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.User.PROPERTY_ACTIVATED">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -512,7 +512,7 @@ PROPERTY_PICTURE</H3>
 public static final java.lang.String <B>PROPERTY_PICTURE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.User.PROPERTY_PICTURE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.User.PROPERTY_PICTURE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -522,7 +522,7 @@ PROPERTY_DISABLED</H3>
 public static final java.lang.String <B>PROPERTY_DISABLED</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.User.PROPERTY_DISABLED">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.User.PROPERTY_DISABLED">Constant Field Values</A></DL>
 </DL>
 
 <!-- ========= CONSTRUCTOR DETAIL ======== -->
@@ -543,10 +543,10 @@ public <B>User</B>()</PRE>
 </DL>
 <HR>
 
-<A NAME="User(org.usergrid.android.client.entities.Entity)"><!-- --></A><H3>
+<A NAME="User(org.apache.usergrid.android.client.entities.Entity)"><!-- --></A><H3>
 User</H3>
 <PRE>
-public <B>User</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;entity)</PRE>
+public <B>User</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;entity)</PRE>
 <DL>
 </DL>
 
@@ -566,7 +566,7 @@ getNativeType</H3>
 public java.lang.String <B>getNativeType</B>()</PRE>
 <DL>
 <DD><DL>
-<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getNativeType()">getNativeType</A></CODE> in class <CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></CODE></DL>
+<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getNativeType()">getNativeType</A></CODE> in class <CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></CODE></DL>
 </DD>
 <DD><DL>
 </DL>
@@ -580,7 +580,7 @@ getPropertyNames</H3>
 public java.util.List&lt;java.lang.String&gt; <B>getPropertyNames</B>()</PRE>
 <DL>
 <DD><DL>
-<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getPropertyNames()">getPropertyNames</A></CODE> in class <CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></CODE></DL>
+<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getPropertyNames()">getPropertyNames</A></CODE> in class <CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></CODE></DL>
 </DD>
 <DD><DL>
 </DL>
@@ -815,7 +815,7 @@ public void <B>setPicture</B>(java.lang.String&nbsp;picture)</PRE>
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
 &nbsp;NEXT CLASS</FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/entities/User.html" target="_top"><B>FRAMES</B></A>  &nbsp;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/entities/class-use/Activity.ActivityCollection.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/entities/class-use/Activity.ActivityCollection.html b/sdks/android/doc/org/usergrid/android/client/entities/class-use/Activity.ActivityCollection.html
index 94cc480..d3e2ed2 100644
--- a/sdks/android/doc/org/usergrid/android/client/entities/class-use/Activity.ActivityCollection.html
+++ b/sdks/android/doc/org/usergrid/android/client/entities/class-use/Activity.ActivityCollection.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Class org.usergrid.android.client.entities.Activity.ActivityCollection
+Uses of Class org.apache.usergrid.android.client.entities.Activity.ActivityCollection
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Class org.usergrid.android.client.entities.Activity.ActivityCollection
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Class org.usergrid.android.client.entities.Activity.ActivityCollection";
+        parent.document.title="Uses of Class org.apache.usergrid.android.client.entities.Activity.ActivityCollection";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.apache.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,9 +81,9 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Class<br>org.usergrid.android.client.entities.Activity.ActivityCollection</B></H2>
+<B>Uses of Class<br>org.apache.usergrid.android.client.entities.Activity.ActivityCollection</B></H2>
 </CENTER>
-No usage of org.usergrid.android.client.entities.Activity.ActivityCollection
+No usage of org.apache.usergrid.android.client.entities.Activity.ActivityCollection
 <P>
 <HR>
 
@@ -99,7 +99,7 @@ No usage of org.usergrid.android.client.entities.Activity.ActivityCollection
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.apache.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/entities/class-use/Activity.ActivityObject.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/entities/class-use/Activity.ActivityObject.html b/sdks/android/doc/org/usergrid/android/client/entities/class-use/Activity.ActivityObject.html
index 3015866..376797e 100644
--- a/sdks/android/doc/org/usergrid/android/client/entities/class-use/Activity.ActivityObject.html
+++ b/sdks/android/doc/org/usergrid/android/client/entities/class-use/Activity.ActivityObject.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Class org.usergrid.android.client.entities.Activity.ActivityObject
+Uses of Class org.apache.usergrid.android.client.entities.Activity.ActivityObject
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Class org.usergrid.android.client.entities.Activity.ActivityObject
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Class org.usergrid.android.client.entities.Activity.ActivityObject";
+        parent.document.title="Uses of Class org.apache.usergrid.android.client.entities.Activity.ActivityObject";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,26 +81,26 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Class<br>org.usergrid.android.client.entities.Activity.ActivityObject</B></H2>
+<B>Uses of Class<br>org.apache.usergrid.android.client.entities.Activity.ActivityObject</B></H2>
 </CENTER>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Packages that use <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A></FONT></TH>
+Packages that use <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client.entities"><B>org.usergrid.android.client.entities</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client.entities"><B>org.apache.usergrid.android.client.entities</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client.entities"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client.entities"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A> in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A></FONT></TH>
+Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A> in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -108,11 +108,11 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A> that return <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A> that return <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A></CODE></FONT></TD>
 <TD><CODE><B>Activity.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html#getActor()">getActor</A></B>()</CODE>
 
 <BR>
@@ -120,7 +120,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>[]</CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>[]</CODE></FONT></TD>
 <TD><CODE><B>Activity.ActivityObject.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html#getAttachments()">getAttachments</A></B>()</CODE>
 
 <BR>
@@ -128,7 +128,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A></CODE></FONT></TD>
 <TD><CODE><B>Activity.ActivityObject.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html#getAuthor()">getAuthor</A></B>()</CODE>
 
 <BR>
@@ -136,7 +136,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A></CODE></FONT></TD>
 <TD><CODE><B>Activity.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html#getGenerator()">getGenerator</A></B>()</CODE>
 
 <BR>
@@ -144,7 +144,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>[]</CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>[]</CODE></FONT></TD>
 <TD><CODE><B>Activity.ActivityCollection.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityCollection.html#getItems()">getItems</A></B>()</CODE>
 
 <BR>
@@ -152,7 +152,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A></CODE></FONT></TD>
 <TD><CODE><B>Activity.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html#getObject()">getObject</A></B>()</CODE>
 
 <BR>
@@ -164,12 +164,12 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Activity.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html#setActor(org.usergrid.android.client.entities.Activity.ActivityObject)">setActor</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>&nbsp;actor)</CODE>
+<TD><CODE><B>Activity.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html#setActor(org.apache.usergrid.android.client.entities.Activity.ActivityObject)">setActor</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>&nbsp;actor)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -177,7 +177,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Activity.ActivityObject.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html#setAttachments(org.usergrid.android.client.entities.Activity.ActivityObject[])">setAttachments</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>[]&nbsp;attachments)</CODE>
+<TD><CODE><B>Activity.ActivityObject.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html#setAttachments(org.apache.usergrid.android.client.entities.Activity.ActivityObject[])">setAttachments</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>[]&nbsp;attachments)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -185,7 +185,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Activity.ActivityObject.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html#setAuthor(org.usergrid.android.client.entities.Activity.ActivityObject)">setAuthor</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>&nbsp;author)</CODE>
+<TD><CODE><B>Activity.ActivityObject.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html#setAuthor(org.apache.usergrid.android.client.entities.Activity.ActivityObject)">setAuthor</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>&nbsp;author)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -193,7 +193,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Activity.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html#setGenerator(org.usergrid.android.client.entities.Activity.ActivityObject)">setGenerator</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>&nbsp;generator)</CODE>
+<TD><CODE><B>Activity.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html#setGenerator(org.apache.usergrid.android.client.entities.Activity.ActivityObject)">setGenerator</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>&nbsp;generator)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -201,7 +201,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Activity.ActivityCollection.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityCollection.html#setItems(org.usergrid.android.client.entities.Activity.ActivityObject[])">setItems</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>[]&nbsp;items)</CODE>
+<TD><CODE><B>Activity.ActivityCollection.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityCollection.html#setItems(org.apache.usergrid.android.client.entities.Activity.ActivityObject[])">setItems</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>[]&nbsp;items)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -209,7 +209,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Activity.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html#setObject(org.usergrid.android.client.entities.Activity.ActivityObject)">setObject</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>&nbsp;object)</CODE>
+<TD><CODE><B>Activity.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html#setObject(org.apache.usergrid.android.client.entities.Activity.ActivityObject)">setObject</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>&nbsp;object)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -231,7 +231,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/entities/class-use/Activity.MediaLink.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/entities/class-use/Activity.MediaLink.html b/sdks/android/doc/org/usergrid/android/client/entities/class-use/Activity.MediaLink.html
index 6489937..921b2ec 100644
--- a/sdks/android/doc/org/usergrid/android/client/entities/class-use/Activity.MediaLink.html
+++ b/sdks/android/doc/org/usergrid/android/client/entities/class-use/Activity.MediaLink.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Class org.usergrid.android.client.entities.Activity.MediaLink
+Uses of Class org.apache.usergrid.android.client.entities.Activity.MediaLink
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Class org.usergrid.android.client.entities.Activity.MediaLink
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Class org.usergrid.android.client.entities.Activity.MediaLink";
+        parent.document.title="Uses of Class org.apache.usergrid.android.client.entities.Activity.MediaLink";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,26 +81,26 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Class<br>org.usergrid.android.client.entities.Activity.MediaLink</B></H2>
+<B>Uses of Class<br>org.apache.usergrid.android.client.entities.Activity.MediaLink</B></H2>
 </CENTER>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Packages that use <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A></FONT></TH>
+Packages that use <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client.entities"><B>org.usergrid.android.client.entities</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client.entities"><B>org.apache.usergrid.android.client.entities</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client.entities"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client.entities"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A> in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A></FONT></TH>
+Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A> in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -108,11 +108,11 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A> that return <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A> that return <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A></CODE></FONT></TD>
 <TD><CODE><B>Activity.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html#getIcon()">getIcon</A></B>()</CODE>
 
 <BR>
@@ -120,7 +120,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A></CODE></FONT></TD>
 <TD><CODE><B>Activity.ActivityObject.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html#getImage()">getImage</A></B>()</CODE>
 
 <BR>
@@ -132,12 +132,12 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Activity.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html#setIcon(org.usergrid.android.client.entities.Activity.MediaLink)">setIcon</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A>&nbsp;icon)</CODE>
+<TD><CODE><B>Activity.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html#setIcon(org.apache.usergrid.android.client.entities.Activity.MediaLink)">setIcon</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A>&nbsp;icon)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -145,7 +145,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Activity.ActivityObject.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html#setImage(org.usergrid.android.client.entities.Activity.MediaLink)">setImage</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A>&nbsp;image)</CODE>
+<TD><CODE><B>Activity.ActivityObject.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html#setImage(org.apache.usergrid.android.client.entities.Activity.MediaLink)">setImage</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A>&nbsp;image)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -167,7 +167,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>


[64/96] [abbrv] USERGRID-2 package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/entities/Activity.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/entities/Activity.html b/sdks/android/doc/org/usergrid/android/client/entities/Activity.html
index 400ccd7..89b9fa4 100644
--- a/sdks/android/doc/org/usergrid/android/client/entities/Activity.html
+++ b/sdks/android/doc/org/usergrid/android/client/entities/Activity.html
@@ -56,7 +56,7 @@ function windowTitle()
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 &nbsp;PREV CLASS&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.apache.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/entities/Activity.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="Activity.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
@@ -88,17 +88,17 @@ DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client.entities</FONT>
+org.apache.usergrid.android.client.entities</FONT>
 <BR>
 Class Activity</H2>
 <PRE>
 java.lang.Object
-  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">org.usergrid.android.client.entities.Entity</A>
-      <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.usergrid.android.client.entities.Activity</B>
+  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">org.apache.usergrid.android.client.entities.Entity</A>
+      <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.usergrid.android.client.entities.Activity</B>
 </PRE>
 <HR>
 <DL>
-<DT><PRE>public class <B>Activity</B><DT>extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></DL>
+<DT><PRE>public class <B>Activity</B><DT>extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></DL>
 </PRE>
 
 <P>
@@ -124,7 +124,7 @@ An entity type for representing activity stream actions. These are similar to
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>static&nbsp;class</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.usergrid.android.client.entities">Activity.ActivityCollection</A></B></CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityCollection</A></B></CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -132,7 +132,7 @@ An entity type for representing activity stream actions. These are similar to
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>static&nbsp;class</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A></B></CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A></B></CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -140,7 +140,7 @@ An entity type for representing activity stream actions. These are similar to
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>static&nbsp;class</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A></B></CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A></B></CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -622,7 +622,7 @@ An entity type for representing activity stream actions. These are similar to
 &nbsp;<A NAME="fields_inherited_from_class_org.usergrid.android.client.entities.Entity"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left"><B>Fields inherited from class org.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></B></TH>
+<TH ALIGN="left"><B>Fields inherited from class org.apache.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></B></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#CLASS_FOR_ENTITY_TYPE">CLASS_FOR_ENTITY_TYPE</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#PROPERTY_TYPE">PROPERTY_TYPE</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#PROPERTY_UUID">PROPERTY_UUID</A></CODE></TD>
@@ -644,7 +644,7 @@ An entity type for representing activity stream actions. These are similar to
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.html#Activity(org.usergrid.android.client.entities.Entity)">Activity</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;entity)</CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.html#Activity(org.apache.usergrid.android.client.entities.Entity)">Activity</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;entity)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -661,7 +661,7 @@ An entity type for representing activity stream actions. These are similar to
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.html#getActor()">getActor</A></B>()</CODE>
 
 <BR>
@@ -685,7 +685,7 @@ An entity type for representing activity stream actions. These are similar to
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.html#getGenerator()">getGenerator</A></B>()</CODE>
 
 <BR>
@@ -693,7 +693,7 @@ An entity type for representing activity stream actions. These are similar to
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.html#getIcon()">getIcon</A></B>()</CODE>
 
 <BR>
@@ -709,7 +709,7 @@ An entity type for representing activity stream actions. These are similar to
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.html#getObject()">getObject</A></B>()</CODE>
 
 <BR>
@@ -749,13 +749,13 @@ An entity type for representing activity stream actions. These are similar to
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>static&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A></CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.html#newActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.entities.User, org.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)">newActivity</A></B>(java.lang.String&nbsp;verb,
+<CODE>static&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A></CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.html#newActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.entities.User, org.apache.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)">newActivity</A></B>(java.lang.String&nbsp;verb,
             java.lang.String&nbsp;title,
             java.lang.String&nbsp;content,
             java.lang.String&nbsp;category,
-            <A HREF="../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>&nbsp;user,
-            <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;object,
+            <A HREF="../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>&nbsp;user,
+            <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;object,
             java.lang.String&nbsp;objectType,
             java.lang.String&nbsp;objectName,
             java.lang.String&nbsp;objectContent)</CODE>
@@ -766,7 +766,7 @@ An entity type for representing activity stream actions. These are similar to
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.html#setActor(org.usergrid.android.client.entities.Activity.ActivityObject)">setActor</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>&nbsp;actor)</CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.html#setActor(org.apache.usergrid.android.client.entities.Activity.ActivityObject)">setActor</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>&nbsp;actor)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -790,7 +790,7 @@ An entity type for representing activity stream actions. These are similar to
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.html#setGenerator(org.usergrid.android.client.entities.Activity.ActivityObject)">setGenerator</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>&nbsp;generator)</CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.html#setGenerator(org.apache.usergrid.android.client.entities.Activity.ActivityObject)">setGenerator</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>&nbsp;generator)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -798,7 +798,7 @@ An entity type for representing activity stream actions. These are similar to
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.html#setIcon(org.usergrid.android.client.entities.Activity.MediaLink)">setIcon</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A>&nbsp;icon)</CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.html#setIcon(org.apache.usergrid.android.client.entities.Activity.MediaLink)">setIcon</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A>&nbsp;icon)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -806,7 +806,7 @@ An entity type for representing activity stream actions. These are similar to
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.html#setObject(org.usergrid.android.client.entities.Activity.ActivityObject)">setObject</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>&nbsp;object)</CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.html#setObject(org.apache.usergrid.android.client.entities.Activity.ActivityObject)">setObject</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>&nbsp;object)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -839,10 +839,10 @@ An entity type for representing activity stream actions. These are similar to
 &nbsp;<A NAME="methods_inherited_from_class_org.usergrid.android.client.entities.Entity"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left"><B>Methods inherited from class org.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></B></TH>
+<TH ALIGN="left"><B>Methods inherited from class org.apache.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></B></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getProperties()">getProperties</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getType()">getType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getUuid()">getUuid</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setProperty(java.lang.String, org.codehaus.jackson.JsonNode)">setProperty</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setType(java.lang.String)">setType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setUuid(java.util.UUID)">setUuid</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toString()">toString</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(java.lang.Class)">toType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(org.usergrid.androi
 d.client.entities.Entity, java.lang.Class)">toType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(java.util.List, java.lang.Class)">toType</A></CODE></TD>
+<TD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getProperties()">getProperties</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getType()">getType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getUuid()">getUuid</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setProperty(java.lang.String, org.codehaus.jackson.JsonNode)">setProperty</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setType(java.lang.String)">setType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setUuid(java.util.UUID)">setUuid</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toString()">toString</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(java.lang.Class)">toType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(org.apache.usergrid
 .android.client.entities.Entity, java.lang.Class)">toType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(java.util.List, java.lang.Class)">toType</A></CODE></TD>
 </TR>
 </TABLE>
 &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
@@ -873,7 +873,7 @@ ENTITY_TYPE</H3>
 public static final java.lang.String <B>ENTITY_TYPE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.ENTITY_TYPE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.ENTITY_TYPE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -883,7 +883,7 @@ VERB_ADD</H3>
 public static final java.lang.String <B>VERB_ADD</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_ADD">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_ADD">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -893,7 +893,7 @@ VERB_CANCEL</H3>
 public static final java.lang.String <B>VERB_CANCEL</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_CANCEL">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_CANCEL">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -903,7 +903,7 @@ VERB_CHECKIN</H3>
 public static final java.lang.String <B>VERB_CHECKIN</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_CHECKIN">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_CHECKIN">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -913,7 +913,7 @@ VERB_DELETE</H3>
 public static final java.lang.String <B>VERB_DELETE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_DELETE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_DELETE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -923,7 +923,7 @@ VERB_FAVORITE</H3>
 public static final java.lang.String <B>VERB_FAVORITE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_FAVORITE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_FAVORITE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -933,7 +933,7 @@ VERB_FOLLOW</H3>
 public static final java.lang.String <B>VERB_FOLLOW</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_FOLLOW">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_FOLLOW">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -943,7 +943,7 @@ VERB_GIVE</H3>
 public static final java.lang.String <B>VERB_GIVE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_GIVE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_GIVE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -953,7 +953,7 @@ VERB_IGNORE</H3>
 public static final java.lang.String <B>VERB_IGNORE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_IGNORE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_IGNORE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -963,7 +963,7 @@ VERB_INVITE</H3>
 public static final java.lang.String <B>VERB_INVITE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_INVITE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_INVITE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -973,7 +973,7 @@ VERB_JOIN</H3>
 public static final java.lang.String <B>VERB_JOIN</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_JOIN">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_JOIN">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -983,7 +983,7 @@ VERB_LEAVE</H3>
 public static final java.lang.String <B>VERB_LEAVE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_LEAVE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_LEAVE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -993,7 +993,7 @@ VERB_LIKE</H3>
 public static final java.lang.String <B>VERB_LIKE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_LIKE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_LIKE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1003,7 +1003,7 @@ VERB_MAKE_FRIEND</H3>
 public static final java.lang.String <B>VERB_MAKE_FRIEND</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_MAKE_FRIEND">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_MAKE_FRIEND">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1013,7 +1013,7 @@ VERB_PLAY</H3>
 public static final java.lang.String <B>VERB_PLAY</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_PLAY">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_PLAY">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1023,7 +1023,7 @@ VERB_POST</H3>
 public static final java.lang.String <B>VERB_POST</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_POST">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_POST">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1033,7 +1033,7 @@ VERB_RECEIVE</H3>
 public static final java.lang.String <B>VERB_RECEIVE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_RECEIVE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_RECEIVE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1043,7 +1043,7 @@ VERB_REMOVE</H3>
 public static final java.lang.String <B>VERB_REMOVE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_REMOVE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_REMOVE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1053,7 +1053,7 @@ VERB_REMOVE_FRIEND</H3>
 public static final java.lang.String <B>VERB_REMOVE_FRIEND</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_REMOVE_FRIEND">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_REMOVE_FRIEND">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1063,7 +1063,7 @@ VERB_REQUEST_FRIEND</H3>
 public static final java.lang.String <B>VERB_REQUEST_FRIEND</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_REQUEST_FRIEND">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_REQUEST_FRIEND">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1073,7 +1073,7 @@ VERB_RSVP_MAYBE</H3>
 public static final java.lang.String <B>VERB_RSVP_MAYBE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_RSVP_MAYBE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_RSVP_MAYBE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1083,7 +1083,7 @@ VERB_RSVP_NO</H3>
 public static final java.lang.String <B>VERB_RSVP_NO</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_RSVP_NO">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_RSVP_NO">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1093,7 +1093,7 @@ VERB_RSVP_YES</H3>
 public static final java.lang.String <B>VERB_RSVP_YES</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_RSVP_YES">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_RSVP_YES">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1103,7 +1103,7 @@ VERB_SAVE</H3>
 public static final java.lang.String <B>VERB_SAVE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_SAVE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_SAVE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1113,7 +1113,7 @@ VERB_SHARE</H3>
 public static final java.lang.String <B>VERB_SHARE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_SHARE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_SHARE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1123,7 +1123,7 @@ VERB_STOP_FOLLOWING</H3>
 public static final java.lang.String <B>VERB_STOP_FOLLOWING</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_STOP_FOLLOWING">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_STOP_FOLLOWING">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1133,7 +1133,7 @@ VERB_TAG</H3>
 public static final java.lang.String <B>VERB_TAG</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_TAG">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_TAG">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1143,7 +1143,7 @@ VERB_UNFAVORITE</H3>
 public static final java.lang.String <B>VERB_UNFAVORITE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_UNFAVORITE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_UNFAVORITE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1153,7 +1153,7 @@ VERB_UNLIKE</H3>
 public static final java.lang.String <B>VERB_UNLIKE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_UNLIKE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_UNLIKE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1163,7 +1163,7 @@ VERB_UNSAVE</H3>
 public static final java.lang.String <B>VERB_UNSAVE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_UNSAVE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_UNSAVE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1173,7 +1173,7 @@ VERB_UPDATE</H3>
 public static final java.lang.String <B>VERB_UPDATE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_UPDATE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_UPDATE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1183,7 +1183,7 @@ OBJECT_TYPE_ARTICLE</H3>
 public static final java.lang.String <B>OBJECT_TYPE_ARTICLE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.OBJECT_TYPE_ARTICLE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_ARTICLE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1193,7 +1193,7 @@ OBJECT_TYPE_AUDIO</H3>
 public static final java.lang.String <B>OBJECT_TYPE_AUDIO</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.OBJECT_TYPE_AUDIO">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_AUDIO">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1203,7 +1203,7 @@ OBJECT_TYPE_BADGE</H3>
 public static final java.lang.String <B>OBJECT_TYPE_BADGE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.OBJECT_TYPE_BADGE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_BADGE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1213,7 +1213,7 @@ OBJECT_TYPE_BOOKMARK</H3>
 public static final java.lang.String <B>OBJECT_TYPE_BOOKMARK</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.OBJECT_TYPE_BOOKMARK">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_BOOKMARK">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1223,7 +1223,7 @@ OBJECT_TYPE_COLLECTION</H3>
 public static final java.lang.String <B>OBJECT_TYPE_COLLECTION</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.OBJECT_TYPE_COLLECTION">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_COLLECTION">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1233,7 +1233,7 @@ OBJECT_TYPE_COMMENT</H3>
 public static final java.lang.String <B>OBJECT_TYPE_COMMENT</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.OBJECT_TYPE_COMMENT">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_COMMENT">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1243,7 +1243,7 @@ OBJECT_TYPE_EVENT</H3>
 public static final java.lang.String <B>OBJECT_TYPE_EVENT</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.OBJECT_TYPE_EVENT">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_EVENT">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1253,7 +1253,7 @@ OBJECT_TYPE_FILE</H3>
 public static final java.lang.String <B>OBJECT_TYPE_FILE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.OBJECT_TYPE_FILE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_FILE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1263,7 +1263,7 @@ OBJECT_TYPE_GROUP</H3>
 public static final java.lang.String <B>OBJECT_TYPE_GROUP</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.OBJECT_TYPE_GROUP">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_GROUP">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1273,7 +1273,7 @@ OBJECT_TYPE_IMAGE</H3>
 public static final java.lang.String <B>OBJECT_TYPE_IMAGE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.OBJECT_TYPE_IMAGE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_IMAGE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1283,7 +1283,7 @@ OBJECT_TYPE_NOTE</H3>
 public static final java.lang.String <B>OBJECT_TYPE_NOTE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.OBJECT_TYPE_NOTE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_NOTE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1293,7 +1293,7 @@ OBJECT_TYPE_PERSON</H3>
 public static final java.lang.String <B>OBJECT_TYPE_PERSON</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.OBJECT_TYPE_PERSON">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_PERSON">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1303,7 +1303,7 @@ OBJECT_TYPE_PLACE</H3>
 public static final java.lang.String <B>OBJECT_TYPE_PLACE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.OBJECT_TYPE_PLACE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_PLACE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1313,7 +1313,7 @@ OBJECT_TYPE_PRODUCT</H3>
 public static final java.lang.String <B>OBJECT_TYPE_PRODUCT</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.OBJECT_TYPE_PRODUCT">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_PRODUCT">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1323,7 +1323,7 @@ OBJECT_TYPE_QUESTION</H3>
 public static final java.lang.String <B>OBJECT_TYPE_QUESTION</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.OBJECT_TYPE_QUESTION">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_QUESTION">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1333,7 +1333,7 @@ OBJECT_TYPE_REVIEW</H3>
 public static final java.lang.String <B>OBJECT_TYPE_REVIEW</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.OBJECT_TYPE_REVIEW">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_REVIEW">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1343,7 +1343,7 @@ OBJECT_TYPE_SERVICE</H3>
 public static final java.lang.String <B>OBJECT_TYPE_SERVICE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.OBJECT_TYPE_SERVICE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_SERVICE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1353,7 +1353,7 @@ OBJECT_TYPE_VIDEO</H3>
 public static final java.lang.String <B>OBJECT_TYPE_VIDEO</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.OBJECT_TYPE_VIDEO">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_VIDEO">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1363,7 +1363,7 @@ PROPERTY_CONTENT</H3>
 public static final java.lang.String <B>PROPERTY_CONTENT</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.PROPERTY_CONTENT">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.PROPERTY_CONTENT">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1373,7 +1373,7 @@ PROPERTY_GENERATOR</H3>
 public static final java.lang.String <B>PROPERTY_GENERATOR</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.PROPERTY_GENERATOR">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.PROPERTY_GENERATOR">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1383,7 +1383,7 @@ PROPERTY_ICON</H3>
 public static final java.lang.String <B>PROPERTY_ICON</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.PROPERTY_ICON">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.PROPERTY_ICON">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1393,7 +1393,7 @@ PROPERTY_CATEGORY</H3>
 public static final java.lang.String <B>PROPERTY_CATEGORY</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.PROPERTY_CATEGORY">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.PROPERTY_CATEGORY">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1403,7 +1403,7 @@ PROPERTY_VERB</H3>
 public static final java.lang.String <B>PROPERTY_VERB</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.PROPERTY_VERB">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.PROPERTY_VERB">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1413,7 +1413,7 @@ PROPERTY_PUBLISHED</H3>
 public static final java.lang.String <B>PROPERTY_PUBLISHED</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.PROPERTY_PUBLISHED">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.PROPERTY_PUBLISHED">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1423,7 +1423,7 @@ PROPERTY_OBJECT</H3>
 public static final java.lang.String <B>PROPERTY_OBJECT</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.PROPERTY_OBJECT">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.PROPERTY_OBJECT">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1433,7 +1433,7 @@ PROPERTY_TITLE</H3>
 public static final java.lang.String <B>PROPERTY_TITLE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.PROPERTY_TITLE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.PROPERTY_TITLE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1443,7 +1443,7 @@ PROPERTY_ACTOR</H3>
 public static final java.lang.String <B>PROPERTY_ACTOR</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.PROPERTY_ACTOR">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.PROPERTY_ACTOR">Constant Field Values</A></DL>
 </DL>
 
 <!-- ========= CONSTRUCTOR DETAIL ======== -->
@@ -1464,10 +1464,10 @@ public <B>Activity</B>()</PRE>
 </DL>
 <HR>
 
-<A NAME="Activity(org.usergrid.android.client.entities.Entity)"><!-- --></A><H3>
+<A NAME="Activity(org.apache.usergrid.android.client.entities.Entity)"><!-- --></A><H3>
 Activity</H3>
 <PRE>
-public <B>Activity</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;entity)</PRE>
+public <B>Activity</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;entity)</PRE>
 <DL>
 </DL>
 
@@ -1487,7 +1487,7 @@ getNativeType</H3>
 public java.lang.String <B>getNativeType</B>()</PRE>
 <DL>
 <DD><DL>
-<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getNativeType()">getNativeType</A></CODE> in class <CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></CODE></DL>
+<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getNativeType()">getNativeType</A></CODE> in class <CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></CODE></DL>
 </DD>
 <DD><DL>
 </DL>
@@ -1501,7 +1501,7 @@ getPropertyNames</H3>
 public java.util.List&lt;java.lang.String&gt; <B>getPropertyNames</B>()</PRE>
 <DL>
 <DD><DL>
-<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getPropertyNames()">getPropertyNames</A></CODE> in class <CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></CODE></DL>
+<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getPropertyNames()">getPropertyNames</A></CODE> in class <CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></CODE></DL>
 </DD>
 <DD><DL>
 </DL>
@@ -1509,15 +1509,15 @@ public java.util.List&lt;java.lang.String&gt; <B>getPropertyNames</B>()</PRE>
 </DL>
 <HR>
 
-<A NAME="newActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.entities.User, org.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)"><!-- --></A><H3>
+<A NAME="newActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.entities.User, org.apache.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)"><!-- --></A><H3>
 newActivity</H3>
 <PRE>
-public static <A HREF="../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A> <B>newActivity</B>(java.lang.String&nbsp;verb,
+public static <A HREF="../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A> <B>newActivity</B>(java.lang.String&nbsp;verb,
                                    java.lang.String&nbsp;title,
                                    java.lang.String&nbsp;content,
                                    java.lang.String&nbsp;category,
-                                   <A HREF="../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>&nbsp;user,
-                                   <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;object,
+                                   <A HREF="../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>&nbsp;user,
+                                   <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;object,
                                    java.lang.String&nbsp;objectType,
                                    java.lang.String&nbsp;objectName,
                                    java.lang.String&nbsp;objectContent)</PRE>
@@ -1531,7 +1531,7 @@ public static <A HREF="../../../../../org/usergrid/android/client/entities/Activ
 <A NAME="getActor()"><!-- --></A><H3>
 getActor</H3>
 <PRE>
-public <A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A> <B>getActor</B>()</PRE>
+public <A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A> <B>getActor</B>()</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1539,10 +1539,10 @@ public <A HREF="../../../../../org/usergrid/android/client/entities/Activity.Act
 </DL>
 <HR>
 
-<A NAME="setActor(org.usergrid.android.client.entities.Activity.ActivityObject)"><!-- --></A><H3>
+<A NAME="setActor(org.apache.usergrid.android.client.entities.Activity.ActivityObject)"><!-- --></A><H3>
 setActor</H3>
 <PRE>
-public void <B>setActor</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>&nbsp;actor)</PRE>
+public void <B>setActor</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>&nbsp;actor)</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1553,7 +1553,7 @@ public void <B>setActor</B>(<A HREF="../../../../../org/usergrid/android/client/
 <A NAME="getGenerator()"><!-- --></A><H3>
 getGenerator</H3>
 <PRE>
-public <A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A> <B>getGenerator</B>()</PRE>
+public <A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A> <B>getGenerator</B>()</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1561,10 +1561,10 @@ public <A HREF="../../../../../org/usergrid/android/client/entities/Activity.Act
 </DL>
 <HR>
 
-<A NAME="setGenerator(org.usergrid.android.client.entities.Activity.ActivityObject)"><!-- --></A><H3>
+<A NAME="setGenerator(org.apache.usergrid.android.client.entities.Activity.ActivityObject)"><!-- --></A><H3>
 setGenerator</H3>
 <PRE>
-public void <B>setGenerator</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>&nbsp;generator)</PRE>
+public void <B>setGenerator</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>&nbsp;generator)</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1641,7 +1641,7 @@ public void <B>setPublished</B>(java.lang.Long&nbsp;published)</PRE>
 <A NAME="getObject()"><!-- --></A><H3>
 getObject</H3>
 <PRE>
-public <A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A> <B>getObject</B>()</PRE>
+public <A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A> <B>getObject</B>()</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1649,10 +1649,10 @@ public <A HREF="../../../../../org/usergrid/android/client/entities/Activity.Act
 </DL>
 <HR>
 
-<A NAME="setObject(org.usergrid.android.client.entities.Activity.ActivityObject)"><!-- --></A><H3>
+<A NAME="setObject(org.apache.usergrid.android.client.entities.Activity.ActivityObject)"><!-- --></A><H3>
 setObject</H3>
 <PRE>
-public void <B>setObject</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>&nbsp;object)</PRE>
+public void <B>setObject</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>&nbsp;object)</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1685,7 +1685,7 @@ public void <B>setTitle</B>(java.lang.String&nbsp;title)</PRE>
 <A NAME="getIcon()"><!-- --></A><H3>
 getIcon</H3>
 <PRE>
-public <A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A> <B>getIcon</B>()</PRE>
+public <A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A> <B>getIcon</B>()</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1693,10 +1693,10 @@ public <A HREF="../../../../../org/usergrid/android/client/entities/Activity.Med
 </DL>
 <HR>
 
-<A NAME="setIcon(org.usergrid.android.client.entities.Activity.MediaLink)"><!-- --></A><H3>
+<A NAME="setIcon(org.apache.usergrid.android.client.entities.Activity.MediaLink)"><!-- --></A><H3>
 setIcon</H3>
 <PRE>
-public void <B>setIcon</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A>&nbsp;icon)</PRE>
+public void <B>setIcon</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A>&nbsp;icon)</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1756,7 +1756,7 @@ public void <B>setContent</B>(java.lang.String&nbsp;content)</PRE>
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 &nbsp;PREV CLASS&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.apache.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/entities/Activity.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="Activity.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/entities/Device.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/entities/Device.html b/sdks/android/doc/org/usergrid/android/client/entities/Device.html
index ada32f3..7d9fe49 100644
--- a/sdks/android/doc/org/usergrid/android/client/entities/Device.html
+++ b/sdks/android/doc/org/usergrid/android/client/entities/Device.html
@@ -55,8 +55,8 @@ function windowTitle()
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/entities/Device.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="Device.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
@@ -88,17 +88,17 @@ DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client.entities</FONT>
+org.apache.usergrid.android.client.entities</FONT>
 <BR>
 Class Device</H2>
 <PRE>
 java.lang.Object
-  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">org.usergrid.android.client.entities.Entity</A>
-      <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.usergrid.android.client.entities.Device</B>
+  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">org.apache.usergrid.android.client.entities.Entity</A>
+      <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.usergrid.android.client.entities.Device</B>
 </PRE>
 <HR>
 <DL>
-<DT><PRE>public class <B>Device</B><DT>extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></DL>
+<DT><PRE>public class <B>Device</B><DT>extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></DL>
 </PRE>
 
 <P>
@@ -133,7 +133,7 @@ java.lang.Object
 &nbsp;<A NAME="fields_inherited_from_class_org.usergrid.android.client.entities.Entity"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left"><B>Fields inherited from class org.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></B></TH>
+<TH ALIGN="left"><B>Fields inherited from class org.apache.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></B></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#CLASS_FOR_ENTITY_TYPE">CLASS_FOR_ENTITY_TYPE</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#PROPERTY_TYPE">PROPERTY_TYPE</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#PROPERTY_UUID">PROPERTY_UUID</A></CODE></TD>
@@ -155,7 +155,7 @@ java.lang.Object
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Device.html#Device(org.usergrid.android.client.entities.Entity)">Device</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;entity)</CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Device.html#Device(org.apache.usergrid.android.client.entities.Entity)">Device</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;entity)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -206,10 +206,10 @@ java.lang.Object
 &nbsp;<A NAME="methods_inherited_from_class_org.usergrid.android.client.entities.Entity"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left"><B>Methods inherited from class org.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></B></TH>
+<TH ALIGN="left"><B>Methods inherited from class org.apache.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></B></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getProperties()">getProperties</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getType()">getType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getUuid()">getUuid</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setProperty(java.lang.String, org.codehaus.jackson.JsonNode)">setProperty</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setType(java.lang.String)">setType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setUuid(java.util.UUID)">setUuid</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toString()">toString</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(java.lang.Class)">toType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(org.usergrid.androi
 d.client.entities.Entity, java.lang.Class)">toType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(java.util.List, java.lang.Class)">toType</A></CODE></TD>
+<TD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getProperties()">getProperties</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getType()">getType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getUuid()">getUuid</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setProperty(java.lang.String, org.codehaus.jackson.JsonNode)">setProperty</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setType(java.lang.String)">setType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setUuid(java.util.UUID)">setUuid</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toString()">toString</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(java.lang.Class)">toType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(org.apache.usergrid
 .android.client.entities.Entity, java.lang.Class)">toType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(java.util.List, java.lang.Class)">toType</A></CODE></TD>
 </TR>
 </TABLE>
 &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
@@ -240,7 +240,7 @@ ENTITY_TYPE</H3>
 public static final java.lang.String <B>ENTITY_TYPE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Device.ENTITY_TYPE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Device.ENTITY_TYPE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -250,7 +250,7 @@ PROPERTY_NAME</H3>
 public static final java.lang.String <B>PROPERTY_NAME</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Device.PROPERTY_NAME">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Device.PROPERTY_NAME">Constant Field Values</A></DL>
 </DL>
 
 <!-- ========= CONSTRUCTOR DETAIL ======== -->
@@ -271,10 +271,10 @@ public <B>Device</B>()</PRE>
 </DL>
 <HR>
 
-<A NAME="Device(org.usergrid.android.client.entities.Entity)"><!-- --></A><H3>
+<A NAME="Device(org.apache.usergrid.android.client.entities.Entity)"><!-- --></A><H3>
 Device</H3>
 <PRE>
-public <B>Device</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;entity)</PRE>
+public <B>Device</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;entity)</PRE>
 <DL>
 </DL>
 
@@ -294,7 +294,7 @@ getNativeType</H3>
 public java.lang.String <B>getNativeType</B>()</PRE>
 <DL>
 <DD><DL>
-<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getNativeType()">getNativeType</A></CODE> in class <CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></CODE></DL>
+<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getNativeType()">getNativeType</A></CODE> in class <CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></CODE></DL>
 </DD>
 <DD><DL>
 </DL>
@@ -308,7 +308,7 @@ getPropertyNames</H3>
 public java.util.List&lt;java.lang.String&gt; <B>getPropertyNames</B>()</PRE>
 <DL>
 <DD><DL>
-<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getPropertyNames()">getPropertyNames</A></CODE> in class <CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></CODE></DL>
+<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getPropertyNames()">getPropertyNames</A></CODE> in class <CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></CODE></DL>
 </DD>
 <DD><DL>
 </DL>
@@ -367,8 +367,8 @@ public void <B>setName</B>(java.lang.String&nbsp;name)</PRE>
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/entities/Device.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="Device.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/entities/Entity.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/entities/Entity.html b/sdks/android/doc/org/usergrid/android/client/entities/Entity.html
index ae63c36..0e282e0 100644
--- a/sdks/android/doc/org/usergrid/android/client/entities/Entity.html
+++ b/sdks/android/doc/org/usergrid/android/client/entities/Entity.html
@@ -55,8 +55,8 @@ function windowTitle()
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/entities/Entity.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="Entity.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
@@ -88,15 +88,15 @@ DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client.entities</FONT>
+org.apache.usergrid.android.client.entities</FONT>
 <BR>
 Class Entity</H2>
 <PRE>
 java.lang.Object
-  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.usergrid.android.client.entities.Entity</B>
+  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.usergrid.android.client.entities.Entity</B>
 </PRE>
 <DL>
-<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities">Device</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>, <A HREF="../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A></DD>
+<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities">Device</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>, <A HREF="../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A></DD>
 </DL>
 <HR>
 <DL>
@@ -117,7 +117,7 @@ java.lang.Object
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>static&nbsp;java.util.Map&lt;java.lang.String,java.lang.Class&lt;? extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt;&gt;</CODE></FONT></TD>
+<CODE>static&nbsp;java.util.Map&lt;java.lang.String,java.lang.Class&lt;? extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt;&gt;</CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#CLASS_FOR_ENTITY_TYPE">CLASS_FOR_ENTITY_TYPE</A></B></CODE>
 
 <BR>
@@ -250,7 +250,7 @@ java.lang.Object
 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
 <TR ALIGN="right" VALIGN="">
 <TD NOWRAP><FONT SIZE="-1">
-<CODE>&lt;T extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt; 
+<CODE>&lt;T extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt; 
 <BR>
 T</CODE></FONT></TD>
 </TR>
@@ -267,13 +267,13 @@ T</CODE></FONT></TD>
 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
 <TR ALIGN="right" VALIGN="">
 <TD NOWRAP><FONT SIZE="-1">
-<CODE>&lt;T extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt; 
+<CODE>&lt;T extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt; 
 <BR>
 T</CODE></FONT></TD>
 </TR>
 </TABLE>
 </CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(org.usergrid.android.client.entities.Entity, java.lang.Class)">toType</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;entity,
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(org.apache.usergrid.android.client.entities.Entity, java.lang.Class)">toType</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;entity,
        java.lang.Class&lt;T&gt;&nbsp;t)</CODE>
 
 <BR>
@@ -285,13 +285,13 @@ T</CODE></FONT></TD>
 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
 <TR ALIGN="right" VALIGN="">
 <TD NOWRAP><FONT SIZE="-1">
-<CODE>&lt;T extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt; 
+<CODE>&lt;T extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt; 
 <BR>
 java.util.List&lt;T&gt;</CODE></FONT></TD>
 </TR>
 </TABLE>
 </CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(java.util.List, java.lang.Class)">toType</A></B>(java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt;&nbsp;entities,
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(java.util.List, java.lang.Class)">toType</A></B>(java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt;&nbsp;entities,
        java.lang.Class&lt;T&gt;&nbsp;t)</CODE>
 
 <BR>
@@ -326,7 +326,7 @@ PROPERTY_UUID</H3>
 public static final java.lang.String <B>PROPERTY_UUID</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Entity.PROPERTY_UUID">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Entity.PROPERTY_UUID">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -336,14 +336,14 @@ PROPERTY_TYPE</H3>
 public static final java.lang.String <B>PROPERTY_TYPE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Entity.PROPERTY_TYPE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Entity.PROPERTY_TYPE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
 <A NAME="CLASS_FOR_ENTITY_TYPE"><!-- --></A><H3>
 CLASS_FOR_ENTITY_TYPE</H3>
 <PRE>
-public static java.util.Map&lt;java.lang.String,java.lang.Class&lt;? extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt;&gt; <B>CLASS_FOR_ENTITY_TYPE</B></PRE>
+public static java.util.Map&lt;java.lang.String,java.lang.Class&lt;? extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt;&gt; <B>CLASS_FOR_ENTITY_TYPE</B></PRE>
 <DL>
 <DL>
 </DL>
@@ -490,7 +490,7 @@ public java.lang.String <B>toString</B>()</PRE>
 <A NAME="toType(java.lang.Class)"><!-- --></A><H3>
 toType</H3>
 <PRE>
-public &lt;T extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt; T <B>toType</B>(java.lang.Class&lt;T&gt;&nbsp;t)</PRE>
+public &lt;T extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt; T <B>toType</B>(java.lang.Class&lt;T&gt;&nbsp;t)</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -498,10 +498,10 @@ public &lt;T extends <A HREF="../../../../../org/usergrid/android/client/entitie
 </DL>
 <HR>
 
-<A NAME="toType(org.usergrid.android.client.entities.Entity, java.lang.Class)"><!-- --></A><H3>
+<A NAME="toType(org.apache.usergrid.android.client.entities.Entity, java.lang.Class)"><!-- --></A><H3>
 toType</H3>
 <PRE>
-public static &lt;T extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt; T <B>toType</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;entity,
+public static &lt;T extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt; T <B>toType</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;entity,
                                           java.lang.Class&lt;T&gt;&nbsp;t)</PRE>
 <DL>
 <DD><DL>
@@ -513,7 +513,7 @@ public static &lt;T extends <A HREF="../../../../../org/usergrid/android/client/
 <A NAME="toType(java.util.List, java.lang.Class)"><!-- --></A><H3>
 toType</H3>
 <PRE>
-public static &lt;T extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt; java.util.List&lt;T&gt; <B>toType</B>(java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt;&nbsp;entities,
+public static &lt;T extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt; java.util.List&lt;T&gt; <B>toType</B>(java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt;&nbsp;entities,
                                                           java.lang.Class&lt;T&gt;&nbsp;t)</PRE>
 <DL>
 <DD><DL>
@@ -551,8 +551,8 @@ public static &lt;T extends <A HREF="../../../../../org/usergrid/android/client/
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/entities/Entity.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="Entity.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;


[45/96] [abbrv] [partial] Change package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/mq/QueueQuery.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/mq/QueueQuery.java b/stack/core/src/main/java/org/apache/usergrid/mq/QueueQuery.java
new file mode 100644
index 0000000..4f43be9
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/mq/QueueQuery.java
@@ -0,0 +1,305 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.mq;
+
+
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
+import org.apache.usergrid.utils.ConversionUtils;
+
+import static java.util.UUID.nameUUIDFromBytes;
+import static org.apache.commons.lang.StringUtils.isNotBlank;
+import static org.apache.usergrid.utils.ConversionUtils.getLong;
+import static org.apache.usergrid.utils.ListUtils.first;
+import static org.apache.usergrid.utils.UUIDUtils.isUUID;
+import static org.apache.usergrid.utils.UUIDUtils.tryGetUUID;
+
+
+public class QueueQuery extends Query {
+
+    UUID consumerId;
+    long lastTimestamp;
+    UUID lastMessageId;
+    QueuePosition position = null;
+    boolean _synchronized;
+    boolean update = true;
+    long timeout;
+
+
+    public QueueQuery() {
+    }
+
+
+    public QueueQuery( Query q ) {
+        super( q );
+    }
+
+
+    public QueueQuery( QueueQuery q ) {
+        super( q );
+        if ( q != null ) {
+            consumerId = q.consumerId;
+            lastTimestamp = q.lastTimestamp;
+            lastMessageId = q.lastMessageId;
+            position = q.position;
+            _synchronized = q._synchronized;
+            update = q.update;
+        }
+    }
+
+
+    public static QueueQuery newQueryIfNull( QueueQuery query ) {
+        if ( query == null ) {
+            query = new QueueQuery();
+        }
+        return query;
+    }
+
+
+    public static QueueQuery fromQL( String ql ) {
+        if ( ql == null ) {
+            return null;
+        }
+        QueueQuery query = null;
+        Query q = Query.fromQL( ql );
+        if ( q != null ) {
+            query = new QueueQuery( q );
+        }
+        return query;
+    }
+
+
+    public static QueueQuery fromQueryParams( Map<String, List<String>> params ) {
+
+        QueueQuery query = null;
+
+        Query q = Query.fromQueryParams( params );
+        if ( q != null ) {
+            query = new QueueQuery( q );
+        }
+
+        String consumer = first( params.get( "consumer" ) );
+
+        if ( consumer != null ) {
+            query = newQueryIfNull( query );
+            query.setConsumerId( getConsumerId( consumer ) );
+        }
+
+        UUID last = tryGetUUID( first( params.get( "last" ) ) );
+        if ( last != null ) {
+            query = newQueryIfNull( query );
+            query.setLastMessageId( last );
+        }
+
+        if ( params.containsKey( "time" ) ) {
+            query = newQueryIfNull( query );
+            long t = getLong( first( params.get( "time" ) ) );
+            if ( t > 0 ) {
+                query.setLastTimestamp( t );
+            }
+        }
+        if ( params.containsKey( "pos" ) ) {
+            query = newQueryIfNull( query );
+            QueuePosition pos = QueuePosition.find( first( params.get( "pos" ) ) );
+            if ( pos != null ) {
+                query.setPosition( pos );
+            }
+        }
+
+        if ( params.containsKey( "update" ) ) {
+            query = newQueryIfNull( query );
+            query.setUpdate( ConversionUtils.getBoolean( first( params.get( "update" ) ) ) );
+        }
+
+        if ( params.containsKey( "synchronized" ) ) {
+            query = newQueryIfNull( query );
+            query.setSynchronized( ConversionUtils.getBoolean( first( params.get( "synchronized" ) ) ) );
+        }
+
+        if ( params.containsKey( "timeout" ) ) {
+            query = newQueryIfNull( query );
+            query.setTimeout( ConversionUtils.getLong( first( params.get( "timeout" ) ) ) );
+        }
+
+        if ( ( query != null ) && ( consumer != null ) ) {
+            query.setPositionIfUnset( QueuePosition.CONSUMER );
+        }
+
+        return query;
+    }
+
+
+    public UUID getConsumerId() {
+        return consumerId;
+    }
+
+
+    public void setConsumerId( UUID consumerId ) {
+        this.consumerId = consumerId;
+    }
+
+
+    public QueueQuery withConsumerId( UUID consumerId ) {
+        this.consumerId = consumerId;
+        setPositionIfUnset( QueuePosition.CONSUMER );
+        return this;
+    }
+
+
+    public QueueQuery withConsumer( String consumer ) {
+        consumerId = getConsumerId( consumer );
+        setPositionIfUnset( QueuePosition.CONSUMER );
+        return this;
+    }
+
+
+    public long getLastTimestamp() {
+        return lastTimestamp;
+    }
+
+
+    public void setLastTimestamp( long lastTimestamp ) {
+        this.lastTimestamp = lastTimestamp;
+    }
+
+
+    public QueueQuery withLastTimestamp( long lastTimestamp ) {
+        this.lastTimestamp = lastTimestamp;
+        return this;
+    }
+
+
+    public UUID getLastMessageId() {
+        return lastMessageId;
+    }
+
+
+    public void setLastMessageId( UUID lastMessageId ) {
+        this.lastMessageId = lastMessageId;
+    }
+
+
+    public QueueQuery withLastMessageId( UUID lastMessageId ) {
+        this.lastMessageId = lastMessageId;
+        return this;
+    }
+
+
+    public QueuePosition getPosition() {
+        if ( position != null ) {
+            return position;
+        }
+        return QueuePosition.LAST;
+    }
+
+
+    public boolean isPositionSet() {
+        return position != null;
+    }
+
+
+    public void setPosition( QueuePosition position ) {
+        this.position = position;
+    }
+
+
+    public void setPositionIfUnset( QueuePosition position ) {
+        if ( this.position == null ) {
+            this.position = position;
+        }
+    }
+
+
+    public QueueQuery withPosition( QueuePosition position ) {
+        this.position = position;
+        return this;
+    }
+
+
+    public QueueQuery withPositionInUnset( QueuePosition position ) {
+        if ( this.position == null ) {
+            this.position = position;
+        }
+        return this;
+    }
+
+
+    public static UUID getConsumerId( String consumer ) {
+        if ( consumer == null ) {
+            return null;
+        }
+        if ( isUUID( consumer ) ) {
+            return UUID.fromString( consumer );
+        }
+        else if ( isNotBlank( consumer ) ) {
+            return nameUUIDFromBytes( ( "consumer:" + consumer ).getBytes() );
+        }
+        return null;
+    }
+
+
+    public boolean isSynchronized() {
+        return _synchronized;
+    }
+
+
+    public void setSynchronized( boolean _synchronized ) {
+        this._synchronized = _synchronized;
+    }
+
+
+    public QueueQuery withSynchronized( boolean _synchronized ) {
+        this._synchronized = _synchronized;
+        return this;
+    }
+
+
+    public boolean isUpdate() {
+        return update;
+    }
+
+
+    public void setUpdate( boolean update ) {
+        this.update = update;
+    }
+
+
+    public QueueQuery withUpdate( boolean update ) {
+        this.update = update;
+        return this;
+    }
+
+
+    /** @return the timeout */
+    public long getTimeout() {
+        return timeout;
+    }
+
+
+    /** @param timeout the timeout to set */
+    public void setTimeout( long timeout ) {
+        this.timeout = timeout;
+        setSynchronized( true );
+    }
+
+
+    public QueueQuery withTimeout( long timeout ) {
+        setTimeout( timeout );
+        return this;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/mq/QueueResults.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/mq/QueueResults.java b/stack/core/src/main/java/org/apache/usergrid/mq/QueueResults.java
new file mode 100644
index 0000000..c9567c3
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/mq/QueueResults.java
@@ -0,0 +1,128 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.mq;
+
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.UUID;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
+
+
+@XmlRootElement
+public class QueueResults {
+
+    private String path;
+    private UUID queue;
+    private List<Message> messages = new ArrayList<Message>();
+    private UUID last;
+    private UUID consumer;
+
+
+    public QueueResults() {
+
+    }
+
+
+    public QueueResults( Message message ) {
+        if ( message != null ) {
+            messages.add( message );
+        }
+    }
+
+
+    public QueueResults( List<Message> messages ) {
+        if ( messages != null ) {
+            this.messages = messages;
+        }
+    }
+
+
+    public QueueResults( String path, UUID queue, List<Message> messages, UUID last, UUID consumer ) {
+        this.path = path;
+        this.queue = queue;
+        this.messages = messages;
+        this.last = last;
+        this.consumer = consumer;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public String getPath() {
+        return path;
+    }
+
+
+    public void setPath( String path ) {
+        this.path = path;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public UUID getQueue() {
+        return queue;
+    }
+
+
+    public void setQueue( UUID queue ) {
+        this.queue = queue;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public List<Message> getMessages() {
+        return messages;
+    }
+
+
+    public void setMessages( List<Message> messages ) {
+        if ( messages == null ) {
+            messages = new ArrayList<Message>();
+        }
+        this.messages = messages;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public UUID getLast() {
+        return last;
+    }
+
+
+    public void setLast( UUID last ) {
+        this.last = last;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public UUID getConsumer() {
+        return consumer;
+    }
+
+
+    public void setConsumer( UUID consumer ) {
+        this.consumer = consumer;
+    }
+
+
+    public int size() {
+        return messages.size();
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/mq/QueueSet.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/mq/QueueSet.java b/stack/core/src/main/java/org/apache/usergrid/mq/QueueSet.java
new file mode 100644
index 0000000..974b7ed
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/mq/QueueSet.java
@@ -0,0 +1,192 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.mq;
+
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.UUID;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
+
+
+@XmlRootElement
+public class QueueSet {
+
+    List<QueueInfo> queues = new ArrayList<QueueInfo>();
+    boolean more;
+
+
+    public QueueSet() {
+
+    }
+
+
+    public List<QueueInfo> getQueues() {
+        return queues;
+    }
+
+
+    public void setQueues( List<QueueInfo> queues ) {
+        if ( queues == null ) {
+            queues = new ArrayList<QueueInfo>();
+        }
+        this.queues = queues;
+    }
+
+
+    public QueueSet addQueue( String queuePath, UUID queueId ) {
+        QueueInfo queue = new QueueInfo( queuePath, queueId );
+        queues.add( queue );
+        return this;
+    }
+
+
+    public boolean isMore() {
+        return more;
+    }
+
+
+    public void setMore( boolean more ) {
+        this.more = more;
+    }
+
+
+    public boolean hasMore() {
+        return more;
+    }
+
+
+    public int size() {
+        return queues.size();
+    }
+
+
+    @XmlRootElement
+    public static class QueueInfo {
+
+        String path;
+        UUID uuid;
+
+
+        public QueueInfo() {
+        }
+
+
+        public QueueInfo( String path, UUID uuid ) {
+            this.path = path;
+            this.uuid = uuid;
+        }
+
+
+        public String getPath() {
+            return path;
+        }
+
+
+        public void setPath( String path ) {
+            this.path = path;
+        }
+
+
+        public UUID getUuid() {
+            return uuid;
+        }
+
+
+        public void setUuid( UUID uuid ) {
+            this.uuid = uuid;
+        }
+
+
+        @Override
+        public int hashCode() {
+            final int prime = 31;
+            int result = 1;
+            result = ( prime * result ) + ( ( path == null ) ? 0 : path.hashCode() );
+            result = ( prime * result ) + ( ( uuid == null ) ? 0 : uuid.hashCode() );
+            return result;
+        }
+
+
+        @Override
+        public boolean equals( Object obj ) {
+            if ( this == obj ) {
+                return true;
+            }
+            if ( obj == null ) {
+                return false;
+            }
+            if ( getClass() != obj.getClass() ) {
+                return false;
+            }
+            QueueInfo other = ( QueueInfo ) obj;
+            if ( path == null ) {
+                if ( other.path != null ) {
+                    return false;
+                }
+            }
+            else if ( !path.equals( other.path ) ) {
+                return false;
+            }
+            if ( uuid == null ) {
+                if ( other.uuid != null ) {
+                    return false;
+                }
+            }
+            else if ( !uuid.equals( other.uuid ) ) {
+                return false;
+            }
+            return true;
+        }
+
+
+        @Override
+        public String toString() {
+            return "QueueInfo [path=" + path + ", uuid=" + uuid + "]";
+        }
+    }
+
+
+    public void setCursorToLastResult() {
+        // TODO Auto-generated method stub
+
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public Object getCursor() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+
+    public void and( QueueSet r ) {
+        Set<QueueInfo> oldSet = new HashSet<QueueInfo>( queues );
+        List<QueueInfo> newList = new ArrayList<QueueInfo>();
+        for ( QueueInfo q : r.getQueues() ) {
+            if ( oldSet.contains( q ) ) {
+                newList.add( q );
+            }
+        }
+        queues = newList;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/CassandraMQUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/CassandraMQUtils.java b/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/CassandraMQUtils.java
new file mode 100644
index 0000000..2439597
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/CassandraMQUtils.java
@@ -0,0 +1,277 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.mq.cassandra;
+
+
+import java.nio.ByteBuffer;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.UUID;
+
+import org.apache.usergrid.mq.Message;
+import org.apache.usergrid.mq.Queue;
+import org.apache.usergrid.mq.QueueQuery;
+import org.apache.usergrid.utils.ConversionUtils;
+import org.apache.usergrid.utils.JsonUtils;
+import org.apache.usergrid.utils.UUIDUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import me.prettyprint.cassandra.serializers.ByteBufferSerializer;
+import me.prettyprint.cassandra.serializers.BytesArraySerializer;
+import me.prettyprint.cassandra.serializers.DynamicCompositeSerializer;
+import me.prettyprint.cassandra.serializers.LongSerializer;
+import me.prettyprint.cassandra.serializers.StringSerializer;
+import me.prettyprint.cassandra.serializers.UUIDSerializer;
+import me.prettyprint.hector.api.beans.HColumn;
+import me.prettyprint.hector.api.mutation.Mutator;
+import static me.prettyprint.hector.api.factory.HFactory.createColumn;
+import static org.apache.usergrid.mq.Message.MESSAGE_ID;
+import static org.apache.usergrid.mq.Message.MESSAGE_PROPERTIES;
+import static org.apache.usergrid.mq.Message.MESSAGE_TYPE;
+import static org.apache.usergrid.mq.Queue.QUEUE_NEWEST;
+import static org.apache.usergrid.mq.Queue.QUEUE_OLDEST;
+import static org.apache.usergrid.mq.Queue.QUEUE_PROPERTIES;
+import static org.apache.usergrid.mq.QueuePosition.CONSUMER;
+import static org.apache.usergrid.utils.ConversionUtils.bytebuffer;
+import static org.apache.usergrid.utils.ConversionUtils.getLong;
+import static org.apache.usergrid.utils.ConversionUtils.object;
+
+
+public class CassandraMQUtils {
+
+    public static final Logger logger = LoggerFactory.getLogger( CassandraMQUtils.class );
+
+    public static final StringSerializer se = new StringSerializer();
+    public static final ByteBufferSerializer be = new ByteBufferSerializer();
+    public static final UUIDSerializer ue = new UUIDSerializer();
+    public static final BytesArraySerializer bae = new BytesArraySerializer();
+    public static final DynamicCompositeSerializer dce = new DynamicCompositeSerializer();
+    public static final LongSerializer le = new LongSerializer();
+
+    /** Logger for batch operations */
+    private static final Logger batch_logger =
+            LoggerFactory.getLogger( CassandraMQUtils.class.getPackage().getName() + ".BATCH" );
+
+
+    public static void logBatchOperation( String operation, Object columnFamily, Object key, Object columnName,
+                                          Object columnValue, long timestamp ) {
+
+        if ( batch_logger.isInfoEnabled() ) {
+            batch_logger.info( "{} cf={} key={} name={} value={}", new Object[] {
+                    operation, columnFamily, key, columnName, columnValue
+            } );
+        }
+    }
+
+
+    /**
+     * Encode a message into a set of columns. JMS properties are encoded as strings and longs everything else is binary
+     * JSON.
+     */
+    public static Map<ByteBuffer, ByteBuffer> serializeMessage( Message message ) {
+        if ( message == null ) {
+            return null;
+        }
+        Map<ByteBuffer, ByteBuffer> columns = new HashMap<ByteBuffer, ByteBuffer>();
+        for ( Entry<String, Object> property : message.getProperties().entrySet() ) {
+            if ( property.getValue() == null ) {
+                columns.put( bytebuffer( property.getKey() ), null );
+            }
+            else if ( MESSAGE_TYPE.equals( property.getKey() ) || MESSAGE_ID.equals( property.getKey() ) ) {
+                columns.put( bytebuffer( property.getKey() ), bytebuffer( property.getValue() ) );
+            }
+            else {
+                columns.put( bytebuffer( property.getKey() ), JsonUtils.toByteBuffer( property.getValue() ) );
+            }
+        }
+        return columns;
+    }
+
+
+    public static Mutator<ByteBuffer> addMessageToMutator( Mutator<ByteBuffer> m, Message message, long timestamp ) {
+
+        Map<ByteBuffer, ByteBuffer> columns = serializeMessage( message );
+
+        if ( columns == null ) {
+            return m;
+        }
+
+        for ( Map.Entry<ByteBuffer, ByteBuffer> column_entry : columns.entrySet() ) {
+            if ( ( column_entry.getValue() != null ) && column_entry.getValue().hasRemaining() ) {
+                HColumn<ByteBuffer, ByteBuffer> column =
+                        createColumn( column_entry.getKey(), column_entry.getValue(), timestamp, be, be );
+                m.addInsertion( bytebuffer( message.getUuid() ), QueuesCF.MESSAGE_PROPERTIES.toString(), column );
+            }
+            else {
+                m.addDeletion( bytebuffer( message.getUuid() ), QueuesCF.MESSAGE_PROPERTIES.toString(),
+                        column_entry.getKey(), be, timestamp );
+            }
+        }
+
+        return m;
+    }
+
+
+    public static Message deserializeMessage( List<HColumn<String, ByteBuffer>> columns ) {
+        Message message = null;
+
+        Map<String, Object> properties = new HashMap<String, Object>();
+        for ( HColumn<String, ByteBuffer> column : columns ) {
+            if ( MESSAGE_TYPE.equals( column.getName() ) || MESSAGE_ID.equals( column.getName() ) ) {
+                properties.put( column.getName(),
+                        object( MESSAGE_PROPERTIES.get( column.getName() ), column.getValue() ) );
+            }
+            else {
+                properties.put( column.getName(), JsonUtils.fromByteBuffer( column.getValue() ) );
+            }
+        }
+        if ( !properties.isEmpty() ) {
+            message = new Message( properties );
+        }
+
+        return message;
+    }
+
+
+    public static Map<ByteBuffer, ByteBuffer> serializeQueue( Queue queue ) {
+        if ( queue == null ) {
+            return null;
+        }
+        Map<ByteBuffer, ByteBuffer> columns = new HashMap<ByteBuffer, ByteBuffer>();
+        for ( Entry<String, Object> property : queue.getProperties().entrySet() ) {
+            if ( property.getValue() == null ) {
+                continue;
+            }
+            if ( Queue.QUEUE_ID.equals( property.getKey() ) || QUEUE_NEWEST.equals( property.getKey() ) || QUEUE_OLDEST
+                    .equals( property.getKey() ) ) {
+                continue;
+            }
+            if ( QUEUE_PROPERTIES.containsKey( property.getKey() ) ) {
+                columns.put( bytebuffer( property.getKey() ), bytebuffer( property.getValue() ) );
+            }
+            else {
+                columns.put( bytebuffer( property.getKey() ), JsonUtils.toByteBuffer( property.getValue() ) );
+            }
+        }
+        return columns;
+    }
+
+
+    public static Queue deserializeQueue( List<HColumn<String, ByteBuffer>> columns ) {
+        Queue queue = null;
+
+        Map<String, Object> properties = new HashMap<String, Object>();
+        for ( HColumn<String, ByteBuffer> column : columns ) {
+            if ( QUEUE_PROPERTIES.containsKey( column.getName() ) ) {
+                properties
+                        .put( column.getName(), object( QUEUE_PROPERTIES.get( column.getName() ), column.getValue() ) );
+            }
+            else {
+                properties.put( column.getName(), JsonUtils.fromByteBuffer( column.getValue() ) );
+            }
+        }
+        if ( !properties.isEmpty() ) {
+            queue = new Queue( properties );
+        }
+
+        return queue;
+    }
+
+
+    public static Mutator<ByteBuffer> addQueueToMutator( Mutator<ByteBuffer> m, Queue queue, long timestamp ) {
+
+        Map<ByteBuffer, ByteBuffer> columns = serializeQueue( queue );
+
+        if ( columns == null ) {
+            return m;
+        }
+
+        for ( Map.Entry<ByteBuffer, ByteBuffer> column_entry : columns.entrySet() ) {
+            if ( ( column_entry.getValue() != null ) && column_entry.getValue().hasRemaining() ) {
+                HColumn<ByteBuffer, ByteBuffer> column =
+                        createColumn( column_entry.getKey(), column_entry.getValue(), timestamp, be, be );
+                m.addInsertion( bytebuffer( queue.getUuid() ), QueuesCF.QUEUE_PROPERTIES.toString(), column );
+            }
+            else {
+                m.addDeletion( bytebuffer( queue.getUuid() ), QueuesCF.QUEUE_PROPERTIES.toString(),
+                        column_entry.getKey(), be, timestamp );
+            }
+        }
+
+        return m;
+    }
+
+
+    public static ByteBuffer getQueueShardRowKey( UUID uuid, long ts ) {
+        ByteBuffer bytes = ByteBuffer.allocate( 24 );
+        bytes.putLong( uuid.getMostSignificantBits() );
+        bytes.putLong( uuid.getLeastSignificantBits() );
+        bytes.putLong( ts );
+        return ( ByteBuffer ) bytes.rewind();
+    }
+
+
+    /** Get a row key in format of queueId+clientId */
+    public static ByteBuffer getQueueClientTransactionKey( UUID queueId, UUID clientId ) {
+        ByteBuffer bytes = ByteBuffer.allocate( 32 );
+        bytes.putLong( queueId.getMostSignificantBits() );
+        bytes.putLong( queueId.getLeastSignificantBits() );
+        bytes.putLong( clientId.getMostSignificantBits() );
+        bytes.putLong( clientId.getLeastSignificantBits() );
+        return ( ByteBuffer ) bytes.rewind();
+    }
+
+
+    public static UUID getUUIDFromRowKey( ByteBuffer bytes ) {
+        return ConversionUtils.uuid( bytes );
+    }
+
+
+    public static long getLongFromRowKey( ByteBuffer bytes ) {
+        bytes = bytes.slice();
+        return getLong( 16 );
+    }
+
+
+    /** Get the queueId from the path */
+    public static UUID getQueueId( String path ) {
+        String queuePath = Queue.normalizeQueuePath( path );
+        if ( queuePath == null ) {
+            queuePath = "/";
+        }
+
+        logger.info( "QueueManagerFactoryImpl.getFromQueue: {}", queuePath );
+
+        return Queue.getQueueId( queuePath );
+    }
+
+
+    /** Get the consumer Id from the queue id */
+    public static UUID getConsumerId( UUID queueId, QueueQuery query ) {
+        UUID consumerId = queueId;
+
+        if ( query.getPosition() == CONSUMER ) {
+            consumerId = query.getConsumerId();
+            if ( ( consumerId == null ) && ( query.getPosition() == CONSUMER ) ) {
+                consumerId = UUIDUtils.newTimeUUID();
+            }
+        }
+        return consumerId;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/MessageIndexUpdate.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/MessageIndexUpdate.java b/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/MessageIndexUpdate.java
new file mode 100644
index 0000000..7184516
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/MessageIndexUpdate.java
@@ -0,0 +1,119 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.mq.cassandra;
+
+
+import java.nio.ByteBuffer;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.UUID;
+
+import org.apache.usergrid.mq.Message;
+
+import me.prettyprint.cassandra.serializers.ByteBufferSerializer;
+import me.prettyprint.cassandra.serializers.BytesArraySerializer;
+import me.prettyprint.cassandra.serializers.DynamicCompositeSerializer;
+import me.prettyprint.cassandra.serializers.LongSerializer;
+import me.prettyprint.cassandra.serializers.StringSerializer;
+import me.prettyprint.cassandra.serializers.UUIDSerializer;
+import me.prettyprint.hector.api.beans.DynamicComposite;
+import me.prettyprint.hector.api.mutation.Mutator;
+import static me.prettyprint.hector.api.factory.HFactory.createColumn;
+import static org.apache.usergrid.mq.Message.MESSAGE_PROPERTIES;
+import static org.apache.usergrid.mq.cassandra.QueueIndexUpdate.indexValueCode;
+import static org.apache.usergrid.mq.cassandra.QueueIndexUpdate.validIndexableValue;
+import static org.apache.usergrid.mq.cassandra.QueueIndexUpdate.validIndexableValueOrJson;
+import static org.apache.usergrid.mq.cassandra.QueueManagerImpl.DICTIONARY_MESSAGE_INDEXES;
+import static org.apache.usergrid.mq.cassandra.QueuesCF.PROPERTY_INDEX;
+import static org.apache.usergrid.mq.cassandra.QueuesCF.QUEUE_DICTIONARIES;
+import static org.apache.usergrid.persistence.cassandra.CassandraPersistenceUtils.key;
+import static org.apache.usergrid.utils.ConversionUtils.bytebuffer;
+import static org.apache.usergrid.utils.IndexUtils.getKeyValueList;
+
+
+public class MessageIndexUpdate {
+
+    public static final boolean FULLTEXT = false;
+
+    final Message message;
+    final Map<String, List<Map.Entry<String, Object>>> propertyEntryList;
+
+    public static final StringSerializer se = new StringSerializer();
+    public static final ByteBufferSerializer be = new ByteBufferSerializer();
+    public static final UUIDSerializer ue = new UUIDSerializer();
+    public static final BytesArraySerializer bae = new BytesArraySerializer();
+    public static final DynamicCompositeSerializer dce = new DynamicCompositeSerializer();
+    public static final LongSerializer le = new LongSerializer();
+
+
+    public MessageIndexUpdate( Message message ) {
+        this.message = message;
+
+        if ( message.isIndexed() ) {
+            propertyEntryList = new HashMap<String, List<Map.Entry<String, Object>>>();
+
+            for ( Map.Entry<String, Object> property : message.getProperties().entrySet() ) {
+
+                if ( !MESSAGE_PROPERTIES.containsKey( property.getKey() ) && validIndexableValueOrJson(
+                        property.getValue() ) ) {
+
+                    List<Map.Entry<String, Object>> list =
+                            getKeyValueList( property.getKey(), property.getValue(), FULLTEXT );
+
+                    propertyEntryList.put( property.getKey(), list );
+                }
+            }
+        }
+        else {
+            propertyEntryList = null;
+        }
+    }
+
+
+    public void addToMutation( Mutator<ByteBuffer> batch, UUID queueId, long shard_ts, long timestamp ) {
+
+        if ( propertyEntryList != null ) {
+            for ( Entry<String, List<Entry<String, Object>>> property : propertyEntryList.entrySet() ) {
+
+                for ( Map.Entry<String, Object> indexEntry : property.getValue() ) {
+
+                    if ( validIndexableValue( indexEntry.getValue() ) ) {
+
+                        batch.addInsertion( bytebuffer( key( queueId, shard_ts, indexEntry.getKey() ) ),
+                                PROPERTY_INDEX.getColumnFamily(), createColumn(
+                                new DynamicComposite( indexValueCode( indexEntry.getValue() ), indexEntry.getValue(),
+                                        message.getUuid() ), ByteBuffer.allocate( 0 ), timestamp, dce, be ) );
+
+                        batch.addInsertion( bytebuffer( key( queueId, DICTIONARY_MESSAGE_INDEXES ) ),
+                                QUEUE_DICTIONARIES.getColumnFamily(),
+                                createColumn( indexEntry.getKey(), ByteBuffer.allocate( 0 ), timestamp, se, be ) );
+                    }
+                }
+
+                batch.addInsertion( bytebuffer( key( queueId, DICTIONARY_MESSAGE_INDEXES ) ),
+                        QUEUE_DICTIONARIES.getColumnFamily(),
+                        createColumn( property.getKey(), ByteBuffer.allocate( 0 ), timestamp, se, be ) );
+            }
+        }
+    }
+
+
+    public Message getMessage() {
+        return message;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/QueueIndexUpdate.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/QueueIndexUpdate.java b/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/QueueIndexUpdate.java
new file mode 100644
index 0000000..b71e190
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/QueueIndexUpdate.java
@@ -0,0 +1,347 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.mq.cassandra;
+
+
+import java.io.IOException;
+import java.math.BigInteger;
+import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
+
+import org.codehaus.jackson.JsonNode;
+
+import com.fasterxml.uuid.UUIDComparator;
+
+import me.prettyprint.hector.api.beans.DynamicComposite;
+import me.prettyprint.hector.api.mutation.Mutator;
+import static java.nio.ByteBuffer.wrap;
+import static org.apache.usergrid.utils.JsonUtils.toJsonNode;
+import static org.apache.usergrid.utils.UUIDUtils.getTimestampInMicros;
+
+
+public class QueueIndexUpdate {
+
+    public static final byte VALUE_CODE_BYTES = 0;
+    public static final byte VALUE_CODE_UTF8 = 1;
+    public static final byte VALUE_CODE_UUID = 2;
+    public static final byte VALUE_CODE_INT = 3;
+    public static final byte VALUE_CODE_MAX = 127;
+
+    public static int INDEX_STRING_VALUE_LENGTH = 1024;
+
+    private Mutator<ByteBuffer> batch;
+    private String queuePath;
+    private UUID queueId;
+    private String entryName;
+    private Object entryValue;
+    private final List<QueueIndexEntry> prevEntries = new ArrayList<QueueIndexEntry>();
+    private final List<QueueIndexEntry> newEntries = new ArrayList<QueueIndexEntry>();
+    private final Set<String> indexesSet = new LinkedHashSet<String>();
+    private long timestamp;
+    private final UUID timestampUuid;
+
+
+    public QueueIndexUpdate( Mutator<ByteBuffer> batch, String queuePath, UUID queueId, String entryName,
+                             Object entryValue, UUID timestampUuid ) {
+        this.batch = batch;
+        this.queuePath = queuePath;
+        this.queueId = queueId;
+        this.entryName = entryName;
+        this.entryValue = entryValue;
+        timestamp = getTimestampInMicros( timestampUuid );
+        this.timestampUuid = timestampUuid;
+    }
+
+
+    public Mutator<ByteBuffer> getBatch() {
+        return batch;
+    }
+
+
+    public void setBatch( Mutator<ByteBuffer> batch ) {
+        this.batch = batch;
+    }
+
+
+    public String getQueuePath() {
+        return queuePath;
+    }
+
+
+    public void setQueuePath( String queuePath ) {
+        this.queuePath = queuePath;
+    }
+
+
+    public UUID getQueueId() {
+        return queueId;
+    }
+
+
+    public void setQueueId( UUID queueId ) {
+        this.queueId = queueId;
+    }
+
+
+    public String getEntryName() {
+        return entryName;
+    }
+
+
+    public void setEntryName( String entryName ) {
+        this.entryName = entryName;
+    }
+
+
+    public Object getEntryValue() {
+        return entryValue;
+    }
+
+
+    public void setEntryValue( Object entryValue ) {
+        this.entryValue = entryValue;
+    }
+
+
+    public long getTimestamp() {
+        return timestamp;
+    }
+
+
+    public void setTimestamp( long timestamp ) {
+        this.timestamp = timestamp;
+    }
+
+
+    public UUID getTimestampUuid() {
+        return timestampUuid;
+    }
+
+
+    public List<QueueIndexEntry> getPrevEntries() {
+        return prevEntries;
+    }
+
+
+    public void addPrevEntry( String path, Object value, UUID timestamp ) {
+        QueueIndexEntry entry = new QueueIndexEntry( path, value, timestamp );
+        prevEntries.add( entry );
+    }
+
+
+    public List<QueueIndexEntry> getNewEntries() {
+        return newEntries;
+    }
+
+
+    public void addNewEntry( String path, Object value ) {
+        QueueIndexEntry entry = new QueueIndexEntry( path, value, timestampUuid );
+        newEntries.add( entry );
+    }
+
+
+    public Set<String> getIndexesSet() {
+        return indexesSet;
+    }
+
+
+    public void addIndex( String index ) {
+        indexesSet.add( index );
+    }
+
+
+    public class QueueIndexEntry {
+        private final byte code;
+        private String path;
+        private final Object value;
+        private final UUID timestampUuid;
+
+
+        public QueueIndexEntry( String path, Object value, UUID timestampUuid ) {
+            this.path = path;
+            this.value = value;
+            code = indexValueCode( value );
+            this.timestampUuid = timestampUuid;
+        }
+
+
+        public String getPath() {
+            return path;
+        }
+
+
+        public void setPath( String path ) {
+            this.path = path;
+        }
+
+
+        public Object getValue() {
+            return value;
+        }
+
+
+        public byte getValueCode() {
+            return code;
+        }
+
+
+        public UUID getTimestampUuid() {
+            return timestampUuid;
+        }
+
+
+        public DynamicComposite getIndexComposite() {
+            return new DynamicComposite( code, value, getQueueId(), getQueuePath(), timestampUuid );
+        }
+    }
+
+
+    private static String prepStringForIndex( String str ) {
+        str = str.trim().toLowerCase();
+        str = str.substring( 0, Math.min( INDEX_STRING_VALUE_LENGTH, str.length() ) );
+        return str;
+    }
+
+
+    /**
+     * @param obj
+     * @return
+     */
+    public static Object toIndexableValue( Object obj ) {
+        if ( obj == null ) {
+            return null;
+        }
+
+        if ( obj instanceof String ) {
+            return prepStringForIndex( ( String ) obj );
+        }
+
+        // UUIDs, and BigIntegers map to Cassandra UTF8Type and IntegerType
+        if ( ( obj instanceof UUID ) || ( obj instanceof BigInteger ) ) {
+            return obj;
+        }
+
+        // For any numeric values, turn them into a long
+        // and make them BigIntegers for IntegerType
+        if ( obj instanceof Number ) {
+            return BigInteger.valueOf( ( ( Number ) obj ).longValue() );
+        }
+
+        if ( obj instanceof Boolean ) {
+            return BigInteger.valueOf( ( ( Boolean ) obj ) ? 1L : 0L );
+        }
+
+        if ( obj instanceof Date ) {
+            return BigInteger.valueOf( ( ( Date ) obj ).getTime() );
+        }
+
+        if ( obj instanceof byte[] ) {
+            return wrap( ( byte[] ) obj );
+        }
+
+        if ( obj instanceof ByteBuffer ) {
+            return obj;
+        }
+
+        JsonNode json = toJsonNode( obj );
+        if ( ( json != null ) && json.isValueNode() ) {
+            if ( json.isBigInteger() ) {
+                return json.getBigIntegerValue();
+            }
+            else if ( json.isNumber() || json.isBoolean() ) {
+                return BigInteger.valueOf( json.getValueAsLong() );
+            }
+            else if ( json.isTextual() ) {
+                return prepStringForIndex( json.getTextValue() );
+            }
+            else if ( json.isBinary() ) {
+                try {
+                    return wrap( json.getBinaryValue() );
+                }
+                catch ( IOException e ) {
+                }
+            }
+        }
+
+        return null;
+    }
+
+
+    public static boolean validIndexableValue( Object obj ) {
+        return toIndexableValue( obj ) != null;
+    }
+
+
+    public static boolean validIndexableValueOrJson( Object obj ) {
+        if ( ( obj instanceof Map ) || ( obj instanceof List ) || ( obj instanceof JsonNode ) ) {
+            return true;
+        }
+        return toIndexableValue( obj ) != null;
+    }
+
+
+    public static byte indexValueCode( Object obj ) {
+        obj = toIndexableValue( obj );
+        if ( obj instanceof String ) {
+            return VALUE_CODE_UTF8;
+        }
+        else if ( obj instanceof UUID ) {
+            return VALUE_CODE_UUID;
+        }
+        else if ( obj instanceof BigInteger ) {
+            return VALUE_CODE_INT;
+        }
+        else if ( obj instanceof Number ) {
+            return VALUE_CODE_INT;
+        }
+        else {
+            return VALUE_CODE_BYTES;
+        }
+    }
+
+
+    @SuppressWarnings({ "rawtypes", "unchecked" })
+    public static int compareIndexedValues( Object o1, Object o2 ) {
+        o1 = toIndexableValue( o1 );
+        o2 = toIndexableValue( o2 );
+        if ( ( o1 == null ) && ( o2 == null ) ) {
+            return 0;
+        }
+        else if ( o1 == null ) {
+            return -1;
+        }
+        else if ( o2 == null ) {
+            return 1;
+        }
+        int c1 = indexValueCode( o1 );
+        int c2 = indexValueCode( o2 );
+        if ( c1 == c2 ) {
+            if ( o1 instanceof UUID ) {
+                UUIDComparator.staticCompare( ( UUID ) o1, ( UUID ) o2 );
+            }
+            else if ( o1 instanceof Comparable ) {
+                return ( ( Comparable ) o1 ).compareTo( o2 );
+            }
+        }
+        return c1 - c2;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/QueueManagerFactoryImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/QueueManagerFactoryImpl.java b/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/QueueManagerFactoryImpl.java
new file mode 100644
index 0000000..e312e68
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/QueueManagerFactoryImpl.java
@@ -0,0 +1,85 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.mq.cassandra;
+
+
+import java.util.UUID;
+
+import org.apache.usergrid.locking.LockManager;
+import org.apache.usergrid.mq.QueueManager;
+import org.apache.usergrid.mq.QueueManagerFactory;
+import org.apache.usergrid.persistence.cassandra.CassandraService;
+import org.apache.usergrid.persistence.cassandra.CounterUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import me.prettyprint.cassandra.serializers.ByteBufferSerializer;
+import me.prettyprint.cassandra.serializers.BytesArraySerializer;
+import me.prettyprint.cassandra.serializers.DynamicCompositeSerializer;
+import me.prettyprint.cassandra.serializers.LongSerializer;
+import me.prettyprint.cassandra.serializers.StringSerializer;
+import me.prettyprint.cassandra.serializers.UUIDSerializer;
+
+
+public class QueueManagerFactoryImpl implements QueueManagerFactory {
+
+    public static final Logger logger = LoggerFactory.getLogger( QueueManagerFactoryImpl.class );
+
+    public static String IMPLEMENTATION_DESCRIPTION = "Cassandra Queue Manager Factory 1.0";
+
+    private CassandraService cass;
+    private CounterUtils counterUtils;
+    private LockManager lockManager;
+    private int lockTimeout;
+
+    public static final StringSerializer se = new StringSerializer();
+    public static final ByteBufferSerializer be = new ByteBufferSerializer();
+    public static final UUIDSerializer ue = new UUIDSerializer();
+    public static final BytesArraySerializer bae = new BytesArraySerializer();
+    public static final DynamicCompositeSerializer dce = new DynamicCompositeSerializer();
+    public static final LongSerializer le = new LongSerializer();
+
+
+    /**
+     * Must be constructed with a CassandraClientPool.
+     *
+     * @param cass the cassandra client pool
+     * @param counterUtils the CounterUtils
+     */
+    public QueueManagerFactoryImpl( CassandraService cass, CounterUtils counterUtils, LockManager lockManager, int lockTimeout ) {
+        this.cass = cass;
+        this.counterUtils = counterUtils;
+        this.lockManager = lockManager;
+        this.lockTimeout = lockTimeout;
+    }
+
+
+    @Override
+    public String getImpementationDescription() throws Exception {
+        return IMPLEMENTATION_DESCRIPTION;
+    }
+
+
+    @Override
+    public QueueManager getQueueManager( UUID applicationId ) {
+        QueueManagerImpl qm = new QueueManagerImpl();
+        qm.init( cass, counterUtils, lockManager, applicationId, lockTimeout );
+        return qm;
+        //return applicationContext.getAutowireCapableBeanFactory()
+        //		.createBean(QueueManagerImpl.class)
+        //		.init(this, cass, counterUtils, applicationId);
+    }
+}


[93/96] [abbrv] USERGRID-2 package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/index-files/index-16.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/index-files/index-16.html b/sdks/android/doc/index-files/index-16.html
index 33f052f..888e3d1 100644
--- a/sdks/android/doc/index-files/index-16.html
+++ b/sdks/android/doc/index-files/index-16.html
@@ -83,13 +83,13 @@ function windowTitle()
 <B>R</B></H2>
 <DL>
 <DT><A HREF="../org/usergrid/android/client/Client.html#registerDevice(android.content.Context, java.util.Map)"><B>registerDevice(Context, Map&lt;String, Object&gt;)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Registers a device using the device's unique device ID.
-<DT><A HREF="../org/usergrid/android/client/Client.html#registerDeviceAsync(android.content.Context, java.util.Map, org.usergrid.android.client.callbacks.DeviceRegistrationCallback)"><B>registerDeviceAsync(Context, Map&lt;String, Object&gt;, DeviceRegistrationCallback)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#registerDeviceAsync(android.content.Context, java.util.Map, org.apache.usergrid.android.client.callbacks.DeviceRegistrationCallback)"><B>registerDeviceAsync(Context, Map&lt;String, Object&gt;, DeviceRegistrationCallback)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Registers a device using the device's unique device ID.
 <DT><A HREF="../org/usergrid/android/client/Client.html#removeSubscriber(java.lang.String, java.lang.String)"><B>removeSubscriber(String, String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 </DL>
 <HR>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/index-files/index-17.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/index-files/index-17.html b/sdks/android/doc/index-files/index-17.html
index 6fc1cf0..aa3f7e1 100644
--- a/sdks/android/doc/index-files/index-17.html
+++ b/sdks/android/doc/index-files/index-17.html
@@ -83,328 +83,328 @@ function windowTitle()
 <B>S</B></H2>
 <DL>
 <DT><A HREF="../org/usergrid/android/client/Client.html#setAccessToken(java.lang.String)"><B>setAccessToken(String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setAccessToken(java.lang.String)"><B>setAccessToken(String)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setAction(java.lang.String)"><B>setAction(String)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#setActivated(java.lang.Boolean)"><B>setActivated(Boolean)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/entities/Activity.html#setActor(org.usergrid.android.client.entities.Activity.ActivityObject)"><B>setActor(Activity.ActivityObject)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+<DT><A HREF="../org/usergrid/android/client/entities/Activity.html#setActor(org.apache.usergrid.android.client.entities.Activity.ActivityObject)"><B>setActor(Activity.ActivityObject)</B></A> - 
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.html#setApiUrl(java.lang.String)"><B>setApiUrl(String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setApplication(java.util.UUID)"><B>setApplication(UUID)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.html#setApplicationId(java.lang.String)"><B>setApplicationId(String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setApplications(java.util.Map)"><B>setApplications(Map&lt;String, UUID&gt;)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#setAttachments(org.usergrid.android.client.entities.Activity.ActivityObject[])"><B>setAttachments(Activity.ActivityObject[])</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+<DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#setAttachments(org.apache.usergrid.android.client.entities.Activity.ActivityObject[])"><B>setAttachments(Activity.ActivityObject[])</B></A> - 
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#setAuthor(org.usergrid.android.client.entities.Activity.ActivityObject)"><B>setAuthor(Activity.ActivityObject)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+<DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#setAuthor(org.apache.usergrid.android.client.entities.Activity.ActivityObject)"><B>setAuthor(Activity.ActivityObject)</B></A> - 
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/utils/JsonUtils.html#setBooleanProperty(java.util.Map, java.lang.String, java.lang.Boolean)"><B>setBooleanProperty(Map&lt;String, JsonNode&gt;, String, Boolean)</B></A> - 
-Static method in class org.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.usergrid.android.client.utils">JsonUtils</A>
+Static method in class org.apache.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.apache.usergrid.android.client.utils">JsonUtils</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#setCategory(java.lang.String)"><B>setCategory(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Message.html#setCategory(java.lang.String)"><B>setCategory(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html#setCategory(java.lang.String)"><B>setCategory(String)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response">AggregateCounterSet</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response">AggregateCounterSet</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.html#setClientId(java.lang.String)"><B>setClientId(String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.html#setClientSecret(java.lang.String)"><B>setClientSecret(String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setConsumer(java.util.UUID)"><B>setConsumer(UUID)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#setContent(java.lang.String)"><B>setContent(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#setContent(java.lang.String)"><B>setContent(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Message.html#setCorrelationId(java.util.UUID)"><B>setCorrelationId(UUID)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setCounters(java.util.List)"><B>setCounters(List&lt;AggregateCounterSet&gt;)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setCredentials(org.usergrid.android.client.response.ClientCredentialsInfo)"><B>setCredentials(ClientCredentialsInfo)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+<DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setCredentials(org.apache.usergrid.android.client.response.ClientCredentialsInfo)"><B>setCredentials(ClientCredentialsInfo)</B></A> - 
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.html#setCurrentOrganization(java.lang.String)"><B>setCurrentOrganization(String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setCursor(java.lang.String)"><B>setCursor(String)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setData(java.lang.Object)"><B>setData(Object)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Message.html#setDestination(java.lang.String)"><B>setDestination(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#setDisabled(java.lang.Boolean)"><B>setDisabled(Boolean)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#setDisplayName(java.lang.String)"><B>setDisplayName(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#setDownstreamDuplicates(java.lang.String[])"><B>setDownstreamDuplicates(String[])</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html#setDuration(int)"><B>setDuration(int)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html#setDynamicProperty(java.lang.String, java.lang.Object)"><B>setDynamicProperty(String, Object)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.usergrid.android.client.entities">Activity.ActivityCollection</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityCollection</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#setDynamicProperty(java.lang.String, java.lang.Object)"><B>setDynamicProperty(String, Object)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html#setDynamicProperty(java.lang.String, java.lang.Object)"><B>setDynamicProperty(String, Object)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#setEmail(java.lang.String)"><B>setEmail(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setEntities(java.util.List)"><B>setEntities(List&lt;Entity&gt;)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#setEntityType(java.lang.String)"><B>setEntityType(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setError(java.lang.String)"><B>setError(String)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setErrorDescription(java.lang.String)"><B>setErrorDescription(String)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setErrorUri(java.lang.String)"><B>setErrorUri(String)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setException(java.lang.String)"><B>setException(String)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#setFirstname(java.lang.String)"><B>setFirstname(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/entities/Activity.html#setGenerator(org.usergrid.android.client.entities.Activity.ActivityObject)"><B>setGenerator(Activity.ActivityObject)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+<DT><A HREF="../org/usergrid/android/client/entities/Activity.html#setGenerator(org.apache.usergrid.android.client.entities.Activity.ActivityObject)"><B>setGenerator(Activity.ActivityObject)</B></A> - 
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html#setGroup(java.util.UUID)"><B>setGroup(UUID)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response">AggregateCounterSet</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response">AggregateCounterSet</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html#setHeight(int)"><B>setHeight(int)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/entities/Activity.html#setIcon(org.usergrid.android.client.entities.Activity.MediaLink)"><B>setIcon(Activity.MediaLink)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+<DT><A HREF="../org/usergrid/android/client/entities/Activity.html#setIcon(org.apache.usergrid.android.client.entities.Activity.MediaLink)"><B>setIcon(Activity.MediaLink)</B></A> - 
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#setId(java.lang.String)"><B>setId(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ClientCredentialsInfo.html#setId(java.lang.String)"><B>setId(String)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response">ClientCredentialsInfo</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response">ClientCredentialsInfo</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#setImage(org.usergrid.android.client.entities.Activity.MediaLink)"><B>setImage(Activity.MediaLink)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+<DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#setImage(org.apache.usergrid.android.client.entities.Activity.MediaLink)"><B>setImage(Activity.MediaLink)</B></A> - 
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Message.html#setIndexed(java.lang.Boolean)"><B>setIndexed(Boolean)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html#setItems(org.usergrid.android.client.entities.Activity.ActivityObject[])"><B>setItems(Activity.ActivityObject[])</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.usergrid.android.client.entities">Activity.ActivityCollection</A>
+<DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html#setItems(org.apache.usergrid.android.client.entities.Activity.ActivityObject[])"><B>setItems(Activity.ActivityObject[])</B></A> - 
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityCollection</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setLast(java.util.UUID)"><B>setLast(UUID)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#setLastname(java.lang.String)"><B>setLastname(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setList(java.util.List)"><B>setList(List&lt;Object&gt;)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/Client.html#setLoggedInUser(org.usergrid.android.client.entities.User)"><B>setLoggedInUser(User)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#setLoggedInUser(org.apache.usergrid.android.client.entities.User)"><B>setLoggedInUser(User)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/utils/JsonUtils.html#setLongProperty(java.util.Map, java.lang.String, java.lang.Long)"><B>setLongProperty(Map&lt;String, JsonNode&gt;, String, Long)</B></A> - 
-Static method in class org.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.usergrid.android.client.utils">JsonUtils</A>
+Static method in class org.apache.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.apache.usergrid.android.client.utils">JsonUtils</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setMessages(java.util.List)"><B>setMessages(List&lt;Message&gt;)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setMetadata(java.util.Map)"><B>setMetadata(Map&lt;String, JsonNode&gt;)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#setMiddlename(java.lang.String)"><B>setMiddlename(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Device.html#setName(java.lang.String)"><B>setName(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities">Device</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities">Device</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#setName(java.lang.String)"><B>setName(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html#setName(java.lang.String)"><B>setName(String)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response">AggregateCounterSet</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response">AggregateCounterSet</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setNext(java.util.UUID)"><B>setNext(UUID)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/entities/Activity.html#setObject(org.usergrid.android.client.entities.Activity.ActivityObject)"><B>setObject(Activity.ActivityObject)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+<DT><A HREF="../org/usergrid/android/client/entities/Activity.html#setObject(org.apache.usergrid.android.client.entities.Activity.ActivityObject)"><B>setObject(Activity.ActivityObject)</B></A> - 
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/utils/JsonUtils.html#setObjectProperty(java.util.Map, java.lang.String, java.lang.Object)"><B>setObjectProperty(Map&lt;String, JsonNode&gt;, String, Object)</B></A> - 
-Static method in class org.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.usergrid.android.client.utils">JsonUtils</A>
+Static method in class org.apache.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.apache.usergrid.android.client.utils">JsonUtils</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#setObjectType(java.lang.String)"><B>setObjectType(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setParams(java.util.Map)"><B>setParams(Map&lt;String, List&lt;String&gt;&gt;)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Group.html#setPath(java.lang.String)"><B>setPath(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setPath(java.lang.String)"><B>setPath(String)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/QueueInfo.html#setPath(java.lang.String)"><B>setPath(String)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response">QueueInfo</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response">QueueInfo</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Message.html#setPersistent(java.lang.Boolean)"><B>setPersistent(Boolean)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#setPicture(java.lang.String)"><B>setPicture(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Entity.html#setProperty(java.lang.String, org.codehaus.jackson.JsonNode)"><B>setProperty(String, JsonNode)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setProperty(java.lang.String, org.codehaus.jackson.JsonNode)"><B>setProperty(String, JsonNode)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#setPublished(java.util.Date)"><B>setPublished(Date)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#setPublished(java.lang.Long)"><B>setPublished(Long)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html#setQueue(java.util.UUID)"><B>setQueue(UUID)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response">AggregateCounterSet</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response">AggregateCounterSet</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setQueue(java.util.UUID)"><B>setQueue(UUID)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/QueueInfo.html#setQueue(java.util.UUID)"><B>setQueue(UUID)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response">QueueInfo</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response">QueueInfo</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setQueues(java.util.List)"><B>setQueues(List&lt;QueueInfo&gt;)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Message.html#setReplyTo(java.lang.String)"><B>setReplyTo(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ClientCredentialsInfo.html#setSecret(java.lang.String)"><B>setSecret(String)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response">ClientCredentialsInfo</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response">ClientCredentialsInfo</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setStatus(java.lang.String)"><B>setStatus(String)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/utils/JsonUtils.html#setStringProperty(java.util.Map, java.lang.String, java.lang.String)"><B>setStringProperty(Map&lt;String, JsonNode&gt;, String, String)</B></A> - 
-Static method in class org.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.usergrid.android.client.utils">JsonUtils</A>
+Static method in class org.apache.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.apache.usergrid.android.client.utils">JsonUtils</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#setSummary(java.lang.String)"><B>setSummary(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Message.html#setTimestamp(java.lang.Long)"><B>setTimestamp(Long)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/AggregateCounter.html#setTimestamp(long)"><B>setTimestamp(long)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response">AggregateCounter</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response">AggregateCounter</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setTimestamp(long)"><B>setTimestamp(long)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#setTitle(java.lang.String)"><B>setTitle(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Group.html#setTitle(java.lang.String)"><B>setTitle(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html#setTotalItems(int)"><B>setTotalItems(int)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.usergrid.android.client.entities">Activity.ActivityCollection</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityCollection</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Entity.html#setType(java.lang.String)"><B>setType(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#setUpdated(java.lang.String)"><B>setUpdated(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#setUpstreamDuplicates(java.lang.String)"><B>setUpstreamDuplicates(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setUri(java.lang.String)"><B>setUri(String)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html#setUrl(java.lang.String)"><B>setUrl(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.usergrid.android.client.entities">Activity.ActivityCollection</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityCollection</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#setUrl(java.lang.String)"><B>setUrl(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html#setUrl(java.lang.String)"><B>setUrl(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html#setUser(java.util.UUID)"><B>setUser(UUID)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response">AggregateCounterSet</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response">AggregateCounterSet</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setUser(org.usergrid.android.client.entities.User)"><B>setUser(User)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+<DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#setUser(org.apache.usergrid.android.client.entities.User)"><B>setUser(User)</B></A> - 
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#setUsername(java.lang.String)"><B>setUsername(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#setUuid(java.util.UUID)"><B>setUuid(UUID)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Entity.html#setUuid(java.util.UUID)"><B>setUuid(UUID)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/utils/JsonUtils.html#setUUIDProperty(java.util.Map, java.lang.String, java.util.UUID)"><B>setUUIDProperty(Map&lt;String, JsonNode&gt;, String, UUID)</B></A> - 
-Static method in class org.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.usergrid.android.client.utils">JsonUtils</A>
+Static method in class org.apache.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.apache.usergrid.android.client.utils">JsonUtils</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/AggregateCounter.html#setValue(long)"><B>setValue(long)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response">AggregateCounter</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response">AggregateCounter</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html#setValues(java.util.List)"><B>setValues(List&lt;AggregateCounter&gt;)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response">AggregateCounterSet</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response">AggregateCounterSet</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#setVerb(java.lang.String)"><B>setVerb(String)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html#setWidth(int)"><B>setWidth(int)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A>
 <DD>&nbsp;
 </DL>
 <HR>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/index-files/index-18.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/index-files/index-18.html b/sdks/android/doc/index-files/index-18.html
index abc1393..b290771 100644
--- a/sdks/android/doc/index-files/index-18.html
+++ b/sdks/android/doc/index-files/index-18.html
@@ -83,46 +83,46 @@ function windowTitle()
 <B>T</B></H2>
 <DL>
 <DT><A HREF="../org/usergrid/android/client/utils/JsonUtils.html#toJsonNode(java.lang.Object)"><B>toJsonNode(Object)</B></A> - 
-Static method in class org.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.usergrid.android.client.utils">JsonUtils</A>
+Static method in class org.apache.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.apache.usergrid.android.client.utils">JsonUtils</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/utils/JsonUtils.html#toJsonString(java.lang.Object)"><B>toJsonString(Object)</B></A> - 
-Static method in class org.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.usergrid.android.client.utils">JsonUtils</A>
+Static method in class org.apache.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.apache.usergrid.android.client.utils">JsonUtils</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.QueuePosition.html#toString()"><B>toString()</B></A> - 
-Method in enum org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A>
+Method in enum org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html#toString()"><B>toString()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.usergrid.android.client.entities">Activity.ActivityCollection</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityCollection</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#toString()"><B>toString()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html#toString()"><B>toString()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Entity.html#toString()"><B>toString()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/AggregateCounter.html#toString()"><B>toString()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response">AggregateCounter</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response">AggregateCounter</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html#toString()"><B>toString()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response">AggregateCounterSet</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response">AggregateCounterSet</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#toString()"><B>toString()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ClientCredentialsInfo.html#toString()"><B>toString()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response">ClientCredentialsInfo</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response">ClientCredentialsInfo</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Entity.html#toType(java.lang.Class)"><B>toType(Class&lt;T&gt;)</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/entities/Entity.html#toType(org.usergrid.android.client.entities.Entity, java.lang.Class)"><B>toType(Entity, Class&lt;T&gt;)</B></A> - 
-Static method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>
+<DT><A HREF="../org/usergrid/android/client/entities/Entity.html#toType(org.apache.usergrid.android.client.entities.Entity, java.lang.Class)"><B>toType(Entity, Class&lt;T&gt;)</B></A> - 
+Static method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Entity.html#toType(java.util.List, java.lang.Class)"><B>toType(List&lt;Entity&gt;, Class&lt;T&gt;)</B></A> - 
-Static method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>
+Static method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>
 <DD>&nbsp;
 </DL>
 <HR>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/index-files/index-19.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/index-files/index-19.html b/sdks/android/doc/index-files/index-19.html
index e2d2d0e..601621f 100644
--- a/sdks/android/doc/index-files/index-19.html
+++ b/sdks/android/doc/index-files/index-19.html
@@ -83,19 +83,19 @@ function windowTitle()
 <B>U</B></H2>
 <DL>
 <DT><A HREF="../org/usergrid/android/client/utils/UrlUtils.html#url(java.lang.String)"><B>url(String)</B></A> - 
-Static method in class org.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/UrlUtils.html" title="class in org.usergrid.android.client.utils">UrlUtils</A>
+Static method in class org.apache.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/UrlUtils.html" title="class in org.apache.usergrid.android.client.utils">UrlUtils</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/utils/UrlUtils.html#url(java.net.URL, java.lang.String)"><B>url(URL, String)</B></A> - 
-Static method in class org.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/UrlUtils.html" title="class in org.usergrid.android.client.utils">UrlUtils</A>
+Static method in class org.apache.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/UrlUtils.html" title="class in org.apache.usergrid.android.client.utils">UrlUtils</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/utils/UrlUtils.html" title="class in org.usergrid.android.client.utils"><B>UrlUtils</B></A> - Class in <A HREF="../org/usergrid/android/client/utils/package-summary.html">org.usergrid.android.client.utils</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/utils/UrlUtils.html#UrlUtils()"><B>UrlUtils()</B></A> - 
-Constructor for class org.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/UrlUtils.html" title="class in org.usergrid.android.client.utils">UrlUtils</A>
+<DT><A HREF="../org/usergrid/android/client/utils/UrlUtils.html" title="class in org.apache.usergrid.android.client.utils"><B>UrlUtils</B></A> - Class in <A HREF="../org/usergrid/android/client/utils/package-summary.html">org.apache.usergrid.android.client.utils</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/utils/UrlUtils.html#UrlUtils()"><B>UrlUtils()</B></A> - 
+Constructor for class org.apache.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/UrlUtils.html" title="class in org.apache.usergrid.android.client.utils">UrlUtils</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities"><B>User</B></A> - Class in <A HREF="../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/entities/User.html#User()"><B>User()</B></A> - 
-Constructor for class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+<DT><A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities"><B>User</B></A> - Class in <A HREF="../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/entities/User.html#User()"><B>User()</B></A> - 
+Constructor for class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/entities/User.html#User(org.usergrid.android.client.entities.Entity)"><B>User(Entity)</B></A> - 
-Constructor for class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+<DT><A HREF="../org/usergrid/android/client/entities/User.html#User(org.apache.usergrid.android.client.entities.Entity)"><B>User(Entity)</B></A> - 
+Constructor for class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 </DL>
 <HR>


[33/96] [abbrv] [partial] Change package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/entities/Application.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/entities/Application.java b/stack/core/src/main/java/org/apache/usergrid/persistence/entities/Application.java
new file mode 100644
index 0000000..9ead59c
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/entities/Application.java
@@ -0,0 +1,609 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.entities;
+
+
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.apache.usergrid.persistence.TypedEntity;
+import org.apache.usergrid.persistence.annotations.EntityCollection;
+import org.apache.usergrid.persistence.annotations.EntityDictionary;
+import org.apache.usergrid.persistence.annotations.EntityProperty;
+import org.codehaus.jackson.annotate.JsonProperty;
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
+
+
+/** Applications represent the topmost container for all entities. */
+@XmlRootElement
+public class Application extends TypedEntity {
+
+    public static final String ENTITY_TYPE = "application";
+
+    public static final String COLLECTION_USERS = "users";
+
+    public static final String COLLECTION_GROUPS = "groups";
+
+    public static final String COLLECTION_ASSETS = "assets";
+
+    public static final String COLLECTION_ACTIVITIES = "activities";
+
+    @EntityProperty(indexed = true, fulltextIndexed = false, required = true, mutable = false, aliasProperty = true,
+            basic = true)
+    protected String name;
+
+    @EntityProperty(basic = true, indexed = false)
+    protected String title;
+
+    @EntityProperty(basic = true, indexed = false)
+    protected Long accesstokenttl;
+
+    @EntityProperty(indexed = false)
+    protected String description;
+
+    @EntityDictionary(keyType = java.lang.String.class)
+    protected Set<String> collections;
+
+    @EntityDictionary(keyType = java.lang.String.class, valueType = java.lang.String.class)
+    protected Map<String, String> rolenames;
+
+    @EntityDictionary(keyType = java.lang.String.class)
+    protected Set<String> counters;
+
+    @EntityProperty(indexed = false)
+    protected Boolean activated;
+
+    @EntityProperty(indexed = false)
+    protected Boolean disabled;
+
+    @EntityProperty(name = "allow_open_registration", indexed = false)
+    protected Boolean allowOpenRegistration;
+
+    @EntityProperty(name = "registration_requires_email_confirmation", indexed = false)
+    protected Boolean registrationRequiresEmailConfirmation;
+
+    @EntityProperty(name = "registration_requires_admin_approval", indexed = false)
+    protected Boolean registrationRequiresAdminApproval;
+
+    @EntityProperty(name = "notify_admin_of_new_users", indexed = false)
+    protected Boolean notifyAdminOfNewUsers;
+
+    @EntityDictionary(keyType = java.lang.String.class, valueType = OAuthProvider.class)
+    protected Map<String, OAuthProvider> oauthproviders;
+
+    @EntityDictionary(keyType = java.lang.String.class, valueType = java.lang.String.class)
+    protected Map<String, String> credentials;
+
+    @EntityDictionary(keyType = java.lang.String.class, valueType = WebHook.class)
+    protected Map<String, WebHook> webhooks;
+
+    @EntityCollection(type = "activity", reversed = true, sort = "published desc", indexingDynamicDictionaries = true)
+    protected List<UUID> activities;
+
+    @EntityCollection(type = "asset", indexingDynamicDictionaries = true)
+    protected List<UUID> assets;
+
+    @EntityCollection(type = "event", indexingDynamicDictionaries = true)
+    protected List<UUID> events;
+
+    @EntityCollection(type = "folder", indexingDynamicDictionaries = true)
+    protected List<UUID> folders;
+
+    @EntityCollection(type = "group")
+    protected List<UUID> groups;
+
+    @EntityCollection(type = "user", dictionariesIndexed = { "aliases" })
+    protected List<UUID> users;
+
+    @EntityCollection(type = "device")
+    protected List<UUID> devices;
+
+    @EntityCollection(type = "notification")
+    protected List<UUID> notifications;
+
+
+    public Application() {
+        // id = UUIDUtils.newTimeUUID();
+    }
+
+
+    public Application( UUID id ) {
+        uuid = id;
+    }
+
+
+    @Override
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public String getName() {
+        return name;
+    }
+
+
+    public void setName( String name ) {
+        this.name = name;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public String getTitle() {
+        return title;
+    }
+
+
+    public void setTitle( String title ) {
+        this.title = title;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public String getDescription() {
+        return description;
+    }
+
+
+    public void setDescription( String description ) {
+        this.description = description;
+    }
+
+
+    public boolean activated() {
+        return ( activated != null ) && activated;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public Boolean getActivated() {
+        return activated;
+    }
+
+
+    public void setActivated( Boolean activated ) {
+        this.activated = activated;
+    }
+
+
+    public boolean disabled() {
+        return ( disabled != null ) && disabled;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public Boolean getDisabled() {
+        return disabled;
+    }
+
+
+    public void setDisabled( Boolean disabled ) {
+        this.disabled = disabled;
+    }
+
+
+    public boolean allowOpenRegistration() {
+        return ( allowOpenRegistration != null ) && allowOpenRegistration;
+    }
+
+
+    @JsonProperty("allow_open_registration")
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public Boolean getAllowOpenRegistration() {
+        return allowOpenRegistration;
+    }
+
+
+    @JsonProperty("allow_open_registration")
+    public void setAllowOpenRegistration( Boolean allowOpenRegistration ) {
+        this.allowOpenRegistration = allowOpenRegistration;
+    }
+
+
+    public boolean registrationRequiresEmailConfirmation() {
+        return ( registrationRequiresEmailConfirmation != null ) && registrationRequiresEmailConfirmation;
+    }
+
+
+    @JsonProperty("registration_requires_email_confirmation")
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public Boolean getRegistrationRequiresEmailConfirmation() {
+        return registrationRequiresEmailConfirmation;
+    }
+
+
+    @JsonProperty("registration_requires_email_confirmation")
+    public void setRegistrationRequiresEmailConfirmation( Boolean registrationRequiresEmailConfirmation ) {
+        this.registrationRequiresEmailConfirmation = registrationRequiresEmailConfirmation;
+    }
+
+
+    public boolean registrationRequiresAdminApproval() {
+        return ( registrationRequiresAdminApproval != null ) && registrationRequiresAdminApproval;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    @JsonProperty("registration_requires_admin_approval")
+    public Boolean getRegistrationRequiresAdminApproval() {
+        return registrationRequiresAdminApproval;
+    }
+
+
+    @JsonProperty("registration_requires_admin_approval")
+    public void setRegistrationRequiresAdminApproval( Boolean registrationRequiresAdminApproval ) {
+        this.registrationRequiresAdminApproval = registrationRequiresAdminApproval;
+    }
+
+
+    public boolean notifyAdminOfNewUsers() {
+        return ( notifyAdminOfNewUsers != null ) && notifyAdminOfNewUsers;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    @JsonProperty("notify_admin_of_new_users")
+    public Boolean getNotifyAdminOfNewUsers() {
+        return notifyAdminOfNewUsers;
+    }
+
+
+    @JsonProperty("notify_admin_of_new_users")
+    public void setNotifyAdminOfNewUsers( Boolean notifyAdminOfNewUsers ) {
+        this.notifyAdminOfNewUsers = notifyAdminOfNewUsers;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public List<UUID> getUsers() {
+        return users;
+    }
+
+
+    public void setUsers( List<UUID> users ) {
+        this.users = users;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public List<UUID> getGroups() {
+        return groups;
+    }
+
+
+    public void setGroups( List<UUID> groups ) {
+        this.groups = groups;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public Set<String> getCollections() {
+        return collections;
+    }
+
+
+    public void setCollections( Set<String> collections ) {
+        this.collections = collections;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public Map<String, String> getRolenames() {
+        return rolenames;
+    }
+
+
+    public void setRolenames( Map<String, String> rolenames ) {
+        this.rolenames = rolenames;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public Set<String> getCounters() {
+        return counters;
+    }
+
+
+    public void setCounters( Set<String> counters ) {
+        this.counters = counters;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public List<UUID> getAssets() {
+        return assets;
+    }
+
+
+    public void setAssets( List<UUID> assets ) {
+        this.assets = assets;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public Map<String, String> getCredentials() {
+        return credentials;
+    }
+
+
+    public void setCredentials( Map<String, String> credentials ) {
+        this.credentials = credentials;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public List<UUID> getActivities() {
+        return activities;
+    }
+
+
+    public void setActivities( List<UUID> activities ) {
+        this.activities = activities;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public List<UUID> getFolders() {
+        return folders;
+    }
+
+
+    public void setFolders( List<UUID> folders ) {
+        this.folders = folders;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public List<UUID> getEvents() {
+        return events;
+    }
+
+
+    public void setEvents( List<UUID> events ) {
+        this.events = events;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public List<UUID> getDevices() {
+        return devices;
+    }
+
+
+    public void setDevices( List<UUID> devices ) {
+        this.devices = devices;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public Map<String, OAuthProvider> getOauthproviders() {
+        return oauthproviders;
+    }
+
+
+    public void setOauthproviders( Map<String, OAuthProvider> oauthproviders ) {
+        this.oauthproviders = oauthproviders;
+    }
+
+
+    /** Get the organization name of this app */
+    public String getOrganizationName() {
+        String[] names = name.split( "/" );
+
+        if ( names.length == 2 ) {
+            return names[0];
+        }
+
+        return null;
+    }
+
+
+    /** Get the application name of this app */
+    public String getApplicationName() {
+        String[] names = name.split( "/" );
+
+        if ( names.length == 2 ) {
+            return names[1];
+        }
+
+        return null;
+    }
+
+
+    /** @return the accesstokenttl */
+    public Long getAccesstokenttl() {
+        return accesstokenttl;
+    }
+
+
+    /** @param accesstokenttl the accesstokenttl to set */
+    public void setAccesstokenttl( Long accesstokenttl ) {
+        this.accesstokenttl = accesstokenttl;
+    }
+
+
+    @XmlRootElement
+    public static class OAuthProvider {
+        String clientId;
+        String clientSecret;
+        String redirectUris;
+        String javaScriptOrigins;
+        String authorizationEndpointUrl;
+        String accessTokenEndpointUrl;
+        String requestTokenEndpointUrl;
+        String version = "1.0a";
+
+
+        public OAuthProvider() {
+        }
+
+
+        public OAuthProvider( String clientId, String clientSecret ) {
+            this.clientId = clientId;
+            this.clientSecret = clientSecret;
+        }
+
+
+        public OAuthProvider( String clientId, String clientSecret, String redirectUris, String javaScriptOrigins ) {
+            this.clientId = clientId;
+            this.clientSecret = clientSecret;
+            this.redirectUris = redirectUris;
+            this.javaScriptOrigins = javaScriptOrigins;
+        }
+
+
+        public OAuthProvider( String clientId, String clientSecret, String redirectUris, String javaScriptOrigins,
+                              String authorizationEndpointUrl, String accessTokenEndpointUrl,
+                              String requestTokenEndpointUrl ) {
+            this.clientId = clientId;
+            this.clientSecret = clientSecret;
+            this.redirectUris = redirectUris;
+            this.javaScriptOrigins = javaScriptOrigins;
+            this.authorizationEndpointUrl = authorizationEndpointUrl;
+            this.accessTokenEndpointUrl = accessTokenEndpointUrl;
+            this.requestTokenEndpointUrl = requestTokenEndpointUrl;
+        }
+
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public String getVersion() {
+            return version;
+        }
+
+
+        public void setVersion( String version ) {
+            this.version = version;
+        }
+
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public String getClientId() {
+            return clientId;
+        }
+
+
+        public void setClientId( String clientId ) {
+            this.clientId = clientId;
+        }
+
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public String getClientSecret() {
+            return clientSecret;
+        }
+
+
+        public void setClientSecret( String clientSecret ) {
+            this.clientSecret = clientSecret;
+        }
+
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public String getRedirectUris() {
+            return redirectUris;
+        }
+
+
+        public void setRedirectUris( String redirectUris ) {
+            this.redirectUris = redirectUris;
+        }
+
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public String getJavaScriptOrigins() {
+            return javaScriptOrigins;
+        }
+
+
+        public void setJavaScriptOrigins( String javaScriptOrigins ) {
+            this.javaScriptOrigins = javaScriptOrigins;
+        }
+
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public String getAuthorizationEndpointUrl() {
+            return authorizationEndpointUrl;
+        }
+
+
+        public void setAuthorizationEndpointUrl( String authorizationEndpointUrl ) {
+            this.authorizationEndpointUrl = authorizationEndpointUrl;
+        }
+
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public String getAccessTokenEndpointUrl() {
+            return accessTokenEndpointUrl;
+        }
+
+
+        public void setAccessTokenEndpointUrl( String accessTokenEndpointUrl ) {
+            this.accessTokenEndpointUrl = accessTokenEndpointUrl;
+        }
+
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public String getRequestTokenEndpointUrl() {
+            return requestTokenEndpointUrl;
+        }
+
+
+        public void setRequestTokenEndpointUrl( String requestTokenEndpointUrl ) {
+            this.requestTokenEndpointUrl = requestTokenEndpointUrl;
+        }
+
+
+        @Override
+        public String toString() {
+            return "OAuthProvider [clientId=" + clientId + ", clientSecret=" + clientSecret + ", redirectUris="
+                    + redirectUris + ", javaScriptOrigins=" + javaScriptOrigins + ", authorizationEndpointUrl="
+                    + authorizationEndpointUrl + ", accessTokenEndpointUrl=" + accessTokenEndpointUrl
+                    + ", requestTokenEndpointUrl=" + requestTokenEndpointUrl + ", version=" + version + "]";
+        }
+    }
+
+
+    @XmlRootElement
+    public static class WebHook {
+        String type;
+        String uri;
+
+
+        public WebHook() {
+        }
+
+
+        public String getType() {
+            return type;
+        }
+
+
+        public void setType( String type ) {
+            this.type = type;
+        }
+
+
+        public String getUri() {
+            return uri;
+        }
+
+
+        public void setUri( String uri ) {
+            this.uri = uri;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/entities/Asset.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/entities/Asset.java b/stack/core/src/main/java/org/apache/usergrid/persistence/entities/Asset.java
new file mode 100644
index 0000000..fcaf6ce
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/entities/Asset.java
@@ -0,0 +1,93 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.entities;
+
+
+import java.util.Set;
+import java.util.UUID;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.apache.usergrid.persistence.TypedEntity;
+import org.apache.usergrid.persistence.annotations.EntityDictionary;
+import org.apache.usergrid.persistence.annotations.EntityProperty;
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
+
+
+/**
+ * Asset entity for representing file-like objects.
+ *
+ * @deprecated
+ */
+@XmlRootElement
+public class Asset extends TypedEntity {
+
+    public static final String ENTITY_TYPE = "asset";
+
+    @EntityProperty(required = true, indexed = true, mutable = false)
+    UUID owner;
+
+    @EntityProperty(indexed = true, fulltextIndexed = false, required = true, aliasProperty = true,
+            pathBasedName = true, mutable = false, unique = true)
+    protected String path;
+
+    @EntityDictionary(keyType = java.lang.String.class)
+    protected Set<String> connections;
+
+
+    public Asset() {
+        // id = UUIDUtils.newTimeUUID();
+    }
+
+
+    public Asset( UUID id ) {
+        this.uuid = id;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public String getPath() {
+        return path;
+    }
+
+
+    public void setPath( String name ) {
+        path = name;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public UUID getOwner() {
+        return owner;
+    }
+
+
+    public void setOwner( UUID owner ) {
+        this.owner = owner;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public Set<String> getConnections() {
+        return connections;
+    }
+
+
+    public void setConnections( Set<String> connections ) {
+        this.connections = connections;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/entities/Device.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/entities/Device.java b/stack/core/src/main/java/org/apache/usergrid/persistence/entities/Device.java
new file mode 100644
index 0000000..01a4a36
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/entities/Device.java
@@ -0,0 +1,105 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.entities;
+
+
+import java.util.List;
+import java.util.UUID;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.apache.usergrid.persistence.TypedEntity;
+import org.apache.usergrid.persistence.annotations.EntityCollection;
+import org.apache.usergrid.persistence.annotations.EntityProperty;
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
+
+
+/** The Device entity class for representing devices in the service. */
+@XmlRootElement
+public class Device extends TypedEntity {
+
+    public static final String ENTITY_TYPE = "device";
+    public static final String RECEIPTS_COLLECTION = "receipts";
+
+    @EntityProperty(indexed = true, fulltextIndexed = false, required = false, aliasProperty = true, unique = true,
+            basic = true)
+    protected String name;
+
+    @EntityCollection(type = "user", linkedCollection = "devices")
+    protected List<UUID> users;
+
+    @EntityCollection(type = "receipt")
+    protected List<UUID> receipts;
+
+    @EntityProperty
+    protected Integer badge;
+
+
+    public Device() {
+        // id = UUIDUtils.newTimeUUID();
+    }
+
+
+    public Device( UUID id ) {
+        uuid = id;
+    }
+
+
+    @Override
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public String getName() {
+        return name;
+    }
+
+
+    public void setName( String name ) {
+        this.name = name;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public List<UUID> getUsers() {
+        return users;
+    }
+
+
+    public void setUsers( List<UUID> users ) {
+        this.users = users;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public List<UUID> getReceipts() {
+        return receipts;
+    }
+
+
+    public void setReceipts( List<UUID> receipts ) {
+        this.receipts = receipts;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public Integer getBadge() {
+        return badge;
+    }
+
+
+    public void setBadge( Integer badge ) {
+        this.badge = badge;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/entities/Event.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/entities/Event.java b/stack/core/src/main/java/org/apache/usergrid/persistence/entities/Event.java
new file mode 100644
index 0000000..2ab2882
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/entities/Event.java
@@ -0,0 +1,155 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.entities;
+
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.apache.usergrid.persistence.TypedEntity;
+import org.apache.usergrid.persistence.annotations.EntityDictionary;
+import org.apache.usergrid.persistence.annotations.EntityProperty;
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
+
+
+/** An event type posted by the application. */
+@XmlRootElement
+public class Event extends TypedEntity {
+
+    public static final String ENTITY_TYPE = "event";
+
+    @EntityProperty(required = true, indexed = true, mutable = false)
+    long timestamp = System.currentTimeMillis();
+
+    @EntityProperty(required = false, indexed = true, mutable = false)
+    UUID user;
+
+    @EntityProperty(required = false, indexed = true, mutable = false)
+    UUID group;
+
+    @EntityProperty(fulltextIndexed = false, required = false, mutable = false, indexed = true)
+    String category;
+
+    @EntityProperty(indexed = false, required = false, mutable = false)
+    Map<String, Integer> counters;
+
+    @EntityProperty(indexed = true, required = false, mutable = false)
+    String message;
+
+    @EntityDictionary(keyType = java.lang.String.class)
+    protected Set<String> connections;
+
+
+    public Event() {
+        // id = UUIDUtils.newTimeUUID();
+    }
+
+
+    public Event( UUID id ) {
+        uuid = id;
+    }
+
+
+    public long getTimestamp() {
+        return timestamp;
+    }
+
+
+    public void setTimestamp( long timestamp ) {
+        if ( timestamp == 0 ) {
+            timestamp = System.currentTimeMillis();
+        }
+        this.timestamp = timestamp;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public UUID getUser() {
+        return user;
+    }
+
+
+    public void setUser( UUID user ) {
+        this.user = user;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public UUID getGroup() {
+        return group;
+    }
+
+
+    public void setGroup( UUID group ) {
+        this.group = group;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public String getCategory() {
+        return category;
+    }
+
+
+    public void setCategory( String category ) {
+        this.category = category;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public Map<String, Integer> getCounters() {
+        return counters;
+    }
+
+
+    public void setCounters( Map<String, Integer> counters ) {
+        this.counters = counters;
+    }
+
+
+    public void addCounter( String name, int value ) {
+        if ( counters == null ) {
+            counters = new HashMap<String, Integer>();
+        }
+        counters.put( name, value );
+    }
+
+
+    public String getMessage() {
+        return message;
+    }
+
+
+    public void setMessage( String message ) {
+        this.message = message;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public Set<String> getConnections() {
+        return connections;
+    }
+
+
+    public void setConnections( Set<String> connections ) {
+        this.connections = connections;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/entities/Folder.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/entities/Folder.java b/stack/core/src/main/java/org/apache/usergrid/persistence/entities/Folder.java
new file mode 100644
index 0000000..6ae91e0
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/entities/Folder.java
@@ -0,0 +1,93 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.entities;
+
+
+import java.util.Set;
+import java.util.UUID;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.apache.usergrid.persistence.TypedEntity;
+import org.apache.usergrid.persistence.annotations.EntityDictionary;
+import org.apache.usergrid.persistence.annotations.EntityProperty;
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
+
+
+/**
+ * Asset entity for representing folder-like objects.
+ *
+ * @deprecated
+ */
+@XmlRootElement
+public class Folder extends TypedEntity {
+
+    public static final String ENTITY_TYPE = "asset";
+
+    @EntityProperty(required = true, indexed = true, mutable = false)
+    UUID owner;
+
+    @EntityProperty(indexed = true, fulltextIndexed = false, required = true, aliasProperty = true,
+            pathBasedName = true, mutable = false, unique = true)
+    protected String path;
+
+    @EntityDictionary(keyType = java.lang.String.class)
+    protected Set<String> connections;
+
+
+    public Folder() {
+        // id = UUIDUtils.newTimeUUID();
+    }
+
+
+    public Folder( UUID id ) {
+        this.uuid = id;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public String getPath() {
+        return path;
+    }
+
+
+    public void setPath( String name ) {
+        path = name;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public UUID getOwner() {
+        return owner;
+    }
+
+
+    public void setOwner( UUID owner ) {
+        this.owner = owner;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public Set<String> getConnections() {
+        return connections;
+    }
+
+
+    public void setConnections( Set<String> connections ) {
+        this.connections = connections;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/entities/Group.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/entities/Group.java b/stack/core/src/main/java/org/apache/usergrid/persistence/entities/Group.java
new file mode 100644
index 0000000..8993d46
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/entities/Group.java
@@ -0,0 +1,168 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.entities;
+
+
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.apache.usergrid.persistence.CredentialsInfo;
+import org.apache.usergrid.persistence.TypedEntity;
+import org.apache.usergrid.persistence.annotations.EntityCollection;
+import org.apache.usergrid.persistence.annotations.EntityDictionary;
+import org.apache.usergrid.persistence.annotations.EntityProperty;
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
+
+
+/** Groups are used to organize users. */
+@XmlRootElement
+public class Group extends TypedEntity {
+
+    public static final String ENTITY_TYPE = "group";
+
+    public static final String CONNECTION_MEMBERSHIP = "membership";
+
+    @EntityProperty(indexed = true, fulltextIndexed = false, required = true, aliasProperty = true,
+            pathBasedName = true, mutable = true, unique = true, basic = true)
+    protected String path;
+
+    @EntityDictionary(keyType = java.lang.String.class)
+    protected Set<String> connections;
+
+    @EntityDictionary(keyType = java.lang.String.class, valueType = java.lang.String.class)
+    protected Map<String, String> rolenames;
+
+    @EntityDictionary(keyType = java.lang.String.class)
+    protected Set<String> permissions;
+
+    @EntityDictionary(keyType = java.lang.String.class, valueType = CredentialsInfo.class)
+    protected Map<String, CredentialsInfo> credentials;
+
+    @EntityCollection(type = "user", linkedCollection = "groups")
+    protected List<UUID> users;
+
+    @EntityCollection(type = "activity", reversed = true, sort = "published desc", indexingDynamicDictionaries = true)
+    protected List<UUID> activities;
+
+    @EntityCollection(type = "activity", reversed = true, sort = "published desc", indexingDynamicDictionaries = true)
+    protected List<UUID> feed;
+
+    @EntityCollection(type = "role", linkedCollection = "groups", indexingDynamicDictionaries = true)
+    protected List<UUID> roles;
+
+
+    public Group() {
+        // id = UUIDUtils.newTimeUUID();
+    }
+
+
+    public Group( UUID id ) {
+        uuid = id;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public String getPath() {
+        return path;
+    }
+
+
+    public void setPath( String path ) {
+        this.path = path;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public List<UUID> getUsers() {
+        return users;
+    }
+
+
+    public void setUsers( List<UUID> users ) {
+        this.users = users;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public Set<String> getConnections() {
+        return connections;
+    }
+
+
+    public void setConnections( Set<String> connections ) {
+        this.connections = connections;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public Map<String, String> getRolenames() {
+        return rolenames;
+    }
+
+
+    public void setRolenames( Map<String, String> rolenames ) {
+        this.rolenames = rolenames;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public List<UUID> getActivities() {
+        return activities;
+    }
+
+
+    public void setActivities( List<UUID> activities ) {
+        this.activities = activities;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public List<UUID> getFeed() {
+        return feed;
+    }
+
+
+    public void setFeed( List<UUID> feed ) {
+        this.feed = feed;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public Map<String, CredentialsInfo> getCredentials() {
+        return credentials;
+    }
+
+
+    public void setCredentials( Map<String, CredentialsInfo> credentials ) {
+        this.credentials = credentials;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public List<UUID> getRoles() {
+        return roles;
+    }
+
+
+    public void setRoles( List<UUID> roles ) {
+        this.roles = roles;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/entities/JobData.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/entities/JobData.java b/stack/core/src/main/java/org/apache/usergrid/persistence/entities/JobData.java
new file mode 100644
index 0000000..e9cbc9e
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/entities/JobData.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.entities;
+
+
+import org.apache.usergrid.persistence.TypedEntity;
+import org.apache.usergrid.persistence.annotations.EntityProperty;
+
+
+/**
+ * All job data should be contained in this entity
+ *
+ * @author tnine
+ */
+public class JobData extends TypedEntity {
+
+
+    @EntityProperty(required = true, basic = true, indexed = true)
+    private String jobName;
+
+
+    /**
+     * @param jobName
+     * @param startTime
+     */
+    public JobData() {
+        super();
+    }
+
+
+    /** @return the jobName */
+    public String getJobName() {
+        return jobName;
+    }
+
+
+    /** @param jobName the jobName to set */
+    public void setJobName( String jobName ) {
+        this.jobName = jobName;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/entities/JobStat.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/entities/JobStat.java b/stack/core/src/main/java/org/apache/usergrid/persistence/entities/JobStat.java
new file mode 100644
index 0000000..7ed306f
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/entities/JobStat.java
@@ -0,0 +1,175 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.entities;
+
+
+import java.util.UUID;
+
+import org.apache.usergrid.persistence.TypedEntity;
+import org.apache.usergrid.persistence.annotations.EntityProperty;
+
+
+/**
+ * All job execution info should be in this entity
+ *
+ * @author tnine
+ */
+public class JobStat extends TypedEntity {
+
+
+    @EntityProperty(required = true, basic = true, indexed = true)
+    private String jobName;
+
+    @EntityProperty(required = true, basic = true, indexed = true)
+    private UUID jobId;
+
+    @EntityProperty(required = true, basic = true, indexed = true)
+    private long startTime;
+
+    @EntityProperty(required = true, basic = true, indexed = true)
+    private int runCount;
+
+    @EntityProperty(required = true, basic = true, indexed = true)
+    private int delayCount;
+
+    @EntityProperty(required = true, basic = true, indexed = true)
+    private long duration;
+
+
+    /**
+     * @param jobName
+     * @param startTime
+     */
+    public JobStat() {
+    }
+
+
+    /**
+     * @param jobName
+     * @param jobId
+     */
+    public JobStat( String jobName, UUID jobId ) {
+        super();
+        this.jobName = jobName;
+        this.jobId = jobId;
+    }
+
+
+    /** @return the jobName */
+    public String getJobName() {
+        return jobName;
+    }
+
+
+    /** @param jobName the jobName to set */
+    public void setJobName( String jobName ) {
+        this.jobName = jobName;
+    }
+
+
+    /** @return the fireTime */
+    public long getStartTime() {
+        return startTime;
+    }
+
+
+    /**
+     * Don't set this, it won't accomplish anything.  This is overwritten by the job as an audit record
+     *
+     * @param startTime the fireTime to set
+     */
+    public void setStartTime( long startTime ) {
+        this.startTime = startTime;
+    }
+
+
+    /** Increment the run count */
+    public void incrementRuns() {
+        runCount++;
+    }
+
+
+    /** Increment the run count */
+    public void incrementDelays() {
+        delayCount++;
+    }
+
+
+    /** Get the number of times this job has failed */
+    public int getRunCount() {
+        return runCount;
+    }
+
+
+    /**
+     * DON'T CALL THIS, USE THE INRECMENT METHOD!
+     *
+     * @param failCount the failCount to set
+     */
+    public void setRunCount( int runCount ) {
+        this.runCount = runCount;
+    }
+
+
+    /**
+     * Return the total number of attempts that have resulted in an error and not an explicit delay
+     * <p/>
+     * runCount - delayCount
+     */
+    public int getTotalAttempts() {
+        return runCount - delayCount;
+    }
+
+
+    /** @return the delayCount */
+    public int getDelayCount() {
+        return delayCount;
+    }
+
+
+    /**
+     * DON'T CALL THIS, USE THE INRECMENT METHOD!
+     *
+     * @param delayCount the delayCount to set
+     */
+    public void setDelayCount( int delayCount ) {
+        this.delayCount = delayCount;
+    }
+
+
+    /** @return the duration */
+    public long getDuration() {
+        return duration;
+    }
+
+
+    /** @param duration the duration to set */
+    public void setDuration( long duration ) {
+        this.duration = duration;
+    }
+
+
+    /** @return the jobId */
+    public UUID getJobId() {
+        return jobId;
+    }
+
+
+    /** @param jobId the jobId to set */
+    public void setJobId( UUID jobId ) {
+        this.jobId = jobId;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/entities/Message.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/entities/Message.java b/stack/core/src/main/java/org/apache/usergrid/persistence/entities/Message.java
new file mode 100644
index 0000000..c540447
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/entities/Message.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.entities;
+
+
+import java.util.Set;
+import java.util.UUID;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.apache.usergrid.persistence.TypedEntity;
+import org.apache.usergrid.persistence.annotations.EntityDictionary;
+import org.apache.usergrid.persistence.annotations.EntityProperty;
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
+
+
+/**
+ * A generic Message type for message queue type operations. For status updates and other social actions, use Activity
+ * instead.
+ */
+@XmlRootElement
+public class Message extends TypedEntity {
+
+    public static final String ENTITY_TYPE = "message";
+
+    @EntityProperty(fulltextIndexed = false, required = true, mutable = false, indexed = true)
+    String category;
+
+    @EntityDictionary(keyType = java.lang.String.class)
+    protected Set<String> connections;
+
+
+    public Message() {
+        // id = UUIDUtils.newTimeUUID();
+    }
+
+
+    public Message( UUID id ) {
+        this.uuid = id;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public String getCategory() {
+        return category;
+    }
+
+
+    public void setCategory( String category ) {
+        this.category = category;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public Set<String> getConnections() {
+        return connections;
+    }
+
+
+    public void setConnections( Set<String> connections ) {
+        this.connections = connections;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/entities/Role.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/entities/Role.java b/stack/core/src/main/java/org/apache/usergrid/persistence/entities/Role.java
new file mode 100644
index 0000000..2f96e75
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/entities/Role.java
@@ -0,0 +1,153 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.entities;
+
+
+import java.util.List;
+import java.util.Set;
+import java.util.UUID;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.apache.usergrid.persistence.TypedEntity;
+import org.apache.usergrid.persistence.annotations.EntityCollection;
+import org.apache.usergrid.persistence.annotations.EntityDictionary;
+import org.apache.usergrid.persistence.annotations.EntityProperty;
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
+
+
+/** Groups are used to organize users. */
+@XmlRootElement
+public class Role extends TypedEntity {
+
+    public static final String ENTITY_TYPE = "role";
+
+    @EntityProperty(indexed = true, fulltextIndexed = false, required = true, aliasProperty = true, mutable = false,
+            unique = true)
+    protected String name;
+
+    @EntityProperty(mutable = true, indexed = true)
+    protected String roleName;
+
+    @EntityProperty(mutable = true, indexed = true)
+    protected String title;
+
+    @EntityProperty(mutable = true, indexed = true)
+    protected Long inactivity;
+
+    @EntityDictionary(keyType = java.lang.String.class)
+    protected Set<String> permissions;
+
+    @EntityCollection(type = "user", linkedCollection = "roles", indexingDynamicDictionaries = true)
+    protected List<UUID> users;
+
+    @EntityCollection(type = "group", linkedCollection = "roles", indexingDynamicDictionaries = true)
+    protected List<UUID> groups;
+
+
+    public Role() {
+        // id = UUIDUtils.newTimeUUID();
+    }
+
+
+    public Role( String roleName ) {
+        this.roleName = roleName;
+    }
+
+
+    public Role( UUID id ) {
+        this.uuid = id;
+    }
+
+
+    @Override
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public String getName() {
+        return name;
+    }
+
+
+    public void setName( String name ) {
+        this.name = name;
+    }
+
+
+    public String getRoleName() {
+        return roleName;
+    }
+
+
+    public void setRoleName( String roleName ) {
+        this.roleName = roleName;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public String getTitle() {
+        return title;
+    }
+
+
+    public void setTitle( String title ) {
+        this.title = title;
+    }
+
+
+    /** @return the inactivity */
+    public Long getInactivity() {
+        return inactivity;
+    }
+
+
+    /** @param inactivity the inactivity to set */
+    public void setInactivity( Long inactivity ) {
+        this.inactivity = inactivity;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public List<UUID> getUsers() {
+        return users;
+    }
+
+
+    public void setUsers( List<UUID> users ) {
+        this.users = users;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public Set<String> getPermissions() {
+        return permissions;
+    }
+
+
+    public void setPermissions( Set<String> permissions ) {
+        this.permissions = permissions;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public List<UUID> getGroups() {
+        return groups;
+    }
+
+
+    public void setGroups( List<UUID> groups ) {
+        this.groups = groups;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/entities/User.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/entities/User.java b/stack/core/src/main/java/org/apache/usergrid/persistence/entities/User.java
new file mode 100644
index 0000000..13df1ad
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/entities/User.java
@@ -0,0 +1,348 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.entities;
+
+
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.apache.usergrid.persistence.CredentialsInfo;
+import org.apache.usergrid.persistence.TypedEntity;
+import org.apache.usergrid.persistence.annotations.EntityCollection;
+import org.apache.usergrid.persistence.annotations.EntityDictionary;
+import org.apache.usergrid.persistence.annotations.EntityProperty;
+import org.codehaus.jackson.annotate.JsonIgnore;
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
+
+import static org.apache.commons.lang.StringUtils.isNotBlank;
+
+
+/** The User entity class for representing users in the service. */
+@XmlRootElement
+public class User extends TypedEntity {
+
+    public static final String ENTITY_TYPE = "user";
+
+    public static final String CONNECTION_FOLLOW = "follow";
+
+    public static final String PROPERTY_UUID = "uuid";
+
+    public static final String PROPERTY_EMAIL = "email";
+
+    public static final String PROPERTY_HASHTYPE = "hashtype";
+
+    public static final String HASHTYPE_MD5 = "md5";
+
+    @EntityProperty(indexed = true, fulltextIndexed = false, required = true, aliasProperty = true, unique = true,
+            basic = true)
+    protected String username;
+
+    @EntityProperty(indexed = true, unique = true, basic = true)
+    protected String email;
+
+    @EntityProperty(indexed = true, fulltextIndexed = true)
+    protected String name;
+
+    @EntityProperty(indexed = true)
+    protected Boolean activated;
+
+    @EntityProperty(indexed = true)
+    protected Boolean confirmed;
+
+    @EntityProperty(indexed = true)
+    protected Boolean disabled;
+
+    @EntityProperty(indexed = false)
+    protected String picture;
+
+    /** The time this user was deactivated */
+    @EntityProperty(indexed = true)
+    protected Long deactivated;
+
+    @EntityDictionary(keyType = java.lang.String.class)
+    protected Set<String> connections;
+
+    @EntityDictionary(keyType = java.lang.String.class, valueType = java.lang.String.class)
+    protected Map<String, String> rolenames;
+
+    @EntityDictionary(keyType = java.lang.String.class)
+    protected Set<String> permissions;
+
+    @EntityDictionary(keyType = java.lang.String.class, valueType = CredentialsInfo.class)
+    protected Map<String, CredentialsInfo> credentials;
+
+    @EntityCollection(type = "group", linkedCollection = "users")
+    protected List<UUID> groups;
+
+    @EntityCollection(type = "device", linkedCollection = "users")
+    protected List<UUID> devices;
+
+    @EntityCollection(type = "activity", reversed = true, sort = "published desc", indexingDynamicDictionaries = true)
+    protected List<UUID> activities;
+
+    @EntityCollection(type = "activity", reversed = true, sort = "published desc", indexingDynamicDictionaries = true)
+    protected List<UUID> feed;
+
+    @EntityCollection(type = "role", linkedCollection = "users", indexingDynamicDictionaries = true)
+    protected List<UUID> roles;
+
+    @JsonIgnore
+    @EntityDictionary(keyType = String.class, valueType = CredentialsInfo.class)
+    protected Map<String, CredentialsInfo> credentialsHistory;
+
+
+    public Map<String, CredentialsInfo> getCredentialsHistory() {
+        return credentialsHistory;
+    }
+
+
+    public void setCredentialsHistory( Map<String, CredentialsInfo> credentialsHistory ) {
+        this.credentialsHistory = credentialsHistory;
+    }
+
+
+    public User() {
+        // id = UUIDUtils.newTimeUUID();
+    }
+
+
+    public User( UUID id ) {
+        uuid = id;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public String getUsername() {
+        return username;
+    }
+
+
+    public void setUsername( String username ) {
+        this.username = username;
+    }
+
+
+    @Override
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public String getName() {
+        return name;
+    }
+
+
+    public void setName( String name ) {
+        this.name = name;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public String getEmail() {
+        return email;
+    }
+
+
+    @JsonIgnore
+    public String getDisplayEmailAddress() {
+        if ( isNotBlank( name ) ) {
+            return name + " <" + email + ">";
+        }
+        return email;
+    }
+
+
+    public void setEmail( String email ) {
+        this.email = email;
+    }
+
+
+    public boolean activated() {
+        return ( activated != null ) && activated;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public Boolean getActivated() {
+        return activated;
+    }
+
+
+    public void setActivated( Boolean activated ) {
+        this.activated = activated;
+
+        if ( activated ) {
+            deactivated = null;
+        }
+    }
+
+
+    /** @return the deactivated */
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public Long getDeactivated() {
+        return deactivated;
+    }
+
+
+    /** @param deactivated the deactivated to set */
+    public void setDeactivated( Long deactivated ) {
+        this.deactivated = deactivated;
+    }
+
+
+    public boolean confirmed() {
+        return ( confirmed != null ) && confirmed;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public Boolean getConfirmed() {
+        return confirmed;
+    }
+
+
+    public void setConfirmed( Boolean confirmed ) {
+        this.confirmed = confirmed;
+    }
+
+
+    public boolean disabled() {
+        return ( disabled != null ) && disabled;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public Boolean getDisabled() {
+        return disabled;
+    }
+
+
+    public void setDisabled( Boolean disabled ) {
+        this.disabled = disabled;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public String getPicture() {
+        return picture;
+    }
+
+
+    public void setPicture( String picture ) {
+        this.picture = picture;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public List<UUID> getGroups() {
+        return groups;
+    }
+
+
+    public void setGroups( List<UUID> groups ) {
+        this.groups = groups;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public List<UUID> getDevices() {
+        return devices;
+    }
+
+
+    public void setDevices( List<UUID> devices ) {
+        this.devices = devices;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public Set<String> getConnections() {
+        return connections;
+    }
+
+
+    public void setConnections( Set<String> connections ) {
+        this.connections = connections;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public Map<String, String> getRolenames() {
+        return rolenames;
+    }
+
+
+    public void setRolenames( Map<String, String> rolenames ) {
+        this.rolenames = rolenames;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public Set<String> getPermissions() {
+        return permissions;
+    }
+
+
+    public void setPermissions( Set<String> permissions ) {
+        this.permissions = permissions;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public Map<String, CredentialsInfo> getCredentials() {
+        return credentials;
+    }
+
+
+    public void setCredentials( Map<String, CredentialsInfo> credentials ) {
+        this.credentials = credentials;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public List<UUID> getActivities() {
+        return activities;
+    }
+
+
+    public void setActivities( List<UUID> activities ) {
+        this.activities = activities;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public List<UUID> getFeed() {
+        return feed;
+    }
+
+
+    public void setFeed( List<UUID> feed ) {
+        this.feed = feed;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public List<UUID> getRoles() {
+        return roles;
+    }
+
+
+    public void setRoles( List<UUID> roles ) {
+        this.roles = roles;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/ApplicationAlreadyExistsException.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/ApplicationAlreadyExistsException.java b/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/ApplicationAlreadyExistsException.java
new file mode 100644
index 0000000..788f9a2
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/ApplicationAlreadyExistsException.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.exceptions;
+
+
+public class ApplicationAlreadyExistsException extends PersistenceException {
+
+    /**
+     *
+     */
+    private static final long serialVersionUID = 1L;
+    final String applicationName;
+
+
+    public ApplicationAlreadyExistsException( String applicationName ) {
+        super( "Application " + applicationName + " already exists" );
+        this.applicationName = applicationName;
+    }
+
+
+    public String getApplicationName() {
+        return applicationName;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/DuplicateUniquePropertyExistsException.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/DuplicateUniquePropertyExistsException.java b/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/DuplicateUniquePropertyExistsException.java
new file mode 100644
index 0000000..7687dea
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/DuplicateUniquePropertyExistsException.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.exceptions;
+
+
+public class DuplicateUniquePropertyExistsException extends PersistenceException {
+
+    /**
+     *
+     */
+    private static final long serialVersionUID = 1L;
+    final String entityType;
+    final String propertyName;
+    final Object propertyValue;
+
+
+    public DuplicateUniquePropertyExistsException( String entityType, String propertyName, Object propertyValue ) {
+        super( "Entity " + entityType + " requires that property named " + propertyName + " be unique, value of "
+                + propertyValue + " exists" );
+        this.entityType = entityType;
+        this.propertyName = propertyName;
+        this.propertyValue = propertyValue;
+    }
+
+
+    public String getEntityType() {
+        return entityType;
+    }
+
+
+    public String getPropertyName() {
+        return propertyName;
+    }
+
+
+    public Object getPropertyValue() {
+        return propertyValue;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/EntityNotFoundException.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/EntityNotFoundException.java b/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/EntityNotFoundException.java
new file mode 100644
index 0000000..385f69b
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/EntityNotFoundException.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.exceptions;
+
+
+public class EntityNotFoundException extends PersistenceException {
+
+    /**
+     *
+     */
+    private static final long serialVersionUID = -3579346096812510039L;
+
+
+    public EntityNotFoundException() {
+        super();
+    }
+
+
+    public EntityNotFoundException( String message, Throwable cause ) {
+        super( message, cause );
+    }
+
+
+    public EntityNotFoundException( String message ) {
+        super( message );
+    }
+
+
+    public EntityNotFoundException( Throwable cause ) {
+        super( cause );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/LockingException.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/LockingException.java b/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/LockingException.java
new file mode 100644
index 0000000..7d01114
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/LockingException.java
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.exceptions;
+
+
+/** General Exception for locking related operations. */
+public class LockingException extends Exception {
+
+    /**
+     *
+     */
+    private static final long serialVersionUID = 1630572186589575754L;
+
+
+    /**
+     *
+     */
+    public LockingException() {
+        // TODO Auto-generated constructor stub
+    }
+
+
+    /**
+     * @param arg0
+     */
+    public LockingException( String arg0 ) {
+        super( arg0 );
+        // TODO Auto-generated constructor stub
+    }
+
+
+    /**
+     * @param arg0
+     */
+    public LockingException( Throwable arg0 ) {
+        super( arg0 );
+        // TODO Auto-generated constructor stub
+    }
+
+
+    /**
+     * @param arg0
+     * @param arg1
+     */
+    public LockingException( String arg0, Throwable arg1 ) {
+        super( arg0, arg1 );
+        // TODO Auto-generated constructor stub
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/NoFullTextIndexException.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/NoFullTextIndexException.java b/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/NoFullTextIndexException.java
new file mode 100644
index 0000000..793f623
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/NoFullTextIndexException.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.exceptions;
+
+
+/**
+ * Thrown when the user attempts to perform a "contains" operation on a field that isn't full text indexed
+ *
+ * @author tnine
+ */
+public class NoFullTextIndexException extends PersistenceException {
+
+    /**
+     *
+     */
+    private static final long serialVersionUID = 1L;
+    final String entityType;
+    final String propertyName;
+
+
+    public NoFullTextIndexException( String entityType, String propertyName ) {
+        super( "Entity '" + entityType + "' with property named '" + propertyName
+                + "' is not full text indexed.  You cannot use the 'contains' operand on this field" );
+        this.entityType = entityType;
+        this.propertyName = propertyName;
+    }
+
+
+    public String getEntityType() {
+        return entityType;
+    }
+
+
+    public String getPropertyName() {
+        return propertyName;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/NoIndexException.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/NoIndexException.java b/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/NoIndexException.java
new file mode 100644
index 0000000..2ee5107
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/NoIndexException.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.exceptions;
+
+
+/**
+ * Thrown when the user attempts to perform a "contains" operation on a field that isn't full text indexed
+ *
+ * @author tnine
+ */
+public class NoIndexException extends PersistenceException {
+
+    /**
+     *
+     */
+    private static final long serialVersionUID = 1L;
+    final String entityType;
+    final String propertyName;
+
+
+    public NoIndexException( String entityType, String propertyName ) {
+        super( "Entity '" + entityType + "' with property named '" + propertyName
+                + "' is not indexed.  You cannot use the this field in queries." );
+        this.entityType = entityType;
+        this.propertyName = propertyName;
+    }
+
+
+    public String getEntityType() {
+        return entityType;
+    }
+
+
+    public String getPropertyName() {
+        return propertyName;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/PersistenceException.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/PersistenceException.java b/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/PersistenceException.java
new file mode 100644
index 0000000..dff5c8a
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/PersistenceException.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.exceptions;
+
+
+public class PersistenceException extends Exception {
+
+    /**
+     *
+     */
+    private static final long serialVersionUID = 1L;
+
+
+    public PersistenceException() {
+        super();
+    }
+
+
+    public PersistenceException( String message, Throwable cause ) {
+        super( message, cause );
+    }
+
+
+    public PersistenceException( String message ) {
+        super( message );
+    }
+
+
+    public PersistenceException( Throwable cause ) {
+        super( cause );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/PropertyTypeConversionException.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/PropertyTypeConversionException.java b/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/PropertyTypeConversionException.java
new file mode 100644
index 0000000..90234e5
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/PropertyTypeConversionException.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.exceptions;
+
+
+public class PropertyTypeConversionException extends PersistenceException {
+
+    /**
+     *
+     */
+    private static final long serialVersionUID = 1L;
+    final String entityType;
+    final String propertyName;
+    final Object propertyValue;
+    final Class<?> propertyType;
+
+
+    public PropertyTypeConversionException( String entityType, String propertyName, Object propertyValue,
+                                            Class<?> propertyType ) {
+        super( "Unable to convert property \"" + propertyName + "\" of entity \"" + entityType
+                + "\" from value of type " + propertyValue.getClass() + " to value of type " + propertyType );
+        this.entityType = entityType;
+        this.propertyName = propertyName;
+        this.propertyValue = propertyValue;
+        this.propertyType = propertyType;
+    }
+
+
+    public PropertyTypeConversionException( String entityType, String propertyName, Object propertyValue,
+                                            Class<?> propertyType, Throwable cause ) {
+        super( "Unable to convert property \"" + propertyName + "\" of entity \"" + entityType
+                + "\" from value of type " + propertyValue.getClass() + " to value of type " + propertyType, cause );
+        this.entityType = entityType;
+        this.propertyName = propertyName;
+        this.propertyValue = propertyValue;
+        this.propertyType = propertyType;
+    }
+
+
+    public String getEntityType() {
+        return entityType;
+    }
+
+
+    public String getPropertyName() {
+        return propertyName;
+    }
+
+
+    public Object getPropertyValue() {
+        return propertyValue;
+    }
+
+
+    public Class<?> getPropertyType() {
+        return propertyType;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/QueryIterationException.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/QueryIterationException.java b/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/QueryIterationException.java
new file mode 100644
index 0000000..1acc76a
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/QueryIterationException.java
@@ -0,0 +1,13 @@
+package org.apache.usergrid.persistence.exceptions;
+
+
+/**
+ * Thrown when an error occurs during query iteration
+ *
+ * @author tnine
+ */
+public class QueryIterationException extends RuntimeException {
+    public QueryIterationException( final String message ) {
+        super( message );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/QueryParseException.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/QueryParseException.java b/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/QueryParseException.java
new file mode 100644
index 0000000..d53144f
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/QueryParseException.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.exceptions;
+
+
+/**
+ * An exception thrown when a query cannot be parsed
+ *
+ * @author tnine
+ */
+public class QueryParseException extends RuntimeException {
+
+    /**
+     *
+     */
+    private static final long serialVersionUID = 1L;
+
+
+    /**
+     *
+     */
+    public QueryParseException() {
+        super();
+    }
+
+
+    /**
+     * @param arg0
+     * @param arg1
+     */
+    public QueryParseException( String arg0, Throwable arg1 ) {
+        super( arg0, arg1 );
+    }
+
+
+    /**
+     * @param arg0
+     */
+    public QueryParseException( String arg0 ) {
+        super( arg0 );
+    }
+
+
+    /**
+     * @param arg0
+     */
+    public QueryParseException( Throwable arg0 ) {
+        super( arg0 );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/QueryTokenException.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/QueryTokenException.java b/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/QueryTokenException.java
new file mode 100644
index 0000000..72f158a
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/QueryTokenException.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.exceptions;
+
+
+/**
+ * An exception thrown when a query encounters a token it doesn't recognize
+ * @author tnine
+ */
+public class QueryTokenException extends RuntimeException {
+
+    /**
+     *
+     */
+    private static final long serialVersionUID = 1L;
+
+
+
+
+    /**
+     * @param arg0
+     */
+    public QueryTokenException( Throwable arg0 ) {
+        super( arg0 );
+    }
+
+
+    @Override
+    public String getMessage() {
+        //antlr errors or strange.  We have to do this, there's no message
+        return getCause().toString();
+    }
+
+
+    @Override
+    public String getLocalizedMessage() {
+        return getMessage();
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/QueueException.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/QueueException.java b/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/QueueException.java
new file mode 100644
index 0000000..07889a6
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/QueueException.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.exceptions;
+
+
+/** General Exception for queue related operations. */
+public class QueueException extends RuntimeException {
+
+    /**
+     *
+     */
+    private static final long serialVersionUID = 1630572186589575754L;
+
+
+    /**
+     *
+     */
+    public QueueException() {
+    }
+
+
+    /**
+     * @param arg0
+     */
+    public QueueException( String arg0 ) {
+        super( arg0 );
+    }
+
+
+    /**
+     * @param arg0
+     */
+    public QueueException( Throwable arg0 ) {
+        super( arg0 );
+    }
+
+
+    /**
+     * @param arg0
+     * @param arg1
+     */
+    public QueueException( String arg0, Throwable arg1 ) {
+        super( arg0, arg1 );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/RequiredPropertyNotFoundException.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/RequiredPropertyNotFoundException.java b/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/RequiredPropertyNotFoundException.java
new file mode 100644
index 0000000..850c925
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/RequiredPropertyNotFoundException.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.exceptions;
+
+
+public class RequiredPropertyNotFoundException extends PersistenceException {
+
+    private static final long serialVersionUID = 1L;
+    final String entityType;
+    final String propertyName;
+
+
+    public RequiredPropertyNotFoundException( String entityType, String propertyName ) {
+        super( "Entity " + entityType + " requires a property named " + propertyName );
+        this.entityType = entityType;
+        this.propertyName = propertyName;
+    }
+
+
+    public String getEntityType() {
+        return entityType;
+    }
+
+
+    public String getPropertyName() {
+        return propertyName;
+    }
+}


[94/96] [abbrv] USERGRID-2 package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/index-files/index-1.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/index-files/index-1.html b/sdks/android/doc/index-files/index-1.html
index 2aa919f..fcbad8c 100644
--- a/sdks/android/doc/index-files/index-1.html
+++ b/sdks/android/doc/index-files/index-1.html
@@ -82,72 +82,72 @@ function windowTitle()
 <A NAME="_A_"><!-- --></A><H2>
 <B>A</B></H2>
 <DL>
-<DT><A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities"><B>Activity</B></A> - Class in <A HREF="../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A><DD>An entity type for representing activity stream actions.<DT><A HREF="../org/usergrid/android/client/entities/Activity.html#Activity()"><B>Activity()</B></A> - 
-Constructor for class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+<DT><A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities"><B>Activity</B></A> - Class in <A HREF="../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A><DD>An entity type for representing activity stream actions.<DT><A HREF="../org/usergrid/android/client/entities/Activity.html#Activity()"><B>Activity()</B></A> - 
+Constructor for class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/entities/Activity.html#Activity(org.usergrid.android.client.entities.Entity)"><B>Activity(Entity)</B></A> - 
-Constructor for class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+<DT><A HREF="../org/usergrid/android/client/entities/Activity.html#Activity(org.apache.usergrid.android.client.entities.Entity)"><B>Activity(Entity)</B></A> - 
+Constructor for class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.usergrid.android.client.entities"><B>Activity.ActivityCollection</B></A> - Class in <A HREF="../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html#Activity.ActivityCollection()"><B>Activity.ActivityCollection()</B></A> - 
-Constructor for class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.usergrid.android.client.entities">Activity.ActivityCollection</A>
+<DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.apache.usergrid.android.client.entities"><B>Activity.ActivityCollection</B></A> - Class in <A HREF="../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html#Activity.ActivityCollection()"><B>Activity.ActivityCollection()</B></A> - 
+Constructor for class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityCollection</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities"><B>Activity.ActivityObject</B></A> - Class in <A HREF="../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#Activity.ActivityObject()"><B>Activity.ActivityObject()</B></A> - 
-Constructor for class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+<DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities"><B>Activity.ActivityObject</B></A> - Class in <A HREF="../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#Activity.ActivityObject()"><B>Activity.ActivityObject()</B></A> - 
+Constructor for class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities"><B>Activity.MediaLink</B></A> - Class in <A HREF="../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html#Activity.MediaLink()"><B>Activity.MediaLink()</B></A> - 
-Constructor for class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A>
+<DT><A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities"><B>Activity.MediaLink</B></A> - Class in <A HREF="../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html#Activity.MediaLink()"><B>Activity.MediaLink()</B></A> - 
+Constructor for class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/utils/UrlUtils.html#addQueryParams(java.lang.String, java.util.Map)"><B>addQueryParams(String, Map&lt;String, Object&gt;)</B></A> - 
-Static method in class org.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/UrlUtils.html" title="class in org.usergrid.android.client.utils">UrlUtils</A>
+Static method in class org.apache.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/UrlUtils.html" title="class in org.apache.usergrid.android.client.utils">UrlUtils</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.html#addSubscriber(java.lang.String, java.lang.String)"><B>addSubscriber(String, String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.html#addUserToGroup(java.lang.String, java.lang.String)"><B>addUserToGroup(String, String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Adds a user to the specified groups.
-<DT><A HREF="../org/usergrid/android/client/Client.html#addUserToGroupAsync(java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)"><B>addUserToGroupAsync(String, String, ApiResponseCallback)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#addUserToGroupAsync(java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)"><B>addUserToGroupAsync(String, String, ApiResponseCallback)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Adds a user to the specified groups.
-<DT><A HREF="../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response"><B>AggregateCounter</B></A> - Class in <A HREF="../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/response/AggregateCounter.html#AggregateCounter(long, long)"><B>AggregateCounter(long, long)</B></A> - 
-Constructor for class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response">AggregateCounter</A>
+<DT><A HREF="../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response"><B>AggregateCounter</B></A> - Class in <A HREF="../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/response/AggregateCounter.html#AggregateCounter(long, long)"><B>AggregateCounter(long, long)</B></A> - 
+Constructor for class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response">AggregateCounter</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response"><B>AggregateCounterSet</B></A> - Class in <A HREF="../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html#AggregateCounterSet(java.lang.String, java.util.UUID, java.util.UUID, java.lang.String, java.util.List)"><B>AggregateCounterSet(String, UUID, UUID, String, List&lt;AggregateCounter&gt;)</B></A> - 
-Constructor for class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response">AggregateCounterSet</A>
+<DT><A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response"><B>AggregateCounterSet</B></A> - Class in <A HREF="../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html#AggregateCounterSet(java.lang.String, java.util.UUID, java.util.UUID, java.lang.String, java.util.List)"><B>AggregateCounterSet(String, UUID, UUID, String, List&lt;AggregateCounter&gt;)</B></A> - 
+Constructor for class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response">AggregateCounterSet</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html#AggregateCounterSet(java.lang.String, java.util.UUID, java.lang.String, java.util.List)"><B>AggregateCounterSet(String, UUID, String, List&lt;AggregateCounter&gt;)</B></A> - 
-Constructor for class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response">AggregateCounterSet</A>
+Constructor for class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response">AggregateCounterSet</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.html#apiRequest(org.springframework.http.HttpMethod, java.util.Map, java.lang.Object, java.lang.String...)"><B>apiRequest(HttpMethod, Map&lt;String, Object&gt;, Object, String...)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>High-level Usergrid API request.
-<DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response"><B>ApiResponse</B></A> - Class in <A HREF="../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#ApiResponse()"><B>ApiResponse()</B></A> - 
-Constructor for class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+<DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response"><B>ApiResponse</B></A> - Class in <A HREF="../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#ApiResponse()"><B>ApiResponse()</B></A> - 
+Constructor for class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>ApiResponseCallback</B></A> - Interface in <A HREF="../org/usergrid/android/client/callbacks/package-summary.html">org.usergrid.android.client.callbacks</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/Client.html#authorizeAppClient(java.lang.String, java.lang.String)"><B>authorizeAppClient(String, String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>ApiResponseCallback</B></A> - Interface in <A HREF="../org/usergrid/android/client/callbacks/package-summary.html">org.apache.usergrid.android.client.callbacks</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/Client.html#authorizeAppClient(java.lang.String, java.lang.String)"><B>authorizeAppClient(String, String)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Log the app in with it's client id and client secret key.
-<DT><A HREF="../org/usergrid/android/client/Client.html#authorizeAppClientAsync(java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)"><B>authorizeAppClientAsync(String, String, ApiResponseCallback)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#authorizeAppClientAsync(java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)"><B>authorizeAppClientAsync(String, String, ApiResponseCallback)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Log the app in with it's client id and client secret key.
 <DT><A HREF="../org/usergrid/android/client/Client.html#authorizeAppUser(java.lang.String, java.lang.String)"><B>authorizeAppUser(String, String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Log the user in and get a valid access token.
-<DT><A HREF="../org/usergrid/android/client/Client.html#authorizeAppUserAsync(java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)"><B>authorizeAppUserAsync(String, String, ApiResponseCallback)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#authorizeAppUserAsync(java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)"><B>authorizeAppUserAsync(String, String, ApiResponseCallback)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Log the user in and get a valid access token.
 <DT><A HREF="../org/usergrid/android/client/Client.html#authorizeAppUserViaFacebook(java.lang.String)"><B>authorizeAppUserViaFacebook(String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Log the user in with their Facebook access token retrived via Facebook
  OAuth.
-<DT><A HREF="../org/usergrid/android/client/Client.html#authorizeAppUserViaFacebookAsync(java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)"><B>authorizeAppUserViaFacebookAsync(String, ApiResponseCallback)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#authorizeAppUserViaFacebookAsync(java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)"><B>authorizeAppUserViaFacebookAsync(String, ApiResponseCallback)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Log the user in with their numeric pin-code and get a valid access token.
 <DT><A HREF="../org/usergrid/android/client/Client.html#authorizeAppUserViaPin(java.lang.String, java.lang.String)"><B>authorizeAppUserViaPin(String, String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Log the user in with their numeric pin-code and get a valid access token.
-<DT><A HREF="../org/usergrid/android/client/Client.html#authorizeAppUserViaPinAsync(java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)"><B>authorizeAppUserViaPinAsync(String, String, ApiResponseCallback)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#authorizeAppUserViaPinAsync(java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)"><B>authorizeAppUserViaPinAsync(String, String, ApiResponseCallback)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Log the user in with their numeric pin-code and get a valid access token.
 </DL>
 <HR>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/index-files/index-10.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/index-files/index-10.html b/sdks/android/doc/index-files/index-10.html
index c8fb554..49ef5b3 100644
--- a/sdks/android/doc/index-files/index-10.html
+++ b/sdks/android/doc/index-files/index-10.html
@@ -83,13 +83,13 @@ function windowTitle()
 <B>L</B></H2>
 <DL>
 <DT><A HREF="../org/usergrid/android/client/Client.html#LOCAL_API_URL"><B>LOCAL_API_URL</B></A> - 
-Static variable in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Static variable in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.html#LOCAL_STANDALONE_API_URL"><B>LOCAL_STANDALONE_API_URL</B></A> - 
-Static variable in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Static variable in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.html#LOCAL_TOMCAT_API_URL"><B>LOCAL_TOMCAT_API_URL</B></A> - 
-Static variable in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Static variable in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 </DL>
 <HR>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/index-files/index-11.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/index-files/index-11.html b/sdks/android/doc/index-files/index-11.html
index 4298dc4..7ba20cf 100644
--- a/sdks/android/doc/index-files/index-11.html
+++ b/sdks/android/doc/index-files/index-11.html
@@ -82,17 +82,17 @@ function windowTitle()
 <A NAME="_M_"><!-- --></A><H2>
 <B>M</B></H2>
 <DL>
-<DT><A HREF="../org/usergrid/android/client/utils/MapUtils.html" title="class in org.usergrid.android.client.utils"><B>MapUtils</B></A> - Class in <A HREF="../org/usergrid/android/client/utils/package-summary.html">org.usergrid.android.client.utils</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/utils/MapUtils.html#MapUtils()"><B>MapUtils()</B></A> - 
-Constructor for class org.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/MapUtils.html" title="class in org.usergrid.android.client.utils">MapUtils</A>
+<DT><A HREF="../org/usergrid/android/client/utils/MapUtils.html" title="class in org.apache.usergrid.android.client.utils"><B>MapUtils</B></A> - Class in <A HREF="../org/usergrid/android/client/utils/package-summary.html">org.apache.usergrid.android.client.utils</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/utils/MapUtils.html#MapUtils()"><B>MapUtils()</B></A> - 
+Constructor for class org.apache.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/MapUtils.html" title="class in org.apache.usergrid.android.client.utils">MapUtils</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities"><B>Message</B></A> - Class in <A HREF="../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/entities/Message.html#Message()"><B>Message()</B></A> - 
-Constructor for class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+<DT><A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities"><B>Message</B></A> - Class in <A HREF="../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/entities/Message.html#Message()"><B>Message()</B></A> - 
+Constructor for class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/entities/Message.html#Message(org.usergrid.android.client.entities.Entity)"><B>Message(Entity)</B></A> - 
-Constructor for class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+<DT><A HREF="../org/usergrid/android/client/entities/Message.html#Message(org.apache.usergrid.android.client.entities.Entity)"><B>Message(Entity)</B></A> - 
+Constructor for class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.Query.html#more()"><B>more()</B></A> - 
-Method in interface org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A>
+Method in interface org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A>
 <DD>&nbsp;
 </DL>
 <HR>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/index-files/index-12.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/index-files/index-12.html b/sdks/android/doc/index-files/index-12.html
index b161ee8..0d0d14f 100644
--- a/sdks/android/doc/index-files/index-12.html
+++ b/sdks/android/doc/index-files/index-12.html
@@ -82,14 +82,14 @@ function windowTitle()
 <A NAME="_N_"><!-- --></A><H2>
 <B>N</B></H2>
 <DL>
-<DT><A HREF="../org/usergrid/android/client/entities/Activity.html#newActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.entities.User, org.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)"><B>newActivity(String, String, String, String, User, Entity, String, String, String)</B></A> - 
-Static method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+<DT><A HREF="../org/usergrid/android/client/entities/Activity.html#newActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.entities.User, org.apache.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)"><B>newActivity(String, String, String, String, User, Entity, String, String, String)</B></A> - 
+Static method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/utils/MapUtils.html#newMapWithoutKeys(java.util.Map, java.util.List)"><B>newMapWithoutKeys(Map&lt;String, T&gt;, List&lt;String&gt;)</B></A> - 
-Static method in class org.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/MapUtils.html" title="class in org.usergrid.android.client.utils">MapUtils</A>
+Static method in class org.apache.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/MapUtils.html" title="class in org.apache.usergrid.android.client.utils">MapUtils</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.Query.html#next()"><B>next()</B></A> - 
-Method in interface org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A>
+Method in interface org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A>
 <DD>&nbsp;
 </DL>
 <HR>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/index-files/index-13.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/index-files/index-13.html b/sdks/android/doc/index-files/index-13.html
index c7644d5..3589824 100644
--- a/sdks/android/doc/index-files/index-13.html
+++ b/sdks/android/doc/index-files/index-13.html
@@ -83,81 +83,81 @@ function windowTitle()
 <B>O</B></H2>
 <DL>
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_ARTICLE"><B>OBJECT_TYPE_ARTICLE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_AUDIO"><B>OBJECT_TYPE_AUDIO</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_BADGE"><B>OBJECT_TYPE_BADGE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_BOOKMARK"><B>OBJECT_TYPE_BOOKMARK</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_COLLECTION"><B>OBJECT_TYPE_COLLECTION</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_COMMENT"><B>OBJECT_TYPE_COMMENT</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_EVENT"><B>OBJECT_TYPE_EVENT</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_FILE"><B>OBJECT_TYPE_FILE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_GROUP"><B>OBJECT_TYPE_GROUP</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_IMAGE"><B>OBJECT_TYPE_IMAGE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_NOTE"><B>OBJECT_TYPE_NOTE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_PERSON"><B>OBJECT_TYPE_PERSON</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_PLACE"><B>OBJECT_TYPE_PLACE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_PRODUCT"><B>OBJECT_TYPE_PRODUCT</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_QUESTION"><B>OBJECT_TYPE_QUESTION</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_REVIEW"><B>OBJECT_TYPE_REVIEW</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_SERVICE"><B>OBJECT_TYPE_SERVICE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_VIDEO"><B>OBJECT_TYPE_VIDEO</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.usergrid.android.client.utils"><B>ObjectUtils</B></A> - Class in <A HREF="../org/usergrid/android/client/utils/package-summary.html">org.usergrid.android.client.utils</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/utils/ObjectUtils.html#ObjectUtils()"><B>ObjectUtils()</B></A> - 
-Constructor for class org.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.usergrid.android.client.utils">ObjectUtils</A>
+<DT><A HREF="../org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.apache.usergrid.android.client.utils"><B>ObjectUtils</B></A> - Class in <A HREF="../org/usergrid/android/client/utils/package-summary.html">org.apache.usergrid.android.client.utils</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/utils/ObjectUtils.html#ObjectUtils()"><B>ObjectUtils()</B></A> - 
+Constructor for class org.apache.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.apache.usergrid.android.client.utils">ObjectUtils</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html#onDeviceRegistration(org.usergrid.android.client.entities.Device)"><B>onDeviceRegistration(Device)</B></A> - 
-Method in interface org.usergrid.android.client.callbacks.<A HREF="../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.usergrid.android.client.callbacks">DeviceRegistrationCallback</A>
+<DT><A HREF="../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html#onDeviceRegistration(org.apache.usergrid.android.client.entities.Device)"><B>onDeviceRegistration(Device)</B></A> - 
+Method in interface org.apache.usergrid.android.client.callbacks.<A HREF="../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">DeviceRegistrationCallback</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/callbacks/ClientCallback.html#onException(java.lang.Exception)"><B>onException(Exception)</B></A> - 
-Method in interface org.usergrid.android.client.callbacks.<A HREF="../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks">ClientCallback</A>
+Method in interface org.apache.usergrid.android.client.callbacks.<A HREF="../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ClientCallback</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html#onGroupsRetrieved(java.util.Map)"><B>onGroupsRetrieved(Map&lt;String, Group&gt;)</B></A> - 
-Method in interface org.usergrid.android.client.callbacks.<A HREF="../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.usergrid.android.client.callbacks">GroupsRetrievedCallback</A>
+Method in interface org.apache.usergrid.android.client.callbacks.<A HREF="../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">GroupsRetrievedCallback</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/callbacks/QueryResultsCallback.html#onQueryResults(org.usergrid.android.client.Client.Query)"><B>onQueryResults(Client.Query)</B></A> - 
-Method in interface org.usergrid.android.client.callbacks.<A HREF="../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks">QueryResultsCallback</A>
+<DT><A HREF="../org/usergrid/android/client/callbacks/QueryResultsCallback.html#onQueryResults(org.apache.usergrid.android.client.Client.Query)"><B>onQueryResults(Client.Query)</B></A> - 
+Method in interface org.apache.usergrid.android.client.callbacks.<A HREF="../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">QueryResultsCallback</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/callbacks/ApiResponseCallback.html#onResponse(org.usergrid.android.client.response.ApiResponse)"><B>onResponse(ApiResponse)</B></A> - 
-Method in interface org.usergrid.android.client.callbacks.<A HREF="../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>
+<DT><A HREF="../org/usergrid/android/client/callbacks/ApiResponseCallback.html#onResponse(org.apache.usergrid.android.client.response.ApiResponse)"><B>onResponse(ApiResponse)</B></A> - 
+Method in interface org.apache.usergrid.android.client.callbacks.<A HREF="../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/callbacks/ClientCallback.html#onResponse(T)"><B>onResponse(T)</B></A> - 
-Method in interface org.usergrid.android.client.callbacks.<A HREF="../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks">ClientCallback</A>
+Method in interface org.apache.usergrid.android.client.callbacks.<A HREF="../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ClientCallback</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/package-summary.html"><B>org.usergrid.android.client</B></A> - package org.usergrid.android.client<DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/callbacks/package-summary.html"><B>org.usergrid.android.client.callbacks</B></A> - package org.usergrid.android.client.callbacks<DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/entities/package-summary.html"><B>org.usergrid.android.client.entities</B></A> - package org.usergrid.android.client.entities<DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/response/package-summary.html"><B>org.usergrid.android.client.response</B></A> - package org.usergrid.android.client.response<DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/utils/package-summary.html"><B>org.usergrid.android.client.utils</B></A> - package org.usergrid.android.client.utils<DD>&nbsp;</DL>
+<DT><A HREF="../org/usergrid/android/client/package-summary.html"><B>org.apache.usergrid.android.client</B></A> - package org.apache.usergrid.android.client<DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/callbacks/package-summary.html"><B>org.apache.usergrid.android.client.callbacks</B></A> - package org.apache.usergrid.android.client.callbacks<DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/entities/package-summary.html"><B>org.apache.usergrid.android.client.entities</B></A> - package org.apache.usergrid.android.client.entities<DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/response/package-summary.html"><B>org.apache.usergrid.android.client.response</B></A> - package org.apache.usergrid.android.client.response<DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/utils/package-summary.html"><B>org.apache.usergrid.android.client.utils</B></A> - package org.apache.usergrid.android.client.utils<DD>&nbsp;</DL>
 <HR>
 
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/index-files/index-14.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/index-files/index-14.html b/sdks/android/doc/index-files/index-14.html
index eabda2e..7b77a87 100644
--- a/sdks/android/doc/index-files/index-14.html
+++ b/sdks/android/doc/index-files/index-14.html
@@ -83,130 +83,130 @@ function windowTitle()
 <B>P</B></H2>
 <DL>
 <DT><A HREF="../org/usergrid/android/client/utils/JsonUtils.html#parse(java.lang.String, java.lang.Class)"><B>parse(String, Class&lt;T&gt;)</B></A> - 
-Static method in class org.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.usergrid.android.client.utils">JsonUtils</A>
+Static method in class org.apache.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.apache.usergrid.android.client.utils">JsonUtils</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/utils/UrlUtils.html#path(java.lang.Object...)"><B>path(Object...)</B></A> - 
-Static method in class org.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/UrlUtils.html" title="class in org.usergrid.android.client.utils">UrlUtils</A>
+Static method in class org.apache.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/UrlUtils.html" title="class in org.apache.usergrid.android.client.utils">UrlUtils</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/Client.html#postGroupActivity(java.lang.String, org.usergrid.android.client.entities.Activity)"><B>postGroupActivity(String, Activity)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#postGroupActivity(java.lang.String, org.apache.usergrid.android.client.entities.Activity)"><B>postGroupActivity(String, Activity)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Posts an activity to a group.
-<DT><A HREF="../org/usergrid/android/client/Client.html#postGroupActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.entities.User, org.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)"><B>postGroupActivity(String, String, String, String, User, Entity, String, String, String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#postGroupActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.entities.User, org.apache.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)"><B>postGroupActivity(String, String, String, String, User, Entity, String, String, String)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Creates and posts an activity to a group.
-<DT><A HREF="../org/usergrid/android/client/Client.html#postGroupActivityAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.entities.User, org.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)"><B>postGroupActivityAsync(String, String, String, String, User, Entity, String, String, String, ApiResponseCallback)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#postGroupActivityAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.entities.User, org.apache.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)"><B>postGroupActivityAsync(String, String, String, String, User, Entity, String, String, String, ApiResponseCallback)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Creates and posts an activity to a group.
 <DT><A HREF="../org/usergrid/android/client/Client.html#postMessage(java.lang.String, java.util.Map)"><B>postMessage(String, Map&lt;String, Object&gt;)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.html#postMessage(java.lang.String, java.util.List)"><B>postMessage(String, List&lt;Map&lt;String, Object&gt;&gt;)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/Client.html#postUserActivity(java.lang.String, org.usergrid.android.client.entities.Activity)"><B>postUserActivity(String, Activity)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#postUserActivity(java.lang.String, org.apache.usergrid.android.client.entities.Activity)"><B>postUserActivity(String, Activity)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Posts an activity to a user.
-<DT><A HREF="../org/usergrid/android/client/Client.html#postUserActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.entities.User, org.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)"><B>postUserActivity(String, String, String, String, User, Entity, String, String, String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#postUserActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.entities.User, org.apache.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)"><B>postUserActivity(String, String, String, String, User, Entity, String, String, String)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Creates and posts an activity to a user.
-<DT><A HREF="../org/usergrid/android/client/Client.html#postUserActivityAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.entities.User, org.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)"><B>postUserActivityAsync(String, String, String, String, User, Entity, String, String, String, ApiResponseCallback)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#postUserActivityAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.entities.User, org.apache.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)"><B>postUserActivityAsync(String, String, String, String, User, Entity, String, String, String, ApiResponseCallback)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Creates and posts an activity to a user.
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#PROPERTY_ACTIVATED"><B>PROPERTY_ACTIVATED</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#PROPERTY_ACTOR"><B>PROPERTY_ACTOR</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#PROPERTY_CATEGORY"><B>PROPERTY_CATEGORY</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Message.html#PROPERTY_CATEGORY"><B>PROPERTY_CATEGORY</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#PROPERTY_CONTENT"><B>PROPERTY_CONTENT</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Message.html#PROPERTY_CORRELATION_ID"><B>PROPERTY_CORRELATION_ID</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Message.html#PROPERTY_DESTINATION"><B>PROPERTY_DESTINATION</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#PROPERTY_DISABLED"><B>PROPERTY_DISABLED</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#PROPERTY_EMAIL"><B>PROPERTY_EMAIL</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#PROPERTY_FIRSTNAME"><B>PROPERTY_FIRSTNAME</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#PROPERTY_GENERATOR"><B>PROPERTY_GENERATOR</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#PROPERTY_ICON"><B>PROPERTY_ICON</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Message.html#PROPERTY_INDEXED"><B>PROPERTY_INDEXED</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#PROPERTY_LASTNAME"><B>PROPERTY_LASTNAME</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#PROPERTY_MIDDLENAME"><B>PROPERTY_MIDDLENAME</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Device.html#PROPERTY_NAME"><B>PROPERTY_NAME</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities">Device</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities">Device</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#PROPERTY_NAME"><B>PROPERTY_NAME</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#PROPERTY_OBJECT"><B>PROPERTY_OBJECT</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Group.html#PROPERTY_PATH"><B>PROPERTY_PATH</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Message.html#PROPERTY_PERSISTENT"><B>PROPERTY_PERSISTENT</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#PROPERTY_PICTURE"><B>PROPERTY_PICTURE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#PROPERTY_PUBLISHED"><B>PROPERTY_PUBLISHED</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Message.html#PROPERTY_REPLY_TO"><B>PROPERTY_REPLY_TO</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Message.html#PROPERTY_TIMESTAMP"><B>PROPERTY_TIMESTAMP</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#PROPERTY_TITLE"><B>PROPERTY_TITLE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Group.html#PROPERTY_TITLE"><B>PROPERTY_TITLE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Entity.html#PROPERTY_TYPE"><B>PROPERTY_TYPE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Message.html#PROPERTY_TYPE"><B>PROPERTY_TYPE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#PROPERTY_USERNAME"><B>PROPERTY_USERNAME</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Entity.html#PROPERTY_UUID"><B>PROPERTY_UUID</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#PROPERTY_VERB"><B>PROPERTY_VERB</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.html#PUBLIC_API_URL"><B>PUBLIC_API_URL</B></A> - 
-Static variable in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Static variable in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 </DL>
 <HR>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/index-files/index-15.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/index-files/index-15.html b/sdks/android/doc/index-files/index-15.html
index f0a1fb7..3ab3375 100644
--- a/sdks/android/doc/index-files/index-15.html
+++ b/sdks/android/doc/index-files/index-15.html
@@ -83,66 +83,66 @@ function windowTitle()
 <B>Q</B></H2>
 <DL>
 <DT><A HREF="../org/usergrid/android/client/Client.html#queryActivityFeedForGroup(java.lang.String)"><B>queryActivityFeedForGroup(String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Get a group's activity feed.
-<DT><A HREF="../org/usergrid/android/client/Client.html#queryActivityFeedForGroupAsync(java.lang.String, org.usergrid.android.client.callbacks.QueryResultsCallback)"><B>queryActivityFeedForGroupAsync(String, QueryResultsCallback)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#queryActivityFeedForGroupAsync(java.lang.String, org.apache.usergrid.android.client.callbacks.QueryResultsCallback)"><B>queryActivityFeedForGroupAsync(String, QueryResultsCallback)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Get a group's activity feed.
 <DT><A HREF="../org/usergrid/android/client/Client.html#queryActivityFeedForUser(java.lang.String)"><B>queryActivityFeedForUser(String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Get a user's activity feed.
-<DT><A HREF="../org/usergrid/android/client/Client.html#queryActivityFeedForUserAsync(java.lang.String, org.usergrid.android.client.callbacks.QueryResultsCallback)"><B>queryActivityFeedForUserAsync(String, QueryResultsCallback)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#queryActivityFeedForUserAsync(java.lang.String, org.apache.usergrid.android.client.callbacks.QueryResultsCallback)"><B>queryActivityFeedForUserAsync(String, QueryResultsCallback)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Get a user's activity feed.
 <DT><A HREF="../org/usergrid/android/client/Client.html#queryEntitiesRequest(org.springframework.http.HttpMethod, java.util.Map, java.lang.Object, java.lang.String...)"><B>queryEntitiesRequest(HttpMethod, Map&lt;String, Object&gt;, Object, String...)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Perform a query request and return a query object.
-<DT><A HREF="../org/usergrid/android/client/Client.html#queryEntitiesRequestAsync(org.usergrid.android.client.callbacks.QueryResultsCallback, org.springframework.http.HttpMethod, java.util.Map, java.lang.Object, java.lang.String...)"><B>queryEntitiesRequestAsync(QueryResultsCallback, HttpMethod, Map&lt;String, Object&gt;, Object, String...)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#queryEntitiesRequestAsync(org.apache.usergrid.android.client.callbacks.QueryResultsCallback, org.springframework.http.HttpMethod, java.util.Map, java.lang.Object, java.lang.String...)"><B>queryEntitiesRequestAsync(QueryResultsCallback, HttpMethod, Map&lt;String, Object&gt;, Object, String...)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Perform a query request and return a query object.
 <DT><A HREF="../org/usergrid/android/client/Client.html#queryEntityConnections(java.lang.String, java.lang.String, java.lang.String, java.lang.String)"><B>queryEntityConnections(String, String, String, String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Query the connected entities.
-<DT><A HREF="../org/usergrid/android/client/Client.html#queryEntityConnectionsAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.QueryResultsCallback)"><B>queryEntityConnectionsAsync(String, String, String, String, QueryResultsCallback)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#queryEntityConnectionsAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.QueryResultsCallback)"><B>queryEntityConnectionsAsync(String, String, String, String, QueryResultsCallback)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Query the connected entities.
 <DT><A HREF="../org/usergrid/android/client/Client.html#queryEntityConnectionsWithinLocation(java.lang.String, java.lang.String, java.lang.String, float, android.location.Location, java.lang.String)"><B>queryEntityConnectionsWithinLocation(String, String, String, float, Location, String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Query the connected entities within distance of a specific point.
-<DT><A HREF="../org/usergrid/android/client/Client.html#queryEntityConnectionsWithinLocationAsync(java.lang.String, java.lang.String, java.lang.String, float, android.location.Location, java.lang.String, org.usergrid.android.client.callbacks.QueryResultsCallback)"><B>queryEntityConnectionsWithinLocationAsync(String, String, String, float, Location, String, QueryResultsCallback)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#queryEntityConnectionsWithinLocationAsync(java.lang.String, java.lang.String, java.lang.String, float, android.location.Location, java.lang.String, org.apache.usergrid.android.client.callbacks.QueryResultsCallback)"><B>queryEntityConnectionsWithinLocationAsync(String, String, String, float, Location, String, QueryResultsCallback)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Query the connected entities within distance of a specific point.
 <DT><A HREF="../org/usergrid/android/client/Client.html#queryQueuesRequest(org.springframework.http.HttpMethod, java.util.Map, java.lang.Object, java.lang.String)"><B>queryQueuesRequest(HttpMethod, Map&lt;String, Object&gt;, Object, String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>QueryResultsCallback</B></A> - Interface in <A HREF="../org/usergrid/android/client/callbacks/package-summary.html">org.usergrid.android.client.callbacks</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/Client.html#queryUsers()"><B>queryUsers()</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>QueryResultsCallback</B></A> - Interface in <A HREF="../org/usergrid/android/client/callbacks/package-summary.html">org.apache.usergrid.android.client.callbacks</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/Client.html#queryUsers()"><B>queryUsers()</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Perform a query of the users collection.
 <DT><A HREF="../org/usergrid/android/client/Client.html#queryUsers(java.lang.String)"><B>queryUsers(String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Perform a query of the users collection using the provided query command.
-<DT><A HREF="../org/usergrid/android/client/Client.html#queryUsersAsync(org.usergrid.android.client.callbacks.QueryResultsCallback)"><B>queryUsersAsync(QueryResultsCallback)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#queryUsersAsync(org.apache.usergrid.android.client.callbacks.QueryResultsCallback)"><B>queryUsersAsync(QueryResultsCallback)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Perform a query of the users collection.
-<DT><A HREF="../org/usergrid/android/client/Client.html#queryUsersAsync(java.lang.String, org.usergrid.android.client.callbacks.QueryResultsCallback)"><B>queryUsersAsync(String, QueryResultsCallback)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#queryUsersAsync(java.lang.String, org.apache.usergrid.android.client.callbacks.QueryResultsCallback)"><B>queryUsersAsync(String, QueryResultsCallback)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Perform a query of the users collection using the provided query command.
 <DT><A HREF="../org/usergrid/android/client/Client.html#queryUsersForGroup(java.lang.String)"><B>queryUsersForGroup(String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Queries the users for the specified group.
-<DT><A HREF="../org/usergrid/android/client/Client.html#queryUsersForGroupAsync(java.lang.String, org.usergrid.android.client.callbacks.QueryResultsCallback)"><B>queryUsersForGroupAsync(String, QueryResultsCallback)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#queryUsersForGroupAsync(java.lang.String, org.apache.usergrid.android.client.callbacks.QueryResultsCallback)"><B>queryUsersForGroupAsync(String, QueryResultsCallback)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Queries the users for the specified group.
-<DT><A HREF="../org/usergrid/android/client/Client.html#queryUsersNearLocation(float, android.location.Location, java.lang.String, org.usergrid.android.client.callbacks.QueryResultsCallback)"><B>queryUsersNearLocation(float, Location, String, QueryResultsCallback)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#queryUsersNearLocation(float, android.location.Location, java.lang.String, org.apache.usergrid.android.client.callbacks.QueryResultsCallback)"><B>queryUsersNearLocation(float, Location, String, QueryResultsCallback)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Perform a query of the users collection within the specified distance of
  the specified location and optionally using the provided query command.
 <DT><A HREF="../org/usergrid/android/client/Client.html#queryUsersWithinLocation(float, android.location.Location, java.lang.String)"><B>queryUsersWithinLocation(float, Location, String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Perform a query of the users collection within the specified distance of
  the specified location and optionally using the provided query command.
-<DT><A HREF="../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response"><B>QueueInfo</B></A> - Class in <A HREF="../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/response/QueueInfo.html#QueueInfo()"><B>QueueInfo()</B></A> - 
-Constructor for class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response">QueueInfo</A>
+<DT><A HREF="../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response"><B>QueueInfo</B></A> - Class in <A HREF="../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/response/QueueInfo.html#QueueInfo()"><B>QueueInfo()</B></A> - 
+Constructor for class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response">QueueInfo</A>
 <DD>&nbsp;
 </DL>
 <HR>


[49/96] [abbrv] [partial] Change package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/count/BatchSubmitter.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/count/BatchSubmitter.java b/stack/core/src/main/java/org/apache/usergrid/count/BatchSubmitter.java
new file mode 100644
index 0000000..0fd7965
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/count/BatchSubmitter.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.count;
+
+
+import java.util.Collection;
+import java.util.concurrent.Future;
+
+import org.apache.usergrid.count.common.Count;
+
+
+/** @author zznate */
+public interface BatchSubmitter {
+    Future<?> submit( Collection<Count> counts );
+
+    void shutdown();
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/count/Batcher.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/count/Batcher.java b/stack/core/src/main/java/org/apache/usergrid/count/Batcher.java
new file mode 100644
index 0000000..bef03e1
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/count/Batcher.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.count;
+
+
+import org.apache.usergrid.count.common.Count;
+
+
+/**
+ * Defines minimal set of batch submission operations
+ *
+ * @author zznate
+ */
+public interface Batcher {
+    void setBatchSubmitter( BatchSubmitter batchSubmitter );
+
+    void add( Count count );
+
+    long getOpCount();
+
+    long getBatchSubmissionCount();
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/count/CassandraCounterStore.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/count/CassandraCounterStore.java b/stack/core/src/main/java/org/apache/usergrid/count/CassandraCounterStore.java
new file mode 100644
index 0000000..26d610d
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/count/CassandraCounterStore.java
@@ -0,0 +1,99 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.count;
+
+
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.usergrid.count.common.Count;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import me.prettyprint.cassandra.model.HCounterColumnImpl;
+import me.prettyprint.cassandra.serializers.ByteBufferSerializer;
+import me.prettyprint.hector.api.Keyspace;
+import me.prettyprint.hector.api.factory.HFactory;
+import me.prettyprint.hector.api.mutation.Mutator;
+
+
+/**
+ * Encapsulate counter writes to Cassandra
+ *
+ * @author zznate
+ */
+public class CassandraCounterStore implements CounterStore {
+    private Logger log = LoggerFactory.getLogger( CassandraCounterStore.class );
+
+    // keep track of exceptions thrown in scheduler so we can reduce noise in logs
+    private Map<String, Integer> counterInsertFailures = new HashMap<String, Integer>();
+
+    private final Keyspace keyspace;
+
+
+    public CassandraCounterStore( Keyspace keyspace ) {
+        this.keyspace = keyspace;
+    }
+
+
+    public void save( Count count ) {
+        this.save( Arrays.asList( count ) );
+    }
+
+
+    public void save( Collection<Count> counts ) {
+        Map<String, Count> countHolder = new HashMap<String, Count>();
+        for ( Count count : counts ) {
+            Count c = countHolder.get( count.getCounterName() );
+            if ( c != null ) {
+                c.apply( count );
+            }
+            else {
+                countHolder.put( count.getCounterName(), count );
+            }
+        }
+        Mutator<ByteBuffer> mutator = HFactory.createMutator( keyspace, ByteBufferSerializer.get() );
+        for ( Count count : countHolder.values() ) {
+            mutator.addCounter( count.getKeyNameBytes(), count.getTableName(),
+                    new HCounterColumnImpl( count.getColumnName(), count.getValue(),
+                            count.getColumnNameSerializer() ) );
+        }
+        try {
+            mutator.execute();
+        }
+        catch ( Exception e ) {
+
+            // errors here happen a lot on shutdown, don't fill the logs with them
+            String error = e.getClass().getCanonicalName();
+            if (counterInsertFailures.get( error ) == null) {
+                log.error( "CounterStore insert failed, first instance", e);
+                counterInsertFailures.put( error, 1);
+
+            } else {
+                int count = counterInsertFailures.get(error) + 1; 
+                counterInsertFailures.put(error, count);
+                if (log.isDebugEnabled()) {
+                    log.debug( error + " caused CounterStore insert failure, count =  " + count, e );
+                } else {
+                    log.error( error + " caused CounterStore insert failure, count =  " + count );
+                }
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/count/CassandraSubmitter.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/count/CassandraSubmitter.java b/stack/core/src/main/java/org/apache/usergrid/count/CassandraSubmitter.java
new file mode 100644
index 0000000..13f72c1
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/count/CassandraSubmitter.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.count;
+
+
+import java.util.Collection;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.usergrid.count.common.Count;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.yammer.metrics.Metrics;
+import com.yammer.metrics.core.Timer;
+import com.yammer.metrics.core.TimerContext;
+
+
+/**
+ * Submits directly to Cassandra for insertion
+ *
+ * @author zznate
+ */
+public class CassandraSubmitter implements BatchSubmitter {
+    private final Logger log = LoggerFactory.getLogger( CassandraSubmitter.class );
+
+    private final int threadCount = 3;
+    private final CassandraCounterStore cassandraCounterStore;
+
+    private final ExecutorService executor = Executors.newFixedThreadPool( threadCount );
+    private final Timer addTimer =
+            Metrics.newTimer( CassandraSubmitter.class, "submit_invocation", TimeUnit.MICROSECONDS, TimeUnit.SECONDS );
+
+
+    public CassandraSubmitter( CassandraCounterStore cassandraCounterStore ) {
+        this.cassandraCounterStore = cassandraCounterStore;
+    }
+
+
+    @Override
+    public Future submit( final Collection<Count> counts ) {
+        return executor.submit( new Callable<Object>() {
+            final TimerContext timer = addTimer.time();
+
+
+            @Override
+            public Object call() throws Exception {
+                cassandraCounterStore.save( counts );
+                timer.stop();
+                return true;
+            }
+        } );
+    }
+
+
+    @Override
+    public void shutdown() {
+        log.warn( "Shutting down CassandraSubmitter" );
+        executor.shutdown();
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/count/CountProducer.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/count/CountProducer.java b/stack/core/src/main/java/org/apache/usergrid/count/CountProducer.java
new file mode 100644
index 0000000..6bbe3dc
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/count/CountProducer.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.count;
+
+
+import org.apache.usergrid.count.common.Count;
+
+
+/** @author zznate */
+public interface CountProducer {
+    void send( Count count );
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/count/CounterProcessingUnavailableException.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/count/CounterProcessingUnavailableException.java b/stack/core/src/main/java/org/apache/usergrid/count/CounterProcessingUnavailableException.java
new file mode 100644
index 0000000..50b9593
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/count/CounterProcessingUnavailableException.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.count;
+
+
+/** @author zznate */
+public class CounterProcessingUnavailableException extends RuntimeException {
+
+    private static final String ERR_MSG = "Counter was not processed. Reason: ";
+
+
+    public CounterProcessingUnavailableException() {
+        super( ERR_MSG );
+    }
+
+
+    public CounterProcessingUnavailableException( String errMsg ) {
+        super( ERR_MSG + errMsg );
+    }
+
+
+    public CounterProcessingUnavailableException( String errMsg, Throwable t ) {
+        super( ERR_MSG + errMsg, t );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/count/CounterStore.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/count/CounterStore.java b/stack/core/src/main/java/org/apache/usergrid/count/CounterStore.java
new file mode 100644
index 0000000..595b55b
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/count/CounterStore.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.count;
+
+
+import java.util.Collection;
+
+import org.apache.usergrid.count.common.Count;
+
+
+/** @author zznate */
+public interface CounterStore {
+    // TODO consider inforcing Async via Future<T> as return type
+    void save( Count count );
+
+    void save( Collection<Count> counts );
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/count/SimpleBatcher.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/count/SimpleBatcher.java b/stack/core/src/main/java/org/apache/usergrid/count/SimpleBatcher.java
new file mode 100644
index 0000000..6d685a9
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/count/SimpleBatcher.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.count;
+
+
+import org.apache.usergrid.count.common.Count;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * A simple Batcher implementation that keeps a sum of the number of {@link Count} operations which have been applied.
+ * Counters are aggregated by name.
+ *
+ * @author zznate
+ */
+public class SimpleBatcher extends AbstractBatcher {
+    private Logger log = LoggerFactory.getLogger( SimpleBatcher.class );
+
+    private boolean blockingSubmit = false;
+
+
+    public void setBlockingSubmit( boolean blockingSubmit ) {
+        this.blockingSubmit = blockingSubmit;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/count/Slf4JBatchSubmitter.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/count/Slf4JBatchSubmitter.java b/stack/core/src/main/java/org/apache/usergrid/count/Slf4JBatchSubmitter.java
new file mode 100644
index 0000000..bbfb5d1
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/count/Slf4JBatchSubmitter.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.count;
+
+
+import java.util.Collection;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.usergrid.count.common.Count;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.yammer.metrics.Metrics;
+import com.yammer.metrics.core.Timer;
+import com.yammer.metrics.core.TimerContext;
+
+
+/**
+ * A BatchSubmitter that prints contents to the configured slf4j logger logger
+ *
+ * @author zznate
+ */
+public class Slf4JBatchSubmitter implements BatchSubmitter {
+
+    // TODO custom logger for printing counts
+    // - should be configed programatically
+    private Logger log = LoggerFactory.getLogger( Slf4JBatchSubmitter.class );
+
+    private int threadCount = 3;
+
+    private ExecutorService executor = Executors.newFixedThreadPool( threadCount );
+    private final Timer addTimer =
+            Metrics.newTimer( Slf4JBatchSubmitter.class, "submit_invocation", TimeUnit.MICROSECONDS, TimeUnit.SECONDS );
+
+
+    @Override
+    public Future submit( final Collection<Count> counts ) {
+        return executor.submit( new Callable<Object>() {
+            final TimerContext timer = addTimer.time();
+
+
+            @Override
+            public Object call() throws Exception {
+                // TODO perhaps this could be pushed down further into CountProducer Impl?
+                // - this would leave generic submitter class
+                for ( Count c : counts ) {
+                    log.info( "found count {}", c );
+                }
+                timer.stop();
+                return true;
+            }
+        } );
+    }
+
+
+    public void shutdown() {
+        log.warn( "Shutdown Slf4jBatchSubmitter" );
+        executor.shutdown();
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/count/common/Count.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/count/common/Count.java b/stack/core/src/main/java/org/apache/usergrid/count/common/Count.java
new file mode 100644
index 0000000..c912bbf
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/count/common/Count.java
@@ -0,0 +1,139 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.count.common;
+
+
+import java.nio.ByteBuffer;
+
+import org.codehaus.jackson.annotate.JsonAutoDetect;
+import org.codehaus.jackson.annotate.JsonCreator;
+import org.codehaus.jackson.annotate.JsonIgnore;
+import org.codehaus.jackson.annotate.JsonProperty;
+
+import org.apache.commons.codec.binary.Hex;
+import org.apache.commons.lang.StringUtils;
+
+import me.prettyprint.cassandra.serializers.SerializerTypeInferer;
+import me.prettyprint.cassandra.serializers.StringSerializer;
+import me.prettyprint.hector.api.Serializer;
+
+import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility;
+
+
+/**
+ * Loosely models a 'count' of things to
+ *
+ * @author zznate
+ */
+@JsonAutoDetect(creatorVisibility = Visibility.PUBLIC_ONLY)
+public class Count<K, C> {
+    private static final StringSerializer se = StringSerializer.get();
+
+    @JsonProperty
+    private final String tableName;
+    @JsonProperty
+    private final K keyName;
+    @JsonProperty
+    private final C columnName;
+    @JsonProperty
+    private long value;
+
+    private Serializer<K> keySerializer;
+    private Serializer<C> columnNameSerializer;
+    private String counterName;
+
+
+    @JsonCreator
+    public Count( @JsonProperty(value = "tableName") String tableName, @JsonProperty(value = "keyName") K keyName,
+                  @JsonProperty(value = "columnName") C columnName, @JsonProperty(value = "value") long value ) {
+        this.tableName = tableName;
+        this.keyName = keyName;
+        this.columnName = columnName;
+        this.value = value;
+        this.keySerializer = SerializerTypeInferer.getSerializer( keyName );
+        this.columnNameSerializer = SerializerTypeInferer.getSerializer( columnName );
+    }
+
+
+    public Count apply( Count count ) {
+        if ( !StringUtils.equals( count.getCounterName(), getCounterName() ) ) {
+            throw new IllegalArgumentException( "Attempt to apply a counter with a different name" );
+        }
+        this.value += count.getValue();
+        return this;
+    }
+
+
+    /** the counter name should uniquely identify the entity being counted. */
+    @JsonIgnore
+    public String getCounterName() {
+        if ( counterName == null ) {
+            counterName = tableName + ":" + Hex.encodeHexString( getKeyNameBytes().array() ) + ":" + Hex
+                    .encodeHexString( getColumnNameBytes().array() );
+        }
+        return counterName;
+    }
+
+
+    public long getValue() {
+        return value;
+    }
+
+
+    public C getColumnName() {
+        return columnName;
+    }
+
+
+    public K getKeyName() {
+        return keyName;
+    }
+
+
+    @JsonIgnore
+    public ByteBuffer getKeyNameBytes() {
+        return keySerializer.toByteBuffer( keyName );
+    }
+
+
+    @JsonIgnore
+    public ByteBuffer getColumnNameBytes() {
+        return columnNameSerializer.toByteBuffer( columnName );
+    }
+
+
+    @JsonIgnore
+    public Serializer<K> getKeySerializer() {
+        return keySerializer;
+    }
+
+
+    @JsonIgnore
+    public Serializer<C> getColumnNameSerializer() {
+        return columnNameSerializer;
+    }
+
+
+    public String getTableName() {
+        return tableName;
+    }
+
+
+    @Override
+    public String toString() {
+        return "Counter Name: ".concat( getCounterName() ).concat( " value: " ).concat( Long.toString( value ) );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/count/common/CountSerDeUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/count/common/CountSerDeUtils.java b/stack/core/src/main/java/org/apache/usergrid/count/common/CountSerDeUtils.java
new file mode 100644
index 0000000..84492dc
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/count/common/CountSerDeUtils.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.count.common;
+
+
+import java.io.IOException;
+
+import org.codehaus.jackson.annotate.JsonAutoDetect;
+import org.codehaus.jackson.annotate.JsonMethod;
+import org.codehaus.jackson.map.ObjectMapper;
+
+
+/** @author zznate */
+public class CountSerDeUtils {
+
+    public static String serialize( Count count ) {
+        ObjectMapper mapper = new ObjectMapper();
+        try {
+            return mapper.writeValueAsString( count );
+        }
+        catch ( Exception ex ) {
+            throw new CountTransportSerDeException( "Problem in serialize() call", ex );
+        }
+    }
+
+
+    public static Count deserialize( String json ) {
+        ObjectMapper mapper = new ObjectMapper();
+        mapper.setVisibility( JsonMethod.CREATOR, JsonAutoDetect.Visibility.ANY );
+
+        try {
+            return mapper.readValue( json, Count.class );
+        }
+        catch ( IOException e ) {
+            throw new CountTransportSerDeException( "Problem in deserialize() call", e );
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/count/common/CountTransportSerDeException.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/count/common/CountTransportSerDeException.java b/stack/core/src/main/java/org/apache/usergrid/count/common/CountTransportSerDeException.java
new file mode 100644
index 0000000..e1b7188
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/count/common/CountTransportSerDeException.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.count.common;
+
+
+/** @author zznate */
+public class CountTransportSerDeException extends RuntimeException {
+    private static final String DEF_MSG =
+            "There was a serialization/deserialization problem in Count transport. Reason: ";
+
+
+    public CountTransportSerDeException() {
+        super( DEF_MSG );
+    }
+
+
+    public CountTransportSerDeException( String msg ) {
+        super( DEF_MSG + msg );
+    }
+
+
+    public CountTransportSerDeException( String msg, Throwable t ) {
+        super( DEF_MSG + msg, t );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/count/package-info.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/count/package-info.java b/stack/core/src/main/java/org/apache/usergrid/count/package-info.java
new file mode 100644
index 0000000..50e5957
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/count/package-info.java
@@ -0,0 +1 @@
+package org.apache.usergrid.count;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/exception/JsonReadException.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/exception/JsonReadException.java b/stack/core/src/main/java/org/apache/usergrid/exception/JsonReadException.java
new file mode 100644
index 0000000..7ddbfb4
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/exception/JsonReadException.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.exception;
+
+
+public class JsonReadException extends RuntimeException {
+    private static final long serialVersionUID = 1L;
+
+
+    public JsonReadException( String msg, Throwable t ) {
+        super( msg, t );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/exception/JsonWriteException.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/exception/JsonWriteException.java b/stack/core/src/main/java/org/apache/usergrid/exception/JsonWriteException.java
new file mode 100644
index 0000000..4feb886
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/exception/JsonWriteException.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.exception;
+
+
+public class JsonWriteException extends RuntimeException {
+    private static final long serialVersionUID = 1L;
+
+
+    public JsonWriteException( String msg, Throwable t ) {
+        super( msg, t );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/exception/NotImplementedException.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/exception/NotImplementedException.java b/stack/core/src/main/java/org/apache/usergrid/exception/NotImplementedException.java
new file mode 100644
index 0000000..17a6a6c
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/exception/NotImplementedException.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.exception;
+
+
+public class NotImplementedException extends RuntimeException {
+
+    /**
+     *
+     */
+    private static final long serialVersionUID = 1L;
+
+
+    /**
+     *
+     */
+    public NotImplementedException() {
+        super();
+    }
+
+
+    /**
+     * @param message
+     * @param cause
+     */
+    public NotImplementedException( String message, Throwable cause ) {
+        super( message, cause );
+    }
+
+
+    /**
+     * @param message
+     */
+    public NotImplementedException( String message ) {
+        super( message );
+    }
+
+
+    /**
+     * @param cause
+     */
+    public NotImplementedException( Throwable cause ) {
+        super( cause );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/locking/Lock.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/locking/Lock.java b/stack/core/src/main/java/org/apache/usergrid/locking/Lock.java
new file mode 100644
index 0000000..3826818
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/locking/Lock.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.locking;
+
+
+import java.util.concurrent.TimeUnit;
+
+import org.apache.usergrid.locking.exception.UGLockException;
+
+
+/**
+ * The lock object to acquire
+ *
+ * @author tnine
+ */
+public interface Lock {
+
+    /**
+     * Acquire the lock.  Wait the specified amount of time before giving up
+     *
+     * @param timeout The amount of time to wait
+     * @param time the units of time to wait
+     */
+    public boolean tryLock( long timeout, TimeUnit time ) throws UGLockException;
+
+    /** Block until a lock is available */
+    public void lock() throws UGLockException;
+
+    /** Release the lock */
+    public void unlock() throws UGLockException;
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/locking/LockHelper.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/locking/LockHelper.java b/stack/core/src/main/java/org/apache/usergrid/locking/LockHelper.java
new file mode 100644
index 0000000..ac92ac4
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/locking/LockHelper.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.locking;
+
+
+import java.util.UUID;
+
+import org.apache.commons.codec.binary.Hex;
+import org.apache.usergrid.locking.exception.UGLockException;
+import org.apache.usergrid.locking.noop.NoOpLockImpl;
+
+import static org.apache.usergrid.locking.LockPathBuilder.buildPath;
+import static org.apache.usergrid.utils.ConversionUtils.bytes;
+
+
+/** @author tnine */
+public class LockHelper {
+
+
+    private static final NoOpLockImpl NO_OP_LOCK = new NoOpLockImpl();
+
+
+    /**
+     * Build a string path for this lock.  Since it's specifically for updating a property, the property needs appended
+     * to the path.  If the property is null, it's getting deleted, so a lock on it isn't neccessary.  In that case, a
+     * no op lock is returned
+     */
+    public static Lock getUniqueUpdateLock( LockManager manager, UUID applicationId, Object value, String... path )
+            throws UGLockException {
+        //we have no value, therefore there's nothing to lock
+        if ( value == null ) {
+            return NO_OP_LOCK;
+        }
+
+        return manager.createLock( applicationId, buildPath( Hex.encodeHexString( bytes( value ) ), path ) );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/locking/LockManager.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/locking/LockManager.java b/stack/core/src/main/java/org/apache/usergrid/locking/LockManager.java
new file mode 100644
index 0000000..db7d079
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/locking/LockManager.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.locking;
+
+
+import java.util.UUID;
+
+import org.apache.usergrid.locking.exception.UGLockException;
+
+
+/**
+ * This Interface to a class responsible for distributed lock across system.
+ *
+ * @author tnine
+ */
+public interface LockManager {
+
+    /**
+     * Acquires a lock on a particular path.
+     *
+     * @param applicationId application UUID
+     * @param path a unique path
+     *
+     * @throws UGLockException if the lock cannot be acquired
+     */
+    public Lock createLock( final UUID applicationId, final String... path );
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/locking/LockPathBuilder.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/locking/LockPathBuilder.java b/stack/core/src/main/java/org/apache/usergrid/locking/LockPathBuilder.java
new file mode 100644
index 0000000..5842a07
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/locking/LockPathBuilder.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.locking;
+
+
+import java.util.UUID;
+
+
+/**
+ * Helper class that contains the logic to build a lock path
+ *
+ * @author eanuff
+ */
+public class LockPathBuilder {
+
+    private static final String SLASH = "/";
+
+
+    /** Build a string path for this lock */
+    public static String buildPath( UUID applicationId, String... path ) {
+        StringBuilder builder = new StringBuilder();
+        builder.append( SLASH );
+        builder.append( applicationId.toString() );
+
+        for ( String element : path ) {
+            builder.append( SLASH );
+            builder.append( element );
+        }
+        return builder.toString();
+    }
+
+
+    /**
+     * Build a string path for this lock
+     *
+     * @param The binary value to append to the end of the lock path
+     * @param path The values to prepend to build path
+     */
+    public static String buildPath( String binaryValue, String... path ) {
+
+        StringBuilder builder = new StringBuilder();
+
+        for ( String element : path ) {
+            builder.append( SLASH );
+            builder.append( element );
+        }
+
+        builder.append( SLASH );
+        builder.append( binaryValue );
+
+        builder.deleteCharAt( 0 );
+
+        return builder.toString();
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/locking/cassandra/HectorLockImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/locking/cassandra/HectorLockImpl.java b/stack/core/src/main/java/org/apache/usergrid/locking/cassandra/HectorLockImpl.java
new file mode 100644
index 0000000..1812f37
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/locking/cassandra/HectorLockImpl.java
@@ -0,0 +1,85 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.locking.cassandra;
+
+
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.apache.usergrid.locking.Lock;
+import org.apache.usergrid.locking.exception.UGLockException;
+
+import me.prettyprint.hector.api.locking.HLock;
+import me.prettyprint.hector.api.locking.HLockManager;
+import me.prettyprint.hector.api.locking.HLockTimeoutException;
+
+
+/** @author tnine */
+public class HectorLockImpl implements Lock {
+
+    private HLock lock;
+    private HLockManager lm;
+    private AtomicInteger count = new AtomicInteger();
+
+
+    /**
+     *
+     */
+    public HectorLockImpl( HLock lock, HLockManager lm ) {
+        this.lock = lock;
+        this.lm = lm;
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.usergrid.locking.Lock#acquire(long, java.util.concurrent.TimeUnit)
+     */
+    @Override
+    public boolean tryLock( long timeout, TimeUnit time ) throws UGLockException {
+        try {
+            lm.acquire( this.lock, time.toMillis( timeout ) );
+            count.incrementAndGet();
+        }
+        catch ( HLockTimeoutException hlte ) {
+            return false;
+        }
+
+        return true;
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.usergrid.locking.Lock#lock()
+     */
+    @Override
+    public void lock() throws UGLockException {
+        lm.acquire( lock );
+        count.incrementAndGet();
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.usergrid.locking.Lock#release()
+     */
+    @Override
+    public void unlock() throws UGLockException {
+        int current = count.decrementAndGet();
+
+        if ( current == 0 ) {
+            lm.release( this.lock );
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/locking/cassandra/HectorLockManagerImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/locking/cassandra/HectorLockManagerImpl.java b/stack/core/src/main/java/org/apache/usergrid/locking/cassandra/HectorLockManagerImpl.java
new file mode 100644
index 0000000..6642f97
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/locking/cassandra/HectorLockManagerImpl.java
@@ -0,0 +1,141 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.locking.cassandra;
+
+
+import java.util.UUID;
+
+import javax.annotation.PostConstruct;
+
+import me.prettyprint.cassandra.locking.HLockManagerImpl;
+import me.prettyprint.hector.api.Cluster;
+import me.prettyprint.hector.api.ConsistencyLevelPolicy;
+import me.prettyprint.hector.api.locking.HLockManager;
+import me.prettyprint.hector.api.locking.HLockManagerConfigurator;
+
+import org.apache.usergrid.locking.Lock;
+import org.apache.usergrid.locking.LockManager;
+import org.apache.usergrid.locking.LockPathBuilder;
+import org.springframework.util.Assert;
+
+
+/**
+ * Uses the hector based locking implementation to obtain locks
+ *
+ * @author tnine
+ */
+public class HectorLockManagerImpl implements LockManager {
+    private int replicationFactor = 1;
+    private int numberOfLockObserverThreads = 1;
+    private long lockTtl = 2000;
+    private String keyspaceName;
+    private Cluster cluster;
+    private HLockManager lm;
+    private ConsistencyLevelPolicy consistencyLevelPolicy;
+
+
+    /**
+     *
+     */
+    public HectorLockManagerImpl() {
+    }
+
+
+    @PostConstruct
+    public void init() {
+        HLockManagerConfigurator hlc = new HLockManagerConfigurator();
+        hlc.setReplicationFactor( replicationFactor );
+        hlc.setKeyspaceName( keyspaceName );
+        hlc.setNumberOfLockObserverThreads( numberOfLockObserverThreads );
+        hlc.setLocksTTLInMillis( lockTtl );
+        lm = new HLockManagerImpl( cluster, hlc );
+        if ( consistencyLevelPolicy != null ) {
+        	lm.getKeyspace().setConsistencyLevelPolicy(consistencyLevelPolicy);
+        }
+        // if consistencyLevelPolicy == null, use hector's default, which is QuorumAll, no need to explicitly set
+        lm.init();
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.apache.usergrid.locking.LockManager#createLock(java.util.UUID,
+     * java.lang.String[])
+     */
+    @Override
+    public Lock createLock( UUID applicationId, String... path ) {
+
+        String lockPath = LockPathBuilder.buildPath( applicationId, path );
+
+        return new HectorLockImpl( lm.createLock( lockPath ), lm );
+    }
+
+
+    /**
+     * Note that in a real environment this MUST be an odd number. Locks are read and written at QUORUM. RF >= 3 is
+     * preferred for failure tolerance and replication.  Defaults to 1
+     *
+     * @param replicationFactor the replicationFactor to set
+     */
+    public void setReplicationFactor( int replicationFactor ) {
+
+        Assert.isTrue( numberOfLockObserverThreads % 2 != 0, "You must specify an odd number for replication factor" );
+
+        this.replicationFactor = replicationFactor;
+    }
+
+
+    /**
+     * Set the number of threads the lock heartbeat executor uses.  Must accommodate the total number of locks that may
+     * exist in the system.  Locks are always renewed at the ttl/2 time.
+     *
+     * @param numberOfLockObserverThreads the numberOfLockObserverThreads to set
+     */
+    public void setNumberOfLockObserverThreads( int numberOfLockObserverThreads ) {
+        this.numberOfLockObserverThreads = numberOfLockObserverThreads;
+    }
+
+
+    /**
+     * The amount of time a lock must not be renewed before it times out.  Set in milliseconds.  2000 is the default
+     *
+     * @param lockTtl the lockTtl to set
+     */
+    public void setLockTtl( long lockTtl ) {
+        this.lockTtl = lockTtl;
+    }
+
+
+    /** @param keyspaceName the keyspaceName to set */
+    public void setKeyspaceName( String keyspaceName ) {
+        this.keyspaceName = keyspaceName;
+    }
+
+
+    /** @param cluster the cluster to set */
+    public void setCluster( Cluster cluster ) {
+        this.cluster = cluster;
+    }
+
+
+	/**
+	 * @param consistencyLevelPolicy the consistencyLevelPolicy to set
+	 */
+	public void setConsistencyLevelPolicy(ConsistencyLevelPolicy consistencyLevelPolicy) {
+		this.consistencyLevelPolicy = consistencyLevelPolicy;
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/locking/exception/UGLockException.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/locking/exception/UGLockException.java b/stack/core/src/main/java/org/apache/usergrid/locking/exception/UGLockException.java
new file mode 100644
index 0000000..21a610d
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/locking/exception/UGLockException.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.locking.exception;
+
+
+public class UGLockException extends Exception {
+
+    /**
+     *
+     */
+    private static final long serialVersionUID = -8902830935510966393L;
+
+
+    public UGLockException() {
+        super();
+        // TODO Auto-generated constructor stub
+    }
+
+
+    public UGLockException( String message, Throwable cause ) {
+        super( message, cause );
+        // TODO Auto-generated constructor stub
+    }
+
+
+    public UGLockException( String message ) {
+        super( message );
+        // TODO Auto-generated constructor stub
+    }
+
+
+    public UGLockException( Throwable cause ) {
+        super( cause );
+        // TODO Auto-generated constructor stub
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/locking/noop/NoOpLockImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/locking/noop/NoOpLockImpl.java b/stack/core/src/main/java/org/apache/usergrid/locking/noop/NoOpLockImpl.java
new file mode 100644
index 0000000..dd1cc39
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/locking/noop/NoOpLockImpl.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.locking.noop;
+
+
+import java.util.concurrent.TimeUnit;
+
+import org.apache.usergrid.locking.Lock;
+import org.apache.usergrid.locking.exception.UGLockException;
+
+
+/** @author tnine */
+public class NoOpLockImpl implements Lock {
+
+    /**
+     *
+     */
+    public NoOpLockImpl() {
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.usergrid.locking.Lock#acquire(long, java.util.concurrent.TimeUnit)
+     */
+    @Override
+    public boolean tryLock( long timeout, TimeUnit time ) throws UGLockException {
+        //no op
+        return true;
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.usergrid.locking.Lock#lock()
+     */
+    @Override
+    public void lock() throws UGLockException {
+        //no op
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.usergrid.locking.Lock#release()
+     */
+    @Override
+    public void unlock() throws UGLockException {
+        //no op
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/locking/noop/NoOpLockManagerImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/locking/noop/NoOpLockManagerImpl.java b/stack/core/src/main/java/org/apache/usergrid/locking/noop/NoOpLockManagerImpl.java
new file mode 100644
index 0000000..467f5a5
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/locking/noop/NoOpLockManagerImpl.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.locking.noop;
+
+
+import java.util.UUID;
+
+import org.apache.usergrid.locking.Lock;
+import org.apache.usergrid.locking.LockManager;
+
+
+/** This is a no-op manager used for testing. */
+public class NoOpLockManagerImpl implements LockManager {
+
+    public NoOpLockManagerImpl() {
+
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.usergrid.locking.LockManager#createLock(java.util.UUID, java.lang.String[])
+     */
+    @Override
+    public Lock createLock( UUID applicationId, String... path ) {
+        return new NoOpLockImpl();
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/locking/singlenode/SingleNodeLockImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/locking/singlenode/SingleNodeLockImpl.java b/stack/core/src/main/java/org/apache/usergrid/locking/singlenode/SingleNodeLockImpl.java
new file mode 100644
index 0000000..aec969a
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/locking/singlenode/SingleNodeLockImpl.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.locking.singlenode;
+
+
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.locks.ReentrantLock;
+
+import org.apache.usergrid.locking.Lock;
+import org.apache.usergrid.locking.exception.UGLockException;
+
+
+/** @author tnine */
+public class SingleNodeLockImpl implements Lock {
+
+    private final ReentrantLock lock;
+
+
+    /**
+     *
+     */
+    public SingleNodeLockImpl( ReentrantLock lock ) {
+        this.lock = lock;
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.usergrid.locking.Lock#acquire(long)
+     */
+    @Override
+    public boolean tryLock( long timeout, TimeUnit time ) throws UGLockException {
+        try {
+            return this.lock.tryLock( timeout, time );
+        }
+        catch ( InterruptedException e ) {
+            throw new UGLockException( "Couldn't get the lock", e );
+        }
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.usergrid.locking.Lock#lock()
+     */
+    @Override
+    public void lock() throws UGLockException {
+        this.lock.lock();
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.usergrid.locking.Lock#release()
+     */
+    @Override
+    public void unlock() throws UGLockException {
+        this.lock.unlock();
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/locking/singlenode/SingleNodeLockManagerImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/locking/singlenode/SingleNodeLockManagerImpl.java b/stack/core/src/main/java/org/apache/usergrid/locking/singlenode/SingleNodeLockManagerImpl.java
new file mode 100644
index 0000000..b75ad76
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/locking/singlenode/SingleNodeLockManagerImpl.java
@@ -0,0 +1,93 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.locking.singlenode;
+
+
+import java.util.UUID;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.locks.ReentrantLock;
+
+import org.apache.usergrid.locking.Lock;
+import org.apache.usergrid.locking.LockManager;
+import org.apache.usergrid.locking.LockPathBuilder;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.google.common.cache.CacheBuilder;
+import com.google.common.cache.CacheLoader;
+import com.google.common.cache.LoadingCache;
+import com.google.common.cache.RemovalListener;
+import com.google.common.cache.RemovalNotification;
+
+
+/**
+ * Single Node implementation for {@link LockManager} Note that this implementation has not been used in a production
+ * environment.
+ * <p/>
+ * The hector based implementation is the preferred production locking system
+ */
+public class SingleNodeLockManagerImpl implements LockManager {
+
+    private static final Logger logger = LoggerFactory.getLogger( SingleNodeLockManagerImpl.class );
+
+    public static final long MILLI_EXPIRATION = 5000;
+
+    /** Lock cache that sill expire after 5 seconds of no use for a lock path */
+    private LoadingCache<String, ReentrantLock> locks =
+            CacheBuilder.newBuilder().expireAfterWrite( MILLI_EXPIRATION, TimeUnit.MILLISECONDS )
+                    // use weakValues. We want want entries removed if they're not being
+                    // referenced by another
+                    // thread somewhere and GC occurs
+                    .weakValues().removalListener( new RemovalListener<String, ReentrantLock>() {
+
+                @Override
+                public void onRemoval( RemovalNotification<String, ReentrantLock> notification ) {
+                    logger.debug( "Evicting reentrant lock for {}", notification.getKey() );
+                }
+            } ).build( new CacheLoader<String, ReentrantLock>() {
+
+                @Override
+                public ReentrantLock load( String arg0 ) throws Exception {
+                    return new ReentrantLock( true );
+                }
+            } );
+
+
+    /** Default constructor. */
+    public SingleNodeLockManagerImpl() {
+    }
+
+
+    /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.usergrid.locking.LockManager#createLock(java.util.UUID,
+   * java.lang.String[])
+   */
+    @Override
+    public Lock createLock( UUID applicationId, String... path ) {
+
+        String lockPath = LockPathBuilder.buildPath( applicationId, path );
+
+        try {
+            return new SingleNodeLockImpl( locks.get( lockPath ) );
+        }
+        catch ( ExecutionException e ) {
+            throw new RuntimeException( "Unable to create lock in cache", e );
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/locking/zookeeper/ZooKeeperLockManagerImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/locking/zookeeper/ZooKeeperLockManagerImpl.java b/stack/core/src/main/java/org/apache/usergrid/locking/zookeeper/ZooKeeperLockManagerImpl.java
new file mode 100644
index 0000000..e0c7ae2
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/locking/zookeeper/ZooKeeperLockManagerImpl.java
@@ -0,0 +1,114 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.locking.zookeeper;
+
+
+import java.util.UUID;
+
+import javax.annotation.PostConstruct;
+
+import org.apache.usergrid.locking.Lock;
+import org.apache.usergrid.locking.LockManager;
+import org.apache.usergrid.locking.LockPathBuilder;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.netflix.curator.RetryPolicy;
+import com.netflix.curator.framework.CuratorFramework;
+import com.netflix.curator.framework.CuratorFrameworkFactory;
+import com.netflix.curator.framework.recipes.locks.InterProcessMutex;
+import com.netflix.curator.retry.ExponentialBackoffRetry;
+
+
+/** Implementation for Zookeeper service that handles global locks. */
+public final class ZooKeeperLockManagerImpl implements LockManager {
+
+    private String hostPort;
+
+    private int sessionTimeout = 2000;
+
+    private int maxAttempts = 5;
+
+    private CuratorFramework client;
+
+
+    public ZooKeeperLockManagerImpl( String hostPort, int sessionTimeout, int maxAttemps ) {
+        this.hostPort = hostPort;
+        this.sessionTimeout = sessionTimeout;
+        this.maxAttempts = maxAttemps;
+        init();
+    }
+
+
+    public ZooKeeperLockManagerImpl() {
+    }
+
+
+    @PostConstruct
+    public void init() {
+        RetryPolicy retryPolicy = new ExponentialBackoffRetry( sessionTimeout, maxAttempts );
+        client = CuratorFrameworkFactory.newClient( hostPort, retryPolicy );
+        client.start();
+    }
+
+
+    protected static final Logger logger = LoggerFactory.getLogger( ZooKeeperLockManagerImpl.class );
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.apache.usergrid.locking.LockManager#createLock(java.util.UUID,
+     * java.lang.String[])
+     */
+    @Override
+    public Lock createLock( UUID applicationId, String... path ) {
+        String lockPath = LockPathBuilder.buildPath( applicationId, path );
+
+
+        return new ZookeeperLockImpl( new InterProcessMutex( client, lockPath ) );
+    }
+
+
+    public String getHostPort() {
+        return hostPort;
+    }
+
+
+    public void setHostPort( String hostPort ) {
+        this.hostPort = hostPort;
+    }
+
+
+    public int getSessionTimeout() {
+        return sessionTimeout;
+    }
+
+
+    public void setSessionTimeout( int sessionTimeout ) {
+        this.sessionTimeout = sessionTimeout;
+    }
+
+
+    public int getMaxAttempts() {
+        return maxAttempts;
+    }
+
+
+    public void setMaxAttempts( int maxAttemps ) {
+        this.maxAttempts = maxAttemps;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/locking/zookeeper/ZookeeperLockImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/locking/zookeeper/ZookeeperLockImpl.java b/stack/core/src/main/java/org/apache/usergrid/locking/zookeeper/ZookeeperLockImpl.java
new file mode 100644
index 0000000..185f37c
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/locking/zookeeper/ZookeeperLockImpl.java
@@ -0,0 +1,87 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.locking.zookeeper;
+
+
+import java.util.concurrent.TimeUnit;
+
+import org.apache.usergrid.locking.Lock;
+import org.apache.usergrid.locking.exception.UGLockException;
+
+import com.netflix.curator.framework.recipes.locks.InterProcessMutex;
+
+
+/**
+ * Wrapper for locks using curator
+ *
+ * @author tnine
+ */
+public class ZookeeperLockImpl implements Lock {
+
+
+    private InterProcessMutex zkMutex;
+
+
+    /**
+     *
+     */
+    public ZookeeperLockImpl( InterProcessMutex zkMutex ) {
+        this.zkMutex = zkMutex;
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.usergrid.locking.Lock#tryLock(long, java.util.concurrent.TimeUnit)
+     */
+    @Override
+    public boolean tryLock( long timeout, TimeUnit time ) throws UGLockException {
+
+        try {
+            return zkMutex.acquire( timeout, time );
+        }
+        catch ( Exception e ) {
+            throw new UGLockException( "Unable to obtain lock", e );
+        }
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.usergrid.locking.Lock#lock()
+     */
+    @Override
+    public void lock() throws UGLockException {
+        try {
+            zkMutex.acquire();
+        }
+        catch ( Exception e ) {
+            throw new UGLockException( "Unable to obtain lock", e );
+        }
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.usergrid.locking.Lock#unlock()
+     */
+    @Override
+    public void unlock() throws UGLockException {
+        try {
+            zkMutex.release();
+        }
+        catch ( Exception e ) {
+            throw new UGLockException( "Unable to obtain lock", e );
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/mq/CounterQuery.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/mq/CounterQuery.java b/stack/core/src/main/java/org/apache/usergrid/mq/CounterQuery.java
new file mode 100644
index 0000000..2a0f074
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/mq/CounterQuery.java
@@ -0,0 +1,314 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.mq;
+
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.usergrid.mq.Query.CounterFilterPredicate;
+import org.apache.usergrid.persistence.CounterResolution;
+import org.apache.usergrid.utils.JsonUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static org.apache.usergrid.utils.ClassUtils.cast;
+import static org.apache.usergrid.utils.ListUtils.firstBoolean;
+import static org.apache.usergrid.utils.ListUtils.firstInteger;
+import static org.apache.usergrid.utils.ListUtils.firstLong;
+import static org.apache.usergrid.utils.ListUtils.isEmpty;
+import static org.apache.usergrid.utils.MapUtils.toMapList;
+
+
+public class CounterQuery {
+
+    public static final Logger logger = LoggerFactory.getLogger( CounterQuery.class );
+
+    public static final int DEFAULT_MAX_RESULTS = 10;
+
+    private int limit = 0;
+    boolean limitSet = false;
+
+    private Long startTime;
+    private Long finishTime;
+    private boolean pad;
+    private CounterResolution resolution = CounterResolution.ALL;
+    private List<String> categories;
+    private List<CounterFilterPredicate> counterFilters;
+
+
+    public CounterQuery() {
+    }
+
+
+    public CounterQuery( CounterQuery q ) {
+        if ( q != null ) {
+            limit = q.limit;
+            limitSet = q.limitSet;
+            startTime = q.startTime;
+            finishTime = q.finishTime;
+            resolution = q.resolution;
+            pad = q.pad;
+            categories = q.categories != null ? new ArrayList<String>( q.categories ) : null;
+            counterFilters =
+                    q.counterFilters != null ? new ArrayList<CounterFilterPredicate>( q.counterFilters ) : null;
+        }
+    }
+
+
+    public static CounterQuery newQueryIfNull( CounterQuery query ) {
+        if ( query == null ) {
+            query = new CounterQuery();
+        }
+        return query;
+    }
+
+
+    public static CounterQuery fromJsonString( String json ) {
+        Object o = JsonUtils.parse( json );
+        if ( o instanceof Map ) {
+            @SuppressWarnings({ "unchecked", "rawtypes" }) Map<String, List<String>> params =
+                    cast( toMapList( ( Map ) o ) );
+            return fromQueryParams( params );
+        }
+        return null;
+    }
+
+
+    public static CounterQuery fromQueryParams( Map<String, List<String>> params ) {
+
+        CounterQuery q = null;
+        Integer limit = null;
+        Long startTime = null;
+        Long finishTime = null;
+        Boolean pad = null;
+        CounterResolution resolution = null;
+        List<CounterFilterPredicate> counterFilters = null;
+        List<String> categories = null;
+
+        List<String> l = null;
+
+        limit = firstInteger( params.get( "limit" ) );
+        startTime = firstLong( params.get( "start_time" ) );
+        finishTime = firstLong( params.get( "end_time" ) );
+
+        l = params.get( "resolution" );
+        if ( !isEmpty( l ) ) {
+            resolution = CounterResolution.fromString( l.get( 0 ) );
+        }
+
+        categories = params.get( "category" );
+
+        l = params.get( "counter" );
+        if ( !isEmpty( l ) ) {
+            counterFilters = CounterFilterPredicate.fromList( l );
+        }
+
+        pad = firstBoolean( params.get( "pad" ) );
+
+        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 ( categories != null ) {
+            q = newQueryIfNull( q );
+            q.setCategories( categories );
+        }
+
+        if ( counterFilters != null ) {
+            q = newQueryIfNull( q );
+            q.setCounterFilters( counterFilters );
+        }
+
+        if ( pad != null ) {
+            q = newQueryIfNull( q );
+            q.setPad( pad );
+        }
+
+        return q;
+    }
+
+
+    public int getLimit() {
+        return getLimit( DEFAULT_MAX_RESULTS );
+    }
+
+
+    public int getLimit( int defaultMax ) {
+        if ( limit <= 0 ) {
+            if ( defaultMax > 0 ) {
+                return defaultMax;
+            }
+            else {
+                return DEFAULT_MAX_RESULTS;
+            }
+        }
+        return limit;
+    }
+
+
+    public void setLimit( int limit ) {
+        limitSet = true;
+        this.limit = limit;
+    }
+
+
+    public CounterQuery withLimit( int limit ) {
+        limitSet = true;
+        this.limit = limit;
+        return this;
+    }
+
+
+    public boolean isLimitSet() {
+        return limitSet;
+    }
+
+
+    public Long getStartTime() {
+        return startTime;
+    }
+
+
+    public void setStartTime( Long startTime ) {
+        this.startTime = startTime;
+    }
+
+
+    public CounterQuery withStartTime( Long startTime ) {
+        this.startTime = startTime;
+        return this;
+    }
+
+
+    public Long getFinishTime() {
+        return finishTime;
+    }
+
+
+    public void setFinishTime( Long finishTime ) {
+        this.finishTime = finishTime;
+    }
+
+
+    public CounterQuery withFinishTime( Long finishTime ) {
+        this.finishTime = finishTime;
+        return this;
+    }
+
+
+    public boolean isPad() {
+        return pad;
+    }
+
+
+    public void setPad( boolean pad ) {
+        this.pad = pad;
+    }
+
+
+    public CounterQuery withPad( boolean pad ) {
+        this.pad = pad;
+        return this;
+    }
+
+
+    public void setResolution( CounterResolution resolution ) {
+        this.resolution = resolution;
+    }
+
+
+    public CounterResolution getResolution() {
+        return resolution;
+    }
+
+
+    public CounterQuery withResolution( CounterResolution resolution ) {
+        this.resolution = resolution;
+        return this;
+    }
+
+
+    public List<String> getCategories() {
+        return categories;
+    }
+
+
+    public CounterQuery addCategory( String category ) {
+        if ( categories == null ) {
+            categories = new ArrayList<String>();
+        }
+        categories.add( category );
+        return this;
+    }
+
+
+    public void setCategories( List<String> categories ) {
+        this.categories = categories;
+    }
+
+
+    public CounterQuery withCategories( List<String> categories ) {
+        this.categories = categories;
+        return this;
+    }
+
+
+    public List<CounterFilterPredicate> getCounterFilters() {
+        return counterFilters;
+    }
+
+
+    public CounterQuery addCounterFilter( String counter ) {
+        CounterFilterPredicate p = CounterFilterPredicate.fromString( counter );
+        if ( p == null ) {
+            return this;
+        }
+        if ( counterFilters == null ) {
+            counterFilters = new ArrayList<CounterFilterPredicate>();
+        }
+        counterFilters.add( p );
+        return this;
+    }
+
+
+    public void setCounterFilters( List<CounterFilterPredicate> counterFilters ) {
+        this.counterFilters = counterFilters;
+    }
+
+
+    public CounterQuery withCounterFilters( List<CounterFilterPredicate> counterFilters ) {
+        this.counterFilters = counterFilters;
+        return this;
+    }
+}


[17/96] [abbrv] [partial] Change package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/Query.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/Query.java b/stack/core/src/main/java/org/usergrid/persistence/Query.java
deleted file mode 100644
index b6ef324..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/Query.java
+++ /dev/null
@@ -1,1310 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence;
-
-
-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 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.codehaus.jackson.annotate.JsonIgnore;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.usergrid.persistence.Results.Level;
-import org.usergrid.persistence.exceptions.QueryParseException;
-import org.usergrid.persistence.query.tree.AndOperand;
-import org.usergrid.persistence.query.tree.ContainsOperand;
-import org.usergrid.persistence.query.tree.Equal;
-import org.usergrid.persistence.query.tree.EqualityOperand;
-import org.usergrid.persistence.query.tree.GreaterThan;
-import org.usergrid.persistence.query.tree.GreaterThanEqual;
-import org.usergrid.persistence.query.tree.LessThan;
-import org.usergrid.persistence.query.tree.LessThanEqual;
-import org.usergrid.persistence.query.tree.Operand;
-import org.usergrid.persistence.query.tree.QueryFilterLexer;
-import org.usergrid.persistence.query.tree.QueryFilterParser;
-import org.usergrid.utils.JsonUtils;
-
-import org.apache.commons.lang.StringUtils;
-
-import static org.apache.commons.codec.binary.Base64.decodeBase64;
-import static org.apache.commons.lang.StringUtils.isBlank;
-import static org.apache.commons.lang.StringUtils.split;
-import static org.usergrid.persistence.Schema.PROPERTY_UUID;
-import static org.usergrid.utils.ClassUtils.cast;
-import static org.usergrid.utils.ConversionUtils.uuid;
-import static org.usergrid.utils.ListUtils.first;
-import static org.usergrid.utils.ListUtils.firstBoolean;
-import static org.usergrid.utils.ListUtils.firstInteger;
-import static org.usergrid.utils.ListUtils.firstLong;
-import static org.usergrid.utils.ListUtils.firstUuid;
-import static org.usergrid.utils.ListUtils.isEmpty;
-import static org.usergrid.utils.MapUtils.toMapList;
-
-
-public class Query {
-
-    private static final Logger logger = LoggerFactory.getLogger( Query.class );
-
-    public static final int DEFAULT_LIMIT = 10;
-
-    public static final int MAX_LIMIT = 1000;
-
-    private String type;
-    private List<SortPredicate> sortPredicates = new ArrayList<SortPredicate>();
-    private Operand rootOperand;
-    private UUID startResult;
-    private String cursor;
-    private int limit = 0;
-
-    private Map<String, String> selectAssignments = new LinkedHashMap<String, String>();
-    private boolean mergeSelectResults = false;
-    private Level level = Level.ALL_PROPERTIES;
-    private String connection;
-    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;
-
-
-    public Query() {
-    }
-
-
-    public Query( Query q ) {
-        if ( q != null ) {
-            type = q.type;
-            sortPredicates = q.sortPredicates != null ? new ArrayList<SortPredicate>( q.sortPredicates ) : null;
-            startResult = q.startResult;
-            cursor = q.cursor;
-            limit = q.limit;
-            selectAssignments =
-                    q.selectAssignments != null ? new LinkedHashMap<String, String>( q.selectAssignments ) : null;
-            mergeSelectResults = q.mergeSelectResults;
-            level = q.level;
-            connection = q.connection;
-            permissions = q.permissions != null ? new ArrayList<String>( 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<Identifier>( q.identifiers ) : null;
-            counterFilters =
-                    q.counterFilters != null ? new ArrayList<CounterFilterPredicate>( q.counterFilters ) : null;
-            collection = q.collection;
-        }
-    }
-
-
-    public static Query fromQL( String ql ) throws QueryParseException {
-        if ( ql == null ) {
-            return null;
-        }
-        String originalQl = ql;
-        ql = ql.trim();
-
-        String qlt = ql.toLowerCase();
-        if ( !qlt.startsWith( "select" ) && !qlt.startsWith( "insert" ) && !qlt.startsWith( "update" ) && !qlt
-                .startsWith( "delete" ) ) {
-            if ( qlt.startsWith( "order by" ) ) {
-                ql = "select * " + ql;
-            }
-            else {
-                ql = "select * where " + ql;
-            }
-        }
-
-        ANTLRStringStream in = new ANTLRStringStream( qlt.trim() );
-        QueryFilterLexer lexer = new QueryFilterLexer( in );
-        CommonTokenStream tokens = new CommonTokenStream( lexer );
-        QueryFilterParser parser = new QueryFilterParser( tokens );
-
-        try {
-            Query q = parser.ql().query;
-            q.setQl( originalQl );
-            return q;
-        }
-        catch ( RecognitionException e ) {
-            logger.error( "Unable to parse \"{}\"", ql, e );
-
-            int index = e.index;
-            int lineNumber = e.line;
-            Token token = e.token;
-
-            String message = String.format(
-                    "The query cannot be parsed. The token '%s' at column %d on line %d cannot be " + "parsed",
-                    token.getText(), index, lineNumber );
-
-            throw new QueryParseException( message, e );
-        }
-    }
-
-
-    private static Query newQueryIfNull( Query query ) {
-        if ( query == null ) {
-            query = new Query();
-        }
-        return query;
-    }
-
-
-    public static Query fromJsonString( String json ) throws QueryParseException {
-        Object o = JsonUtils.parse( json );
-        if ( o instanceof Map ) {
-            @SuppressWarnings({ "unchecked", "rawtypes" }) Map<String, List<String>> params =
-                    cast( 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 = first( params.get( "type" ) );
-        Boolean reversed = firstBoolean( params.get( "reversed" ) );
-        String connection = first( params.get( "connection" ) );
-        UUID start = firstUuid( params.get( "start" ) );
-        String cursor = first( params.get( "cursor" ) );
-        Integer limit = firstInteger( params.get( "limit" ) );
-        List<String> permissions = params.get( "permission" );
-        Long startTime = firstLong( params.get( "start_time" ) );
-        Long finishTime = firstLong( params.get( "end_time" ) );
-
-        List<String> l = params.get( "resolution" );
-        if ( !isEmpty( l ) ) {
-            resolution = CounterResolution.fromString( l.get( 0 ) );
-        }
-
-        l = params.get( "counter" );
-
-        if ( !isEmpty( l ) ) {
-            counterFilters = CounterFilterPredicate.fromList( l );
-        }
-
-        Boolean pad = 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 ) );
-        }
-
-        l = params.get( "filter" );
-
-        if ( !isEmpty( l ) ) {
-            q = newQueryIfNull( q );
-            for ( String s : l ) {
-                q.addFilter( decode( s ) );
-            }
-        }
-
-        l = params.get( "sort" );
-        if ( !isEmpty( l ) ) {
-            q = newQueryIfNull( q );
-            for ( String s : l ) {
-                q.addSort( decode( s ) );
-            }
-        }
-
-        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 searchForProperty( String propertyName, Object propertyValue ) {
-        Query q = new Query();
-        q.addEqualityFilter( propertyName, propertyValue );
-        return q;
-    }
-
-
-    public static Query findForProperty( String propertyName, Object propertyValue ) {
-        Query q = new Query();
-        q.addEqualityFilter( propertyName, propertyValue );
-        q.setLimit( 1 );
-        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;
-    }
-
-
-    public Query addSort( SortPredicate sort ) {
-        if ( sort == null ) {
-            return this;
-        }
-
-        for ( SortPredicate s : sortPredicates ) {
-            if ( s.getPropertyName().equals( sort.getPropertyName() ) ) {
-                throw new QueryParseException(
-                        String.format( "Attempted to set sort order for %s more than once", s.getPropertyName() ) );
-            }
-        }
-        sortPredicates.add( sort );
-        return this;
-    }
-
-
-    @JsonIgnore
-    public UUID getSingleUuidIdentifier() {
-        if ( !containsSingleUuidIdentifier() ) {
-            return null;
-        }
-        return ( identifiers.get( 0 ).getUUID() );
-    }
-
-
-    @JsonIgnore
-    boolean isIdsOnly() {
-        if ( ( selectAssignments.size() == 1 ) && selectAssignments.containsKey( PROPERTY_UUID ) ) {
-            level = Level.IDS;
-            return true;
-        }
-        return false;
-    }
-
-
-    private void setIdsOnly( boolean idsOnly ) {
-        if ( idsOnly ) {
-            selectAssignments = new LinkedHashMap<String, String>();
-            selectAssignments.put( PROPERTY_UUID, PROPERTY_UUID );
-            level = Level.IDS;
-        }
-        else if ( isIdsOnly() ) {
-            selectAssignments = new LinkedHashMap<String, String>();
-            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 String getConnectionType() {
-        return connection;
-    }
-
-
-    public void setConnectionType( String connection ) {
-        this.connection = connection;
-    }
-
-
-    public List<String> getPermissions() {
-        return permissions;
-    }
-
-
-    public void setPermissions( List<String> permissions ) {
-        this.permissions = permissions;
-    }
-
-
-    public Query addSelect( String select ) {
-
-        return addSelect( select, null );
-    }
-
-
-    public Query addSelect( String select, String output ) {
-        // be paranoid with the null checks because
-        // the query parser sometimes flakes out
-        if ( select == null ) {
-            return this;
-        }
-        select = select.trim();
-
-        if ( select.equals( "*" ) ) {
-            return this;
-        }
-
-        mergeSelectResults = StringUtils.isNotEmpty( output );
-
-        if ( output == null ) {
-            output = "";
-        }
-
-        selectAssignments.put( select, output );
-
-        return this;
-    }
-
-
-    public boolean hasSelectSubjects() {
-        return !selectAssignments.isEmpty();
-    }
-
-
-    @JsonIgnore
-    public Set<String> getSelectSubjects() {
-        return selectAssignments.keySet();
-    }
-
-
-    public Map<String, String> getSelectAssignments() {
-        return selectAssignments;
-    }
-
-
-    boolean isMergeSelectResults() {
-        return mergeSelectResults;
-    }
-
-
-    public Query addSort( String propertyName ) {
-        if ( isBlank( propertyName ) ) {
-            return this;
-        }
-        propertyName = propertyName.trim();
-        if ( propertyName.indexOf( ',' ) >= 0 ) {
-            String[] propertyNames = split( propertyName, ',' );
-            for ( String s : propertyNames ) {
-                addSort( s );
-            }
-            return this;
-        }
-
-        SortDirection direction = SortDirection.ASCENDING;
-        if ( propertyName.indexOf( ' ' ) >= 0 ) {
-            String[] parts = split( propertyName, ' ' );
-            if ( parts.length > 1 ) {
-                propertyName = parts[0];
-                direction = SortDirection.find( parts[1] );
-            }
-        }
-        else if ( propertyName.startsWith( "-" ) ) {
-            propertyName = propertyName.substring( 1 );
-            direction = SortDirection.DESCENDING;
-        }
-        else if ( propertyName.startsWith( "+" ) ) {
-            propertyName = propertyName.substring( 1 );
-            direction = SortDirection.ASCENDING;
-        }
-
-        return addSort( propertyName, direction );
-    }
-
-
-    public Query addSort( String propertyName, SortDirection direction ) {
-        if ( isBlank( propertyName ) ) {
-            return this;
-        }
-        propertyName = propertyName.trim();
-        for ( SortPredicate s : sortPredicates ) {
-            if ( s.getPropertyName().equals( propertyName ) ) {
-                logger.error(
-                        "Attempted to set sort order for " + s.getPropertyName() + " more than once, discarding..." );
-                return this;
-            }
-        }
-        sortPredicates.add( new SortPredicate( propertyName, direction ) );
-        return this;
-    }
-
-
-    @JsonIgnore
-    public boolean isSortSet() {
-        return !sortPredicates.isEmpty();
-    }
-
-
-    public List<SortPredicate> getSortPredicates() {
-        return sortPredicates;
-    }
-
-
-    public Query addFilter( String filter ) {
-        ANTLRStringStream in = new ANTLRStringStream( filter );
-        QueryFilterLexer lexer = new QueryFilterLexer( in );
-        TokenRewriteStream tokens = new TokenRewriteStream( lexer );
-        QueryFilterParser parser = new QueryFilterParser( tokens );
-
-        Operand root;
-
-        try {
-            root = parser.ql().query.getRootOperand();
-        }
-        catch ( RecognitionException e ) {
-            // todo: should we create a specific Exception for this? checked?
-            throw new RuntimeException( "Unknown operation: " + filter, e );
-        }
-
-        if ( root != null ) {
-            addClause( root );
-        }
-
-        return this;
-    }
-
-
-    /** Add a less than filter to this query. && with existing clauses */
-    public Query addLessThanFilter( String propName, Object value ) {
-        LessThan equality = new LessThan( null );
-
-        addClause( equality, propName, value );
-
-        return this;
-    }
-
-
-    /** Add a less than equal filter to this query. && with existing clauses */
-    public Query addLessThanEqualFilter( String propName, Object value ) {
-        LessThanEqual equality = new LessThanEqual( null );
-
-        addClause( equality, propName, value );
-
-        return this;
-    }
-
-
-    /** Add a equal filter to this query. && with existing clauses */
-    public Query addEqualityFilter( String propName, Object value ) {
-        Equal equality = new Equal( new ClassicToken( 0, "=" ) );
-
-        addClause( equality, propName, value );
-
-        return this;
-    }
-
-
-    /** Add a greater than equal filter to this query. && with existing clauses */
-    public Query addGreaterThanEqualFilter( String propName, Object value ) {
-        GreaterThanEqual equality = new GreaterThanEqual( null );
-
-        addClause( equality, propName, value );
-
-        return this;
-    }
-
-
-    /** Add a less than filter to this query. && with existing clauses */
-    public Query addGreaterThanFilter( String propName, Object value ) {
-        GreaterThan equality = new GreaterThan( null );
-
-        addClause( equality, propName, value );
-
-        return this;
-    }
-
-
-    public Query addContainsFilter( String propName, String keyword ) {
-        ContainsOperand equality = new ContainsOperand( new ClassicToken( 0, "contains" ) );
-
-        equality.setProperty( propName );
-        equality.setLiteral( keyword );
-
-        addClause( equality );
-
-        return this;
-    }
-
-
-    private void addClause( EqualityOperand equals, String propertyName, Object value ) {
-        equals.setProperty( propertyName );
-        equals.setLiteral( value );
-        addClause( equals );
-    }
-
-
-    private void addClause( Operand equals ) {
-
-        if ( rootOperand == null ) {
-            rootOperand = equals;
-            return;
-        }
-
-        AndOperand and = new AndOperand();
-        and.addChild( rootOperand );
-        and.addChild( equals );
-
-        // redirect the root to new && clause
-        rootOperand = and;
-    }
-
-
-    @JsonIgnore
-    public Operand getRootOperand() {
-        if ( rootOperand == null ) { // attempt deserialization
-            if ( ql != null ) {
-                try {
-                    Query q = Query.fromQL( ql );
-                    rootOperand = q.rootOperand;
-                }
-                catch ( QueryParseException e ) {
-                    logger.error( "error parsing sql for rootOperand", e ); // shouldn't happen
-                }
-            }
-        }
-        return rootOperand;
-    }
-
-
-    public void setRootOperand( Operand root ) {
-        this.rootOperand = root;
-    }
-
-
-    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 = decodeBase64( cursor );
-            if ( ( cursorBytes != null ) && ( cursorBytes.length == 16 ) ) {
-                startResult = 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;
-    }
-
-
-    @Override
-    public String toString() {
-        if ( ql != null ) {
-            return ql;
-        }
-        StringBuilder s = new StringBuilder( "select " );
-        if ( selectAssignments.isEmpty() ) {
-            s.append( "*" );
-        }
-        else {
-            if ( mergeSelectResults ) {
-                s.append( "{ " );
-                boolean first = true;
-                for ( Map.Entry<String, String> select : selectAssignments.entrySet() ) {
-                    if ( !first ) {
-                        s.append( ", " );
-                    }
-                    s.append( select.getValue() ).append( " : " ).append( select.getKey() );
-                    first = false;
-                }
-                s.append( " }" );
-            }
-            else {
-                boolean first = true;
-                for ( String select : selectAssignments.keySet() ) {
-                    if ( !first ) {
-                        s.append( ", " );
-                    }
-                    s.append( select );
-                    first = false;
-                }
-            }
-        }
-        s.append( " from " );
-        s.append( type );
-        if ( !sortPredicates.isEmpty() ) {
-            boolean first = true;
-            s.append( " order by " );
-            for ( SortPredicate sp : sortPredicates ) {
-                if ( !first ) {
-                    s.append( ", " );
-                }
-                s.append( sp );
-                first = false;
-            }
-        }
-        //      if (!filterPredicates.isEmpty()) {
-        //        s.append(" where ");
-        //        boolean first = true;
-        //        for (FilterPredicate f : filterPredicates) {
-        //          if (!first) {
-        //            s.append(" and ");
-        //          }
-        //          s.append(f.toString());
-        //          first = false;
-        //        }
-        //      }
-        return s.toString();
-    }
-
-
-    public static enum SortDirection {
-        ASCENDING, DESCENDING;
-
-
-        public static SortDirection find( String s ) {
-            if ( s == null ) {
-                return ASCENDING;
-            }
-            s = s.toLowerCase();
-            if ( s.startsWith( "asc" ) ) {
-                return ASCENDING;
-            }
-            if ( s.startsWith( "des" ) ) {
-                return DESCENDING;
-            }
-            if ( s.equals( "+" ) ) {
-                return ASCENDING;
-            }
-            if ( s.equals( "-" ) ) {
-                return DESCENDING;
-            }
-            return ASCENDING;
-        }
-    }
-
-
-    public static final class SortPredicate implements Serializable {
-        private static final long serialVersionUID = 1L;
-        private final String propertyName;
-        private final Query.SortDirection direction;
-
-
-        public SortPredicate( String propertyName, Query.SortDirection direction ) {
-            if ( propertyName == null ) {
-                throw new NullPointerException( "Property name was null" );
-            }
-
-            if ( direction == null ) {
-                direction = SortDirection.ASCENDING;
-            }
-
-            this.propertyName = propertyName.trim();
-            this.direction = direction;
-        }
-
-
-        public SortPredicate( String propertyName, String direction ) {
-            this( propertyName, SortDirection.find( direction ) );
-        }
-
-
-        public String getPropertyName() {
-            return propertyName;
-        }
-
-
-        public Query.SortDirection getDirection() {
-            return direction;
-        }
-
-
-        @Override
-        public boolean equals( Object o ) {
-            if ( this == o ) {
-                return true;
-            }
-            if ( ( o == null ) || ( super.getClass() != o.getClass() ) ) {
-                return false;
-            }
-
-            SortPredicate that = ( SortPredicate ) o;
-
-            if ( direction != that.direction ) {
-                return false;
-            }
-
-            return ( propertyName.equals( that.propertyName ) );
-        }
-
-
-        @Override
-        public int hashCode() {
-            int result = propertyName.hashCode();
-            result = ( 31 * result ) + direction.hashCode();
-            return result;
-        }
-
-
-        @Override
-        public String toString() {
-            return propertyName + ( ( direction == Query.SortDirection.DESCENDING ) ? " DESC" : "" );
-        }
-    }
-
-
-    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 = 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 void setQl( String ql ) {
-        this.ql = ql;
-    }
-
-
-    public List<Identifier> getIdentifiers() {
-        return identifiers;
-    }
-
-
-    public String getConnection() {
-        return connection;
-    }
-
-
-    public String getType() {
-        return type;
-    }
-
-
-    public Level getLevel() {
-        return level;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/QueryUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/QueryUtils.java b/stack/core/src/main/java/org/usergrid/persistence/QueryUtils.java
deleted file mode 100644
index 892aeff..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/QueryUtils.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package org.usergrid.persistence;
-
-
-import java.util.List;
-import java.util.Map;
-
-import org.usergrid.utils.ListUtils;
-
-
-/**
- * Utilities to deal with query extraction and generation
- *
- * @author zznate
- */
-public class QueryUtils {
-
-    public static final String PARAM_QL = "ql";
-    public static final String PARAM_Q = "q";
-    public static final String PARAM_QUERY = "query";
-
-
-    public static String queryStrFrom( Map<String, List<String>> params ) {
-        if ( params.containsKey( PARAM_QL ) ) {
-            return ListUtils.first( params.get( PARAM_QL ) );
-        }
-        else if ( params.containsKey( PARAM_Q ) ) {
-            return ListUtils.first( params.get( PARAM_Q ) );
-        }
-        else if ( params.containsKey( PARAM_QUERY ) ) {
-            return ListUtils.first( params.get( PARAM_QUERY ) );
-        }
-        return null;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/RelationManager.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/RelationManager.java b/stack/core/src/main/java/org/usergrid/persistence/RelationManager.java
deleted file mode 100644
index dab436d..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/RelationManager.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence;
-
-
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.UUID;
-
-import org.usergrid.persistence.Results.Level;
-
-
-public interface RelationManager {
-
-    public Set<String> getCollectionIndexes( String collectionName ) throws Exception;
-
-    public Map<String, Map<UUID, Set<String>>> getOwners() throws Exception;
-
-
-    /**
-     * Returns true if the entity ref if a member of the owner ref for the current relation manager
-     *
-     * @param collectionName The name of the collection
-     */
-    public boolean isCollectionMember( String collectionName, EntityRef entity ) throws Exception;
-
-    /** Returns true if the target entity is currently connected to the owner ref of this relation manager */
-    public boolean isConnectionMember( String connectionName, EntityRef entity ) throws Exception;
-
-    public Set<String> getCollections() throws Exception;
-
-    public Results getCollection( String collectionName, UUID startResult, int count, Results.Level resultsLevel,
-                                  boolean reversed ) throws Exception;
-
-    public Results getCollection( String collectionName, Query query, Results.Level resultsLevel ) throws Exception;
-
-    public Entity addToCollection( String collectionName, EntityRef itemRef ) throws Exception;
-
-    public Entity addToCollections( List<EntityRef> owners, String collectionName ) throws Exception;
-
-    public Entity createItemInCollection( String collectionName, String itemType, Map<String, Object> properties )
-            throws Exception;
-
-    public void removeFromCollection( String collectionName, EntityRef itemRef ) throws Exception;
-
-    public void copyRelationships( String srcRelationName, EntityRef dstEntityRef, String dstRelationName )
-            throws Exception;
-
-    public Results searchCollection( String collectionName, Query query ) throws Exception;
-
-    public ConnectionRef createConnection( ConnectionRef connection ) throws Exception;
-
-    public ConnectionRef createConnection( String connectionType, EntityRef connectedEntityRef ) throws Exception;
-
-    public ConnectionRef createConnection( String pairedConnectionType, EntityRef pairedEntity, String connectionType,
-                                           EntityRef connectedEntityRef ) throws Exception;
-
-    public ConnectionRef createConnection( ConnectedEntityRef... connections ) throws Exception;
-
-    public ConnectionRef connectionRef( String connectionType, EntityRef connectedEntityRef ) throws Exception;
-
-    public ConnectionRef connectionRef( String pairedConnectionType, EntityRef pairedEntity, String connectionType,
-                                        EntityRef connectedEntityRef ) throws Exception;
-
-    public ConnectionRef connectionRef( ConnectedEntityRef... connections );
-
-    public void deleteConnection( ConnectionRef connectionRef ) throws Exception;
-
-    public Set<String> getConnectionTypes( UUID connectedEntityId ) throws Exception;
-
-    public Set<String> getConnectionTypes() throws Exception;
-
-    public Set<String> getConnectionTypes( boolean filterConnection ) throws Exception;
-
-    /**
-     * Get all entities connected to this entity.  Also get all
-     *
-     * @param connectionType The type/name of the connection
-     * @param connectedEntityType The type of
-     */
-    public Results getConnectedEntities( String connectionType, String connectedEntityType, Results.Level resultsLevel )
-            throws Exception;
-
-    public Results getConnectingEntities( String connectionType, String connectedEntityType,
-                                          Results.Level resultsLevel ) throws Exception;
-
-    // public Results searchConnectedEntitiesForProperty(String connectionType,
-    // String connectedEntityType, String propertyName,
-    // Object searchStartValue, Object searchFinishValue,
-    // 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 searchConnectedEntities( Query query ) throws Exception;
-
-
-    public Set<String> getConnectionIndexes( String connectionType ) throws Exception;
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/Results.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/Results.java b/stack/core/src/main/java/org/usergrid/persistence/Results.java
deleted file mode 100644
index a6329d6..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/Results.java
+++ /dev/null
@@ -1,1294 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence;
-
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.ListIterator;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-import java.util.UUID;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
-import org.usergrid.persistence.cassandra.QueryProcessor;
-import org.usergrid.persistence.query.ir.SearchVisitor;
-import org.usergrid.utils.MapUtils;
-import org.usergrid.utils.StringUtils;
-
-import static org.apache.commons.codec.binary.Base64.encodeBase64URLSafeString;
-import static org.usergrid.persistence.SimpleEntityRef.ref;
-import static org.usergrid.utils.ClassUtils.cast;
-import static org.usergrid.utils.ConversionUtils.bytes;
-
-
-@XmlRootElement
-public class Results implements Iterable<Entity> {
-
-
-    public enum Level {
-        IDS, REFS, CORE_PROPERTIES, ALL_PROPERTIES, LINKED_PROPERTIES
-    }
-
-
-    Level level = Level.IDS;
-    UUID id;
-    List<UUID> ids;
-    Set<UUID> idSet;
-
-    EntityRef ref;
-    List<EntityRef> refs;
-    Map<UUID, EntityRef> refsMap;
-    Map<String, List<EntityRef>> refsByType;
-
-    Entity entity;
-    List<Entity> entities;
-    Map<UUID, Entity> entitiesMap;
-    Map<String, List<Entity>> entitiesByType;
-
-    List<ConnectionRef> connections;
-    boolean forwardConnections = true;
-
-    List<AggregateCounterSet> counters;
-
-    Set<String> types;
-
-    Map<UUID, Map<String, Object>> metadata;
-    boolean metadataMerged = true;
-
-    UUID nextResult;
-    String cursor;
-
-    Query query;
-    Object data;
-    String dataName;
-
-    private QueryProcessor queryProcessor;
-    private SearchVisitor searchVisitor;
-
-
-    public Results() {
-    }
-
-
-    public Results( Results r ) {
-        if ( r != null ) {
-            level = r.level;
-
-            id = r.id;
-            ids = r.ids;
-            idSet = r.idSet;
-
-            ref = r.ref;
-            refs = r.refs;
-            refsMap = r.refsMap;
-            refsByType = r.refsByType;
-
-            entity = r.entity;
-            entities = r.entities;
-            entitiesMap = r.entitiesMap;
-            entitiesByType = r.entitiesByType;
-
-            connections = r.connections;
-            forwardConnections = r.forwardConnections;
-
-            counters = r.counters;
-
-            types = r.types;
-
-            metadata = r.metadata;
-            metadataMerged = r.metadataMerged;
-
-            nextResult = r.nextResult;
-            cursor = r.cursor;
-
-            query = r.query;
-            data = r.data;
-            dataName = r.dataName;
-        }
-    }
-
-
-    public void init() {
-        level = Level.IDS;
-
-        id = null;
-        ids = null;
-        idSet = null;
-
-        ref = null;
-        refs = null;
-        refsMap = null;
-        refsByType = null;
-
-        entity = null;
-        entities = null;
-        entitiesMap = null;
-        entitiesByType = null;
-
-        connections = null;
-        forwardConnections = true;
-
-        counters = null;
-
-        types = null;
-
-        // metadata = null;
-        metadataMerged = false;
-
-        query = null;
-        data = null;
-        dataName = null;
-    }
-
-
-    public static Results fromIdList( List<UUID> l ) {
-        Results r = new Results();
-        r.setIds( l );
-        return r;
-    }
-
-
-    public static Results fromIdList( List<UUID> l, String type ) {
-        if ( type == null ) {
-            return fromIdList( l );
-        }
-        List<EntityRef> refs = new ArrayList<EntityRef>();
-        for ( UUID u : l ) {
-            refs.add( ref( type, u ) );
-        }
-        Results r = new Results();
-        r.setRefs( refs );
-        return r;
-    }
-
-
-    public static Results fromId( UUID id ) {
-        Results r = new Results();
-        if ( id != null ) {
-            List<UUID> l = new ArrayList<UUID>();
-            l.add( id );
-            r.setIds( l );
-        }
-        return r;
-    }
-
-
-    public static Results fromRefList( List<EntityRef> l ) {
-        Results r = new Results();
-        r.setRefs( l );
-        return r;
-    }
-
-
-    public static Results fromEntities( List<? extends Entity> l ) {
-        Results r = new Results();
-        r.setEntities( l );
-        return r;
-    }
-
-
-    public static Results fromEntity( Entity e ) {
-        Results r = new Results();
-        r.setEntity( e );
-        return r;
-    }
-
-
-    public static Results fromRef( EntityRef ref ) {
-        if ( ref instanceof Entity ) {
-            return fromEntity( ( Entity ) ref );
-        }
-        Results r = new Results();
-        r.setRef( ref );
-        return r;
-    }
-
-
-    public static Results fromData( Object obj ) {
-        Results r = new Results();
-        r.setData( obj );
-        return r;
-    }
-
-
-    public static Results fromCounters( AggregateCounterSet counters ) {
-        Results r = new Results();
-        List<AggregateCounterSet> l = new ArrayList<AggregateCounterSet>();
-        l.add( counters );
-        r.setCounters( l );
-        return r;
-    }
-
-
-    public static Results fromCounters( List<AggregateCounterSet> counters ) {
-        Results r = new Results();
-        r.setCounters( counters );
-        return r;
-    }
-
-
-    @SuppressWarnings("unchecked")
-    public static Results fromConnections( List<? extends ConnectionRef> connections ) {
-        Results r = new Results();
-        r.setConnections( ( List<ConnectionRef> ) connections, true );
-        return r;
-    }
-
-
-    @SuppressWarnings("unchecked")
-    public static Results fromConnections( List<? extends ConnectionRef> connections, boolean forward ) {
-        Results r = new Results();
-        r.setConnections( ( List<ConnectionRef> ) connections, forward );
-        return r;
-    }
-
-
-    public Level getLevel() {
-        return level;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public Query getQuery() {
-        return query;
-    }
-
-
-    public void setQuery( Query query ) {
-        this.query = query;
-    }
-
-
-    public Results withQuery( Query query ) {
-        this.query = query;
-        return this;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public UUID getId() {
-        if ( id != null ) {
-            return id;
-        }
-        if ( entity != null ) {
-            id = entity.getUuid();
-            return id;
-        }
-        if ( ( ids != null ) && ( ids.size() > 0 ) ) {
-            id = ids.get( 0 );
-            return id;
-        }
-        if ( ( entities != null ) && ( entities.size() > 0 ) ) {
-            entity = entities.get( 0 );
-            id = entity.getUuid();
-            return id;
-        }
-        if ( ( refs != null ) && ( refs.size() > 0 ) ) {
-            EntityRef ref = refs.get( 0 );
-            id = ref.getUuid();
-        }
-        return id;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public List<UUID> getIds() {
-        if ( ids != null ) {
-            return ids;
-        }
-        /*
-         * if (connectionTypeAndEntityTypeToEntityIdMap != null) { ids = new
-         * ArrayList<UUID>(); Set<UUID> entitySet = new LinkedHashSet<UUID>();
-         * for (String ctype : connectionTypeAndEntityTypeToEntityIdMap
-         * .keySet()) { Map<String, List<UUID>> m =
-         * connectionTypeAndEntityTypeToEntityIdMap .get(ctype); for (String
-         * etype : m.keySet()) { List<UUID> l = m.get(etype); for (UUID id : l)
-         * { if (!entitySet.contains(id)) { ids.add(id); } } } } return ids; }
-         */
-        if ( connections != null ) {
-            ids = new ArrayList<UUID>();
-            for ( ConnectionRef connection : connections ) {
-                if ( forwardConnections ) {
-                    ConnectedEntityRef c = connection.getConnectedEntity();
-                    if ( c != null ) {
-                        ids.add( c.getUuid() );
-                    }
-                }
-                else {
-                    EntityRef c = connection.getConnectingEntity();
-                    if ( c != null ) {
-                        ids.add( c.getUuid() );
-                    }
-                }
-            }
-            return ids;
-        }
-        if ( ( entities != null )
-        /* || (connectionTypeAndEntityTypeToEntityMap != null) */ ) {
-            // getEntities();
-            ids = new ArrayList<UUID>();
-            for ( Entity entity : entities ) {
-                ids.add( entity.getUuid() );
-            }
-            return ids;
-        }
-        if ( refs != null ) {
-            ids = new ArrayList<UUID>();
-            for ( EntityRef ref : refs ) {
-                ids.add( ref.getUuid() );
-            }
-            return ids;
-        }
-        if ( id != null ) {
-            ids = new ArrayList<UUID>();
-            ids.add( id );
-            return ids;
-        }
-        if ( entity != null ) {
-            ids = new ArrayList<UUID>();
-            ids.add( entity.getUuid() );
-            return ids;
-        }
-        return new ArrayList<UUID>();
-    }
-
-
-    public void setIds( List<UUID> resultsIds ) {
-        init();
-        ids = resultsIds;
-        level = Level.IDS;
-    }
-
-
-    public Results withIds( List<UUID> resultsIds ) {
-        setIds( resultsIds );
-        return this;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public Set<UUID> getIdSet() {
-        if ( idSet != null ) {
-            return idSet;
-        }
-        getIds();
-        if ( ids != null ) {
-            idSet = new LinkedHashSet<UUID>();
-            idSet.addAll( ids );
-            return idSet;
-        }
-        return new LinkedHashSet<UUID>();
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    @SuppressWarnings("unchecked")
-    public List<EntityRef> getRefs() {
-        if ( refs != null ) {
-            return refs;
-        }
-        List<?> l = getEntities();
-        if ( ( l != null ) && ( l.size() > 0 ) ) {
-            return ( List<EntityRef> ) l;
-        }
-        if ( connections != null ) {
-            refs = new ArrayList<EntityRef>();
-            for ( ConnectionRef connection : connections ) {
-                if ( forwardConnections ) {
-                    ConnectedEntityRef c = connection.getConnectedEntity();
-                    if ( c != null ) {
-                        refs.add( c );
-                    }
-                }
-                else {
-                    EntityRef c = connection.getConnectingEntity();
-                    if ( c != null ) {
-                        refs.add( c );
-                    }
-                }
-            }
-            return refs;
-        }
-        if ( ref != null ) {
-            refs = new ArrayList<EntityRef>();
-            refs.add( ref );
-            return refs;
-        }
-        return new ArrayList<EntityRef>();
-    }
-
-
-    public void setRefs( List<EntityRef> resultsRefs ) {
-        init();
-        refs = resultsRefs;
-        level = Level.REFS;
-    }
-
-
-    public Results withRefs( List<EntityRef> resultsRefs ) {
-        setRefs( resultsRefs );
-        return this;
-    }
-
-
-    public void setRef( EntityRef ref ) {
-        init();
-        this.ref = ref;
-        level = Level.REFS;
-    }
-
-
-    public Results withRef( EntityRef ref ) {
-        setRef( ref );
-        return this;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public EntityRef getRef() {
-        if ( ref != null ) {
-            return ref;
-        }
-        ref = getEntity();
-        if ( ref != null ) {
-            return ref;
-        }
-        UUID u = getId();
-        if ( u != null ) {
-            return ref( u );
-        }
-        return null;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public Map<UUID, EntityRef> getRefsMap() {
-        if ( refsMap != null ) {
-            return refsMap;
-        }
-        getEntitiesMap();
-        if ( entitiesMap != null ) {
-            refsMap = cast( entitiesMap );
-            return refsMap;
-        }
-        getRefs();
-        if ( refs != null ) {
-            refsMap = new LinkedHashMap<UUID, EntityRef>();
-            for ( EntityRef ref : refs ) {
-                refsMap.put( ref.getUuid(), ref );
-            }
-        }
-        return refsMap;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public Entity getEntity() {
-        mergeEntitiesWithMetadata();
-        if ( entity != null ) {
-            return entity;
-        }
-        if ( ( entities != null ) && ( entities.size() > 0 ) ) {
-            entity = entities.get( 0 );
-            return entity;
-        }
-        return null;
-    }
-
-
-    public void setEntity( Entity resultEntity ) {
-        init();
-        entity = resultEntity;
-        level = Level.CORE_PROPERTIES;
-    }
-
-
-    public Results withEntity( Entity resultEntity ) {
-        setEntity( resultEntity );
-        return this;
-    }
-
-
-    public Iterator<UUID> idIterator() {
-        List<UUID> l = getIds();
-        if ( l != null ) {
-            return l.iterator();
-        }
-        return ( new ArrayList<UUID>( 0 ) ).iterator();
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public List<Entity> getEntities() {
-        mergeEntitiesWithMetadata();
-        if ( entities != null ) {
-            return entities;
-        }
-        /*
-         * if (connectionTypeAndEntityTypeToEntityMap != null) { entities = new
-         * ArrayList<Entity>(); Map<UUID, Entity> eMap = new LinkedHashMap<UUID,
-         * Entity>(); for (String ctype :
-         * connectionTypeAndEntityTypeToEntityMap.keySet()) { Map<String,
-         * List<Entity>> m = connectionTypeAndEntityTypeToEntityMap .get(ctype);
-         * for (String etype : m.keySet()) { List<Entity> l = m.get(etype); for
-         * (Entity e : l) { if (!eMap.containsKey(e.getUuid())) { entities.add(e);
-         * eMap.put(e.getUuid(), e); } } } } return entities; }
-         */
-        if ( entity != null ) {
-            entities = new ArrayList<Entity>();
-            entities.add( entity );
-            return entities;
-        }
-        return new ArrayList<Entity>();
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public Map<UUID, Entity> getEntitiesMap() {
-        if ( entitiesMap != null ) {
-            return entitiesMap;
-        }
-        if ( entities != null ) {
-            entitiesMap = new LinkedHashMap<UUID, Entity>();
-            for ( Entity entity : entities ) {
-                entitiesMap.put( entity.getUuid(), entity );
-            }
-        }
-        return entitiesMap;
-    }
-
-
-    public List<EntityRef> getEntityRefsByType( String type ) {
-        if ( entitiesByType != null ) {
-            return refsByType.get( type );
-        }
-        List<EntityRef> l = cast( getEntitiesByType( type ) );
-        if ( l != null ) {
-            return l;
-        }
-        getRefs();
-        if ( refs == null ) {
-            return null;
-        }
-        refsByType = new LinkedHashMap<String, List<EntityRef>>();
-        for ( Entity entity : entities ) {
-            l = refsByType.get( entity.getType() );
-            if ( l == null ) {
-                l = new ArrayList<EntityRef>();
-                refsByType.put( entity.getType(), l );
-            }
-            l.add( entity );
-        }
-        return l;
-    }
-
-
-    public List<Entity> getEntitiesByType( String type ) {
-        if ( entitiesByType != null ) {
-            return entitiesByType.get( type );
-        }
-        getEntities();
-        if ( entities == null ) {
-            return null;
-        }
-        List<Entity> l = null;
-        entitiesByType = new LinkedHashMap<String, List<Entity>>();
-        for ( Entity entity : entities ) {
-            l = entitiesByType.get( entity.getType() );
-            if ( l == null ) {
-                l = new ArrayList<Entity>();
-                entitiesByType.put( entity.getType(), l );
-            }
-            l.add( entity );
-        }
-        return l;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public Set<String> getTypes() {
-        if ( types != null ) {
-            return types;
-        }
-        getEntityRefsByType( "entity" );
-        if ( entitiesByType != null ) {
-            types = entitiesByType.keySet();
-        }
-        else if ( refsByType != null ) {
-            types = refsByType.keySet();
-        }
-        return types;
-    }
-
-
-    public void merge( Results results ) {
-        getEntitiesMap();
-        results.getEntitiesMap();
-        if ( entitiesMap != null || results.entitiesMap != null ) {
-
-            level = Level.ALL_PROPERTIES;
-
-            // do nothing, nothing to union
-            if ( entitiesMap != null && results.entitiesMap == null ) {
-                return;
-                // other side has the results, assign and return
-            }
-            else if ( entitiesMap == null && results.entitiesMap != null ) {
-                entities = results.entities;
-                return;
-            }
-
-            entitiesMap.putAll( results.entitiesMap );
-            entities = new ArrayList<Entity>( entitiesMap.values() );
-
-            return;
-        }
-
-        getRefsMap();
-        results.getRefsMap();
-        if ( ( refsMap != null ) || ( results.refsMap != null ) ) {
-
-            level = Level.REFS;
-
-            // do nothing, nothing to union
-            if ( refsMap != null && results.refsMap == null ) {
-                return;
-                // other side has the results, assign and return
-            }
-            else if ( refsMap == null && results.refsMap != null ) {
-                refs = results.refs;
-                return;
-            }
-
-            refsMap.putAll( results.refsMap );
-            refs = new ArrayList<EntityRef>( refsMap.values() );
-
-            return;
-        }
-
-        getIdSet();
-        results.getIdSet();
-        if ( ( idSet != null ) && ( results.idSet != null ) ) {
-
-            level = Level.IDS;
-
-            // do nothing, nothing to union
-            if ( idSet != null && results.idSet == null ) {
-                return;
-                // other side has the results, assign and return
-            }
-            else if ( idSet == null && results.idSet != null ) {
-                ids = results.ids;
-                return;
-            }
-
-            idSet.addAll( results.idSet );
-            ids = new ArrayList<UUID>( idSet );
-
-            return;
-        }
-    }
-
-
-    /** Remove the passed in results from the current results */
-    public void subtract( Results results ) {
-        getEntitiesMap();
-        results.getEntitiesMap();
-
-        if ( ( entitiesMap != null ) && ( results.entitiesMap != null ) ) {
-            Map<UUID, Entity> newMap = new LinkedHashMap<UUID, Entity>();
-            for ( Map.Entry<UUID, Entity> e : entitiesMap.entrySet() ) {
-                if ( !results.entitiesMap.containsKey( e.getKey() ) ) {
-                    newMap.put( e.getKey(), e.getValue() );
-                }
-            }
-            entitiesMap = newMap;
-            entities = new ArrayList<Entity>( entitiesMap.values() );
-            level = Level.ALL_PROPERTIES;
-            return;
-        }
-
-        getRefsMap();
-        results.getRefsMap();
-        if ( ( refsMap != null ) && ( results.refsMap != null ) ) {
-            Map<UUID, EntityRef> newMap = new LinkedHashMap<UUID, EntityRef>();
-            for ( Map.Entry<UUID, EntityRef> e : refsMap.entrySet() ) {
-                if ( !results.refsMap.containsKey( e.getKey() ) ) {
-                    newMap.put( e.getKey(), e.getValue() );
-                }
-            }
-            refsMap = newMap;
-            refs = new ArrayList<EntityRef>( refsMap.values() );
-            level = Level.REFS;
-            return;
-        }
-
-        getIdSet();
-        results.getIdSet();
-        if ( ( idSet != null ) && ( results.idSet != null ) ) {
-            Set<UUID> newSet = new LinkedHashSet<UUID>();
-            for ( UUID uuid : idSet ) {
-                if ( !results.idSet.contains( uuid ) ) {
-                    newSet.add( uuid );
-                }
-            }
-            idSet = newSet;
-            ids = new ArrayList<UUID>( idSet );
-            level = Level.IDS;
-            return;
-        }
-    }
-
-
-    /** Perform an intersection of the 2 results */
-    public void and( Results results ) {
-        getEntitiesMap();
-        results.getEntitiesMap();
-
-        if ( ( entitiesMap != null ) && ( results.entitiesMap != null ) ) {
-            Map<UUID, Entity> newMap = new LinkedHashMap<UUID, Entity>();
-            for ( Map.Entry<UUID, Entity> e : entitiesMap.entrySet() ) {
-                if ( results.entitiesMap.containsKey( e.getKey() ) ) {
-                    newMap.put( e.getKey(), e.getValue() );
-                }
-            }
-            entitiesMap = newMap;
-            entities = new ArrayList<Entity>( entitiesMap.values() );
-            level = Level.ALL_PROPERTIES;
-            return;
-        }
-
-        getRefsMap();
-        results.getRefsMap();
-        if ( ( refsMap != null ) && ( results.refsMap != null ) ) {
-            Map<UUID, EntityRef> newMap = new LinkedHashMap<UUID, EntityRef>();
-            for ( Map.Entry<UUID, EntityRef> e : refsMap.entrySet() ) {
-                if ( results.refsMap.containsKey( e.getKey() ) ) {
-                    newMap.put( e.getKey(), e.getValue() );
-                }
-            }
-            refsMap = newMap;
-            refs = new ArrayList<EntityRef>( refsMap.values() );
-            level = Level.REFS;
-            ids = null;
-            return;
-        }
-
-        getIdSet();
-        results.getIdSet();
-        if ( ( idSet != null ) && ( results.idSet != null ) ) {
-            Set<UUID> newSet = new LinkedHashSet<UUID>();
-            for ( UUID uuid : idSet ) {
-                if ( results.idSet.contains( uuid ) ) {
-                    newSet.add( uuid );
-                }
-            }
-            idSet = newSet;
-            ids = new ArrayList<UUID>( idSet );
-            level = Level.IDS;
-            return;
-        }
-
-        // should be empty
-        init();
-    }
-
-
-    public void replace( Entity entity ) {
-        entitiesMap = null;
-        if ( ( this.entity != null ) && ( this.entity.getUuid().equals( entity.getUuid() ) ) ) {
-            this.entity = entity;
-        }
-        if ( entities != null ) {
-            ListIterator<Entity> i = entities.listIterator();
-            while ( i.hasNext() ) {
-                Entity e = i.next();
-                if ( e.getUuid().equals( entity.getUuid() ) ) {
-                    i.set( entity );
-                }
-            }
-        }
-    }
-
-
-    public Results startingFrom( UUID entityId ) {
-        if ( entities != null ) {
-            for ( int i = 0; i < entities.size(); i++ ) {
-                Entity entity = entities.get( i );
-                if ( entityId.equals( entity.getUuid() ) ) {
-                    if ( i == 0 ) {
-                        return this;
-                    }
-                    return Results.fromEntities( entities.subList( i, entities.size() ) );
-                }
-            }
-        }
-        if ( refs != null ) {
-            for ( int i = 0; i < refs.size(); i++ ) {
-                EntityRef entityRef = refs.get( i );
-                if ( entityId.equals( entityRef.getUuid() ) ) {
-                    if ( i == 0 ) {
-                        return this;
-                    }
-                    return Results.fromRefList( refs.subList( i, refs.size() ) );
-                }
-            }
-        }
-        if ( ids != null ) {
-            for ( int i = 0; i < ids.size(); i++ ) {
-                UUID uuid = ids.get( i );
-                if ( entityId.equals( uuid ) ) {
-                    if ( i == 0 ) {
-                        return this;
-                    }
-                    return Results.fromIdList( ids.subList( i, ids.size() ) );
-                }
-            }
-        }
-        return this;
-    }
-
-
-    @SuppressWarnings("unchecked")
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public <E extends Entity> List<E> getList() {
-        List<Entity> l = getEntities();
-        return ( List<E> ) l;
-    }
-
-
-    public <E extends Entity> Iterator<E> iterator( Class<E> cls ) {
-        List<E> l = getList();
-        if ( l != null ) {
-            return l.iterator();
-        }
-        return ( new ArrayList<E>( 0 ) ).iterator();
-    }
-
-
-    @Override
-    public Iterator<Entity> iterator() {
-        List<Entity> l = getEntities();
-        if ( l != null ) {
-            return l.iterator();
-        }
-        return ( new ArrayList<Entity>( 0 ) ).iterator();
-    }
-
-
-    public Results findForProperty( String propertyName, Object propertyValue ) {
-        return findForProperty( propertyName, propertyValue, 1 );
-    }
-
-
-    public Results findForProperty( String propertyName, Object propertyValue, int count ) {
-        if ( propertyValue == null ) {
-            return new Results();
-        }
-        List<Entity> l = getEntities();
-        if ( l == null ) {
-            return new Results();
-        }
-        List<Entity> found = new ArrayList<Entity>();
-        for ( Entity e : l ) {
-            if ( propertyValue.equals( e.getProperty( propertyName ) ) ) {
-                found.add( e );
-                if ( ( count > 0 ) && ( found.size() == count ) ) {
-                    break;
-                }
-            }
-        }
-        return Results.fromEntities( found );
-    }
-
-
-    @SuppressWarnings("unchecked")
-    public void setEntities( List<? extends Entity> resultsEntities ) {
-        init();
-        entities = ( List<Entity> ) resultsEntities;
-        level = Level.CORE_PROPERTIES;
-    }
-
-
-    public Results withEntities( List<? extends Entity> resultsEntities ) {
-        setEntities( resultsEntities );
-        return this;
-    }
-
-
-    public boolean hasConnections() {
-        return connections != null;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public List<ConnectionRef> getConnections() {
-        return connections;
-    }
-
-
-    private void setConnections( List<ConnectionRef> connections, boolean forwardConnections ) {
-        init();
-        this.connections = connections;
-        this.forwardConnections = forwardConnections;
-        level = Level.REFS;
-        for ( ConnectionRef connection : connections ) {
-            if ( forwardConnections ) {
-                this.setMetadata( connection.getConnectedEntity().getUuid(), "connection",
-                        connection.getConnectionType() );
-            }
-            else {
-                this.setMetadata( connection.getConnectingEntity().getUuid(), "connection",
-                        connection.getConnectionType() );
-            }
-        }
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public Object getObject() {
-        if ( data != null ) {
-            return data;
-        }
-        if ( entities != null ) {
-            return entities;
-        }
-        if ( ids != null ) {
-            return ids;
-        }
-        if ( entity != null ) {
-            return entity;
-        }
-        if ( id != null ) {
-            return id;
-        }
-        if ( counters != null ) {
-            return counters;
-        }
-        return null;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public String getObjectName() {
-        if ( dataName != null ) {
-            return dataName;
-        }
-        if ( entities != null ) {
-            return "entities";
-        }
-        if ( ids != null ) {
-            return "ids";
-        }
-        if ( entity != null ) {
-            return "entity";
-        }
-        if ( id != null ) {
-            return "id";
-        }
-        return null;
-    }
-
-
-    public void setDataName( String dataName ) {
-        this.dataName = dataName;
-    }
-
-
-    public Results withDataName( String dataName ) {
-        this.dataName = dataName;
-        return this;
-    }
-
-
-    public boolean hasData() {
-        return data != null;
-    }
-
-
-    public void setData( Object data ) {
-        this.data = data;
-    }
-
-
-    public Results withData( Object data ) {
-        this.data = data;
-        return this;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public Object getData() {
-        return data;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public List<AggregateCounterSet> getCounters() {
-        return counters;
-    }
-
-
-    public void setCounters( List<AggregateCounterSet> counters ) {
-        this.counters = counters;
-    }
-
-
-    public Results withCounters( List<AggregateCounterSet> counters ) {
-        this.counters = counters;
-        return this;
-    }
-
-
-    public int size() {
-        if ( entities != null ) {
-            return entities.size();
-        }
-        if ( refs != null ) {
-            return refs.size();
-        }
-        if ( ids != null ) {
-            return ids.size();
-        }
-        if ( entity != null ) {
-            return 1;
-        }
-        if ( ref != null ) {
-            return 1;
-        }
-        if ( id != null ) {
-            return 1;
-        }
-        return 0;
-    }
-
-
-    public boolean isEmpty() {
-        return size() == 0;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public UUID getNextResult() {
-        return nextResult;
-    }
-
-
-    public Results excludeCursorMetadataAttribute() {
-        if ( metadata != null ) {
-            for ( Entry<UUID, Map<String, Object>> entry : metadata.entrySet() ) {
-                Map<String, Object> map = entry.getValue();
-                if ( map != null ) {
-                    map.remove( Schema.PROPERTY_CURSOR );
-                }
-            }
-        }
-        return new Results( this );
-    }
-
-
-    public Results trim( int count ) {
-        if ( count == 0 ) {
-            return this;
-        }
-
-        int size = size();
-        if ( size <= count ) {
-            return this;
-        }
-
-        List<UUID> ids = getIds();
-        UUID nextResult = null;
-        String cursor = null;
-        if ( ids.size() > count ) {
-            nextResult = ids.get( count );
-            ids = ids.subList( 0, count );
-            if ( metadata != null ) {
-                cursor = StringUtils.toString( MapUtils.getMapMap( metadata, nextResult, "cursor" ) );
-            }
-            if ( cursor == null ) {
-                cursor = encodeBase64URLSafeString( bytes( nextResult ) );
-            }
-        }
-
-        Results r = new Results( this );
-        if ( r.entities != null ) {
-            r.entities = r.entities.subList( 0, count );
-        }
-        if ( r.refs != null ) {
-            r.refs = r.refs.subList( 0, count );
-        }
-        if ( r.ids != null ) {
-            r.ids = r.ids.subList( 0, count );
-        }
-        r.setNextResult( nextResult );
-        r.setCursor( cursor );
-
-        return r;
-    }
-
-
-    public boolean hasMoreResults() {
-        return nextResult != null;
-    }
-
-
-    public void setNextResult( UUID nextResult ) {
-        this.nextResult = nextResult;
-    }
-
-
-    public Results withNextResult( UUID nextResult ) {
-        this.nextResult = nextResult;
-        return this;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public String getCursor() {
-        return cursor;
-    }
-
-
-    public boolean hasCursor() {
-        return cursor != null && cursor.length() > 0;
-    }
-
-
-    public void setCursor( String cursor ) {
-        this.cursor = cursor;
-    }
-
-
-    public Results withCursor( String cursor ) {
-        this.cursor = cursor;
-        return this;
-    }
-
-
-    public void setMetadata( UUID id, String name, Object value ) {
-        if ( metadata == null ) {
-            metadata = new LinkedHashMap<UUID, Map<String, Object>>();
-        }
-        Map<String, Object> entityMetadata = metadata.get( id );
-        if ( entityMetadata == null ) {
-            entityMetadata = new LinkedHashMap<String, Object>();
-            metadata.put( id, entityMetadata );
-        }
-        entityMetadata.put( name, value );
-        metadataMerged = false;
-        // updateIndex(id, name, value);
-    }
-
-
-    public Results withMetadata( UUID id, String name, Object value ) {
-        setMetadata( id, name, value );
-        return this;
-    }
-
-
-    public void setMetadata( UUID id, Map<String, Object> data ) {
-        if ( metadata == null ) {
-            metadata = new LinkedHashMap<UUID, Map<String, Object>>();
-        }
-        Map<String, Object> entityMetadata = metadata.get( id );
-        if ( entityMetadata == null ) {
-            entityMetadata = new LinkedHashMap<String, Object>();
-            metadata.put( id, entityMetadata );
-        }
-        entityMetadata.putAll( data );
-        metadataMerged = false;
-        /*
-         * for (Entry<String, Object> m : data.entrySet()) { updateIndex(id,
-         * m.getKey(), m.getValue()); }
-         */
-    }
-
-
-    public Results withMetadata( UUID id, Map<String, Object> data ) {
-        setMetadata( id, data );
-        return this;
-    }
-
-
-    public void setMetadata( Map<UUID, Map<String, Object>> metadata ) {
-        this.metadata = metadata;
-    }
-
-
-    public Results withMetadata( Map<UUID, Map<String, Object>> metadata ) {
-        this.metadata = metadata;
-        return this;
-    }
-
-
-    public void mergeEntitiesWithMetadata() {
-        if ( metadataMerged ) {
-            return;
-        }
-        if ( metadata == null ) {
-            return;
-        }
-        metadataMerged = true;
-        getEntities();
-        if ( entities != null ) {
-            for ( Entity entity : entities ) {
-                entity.clearMetadata();
-                Map<String, Object> entityMetadata = metadata.get( entity.getUuid() );
-                if ( entityMetadata != null ) {
-                    entity.mergeMetadata( entityMetadata );
-                }
-            }
-        }
-    }
-
-
-    protected QueryProcessor getQueryProcessor() {
-        return queryProcessor;
-    }
-
-
-    public void setQueryProcessor( QueryProcessor queryProcessor ) {
-        this.queryProcessor = queryProcessor;
-    }
-
-
-    public void setSearchVisitor( SearchVisitor searchVisitor ) {
-        this.searchVisitor = searchVisitor;
-    }
-
-
-    /** uses cursor to get next batch of Results (returns null if no cursor) */
-    public Results getNextPageResults() throws Exception {
-        if ( !hasCursor() ) {
-            return null;
-        }
-
-        Query q = new Query( query );
-        q.setCursor( getCursor() );
-        queryProcessor.setQuery( q );
-
-        return queryProcessor.getResults( searchVisitor );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/RoleRef.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/RoleRef.java b/stack/core/src/main/java/org/usergrid/persistence/RoleRef.java
deleted file mode 100644
index 9b1fe5b..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/RoleRef.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence;
-
-
-import java.util.UUID;
-
-
-public interface RoleRef extends EntityRef {
-
-    public UUID getGroupId();
-
-    public EntityRef getGroupRef();
-
-    public String getRoleName();
-
-    public String getApplicationRoleName();
-}


[70/96] [abbrv] USERGRID-2 package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/index-files/index-6.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/index-files/index-6.html b/sdks/android/doc/index-files/index-6.html
index 285f851..d5e729d 100644
--- a/sdks/android/doc/index-files/index-6.html
+++ b/sdks/android/doc/index-files/index-6.html
@@ -83,411 +83,411 @@ function windowTitle()
 <B>G</B></H2>
 <DL>
 <DT><A HREF="../org/usergrid/android/client/Client.html#getAccessToken()"><B>getAccessToken()</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getAccessToken()"><B>getAccessToken()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getAction()"><B>getAction()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#getActor()"><B>getActor()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.html#getApiUrl()"><B>getApiUrl()</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getApplication()"><B>getApplication()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.html#getApplicationId()"><B>getApplicationId()</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getApplications()"><B>getApplications()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#getAttachments()"><B>getAttachments()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#getAuthor()"><B>getAuthor()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/utils/JsonUtils.html#getBooleanProperty(java.util.Map, java.lang.String)"><B>getBooleanProperty(Map&lt;String, JsonNode&gt;, String)</B></A> - 
-Static method in class org.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.usergrid.android.client.utils">JsonUtils</A>
+Static method in class org.apache.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.apache.usergrid.android.client.utils">JsonUtils</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#getCategory()"><B>getCategory()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Message.html#getCategory()"><B>getCategory()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html#getCategory()"><B>getCategory()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response">AggregateCounterSet</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response">AggregateCounterSet</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.html#getClientId()"><B>getClientId()</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.html#getClientSecret()"><B>getClientSecret()</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getConsumer()"><B>getConsumer()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#getContent()"><B>getContent()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#getContent()"><B>getContent()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Message.html#getCorrelationId()"><B>getCorrelationId()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getCounters()"><B>getCounters()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getCredentials()"><B>getCredentials()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.html#getCurrentOrganization()"><B>getCurrentOrganization()</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getCursor()"><B>getCursor()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getData()"><B>getData()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Message.html#getDestination()"><B>getDestination()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/utils/DeviceUuidFactory.html#getDeviceUuid()"><B>getDeviceUuid()</B></A> - 
-Method in class org.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/DeviceUuidFactory.html" title="class in org.usergrid.android.client.utils">DeviceUuidFactory</A>
+Method in class org.apache.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/DeviceUuidFactory.html" title="class in org.apache.usergrid.android.client.utils">DeviceUuidFactory</A>
 <DD>Returns a unique UUID for the current android device.
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#getDisplayName()"><B>getDisplayName()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#getDownstreamDuplicates()"><B>getDownstreamDuplicates()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html#getDuration()"><B>getDuration()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html#getDynamicProperties()"><B>getDynamicProperties()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.usergrid.android.client.entities">Activity.ActivityCollection</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityCollection</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#getDynamicProperties()"><B>getDynamicProperties()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html#getDynamicProperties()"><B>getDynamicProperties()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#getEmail()"><B>getEmail()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getEntities()"><B>getEntities()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getEntities(java.lang.Class)"><B>getEntities(Class&lt;T&gt;)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getEntityCount()"><B>getEntityCount()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#getEntityType()"><B>getEntityType()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getError()"><B>getError()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getErrorDescription()"><B>getErrorDescription()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getErrorUri()"><B>getErrorUri()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getException()"><B>getException()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getFirstEntity()"><B>getFirstEntity()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getFirstEntity(java.lang.Class)"><B>getFirstEntity(Class&lt;T&gt;)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getFirstMessage()"><B>getFirstMessage()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#getFirstname()"><B>getFirstname()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getFirstQueue()"><B>getFirstQueue()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#getGenerator()"><B>getGenerator()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html#getGroup()"><B>getGroup()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response">AggregateCounterSet</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response">AggregateCounterSet</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.html#getGroupsForUser(java.lang.String)"><B>getGroupsForUser(String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Get the groups for the user.
-<DT><A HREF="../org/usergrid/android/client/Client.html#getGroupsForUserAsync(java.lang.String, org.usergrid.android.client.callbacks.GroupsRetrievedCallback)"><B>getGroupsForUserAsync(String, GroupsRetrievedCallback)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#getGroupsForUserAsync(java.lang.String, org.apache.usergrid.android.client.callbacks.GroupsRetrievedCallback)"><B>getGroupsForUserAsync(String, GroupsRetrievedCallback)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Get the groups for the user.
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html#getHeight()"><B>getHeight()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#getIcon()"><B>getIcon()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#getId()"><B>getId()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ClientCredentialsInfo.html#getId()"><B>getId()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response">ClientCredentialsInfo</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response">ClientCredentialsInfo</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#getImage()"><B>getImage()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html#getItems()"><B>getItems()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.usergrid.android.client.entities">Activity.ActivityCollection</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityCollection</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getLast()"><B>getLast()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getLastEntity()"><B>getLastEntity()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getLastEntity(java.lang.Class)"><B>getLastEntity(Class&lt;T&gt;)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getLastMessage()"><B>getLastMessage()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#getLastname()"><B>getLastname()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getLastQueue()"><B>getLastQueue()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getLastQueueId()"><B>getLastQueueId()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getList()"><B>getList()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.html#getLoggedInUser()"><B>getLoggedInUser()</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/utils/JsonUtils.html#getLongProperty(java.util.Map, java.lang.String)"><B>getLongProperty(Map&lt;String, JsonNode&gt;, String)</B></A> - 
-Static method in class org.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.usergrid.android.client.utils">JsonUtils</A>
+Static method in class org.apache.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.apache.usergrid.android.client.utils">JsonUtils</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getMessageCount()"><B>getMessageCount()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/Client.html#getMessages(java.lang.String, java.lang.String, java.util.UUID, java.lang.Long, java.lang.Integer, java.lang.Integer, java.lang.Integer, org.usergrid.android.client.Client.QueuePosition, java.lang.Boolean, java.lang.Boolean)"><B>getMessages(String, String, UUID, Long, Integer, Integer, Integer, Client.QueuePosition, Boolean, Boolean)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#getMessages(java.lang.String, java.lang.String, java.util.UUID, java.lang.Long, java.lang.Integer, java.lang.Integer, java.lang.Integer, org.apache.usergrid.android.client.Client.QueuePosition, java.lang.Boolean, java.lang.Boolean)"><B>getMessages(String, String, UUID, Long, Integer, Integer, Integer, Client.QueuePosition, Boolean, Boolean)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getMessages()"><B>getMessages()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getMetadata()"><B>getMetadata()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#getMiddlename()"><B>getMiddlename()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Device.html#getName()"><B>getName()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities">Device</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities">Device</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#getName()"><B>getName()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html#getName()"><B>getName()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response">AggregateCounterSet</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response">AggregateCounterSet</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#getNativeType()"><B>getNativeType()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Device.html#getNativeType()"><B>getNativeType()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities">Device</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities">Device</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Entity.html#getNativeType()"><B>getNativeType()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Group.html#getNativeType()"><B>getNativeType()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Message.html#getNativeType()"><B>getNativeType()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#getNativeType()"><B>getNativeType()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getNext()"><B>getNext()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#getObject()"><B>getObject()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/utils/JsonUtils.html#getObjectProperty(java.util.Map, java.lang.String, java.lang.Class)"><B>getObjectProperty(Map&lt;String, JsonNode&gt;, String, Class&lt;T&gt;)</B></A> - 
-Static method in class org.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.usergrid.android.client.utils">JsonUtils</A>
+Static method in class org.apache.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.apache.usergrid.android.client.utils">JsonUtils</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#getObjectType()"><B>getObjectType()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getParams()"><B>getParams()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Group.html#getPath()"><B>getPath()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getPath()"><B>getPath()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/QueueInfo.html#getPath()"><B>getPath()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response">QueueInfo</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response">QueueInfo</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#getPicture()"><B>getPicture()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Entity.html#getProperties()"><B>getProperties()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getProperties()"><B>getProperties()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#getPropertyNames()"><B>getPropertyNames()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Device.html#getPropertyNames()"><B>getPropertyNames()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities">Device</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities">Device</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Entity.html#getPropertyNames()"><B>getPropertyNames()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Group.html#getPropertyNames()"><B>getPropertyNames()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Message.html#getPropertyNames()"><B>getPropertyNames()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#getPropertyNames()"><B>getPropertyNames()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#getPublished()"><B>getPublished()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#getPublished()"><B>getPublished()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html#getQueue()"><B>getQueue()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response">AggregateCounterSet</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response">AggregateCounterSet</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getQueue()"><B>getQueue()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/QueueInfo.html#getQueue()"><B>getQueue()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response">QueueInfo</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response">QueueInfo</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getQueues()"><B>getQueues()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Message.html#getReplyTo()"><B>getReplyTo()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.Query.html#getResponse()"><B>getResponse()</B></A> - 
-Method in interface org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A>
+Method in interface org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ClientCredentialsInfo.html#getSecret()"><B>getSecret()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response">ClientCredentialsInfo</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response">ClientCredentialsInfo</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getStatus()"><B>getStatus()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/utils/JsonUtils.html#getStringProperty(java.util.Map, java.lang.String)"><B>getStringProperty(Map&lt;String, JsonNode&gt;, String)</B></A> - 
-Static method in class org.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.usergrid.android.client.utils">JsonUtils</A>
+Static method in class org.apache.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.apache.usergrid.android.client.utils">JsonUtils</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#getSummary()"><B>getSummary()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Message.html#getTimestamp()"><B>getTimestamp()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/AggregateCounter.html#getTimestamp()"><B>getTimestamp()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response">AggregateCounter</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response">AggregateCounter</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getTimestamp()"><B>getTimestamp()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#getTitle()"><B>getTitle()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Group.html#getTitle()"><B>getTitle()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html#getTotalItems()"><B>getTotalItems()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.usergrid.android.client.entities">Activity.ActivityCollection</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityCollection</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Entity.html#getType()"><B>getType()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#getUpdated()"><B>getUpdated()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#getUpstreamDuplicates()"><B>getUpstreamDuplicates()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getUri()"><B>getUri()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html#getUrl()"><B>getUrl()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.usergrid.android.client.entities">Activity.ActivityCollection</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityCollection</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#getUrl()"><B>getUrl()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html#getUrl()"><B>getUrl()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html#getUser()"><B>getUser()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response">AggregateCounterSet</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response">AggregateCounterSet</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getUser()"><B>getUser()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#getUsername()"><B>getUsername()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#getUuid()"><B>getUuid()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Entity.html#getUuid()"><B>getUuid()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/utils/JsonUtils.html#getUUIDProperty(java.util.Map, java.lang.String)"><B>getUUIDProperty(Map&lt;String, JsonNode&gt;, String)</B></A> - 
-Static method in class org.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.usergrid.android.client.utils">JsonUtils</A>
+Static method in class org.apache.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.apache.usergrid.android.client.utils">JsonUtils</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/AggregateCounter.html#getValue()"><B>getValue()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response">AggregateCounter</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response">AggregateCounter</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html#getValues()"><B>getValues()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response">AggregateCounterSet</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response">AggregateCounterSet</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#getVerb()"><B>getVerb()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html#getWidth()"><B>getWidth()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities"><B>Group</B></A> - Class in <A HREF="../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/entities/Group.html#Group()"><B>Group()</B></A> - 
-Constructor for class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A>
+<DT><A HREF="../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities"><B>Group</B></A> - Class in <A HREF="../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/entities/Group.html#Group()"><B>Group()</B></A> - 
+Constructor for class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/entities/Group.html#Group(org.usergrid.android.client.entities.Entity)"><B>Group(Entity)</B></A> - 
-Constructor for class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A>
+<DT><A HREF="../org/usergrid/android/client/entities/Group.html#Group(org.apache.usergrid.android.client.entities.Entity)"><B>Group(Entity)</B></A> - 
+Constructor for class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>GroupsRetrievedCallback</B></A> - Interface in <A HREF="../org/usergrid/android/client/callbacks/package-summary.html">org.usergrid.android.client.callbacks</A><DD>&nbsp;</DL>
+<DT><A HREF="../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>GroupsRetrievedCallback</B></A> - Interface in <A HREF="../org/usergrid/android/client/callbacks/package-summary.html">org.apache.usergrid.android.client.callbacks</A><DD>&nbsp;</DL>
 <HR>
 
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/index-files/index-7.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/index-files/index-7.html b/sdks/android/doc/index-files/index-7.html
index 86bbfd7..e06a61c 100644
--- a/sdks/android/doc/index-files/index-7.html
+++ b/sdks/android/doc/index-files/index-7.html
@@ -83,7 +83,7 @@ function windowTitle()
 <B>H</B></H2>
 <DL>
 <DT><A HREF="../org/usergrid/android/client/Client.html#httpRequest(org.springframework.http.HttpMethod, java.lang.Class, java.util.Map, java.lang.Object, java.lang.String...)"><B>httpRequest(HttpMethod, Class&lt;T&gt;, Map&lt;String, Object&gt;, Object, String...)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Low-level HTTP request method.
 </DL>
 <HR>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/index-files/index-8.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/index-files/index-8.html b/sdks/android/doc/index-files/index-8.html
index caaef14..1be6d98 100644
--- a/sdks/android/doc/index-files/index-8.html
+++ b/sdks/android/doc/index-files/index-8.html
@@ -83,22 +83,22 @@ function windowTitle()
 <B>I</B></H2>
 <DL>
 <DT><A HREF="../org/usergrid/android/client/Client.html#init()"><B>init()</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#isActivated()"><B>isActivated()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#isDisabled()"><B>isDisabled()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/utils/ObjectUtils.html#isEmpty(java.lang.Object)"><B>isEmpty(Object)</B></A> - 
-Static method in class org.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.usergrid.android.client.utils">ObjectUtils</A>
+Static method in class org.apache.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.apache.usergrid.android.client.utils">ObjectUtils</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Message.html#isIndexed()"><B>isIndexed()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Message.html#isPersistent()"><B>isPersistent()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <DD>&nbsp;
 </DL>
 <HR>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/index-files/index-9.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/index-files/index-9.html b/sdks/android/doc/index-files/index-9.html
index bbcb461..418e059 100644
--- a/sdks/android/doc/index-files/index-9.html
+++ b/sdks/android/doc/index-files/index-9.html
@@ -82,8 +82,8 @@ function windowTitle()
 <A NAME="_J_"><!-- --></A><H2>
 <B>J</B></H2>
 <DL>
-<DT><A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.usergrid.android.client.utils"><B>JsonUtils</B></A> - Class in <A HREF="../org/usergrid/android/client/utils/package-summary.html">org.usergrid.android.client.utils</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/utils/JsonUtils.html#JsonUtils()"><B>JsonUtils()</B></A> - 
-Constructor for class org.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.usergrid.android.client.utils">JsonUtils</A>
+<DT><A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.apache.usergrid.android.client.utils"><B>JsonUtils</B></A> - Class in <A HREF="../org/usergrid/android/client/utils/package-summary.html">org.apache.usergrid.android.client.utils</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/utils/JsonUtils.html#JsonUtils()"><B>JsonUtils()</B></A> - 
+Constructor for class org.apache.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.apache.usergrid.android.client.utils">JsonUtils</A>
 <DD>&nbsp;
 </DL>
 <HR>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/Client.Query.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/Client.Query.html b/sdks/android/doc/org/usergrid/android/client/Client.Query.html
index 260d515..0221b70 100644
--- a/sdks/android/doc/org/usergrid/android/client/Client.Query.html
+++ b/sdks/android/doc/org/usergrid/android/client/Client.Query.html
@@ -55,8 +55,8 @@ function windowTitle()
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../index.html?org/usergrid/android/client/Client.Query.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="Client.Query.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
@@ -88,11 +88,11 @@ DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHO
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client</FONT>
+org.apache.usergrid.android.client</FONT>
 <BR>
 Interface Client.Query</H2>
 <DL>
-<DT><B>Enclosing class:</B><DD><A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A></DD>
+<DT><B>Enclosing class:</B><DD><A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A></DD>
 </DL>
 <HR>
 <DL>
@@ -114,7 +114,7 @@ Interface Client.Query</H2>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.Query.html#getResponse()">getResponse</A></B>()</CODE>
 
 <BR>
@@ -130,7 +130,7 @@ Interface Client.Query</H2>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.Query.html#next()">next</A></B>()</CODE>
 
 <BR>
@@ -153,7 +153,7 @@ Interface Client.Query</H2>
 <A NAME="getResponse()"><!-- --></A><H3>
 getResponse</H3>
 <PRE>
-<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A> <B>getResponse</B>()</PRE>
+<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A> <B>getResponse</B>()</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -175,7 +175,7 @@ boolean <B>more</B>()</PRE>
 <A NAME="next()"><!-- --></A><H3>
 next</H3>
 <PRE>
-<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A> <B>next</B>()</PRE>
+<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A> <B>next</B>()</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -212,8 +212,8 @@ next</H3>
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../index.html?org/usergrid/android/client/Client.Query.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="Client.Query.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;


[67/96] [abbrv] USERGRID-2 package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/callbacks/ApiResponseCallback.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/callbacks/ApiResponseCallback.html b/sdks/android/doc/org/usergrid/android/client/callbacks/ApiResponseCallback.html
index 25cc622..5122c6d 100644
--- a/sdks/android/doc/org/usergrid/android/client/callbacks/ApiResponseCallback.html
+++ b/sdks/android/doc/org/usergrid/android/client/callbacks/ApiResponseCallback.html
@@ -56,7 +56,7 @@ function windowTitle()
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 &nbsp;PREV CLASS&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.usergrid.android.client.callbacks"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.apache.usergrid.android.client.callbacks"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/callbacks/ApiResponseCallback.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="ApiResponseCallback.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
@@ -88,15 +88,15 @@ DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHO
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client.callbacks</FONT>
+org.apache.usergrid.android.client.callbacks</FONT>
 <BR>
 Interface ApiResponseCallback</H2>
 <DL>
-<DT><B>All Superinterfaces:</B> <DD><A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks">ClientCallback</A>&lt;<A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>&gt;</DD>
+<DT><B>All Superinterfaces:</B> <DD><A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ClientCallback</A>&lt;<A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>&gt;</DD>
 </DL>
 <HR>
 <DL>
-<DT><PRE>public interface <B>ApiResponseCallback</B><DT>extends <A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks">ClientCallback</A>&lt;<A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>&gt;</DL>
+<DT><PRE>public interface <B>ApiResponseCallback</B><DT>extends <A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ClientCallback</A>&lt;<A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>&gt;</DL>
 </PRE>
 
 <P>
@@ -115,7 +115,7 @@ Interface ApiResponseCallback</H2>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html#onResponse(org.usergrid.android.client.response.ApiResponse)">onResponse</A></B>(<A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>&nbsp;response)</CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html#onResponse(org.apache.usergrid.android.client.response.ApiResponse)">onResponse</A></B>(<A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>&nbsp;response)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -124,7 +124,7 @@ Interface ApiResponseCallback</H2>
 &nbsp;<A NAME="methods_inherited_from_class_org.usergrid.android.client.callbacks.ClientCallback"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left"><B>Methods inherited from interface org.usergrid.android.client.callbacks.<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks">ClientCallback</A></B></TH>
+<TH ALIGN="left"><B>Methods inherited from interface org.apache.usergrid.android.client.callbacks.<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ClientCallback</A></B></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD><CODE><A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html#onException(java.lang.Exception)">onException</A></CODE></TD>
@@ -143,13 +143,13 @@ Interface ApiResponseCallback</H2>
 </TR>
 </TABLE>
 
-<A NAME="onResponse(org.usergrid.android.client.response.ApiResponse)"><!-- --></A><H3>
+<A NAME="onResponse(org.apache.usergrid.android.client.response.ApiResponse)"><!-- --></A><H3>
 onResponse</H3>
 <PRE>
-void <B>onResponse</B>(<A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>&nbsp;response)</PRE>
+void <B>onResponse</B>(<A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>&nbsp;response)</PRE>
 <DL>
 <DD><DL>
-<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html#onResponse(T)">onResponse</A></CODE> in interface <CODE><A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks">ClientCallback</A>&lt;<A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>&gt;</CODE></DL>
+<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html#onResponse(T)">onResponse</A></CODE> in interface <CODE><A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ClientCallback</A>&lt;<A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>&gt;</CODE></DL>
 </DD>
 <DD><DL>
 </DL>
@@ -187,7 +187,7 @@ void <B>onResponse</B>(<A HREF="../../../../../org/usergrid/android/client/respo
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 &nbsp;PREV CLASS&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.usergrid.android.client.callbacks"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.apache.usergrid.android.client.callbacks"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/callbacks/ApiResponseCallback.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="ApiResponseCallback.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/callbacks/ClientAsyncTask.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/callbacks/ClientAsyncTask.html b/sdks/android/doc/org/usergrid/android/client/callbacks/ClientAsyncTask.html
index 480f46a..0f662d0 100644
--- a/sdks/android/doc/org/usergrid/android/client/callbacks/ClientAsyncTask.html
+++ b/sdks/android/doc/org/usergrid/android/client/callbacks/ClientAsyncTask.html
@@ -55,8 +55,8 @@ function windowTitle()
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/callbacks/ClientAsyncTask.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="ClientAsyncTask.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
@@ -88,13 +88,13 @@ DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&n
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client.callbacks</FONT>
+org.apache.usergrid.android.client.callbacks</FONT>
 <BR>
 Class ClientAsyncTask&lt;T&gt;</H2>
 <PRE>
 java.lang.Object
   <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by ">android.os.AsyncTask&lt;java.lang.Void,java.lang.Exception,T&gt;
-      <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.usergrid.android.client.callbacks.ClientAsyncTask&lt;T&gt;</B>
+      <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.usergrid.android.client.callbacks.ClientAsyncTask&lt;T&gt;</B>
 </PRE>
 <HR>
 <DL>
@@ -134,7 +134,7 @@ java.lang.Object
 <B>Constructor Summary</B></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/callbacks/ClientAsyncTask.html#ClientAsyncTask(org.usergrid.android.client.callbacks.ClientCallback)">ClientAsyncTask</A></B>(<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks">ClientCallback</A>&lt;<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="type parameter in ClientAsyncTask">T</A>&gt;&nbsp;callback)</CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/callbacks/ClientAsyncTask.html#ClientAsyncTask(org.apache.usergrid.android.client.callbacks.ClientCallback)">ClientAsyncTask</A></B>(<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ClientCallback</A>&lt;<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="type parameter in ClientAsyncTask">T</A>&gt;&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -189,10 +189,10 @@ java.lang.Object
 </TR>
 </TABLE>
 
-<A NAME="ClientAsyncTask(org.usergrid.android.client.callbacks.ClientCallback)"><!-- --></A><H3>
+<A NAME="ClientAsyncTask(org.apache.usergrid.android.client.callbacks.ClientCallback)"><!-- --></A><H3>
 ClientAsyncTask</H3>
 <PRE>
-public <B>ClientAsyncTask</B>(<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks">ClientCallback</A>&lt;<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="type parameter in ClientAsyncTask">T</A>&gt;&nbsp;callback)</PRE>
+public <B>ClientAsyncTask</B>(<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ClientCallback</A>&lt;<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="type parameter in ClientAsyncTask">T</A>&gt;&nbsp;callback)</PRE>
 <DL>
 </DL>
 
@@ -246,8 +246,8 @@ public abstract <A HREF="../../../../../org/usergrid/android/client/callbacks/Cl
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/callbacks/ClientAsyncTask.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="ClientAsyncTask.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/callbacks/ClientCallback.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/callbacks/ClientCallback.html b/sdks/android/doc/org/usergrid/android/client/callbacks/ClientCallback.html
index 8826b25..49bf79e 100644
--- a/sdks/android/doc/org/usergrid/android/client/callbacks/ClientCallback.html
+++ b/sdks/android/doc/org/usergrid/android/client/callbacks/ClientCallback.html
@@ -55,8 +55,8 @@ function windowTitle()
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.usergrid.android.client.callbacks"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.apache.usergrid.android.client.callbacks"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/callbacks/ClientCallback.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="ClientCallback.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
@@ -88,11 +88,11 @@ DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHO
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client.callbacks</FONT>
+org.apache.usergrid.android.client.callbacks</FONT>
 <BR>
 Interface ClientCallback&lt;T&gt;</H2>
 <DL>
-<DT><B>All Known Subinterfaces:</B> <DD><A HREF="../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>, <A HREF="../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.usergrid.android.client.callbacks">DeviceRegistrationCallback</A>, <A HREF="../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.usergrid.android.client.callbacks">GroupsRetrievedCallback</A>, <A HREF="../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks">QueryResultsCallback</A></DD>
+<DT><B>All Known Subinterfaces:</B> <DD><A HREF="../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>, <A HREF="../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">DeviceRegistrationCallback</A>, <A HREF="../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">GroupsRetrievedCallback</A>, <A HREF="../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">QueryResultsCallback</A></DD>
 </DL>
 <HR>
 <DL>
@@ -193,8 +193,8 @@ void <B>onException</B>(java.lang.Exception&nbsp;e)</PRE>
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.usergrid.android.client.callbacks"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.apache.usergrid.android.client.callbacks"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/callbacks/ClientCallback.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="ClientCallback.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html b/sdks/android/doc/org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html
index ae96890..5f93d99 100644
--- a/sdks/android/doc/org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html
+++ b/sdks/android/doc/org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html
@@ -55,8 +55,8 @@ function windowTitle()
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="DeviceRegistrationCallback.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
@@ -88,15 +88,15 @@ DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHO
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client.callbacks</FONT>
+org.apache.usergrid.android.client.callbacks</FONT>
 <BR>
 Interface DeviceRegistrationCallback</H2>
 <DL>
-<DT><B>All Superinterfaces:</B> <DD><A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks">ClientCallback</A>&lt;<A HREF="../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities">Device</A>&gt;</DD>
+<DT><B>All Superinterfaces:</B> <DD><A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ClientCallback</A>&lt;<A HREF="../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities">Device</A>&gt;</DD>
 </DL>
 <HR>
 <DL>
-<DT><PRE>public interface <B>DeviceRegistrationCallback</B><DT>extends <A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks">ClientCallback</A>&lt;<A HREF="../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities">Device</A>&gt;</DL>
+<DT><PRE>public interface <B>DeviceRegistrationCallback</B><DT>extends <A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ClientCallback</A>&lt;<A HREF="../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities">Device</A>&gt;</DL>
 </PRE>
 
 <P>
@@ -115,7 +115,7 @@ Interface DeviceRegistrationCallback</H2>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html#onDeviceRegistration(org.usergrid.android.client.entities.Device)">onDeviceRegistration</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities">Device</A>&nbsp;device)</CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html#onDeviceRegistration(org.apache.usergrid.android.client.entities.Device)">onDeviceRegistration</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities">Device</A>&nbsp;device)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -124,7 +124,7 @@ Interface DeviceRegistrationCallback</H2>
 &nbsp;<A NAME="methods_inherited_from_class_org.usergrid.android.client.callbacks.ClientCallback"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left"><B>Methods inherited from interface org.usergrid.android.client.callbacks.<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks">ClientCallback</A></B></TH>
+<TH ALIGN="left"><B>Methods inherited from interface org.apache.usergrid.android.client.callbacks.<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ClientCallback</A></B></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD><CODE><A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html#onException(java.lang.Exception)">onException</A>, <A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html#onResponse(T)">onResponse</A></CODE></TD>
@@ -143,10 +143,10 @@ Interface DeviceRegistrationCallback</H2>
 </TR>
 </TABLE>
 
-<A NAME="onDeviceRegistration(org.usergrid.android.client.entities.Device)"><!-- --></A><H3>
+<A NAME="onDeviceRegistration(org.apache.usergrid.android.client.entities.Device)"><!-- --></A><H3>
 onDeviceRegistration</H3>
 <PRE>
-void <B>onDeviceRegistration</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities">Device</A>&nbsp;device)</PRE>
+void <B>onDeviceRegistration</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities">Device</A>&nbsp;device)</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -186,8 +186,8 @@ void <B>onDeviceRegistration</B>(<A HREF="../../../../../org/usergrid/android/cl
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="DeviceRegistrationCallback.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html b/sdks/android/doc/org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html
index 20bf35f..8e6bede 100644
--- a/sdks/android/doc/org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html
+++ b/sdks/android/doc/org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html
@@ -55,8 +55,8 @@ function windowTitle()
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="GroupsRetrievedCallback.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
@@ -88,15 +88,15 @@ DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHO
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client.callbacks</FONT>
+org.apache.usergrid.android.client.callbacks</FONT>
 <BR>
 Interface GroupsRetrievedCallback</H2>
 <DL>
-<DT><B>All Superinterfaces:</B> <DD><A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks">ClientCallback</A>&lt;java.util.Map&lt;java.lang.String,<A HREF="../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A>&gt;&gt;</DD>
+<DT><B>All Superinterfaces:</B> <DD><A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ClientCallback</A>&lt;java.util.Map&lt;java.lang.String,<A HREF="../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A>&gt;&gt;</DD>
 </DL>
 <HR>
 <DL>
-<DT><PRE>public interface <B>GroupsRetrievedCallback</B><DT>extends <A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks">ClientCallback</A>&lt;java.util.Map&lt;java.lang.String,<A HREF="../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A>&gt;&gt;</DL>
+<DT><PRE>public interface <B>GroupsRetrievedCallback</B><DT>extends <A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ClientCallback</A>&lt;java.util.Map&lt;java.lang.String,<A HREF="../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A>&gt;&gt;</DL>
 </PRE>
 
 <P>
@@ -115,7 +115,7 @@ Interface GroupsRetrievedCallback</H2>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html#onGroupsRetrieved(java.util.Map)">onGroupsRetrieved</A></B>(java.util.Map&lt;java.lang.String,<A HREF="../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A>&gt;&nbsp;groups)</CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html#onGroupsRetrieved(java.util.Map)">onGroupsRetrieved</A></B>(java.util.Map&lt;java.lang.String,<A HREF="../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A>&gt;&nbsp;groups)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -124,7 +124,7 @@ Interface GroupsRetrievedCallback</H2>
 &nbsp;<A NAME="methods_inherited_from_class_org.usergrid.android.client.callbacks.ClientCallback"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left"><B>Methods inherited from interface org.usergrid.android.client.callbacks.<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks">ClientCallback</A></B></TH>
+<TH ALIGN="left"><B>Methods inherited from interface org.apache.usergrid.android.client.callbacks.<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ClientCallback</A></B></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD><CODE><A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html#onException(java.lang.Exception)">onException</A>, <A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html#onResponse(T)">onResponse</A></CODE></TD>
@@ -146,7 +146,7 @@ Interface GroupsRetrievedCallback</H2>
 <A NAME="onGroupsRetrieved(java.util.Map)"><!-- --></A><H3>
 onGroupsRetrieved</H3>
 <PRE>
-void <B>onGroupsRetrieved</B>(java.util.Map&lt;java.lang.String,<A HREF="../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A>&gt;&nbsp;groups)</PRE>
+void <B>onGroupsRetrieved</B>(java.util.Map&lt;java.lang.String,<A HREF="../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A>&gt;&nbsp;groups)</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -186,8 +186,8 @@ void <B>onGroupsRetrieved</B>(java.util.Map&lt;java.lang.String,<A HREF="../../.
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="GroupsRetrievedCallback.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/callbacks/QueryResultsCallback.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/callbacks/QueryResultsCallback.html b/sdks/android/doc/org/usergrid/android/client/callbacks/QueryResultsCallback.html
index 800bc6e..8a9abdd 100644
--- a/sdks/android/doc/org/usergrid/android/client/callbacks/QueryResultsCallback.html
+++ b/sdks/android/doc/org/usergrid/android/client/callbacks/QueryResultsCallback.html
@@ -55,7 +55,7 @@ function windowTitle()
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>PREV CLASS</B></A>&nbsp;
 &nbsp;NEXT CLASS</FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/callbacks/QueryResultsCallback.html" target="_top"><B>FRAMES</B></A>  &nbsp;
@@ -88,15 +88,15 @@ DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHO
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client.callbacks</FONT>
+org.apache.usergrid.android.client.callbacks</FONT>
 <BR>
 Interface QueryResultsCallback</H2>
 <DL>
-<DT><B>All Superinterfaces:</B> <DD><A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks">ClientCallback</A>&lt;<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A>&gt;</DD>
+<DT><B>All Superinterfaces:</B> <DD><A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ClientCallback</A>&lt;<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A>&gt;</DD>
 </DL>
 <HR>
 <DL>
-<DT><PRE>public interface <B>QueryResultsCallback</B><DT>extends <A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks">ClientCallback</A>&lt;<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A>&gt;</DL>
+<DT><PRE>public interface <B>QueryResultsCallback</B><DT>extends <A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ClientCallback</A>&lt;<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A>&gt;</DL>
 </PRE>
 
 <P>
@@ -115,7 +115,7 @@ Interface QueryResultsCallback</H2>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html#onQueryResults(org.usergrid.android.client.Client.Query)">onQueryResults</A></B>(<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A>&nbsp;query)</CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html#onQueryResults(org.apache.usergrid.android.client.Client.Query)">onQueryResults</A></B>(<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A>&nbsp;query)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -124,7 +124,7 @@ Interface QueryResultsCallback</H2>
 &nbsp;<A NAME="methods_inherited_from_class_org.usergrid.android.client.callbacks.ClientCallback"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left"><B>Methods inherited from interface org.usergrid.android.client.callbacks.<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks">ClientCallback</A></B></TH>
+<TH ALIGN="left"><B>Methods inherited from interface org.apache.usergrid.android.client.callbacks.<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ClientCallback</A></B></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD><CODE><A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html#onException(java.lang.Exception)">onException</A>, <A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html#onResponse(T)">onResponse</A></CODE></TD>
@@ -143,10 +143,10 @@ Interface QueryResultsCallback</H2>
 </TR>
 </TABLE>
 
-<A NAME="onQueryResults(org.usergrid.android.client.Client.Query)"><!-- --></A><H3>
+<A NAME="onQueryResults(org.apache.usergrid.android.client.Client.Query)"><!-- --></A><H3>
 onQueryResults</H3>
 <PRE>
-void <B>onQueryResults</B>(<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A>&nbsp;query)</PRE>
+void <B>onQueryResults</B>(<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A>&nbsp;query)</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -186,7 +186,7 @@ void <B>onQueryResults</B>(<A HREF="../../../../../org/usergrid/android/client/C
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>PREV CLASS</B></A>&nbsp;
 &nbsp;NEXT CLASS</FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/callbacks/QueryResultsCallback.html" target="_top"><B>FRAMES</B></A>  &nbsp;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/ApiResponseCallback.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/ApiResponseCallback.html b/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/ApiResponseCallback.html
index 4a6de9e..56c40c8 100644
--- a/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/ApiResponseCallback.html
+++ b/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/ApiResponseCallback.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Interface org.usergrid.android.client.callbacks.ApiResponseCallback
+Uses of Interface org.apache.usergrid.android.client.callbacks.ApiResponseCallback
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Interface org.usergrid.android.client.callbacks.ApiResponseCallback
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Interface org.usergrid.android.client.callbacks.ApiResponseCallback";
+        parent.document.title="Uses of Interface org.apache.usergrid.android.client.callbacks.ApiResponseCallback";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,26 +81,26 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Interface<br>org.usergrid.android.client.callbacks.ApiResponseCallback</B></H2>
+<B>Uses of Interface<br>org.apache.usergrid.android.client.callbacks.ApiResponseCallback</B></H2>
 </CENTER>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Packages that use <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A></FONT></TH>
+Packages that use <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client"><B>org.usergrid.android.client</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client"><B>org.apache.usergrid.android.client</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A> in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A></FONT></TH>
+Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A> in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -108,14 +108,14 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResp
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#addUserToGroupAsync(java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">addUserToGroupAsync</A></B>(java.lang.String&nbsp;userId,
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#addUserToGroupAsync(java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">addUserToGroupAsync</A></B>(java.lang.String&nbsp;userId,
                     java.lang.String&nbsp;groupId,
-                    <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+                    <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a user to the specified groups.</TD>
@@ -123,9 +123,9 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResp
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#authorizeAppClientAsync(java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">authorizeAppClientAsync</A></B>(java.lang.String&nbsp;clientId,
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#authorizeAppClientAsync(java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">authorizeAppClientAsync</A></B>(java.lang.String&nbsp;clientId,
                         java.lang.String&nbsp;clientSecret,
-                        <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+                        <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Log the app in with it's client id and client secret key.</TD>
@@ -133,9 +133,9 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResp
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#authorizeAppUserAsync(java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">authorizeAppUserAsync</A></B>(java.lang.String&nbsp;email,
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#authorizeAppUserAsync(java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">authorizeAppUserAsync</A></B>(java.lang.String&nbsp;email,
                       java.lang.String&nbsp;password,
-                      <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+                      <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Log the user in and get a valid access token.</TD>
@@ -143,8 +143,8 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResp
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#authorizeAppUserViaFacebookAsync(java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">authorizeAppUserViaFacebookAsync</A></B>(java.lang.String&nbsp;fb_access_token,
-                                 <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#authorizeAppUserViaFacebookAsync(java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">authorizeAppUserViaFacebookAsync</A></B>(java.lang.String&nbsp;fb_access_token,
+                                 <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Log the user in with their numeric pin-code and get a valid access token.</TD>
@@ -152,9 +152,9 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResp
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#authorizeAppUserViaPinAsync(java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">authorizeAppUserViaPinAsync</A></B>(java.lang.String&nbsp;email,
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#authorizeAppUserViaPinAsync(java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">authorizeAppUserViaPinAsync</A></B>(java.lang.String&nbsp;email,
                             java.lang.String&nbsp;pin,
-                            <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+                            <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Log the user in with their numeric pin-code and get a valid access token.</TD>
@@ -162,11 +162,11 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResp
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#connectEntitiesAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">connectEntitiesAsync</A></B>(java.lang.String&nbsp;connectingEntityType,
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#connectEntitiesAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">connectEntitiesAsync</A></B>(java.lang.String&nbsp;connectingEntityType,
                      java.lang.String&nbsp;connectingEntityId,
                      java.lang.String&nbsp;connectionType,
                      java.lang.String&nbsp;connectedEntityId,
-                     <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+                     <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Connect two entities together.</TD>
@@ -174,8 +174,8 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResp
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#createEntityAsync(org.usergrid.android.client.entities.Entity, org.usergrid.android.client.callbacks.ApiResponseCallback)">createEntityAsync</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;entity,
-                  <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#createEntityAsync(org.apache.usergrid.android.client.entities.Entity, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">createEntityAsync</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;entity,
+                  <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a new entity on the server.</TD>
@@ -183,8 +183,8 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResp
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#createEntityAsync(java.util.Map, org.usergrid.android.client.callbacks.ApiResponseCallback)">createEntityAsync</A></B>(java.util.Map&lt;java.lang.String,java.lang.Object&gt;&nbsp;properties,
-                  <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#createEntityAsync(java.util.Map, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">createEntityAsync</A></B>(java.util.Map&lt;java.lang.String,java.lang.Object&gt;&nbsp;properties,
+                  <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a new entity on the server from a set of properties.</TD>
@@ -192,8 +192,8 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResp
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#createGroupAsync(java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">createGroupAsync</A></B>(java.lang.String&nbsp;groupPath,
-                 <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#createGroupAsync(java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">createGroupAsync</A></B>(java.lang.String&nbsp;groupPath,
+                 <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a group with the specified group path.</TD>
@@ -201,9 +201,9 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResp
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#createGroupAsync(java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">createGroupAsync</A></B>(java.lang.String&nbsp;groupPath,
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#createGroupAsync(java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">createGroupAsync</A></B>(java.lang.String&nbsp;groupPath,
                  java.lang.String&nbsp;groupTitle,
-                 <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+                 <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a group with the specified group path and group title.</TD>
@@ -211,11 +211,11 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResp
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#createUserAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">createUserAsync</A></B>(java.lang.String&nbsp;username,
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#createUserAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">createUserAsync</A></B>(java.lang.String&nbsp;username,
                 java.lang.String&nbsp;name,
                 java.lang.String&nbsp;email,
                 java.lang.String&nbsp;password,
-                <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+                <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a user.</TD>
@@ -223,11 +223,11 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResp
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#disconnectEntitiesAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">disconnectEntitiesAsync</A></B>(java.lang.String&nbsp;connectingEntityType,
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#disconnectEntitiesAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">disconnectEntitiesAsync</A></B>(java.lang.String&nbsp;connectingEntityType,
                         java.lang.String&nbsp;connectingEntityId,
                         java.lang.String&nbsp;connectionType,
                         java.lang.String&nbsp;connectedEntityId,
-                        <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+                        <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Disconnect two entities.</TD>
@@ -235,16 +235,16 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResp
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postGroupActivityAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.entities.User, org.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">postGroupActivityAsync</A></B>(java.lang.String&nbsp;verb,
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postGroupActivityAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.entities.User, org.apache.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">postGroupActivityAsync</A></B>(java.lang.String&nbsp;verb,
                        java.lang.String&nbsp;title,
                        java.lang.String&nbsp;content,
                        java.lang.String&nbsp;category,
-                       <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>&nbsp;user,
-                       <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;object,
+                       <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>&nbsp;user,
+                       <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;object,
                        java.lang.String&nbsp;objectType,
                        java.lang.String&nbsp;objectName,
                        java.lang.String&nbsp;objectContent,
-                       <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+                       <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates and posts an activity to a group.</TD>
@@ -252,16 +252,16 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResp
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postUserActivityAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.entities.User, org.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">postUserActivityAsync</A></B>(java.lang.String&nbsp;verb,
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postUserActivityAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.entities.User, org.apache.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">postUserActivityAsync</A></B>(java.lang.String&nbsp;verb,
                       java.lang.String&nbsp;title,
                       java.lang.String&nbsp;content,
                       java.lang.String&nbsp;category,
-                      <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>&nbsp;user,
-                      <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;object,
+                      <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>&nbsp;user,
+                      <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;object,
                       java.lang.String&nbsp;objectType,
                       java.lang.String&nbsp;objectName,
                       java.lang.String&nbsp;objectContent,
-                      <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+                      <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates and posts an activity to a user.</TD>
@@ -283,7 +283,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResp
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/ClientAsyncTask.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/ClientAsyncTask.html b/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/ClientAsyncTask.html
index fc35304..36368ed 100644
--- a/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/ClientAsyncTask.html
+++ b/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/ClientAsyncTask.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Class org.usergrid.android.client.callbacks.ClientAsyncTask
+Uses of Class org.apache.usergrid.android.client.callbacks.ClientAsyncTask
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Class org.usergrid.android.client.callbacks.ClientAsyncTask
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Class org.usergrid.android.client.callbacks.ClientAsyncTask";
+        parent.document.title="Uses of Class org.apache.usergrid.android.client.callbacks.ClientAsyncTask";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.usergrid.android.client.callbacks"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.apache.usergrid.android.client.callbacks"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,9 +81,9 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Class<br>org.usergrid.android.client.callbacks.ClientAsyncTask</B></H2>
+<B>Uses of Class<br>org.apache.usergrid.android.client.callbacks.ClientAsyncTask</B></H2>
 </CENTER>
-No usage of org.usergrid.android.client.callbacks.ClientAsyncTask
+No usage of org.apache.usergrid.android.client.callbacks.ClientAsyncTask
 <P>
 <HR>
 
@@ -99,7 +99,7 @@ No usage of org.usergrid.android.client.callbacks.ClientAsyncTask
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.usergrid.android.client.callbacks"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.apache.usergrid.android.client.callbacks"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/ClientCallback.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/ClientCallback.html b/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/ClientCallback.html
index 555d8ba..76ca0f0 100644
--- a/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/ClientCallback.html
+++ b/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/ClientCallback.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Interface org.usergrid.android.client.callbacks.ClientCallback
+Uses of Interface org.apache.usergrid.android.client.callbacks.ClientCallback
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Interface org.usergrid.android.client.callbacks.ClientCallback
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Interface org.usergrid.android.client.callbacks.ClientCallback";
+        parent.document.title="Uses of Interface org.apache.usergrid.android.client.callbacks.ClientCallback";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,26 +81,26 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Interface<br>org.usergrid.android.client.callbacks.ClientCallback</B></H2>
+<B>Uses of Interface<br>org.apache.usergrid.android.client.callbacks.ClientCallback</B></H2>
 </CENTER>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Packages that use <A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks">ClientCallback</A></FONT></TH>
+Packages that use <A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ClientCallback</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client.callbacks"><B>org.usergrid.android.client.callbacks</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client.callbacks"><B>org.apache.usergrid.android.client.callbacks</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client.callbacks"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client.callbacks"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks">ClientCallback</A> in <A HREF="../../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.usergrid.android.client.callbacks</A></FONT></TH>
+Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ClientCallback</A> in <A HREF="../../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.apache.usergrid.android.client.callbacks</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -108,12 +108,12 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientC
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Subinterfaces of <A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks">ClientCallback</A> in <A HREF="../../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.usergrid.android.client.callbacks</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Subinterfaces of <A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ClientCallback</A> in <A HREF="../../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.apache.usergrid.android.client.callbacks</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;interface</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A></B></CODE>
+<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A></B></CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -121,7 +121,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientC
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;interface</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.usergrid.android.client.callbacks">DeviceRegistrationCallback</A></B></CODE>
+<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">DeviceRegistrationCallback</A></B></CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -129,7 +129,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientC
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;interface</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.usergrid.android.client.callbacks">GroupsRetrievedCallback</A></B></CODE>
+<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">GroupsRetrievedCallback</A></B></CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -137,7 +137,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientC
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;interface</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks">QueryResultsCallback</A></B></CODE>
+<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">QueryResultsCallback</A></B></CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -148,10 +148,10 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientC
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Constructors in <A HREF="../../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.usergrid.android.client.callbacks</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks">ClientCallback</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Constructors in <A HREF="../../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.apache.usergrid.android.client.callbacks</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ClientCallback</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientAsyncTask.html#ClientAsyncTask(org.usergrid.android.client.callbacks.ClientCallback)">ClientAsyncTask</A></B>(<A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks">ClientCallback</A>&lt;<A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="type parameter in ClientAsyncTask">T</A>&gt;&nbsp;callback)</CODE>
+<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientAsyncTask.html#ClientAsyncTask(org.apache.usergrid.android.client.callbacks.ClientCallback)">ClientAsyncTask</A></B>(<A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ClientCallback</A>&lt;<A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="type parameter in ClientAsyncTask">T</A>&gt;&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -173,7 +173,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientC
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>


[95/96] [abbrv] git commit: USERGRID-2 package namespace to org.apache.usergrid

Posted by sn...@apache.org.
USERGRID-2 package namespace to org.apache.usergrid


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

Branch: refs/pull/39/head
Commit: 3ccbfd8a68dceebd8d19af40586c38a4d74ed2c3
Parents: b8c01f3
Author: Lewis John McGibbney <le...@apache.org>
Authored: Tue Jan 28 21:38:56 2014 +0000
Committer: Lewis John McGibbney <le...@apache.org>
Committed: Tue Jan 28 21:38:56 2014 +0000

----------------------------------------------------------------------
 sdks/android/README.txt                         |    4 +-
 sdks/android/doc/allclasses-frame.html          |   56 +-
 sdks/android/doc/allclasses-noframe.html        |   56 +-
 sdks/android/doc/constant-values.html           |  180 +--
 sdks/android/doc/index-files/index-1.html       |   72 +-
 sdks/android/doc/index-files/index-10.html      |    6 +-
 sdks/android/doc/index-files/index-11.html      |   14 +-
 sdks/android/doc/index-files/index-12.html      |    8 +-
 sdks/android/doc/index-files/index-13.html      |   60 +-
 sdks/android/doc/index-files/index-14.html      |   96 +-
 sdks/android/doc/index-files/index-15.html      |   62 +-
 sdks/android/doc/index-files/index-16.html      |    8 +-
 sdks/android/doc/index-files/index-17.html      |  238 ++--
 sdks/android/doc/index-files/index-18.html      |   30 +-
 sdks/android/doc/index-files/index-19.html      |   16 +-
 sdks/android/doc/index-files/index-2.html       |   54 +-
 sdks/android/doc/index-files/index-20.html      |   64 +-
 sdks/android/doc/index-files/index-21.html      |    8 +-
 sdks/android/doc/index-files/index-3.html       |   20 +-
 sdks/android/doc/index-files/index-4.html       |   18 +-
 sdks/android/doc/index-files/index-5.html       |    6 +-
 sdks/android/doc/index-files/index-6.html       |  280 ++--
 sdks/android/doc/index-files/index-7.html       |    2 +-
 sdks/android/doc/index-files/index-8.html       |   12 +-
 sdks/android/doc/index-files/index-9.html       |    4 +-
 .../usergrid/android/client/Client.Query.html   |   20 +-
 .../android/client/Client.QueuePosition.html    |   38 +-
 .../doc/org/usergrid/android/client/Client.html |  440 +++---
 .../client/callbacks/ApiResponseCallback.html   |   20 +-
 .../client/callbacks/ClientAsyncTask.html       |   18 +-
 .../client/callbacks/ClientCallback.html        |   12 +-
 .../callbacks/DeviceRegistrationCallback.html   |   22 +-
 .../callbacks/GroupsRetrievedCallback.html      |   20 +-
 .../client/callbacks/QueryResultsCallback.html  |   18 +-
 .../class-use/ApiResponseCallback.html          |   84 +-
 .../callbacks/class-use/ClientAsyncTask.html    |   12 +-
 .../callbacks/class-use/ClientCallback.html     |   32 +-
 .../class-use/DeviceRegistrationCallback.html   |   24 +-
 .../class-use/GroupsRetrievedCallback.html      |   24 +-
 .../class-use/QueryResultsCallback.html         |   52 +-
 .../android/client/callbacks/package-frame.html |   16 +-
 .../client/callbacks/package-summary.html       |   18 +-
 .../android/client/callbacks/package-tree.html  |   12 +-
 .../android/client/callbacks/package-use.html   |   30 +-
 .../android/client/class-use/Client.Query.html  |   52 +-
 .../client/class-use/Client.QueuePosition.html  |   34 +-
 .../android/client/class-use/Client.html        |   28 +-
 .../entities/Activity.ActivityCollection.html   |   24 +-
 .../entities/Activity.ActivityObject.html       |   44 +-
 .../client/entities/Activity.MediaLink.html     |   14 +-
 .../android/client/entities/Activity.html       |  206 +--
 .../android/client/entities/Device.html         |   36 +-
 .../android/client/entities/Entity.html         |   40 +-
 .../usergrid/android/client/entities/Group.html |   38 +-
 .../android/client/entities/Message.html        |   50 +-
 .../usergrid/android/client/entities/User.html  |   48 +-
 .../class-use/Activity.ActivityCollection.html  |   12 +-
 .../class-use/Activity.ActivityObject.html      |   46 +-
 .../entities/class-use/Activity.MediaLink.html  |   30 +-
 .../client/entities/class-use/Activity.html     |   48 +-
 .../client/entities/class-use/Device.html       |   32 +-
 .../client/entities/class-use/Entity.html       |  156 +--
 .../client/entities/class-use/Group.html        |   32 +-
 .../client/entities/class-use/Message.html      |   30 +-
 .../android/client/entities/class-use/User.html |   88 +-
 .../android/client/entities/package-frame.html  |   22 +-
 .../client/entities/package-summary.html        |   24 +-
 .../android/client/entities/package-tree.html   |   10 +-
 .../android/client/entities/package-use.html    |   62 +-
 .../usergrid/android/client/package-frame.html  |   10 +-
 .../android/client/package-summary.html         |   12 +-
 .../usergrid/android/client/package-tree.html   |   12 +-
 .../usergrid/android/client/package-use.html    |   28 +-
 .../client/response/AggregateCounter.html       |    8 +-
 .../client/response/AggregateCounterSet.html    |   28 +-
 .../android/client/response/ApiResponse.html    |  100 +-
 .../client/response/ClientCredentialsInfo.html  |   12 +-
 .../android/client/response/QueueInfo.html      |    8 +-
 .../response/class-use/AggregateCounter.html    |   32 +-
 .../response/class-use/AggregateCounterSet.html |   26 +-
 .../client/response/class-use/ApiResponse.html  |  102 +-
 .../class-use/ClientCredentialsInfo.html        |   26 +-
 .../client/response/class-use/QueueInfo.html    |   32 +-
 .../android/client/response/package-frame.html  |   14 +-
 .../client/response/package-summary.html        |   16 +-
 .../android/client/response/package-tree.html   |    8 +-
 .../android/client/response/package-use.html    |   38 +-
 .../android/client/utils/DeviceUuidFactory.html |    8 +-
 .../android/client/utils/JsonUtils.html         |   12 +-
 .../usergrid/android/client/utils/MapUtils.html |   12 +-
 .../android/client/utils/ObjectUtils.html       |   12 +-
 .../usergrid/android/client/utils/UrlUtils.html |    8 +-
 .../utils/class-use/DeviceUuidFactory.html      |   12 +-
 .../client/utils/class-use/JsonUtils.html       |   12 +-
 .../client/utils/class-use/MapUtils.html        |   12 +-
 .../client/utils/class-use/ObjectUtils.html     |   12 +-
 .../client/utils/class-use/UrlUtils.html        |   12 +-
 .../android/client/utils/package-frame.html     |   14 +-
 .../android/client/utils/package-summary.html   |   16 +-
 .../android/client/utils/package-tree.html      |    8 +-
 .../android/client/utils/package-use.html       |    8 +-
 sdks/android/doc/overview-frame.html            |   10 +-
 sdks/android/doc/overview-summary.html          |   10 +-
 sdks/android/doc/overview-tree.html             |   18 +-
 sdks/android/doc/package-list                   |   10 +-
 sdks/android/pom.xml                            |   11 +-
 .../apache/usergrid/android/client/Client.java  |  591 ++++++++
 .../client/callbacks/ApiResponseCallback.java   |   10 +
 .../client/callbacks/ClientAsyncTask.java       |   38 +
 .../client/callbacks/ClientCallback.java        |    9 +
 .../callbacks/DeviceRegistrationCallback.java   |    9 +
 .../callbacks/GroupsRetrievedCallback.java      |   13 +
 .../client/callbacks/QueryResultsCallback.java  |    9 +
 .../android/client/utils/DeviceUuidFactory.java |  154 +++
 .../android/client/utils/ObjectUtils.java       |   20 +
 .../org/usergrid/android/client/Client.java     |  590 --------
 .../client/callbacks/ApiResponseCallback.java   |   10 -
 .../client/callbacks/ClientAsyncTask.java       |   38 -
 .../client/callbacks/ClientCallback.java        |    9 -
 .../callbacks/DeviceRegistrationCallback.java   |    9 -
 .../callbacks/GroupsRetrievedCallback.java      |   13 -
 .../client/callbacks/QueryResultsCallback.java  |    9 -
 .../android/client/utils/DeviceUuidFactory.java |  154 ---
 .../android/client/utils/ObjectUtils.java       |   20 -
 sdks/java/README.txt                            |    5 +-
 sdks/java/pom.xml                               |    9 +-
 .../org/apache/usergrid/java/client/Client.java | 1277 ++++++++++++++++++
 .../usergrid/java/client/entities/Activity.java |  627 +++++++++
 .../usergrid/java/client/entities/Device.java   |   52 +
 .../usergrid/java/client/entities/Entity.java   |  172 +++
 .../usergrid/java/client/entities/Group.java    |   63 +
 .../usergrid/java/client/entities/Message.java  |  132 ++
 .../usergrid/java/client/entities/User.java     |  142 ++
 .../java/client/exception/ClientException.java  |   40 +
 .../java/client/response/AggregateCounter.java  |   36 +
 .../client/response/AggregateCounterSet.java    |   95 ++
 .../java/client/response/ApiResponse.java       |  406 ++++++
 .../client/response/ClientCredentialsInfo.java  |   42 +
 .../java/client/response/QueueInfo.java         |   28 +
 .../usergrid/java/client/utils/JsonUtils.java   |  167 +++
 .../usergrid/java/client/utils/MapUtils.java    |   23 +
 .../usergrid/java/client/utils/ObjectUtils.java |   20 +
 .../usergrid/java/client/utils/UrlUtils.java    |  108 ++
 .../java/org/usergrid/java/client/Client.java   | 1276 -----------------
 .../usergrid/java/client/entities/Activity.java |  627 ---------
 .../usergrid/java/client/entities/Device.java   |   52 -
 .../usergrid/java/client/entities/Entity.java   |  175 ---
 .../usergrid/java/client/entities/Group.java    |   63 -
 .../usergrid/java/client/entities/Message.java  |  132 --
 .../org/usergrid/java/client/entities/User.java |  142 --
 .../java/client/exception/ClientException.java  |   40 -
 .../java/client/response/AggregateCounter.java  |   36 -
 .../client/response/AggregateCounterSet.java    |   95 --
 .../java/client/response/ApiResponse.java       |  405 ------
 .../client/response/ClientCredentialsInfo.java  |   42 -
 .../java/client/response/QueueInfo.java         |   28 -
 .../usergrid/java/client/utils/JsonUtils.java   |  166 ---
 .../usergrid/java/client/utils/MapUtils.java    |   23 -
 .../usergrid/java/client/utils/ObjectUtils.java |   20 -
 .../usergrid/java/client/utils/UrlUtils.java    |  108 --
 160 files changed, 6395 insertions(+), 6405 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/README.txt
----------------------------------------------------------------------
diff --git a/sdks/android/README.txt b/sdks/android/README.txt
index 5540ba4..056bb49 100644
--- a/sdks/android/README.txt
+++ b/sdks/android/README.txt
@@ -1,7 +1,7 @@
 
-Usergrid Android Client
+Apache Usergrid Android Client
 
-Experimental Android client for Usergrid. Basically uses Spring Android and
+Experimental Android client for Apache Usergrid. Basically uses Spring Android and
 Jackson to wrap calls to Usergrid REST API. Loosely based on the Usergrid
 Javascript client.
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/allclasses-frame.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/allclasses-frame.html b/sdks/android/doc/allclasses-frame.html
index 904fee4..5568794 100644
--- a/sdks/android/doc/allclasses-frame.html
+++ b/sdks/android/doc/allclasses-frame.html
@@ -21,61 +21,61 @@ All Classes
 
 <TABLE BORDER="0" WIDTH="100%" SUMMARY="">
 <TR>
-<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities" target="classFrame">Activity</A>
+<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities" target="classFrame">Activity</A>
 <BR>
-<A HREF="org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.usergrid.android.client.entities" target="classFrame">Activity.ActivityCollection</A>
+<A HREF="org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.apache.usergrid.android.client.entities" target="classFrame">Activity.ActivityCollection</A>
 <BR>
-<A HREF="org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities" target="classFrame">Activity.ActivityObject</A>
+<A HREF="org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities" target="classFrame">Activity.ActivityObject</A>
 <BR>
-<A HREF="org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities" target="classFrame">Activity.MediaLink</A>
+<A HREF="org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities" target="classFrame">Activity.MediaLink</A>
 <BR>
-<A HREF="org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response" target="classFrame">AggregateCounter</A>
+<A HREF="org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response" target="classFrame">AggregateCounter</A>
 <BR>
-<A HREF="org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response" target="classFrame">AggregateCounterSet</A>
+<A HREF="org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response" target="classFrame">AggregateCounterSet</A>
 <BR>
-<A HREF="org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response" target="classFrame">ApiResponse</A>
+<A HREF="org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response" target="classFrame">ApiResponse</A>
 <BR>
-<A HREF="org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks" target="classFrame"><I>ApiResponseCallback</I></A>
+<A HREF="org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks" target="classFrame"><I>ApiResponseCallback</I></A>
 <BR>
-<A HREF="org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client" target="classFrame">Client</A>
+<A HREF="org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client" target="classFrame">Client</A>
 <BR>
-<A HREF="org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client" target="classFrame"><I>Client.Query</I></A>
+<A HREF="org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client" target="classFrame"><I>Client.Query</I></A>
 <BR>
-<A HREF="org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client" target="classFrame">Client.QueuePosition</A>
+<A HREF="org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client" target="classFrame">Client.QueuePosition</A>
 <BR>
-<A HREF="org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.usergrid.android.client.callbacks" target="classFrame">ClientAsyncTask</A>
+<A HREF="org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.apache.usergrid.android.client.callbacks" target="classFrame">ClientAsyncTask</A>
 <BR>
-<A HREF="org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks" target="classFrame"><I>ClientCallback</I></A>
+<A HREF="org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks" target="classFrame"><I>ClientCallback</I></A>
 <BR>
-<A HREF="org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response" target="classFrame">ClientCredentialsInfo</A>
+<A HREF="org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response" target="classFrame">ClientCredentialsInfo</A>
 <BR>
-<A HREF="org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities" target="classFrame">Device</A>
+<A HREF="org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities" target="classFrame">Device</A>
 <BR>
-<A HREF="org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.usergrid.android.client.callbacks" target="classFrame"><I>DeviceRegistrationCallback</I></A>
+<A HREF="org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.apache.usergrid.android.client.callbacks" target="classFrame"><I>DeviceRegistrationCallback</I></A>
 <BR>
-<A HREF="org/usergrid/android/client/utils/DeviceUuidFactory.html" title="class in org.usergrid.android.client.utils" target="classFrame">DeviceUuidFactory</A>
+<A HREF="org/usergrid/android/client/utils/DeviceUuidFactory.html" title="class in org.apache.usergrid.android.client.utils" target="classFrame">DeviceUuidFactory</A>
 <BR>
-<A HREF="org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities" target="classFrame">Entity</A>
+<A HREF="org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities" target="classFrame">Entity</A>
 <BR>
-<A HREF="org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities" target="classFrame">Group</A>
+<A HREF="org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities" target="classFrame">Group</A>
 <BR>
-<A HREF="org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.usergrid.android.client.callbacks" target="classFrame"><I>GroupsRetrievedCallback</I></A>
+<A HREF="org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.apache.usergrid.android.client.callbacks" target="classFrame"><I>GroupsRetrievedCallback</I></A>
 <BR>
-<A HREF="org/usergrid/android/client/utils/JsonUtils.html" title="class in org.usergrid.android.client.utils" target="classFrame">JsonUtils</A>
+<A HREF="org/usergrid/android/client/utils/JsonUtils.html" title="class in org.apache.usergrid.android.client.utils" target="classFrame">JsonUtils</A>
 <BR>
-<A HREF="org/usergrid/android/client/utils/MapUtils.html" title="class in org.usergrid.android.client.utils" target="classFrame">MapUtils</A>
+<A HREF="org/usergrid/android/client/utils/MapUtils.html" title="class in org.apache.usergrid.android.client.utils" target="classFrame">MapUtils</A>
 <BR>
-<A HREF="org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities" target="classFrame">Message</A>
+<A HREF="org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities" target="classFrame">Message</A>
 <BR>
-<A HREF="org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.usergrid.android.client.utils" target="classFrame">ObjectUtils</A>
+<A HREF="org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.apache.usergrid.android.client.utils" target="classFrame">ObjectUtils</A>
 <BR>
-<A HREF="org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks" target="classFrame"><I>QueryResultsCallback</I></A>
+<A HREF="org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks" target="classFrame"><I>QueryResultsCallback</I></A>
 <BR>
-<A HREF="org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response" target="classFrame">QueueInfo</A>
+<A HREF="org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response" target="classFrame">QueueInfo</A>
 <BR>
-<A HREF="org/usergrid/android/client/utils/UrlUtils.html" title="class in org.usergrid.android.client.utils" target="classFrame">UrlUtils</A>
+<A HREF="org/usergrid/android/client/utils/UrlUtils.html" title="class in org.apache.usergrid.android.client.utils" target="classFrame">UrlUtils</A>
 <BR>
-<A HREF="org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities" target="classFrame">User</A>
+<A HREF="org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities" target="classFrame">User</A>
 <BR>
 </FONT></TD>
 </TR>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/allclasses-noframe.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/allclasses-noframe.html b/sdks/android/doc/allclasses-noframe.html
index c174488..0d74cf7 100644
--- a/sdks/android/doc/allclasses-noframe.html
+++ b/sdks/android/doc/allclasses-noframe.html
@@ -21,61 +21,61 @@ All Classes
 
 <TABLE BORDER="0" WIDTH="100%" SUMMARY="">
 <TR>
-<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <BR>
-<A HREF="org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.usergrid.android.client.entities">Activity.ActivityCollection</A>
+<A HREF="org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityCollection</A>
 <BR>
-<A HREF="org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+<A HREF="org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <BR>
-<A HREF="org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A>
+<A HREF="org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A>
 <BR>
-<A HREF="org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response">AggregateCounter</A>
+<A HREF="org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response">AggregateCounter</A>
 <BR>
-<A HREF="org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response">AggregateCounterSet</A>
+<A HREF="org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response">AggregateCounterSet</A>
 <BR>
-<A HREF="org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+<A HREF="org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <BR>
-<A HREF="org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks"><I>ApiResponseCallback</I></A>
+<A HREF="org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><I>ApiResponseCallback</I></A>
 <BR>
-<A HREF="org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<A HREF="org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <BR>
-<A HREF="org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client"><I>Client.Query</I></A>
+<A HREF="org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client"><I>Client.Query</I></A>
 <BR>
-<A HREF="org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A>
+<A HREF="org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A>
 <BR>
-<A HREF="org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.usergrid.android.client.callbacks">ClientAsyncTask</A>
+<A HREF="org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.apache.usergrid.android.client.callbacks">ClientAsyncTask</A>
 <BR>
-<A HREF="org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks"><I>ClientCallback</I></A>
+<A HREF="org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><I>ClientCallback</I></A>
 <BR>
-<A HREF="org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response">ClientCredentialsInfo</A>
+<A HREF="org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response">ClientCredentialsInfo</A>
 <BR>
-<A HREF="org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities">Device</A>
+<A HREF="org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities">Device</A>
 <BR>
-<A HREF="org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.usergrid.android.client.callbacks"><I>DeviceRegistrationCallback</I></A>
+<A HREF="org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><I>DeviceRegistrationCallback</I></A>
 <BR>
-<A HREF="org/usergrid/android/client/utils/DeviceUuidFactory.html" title="class in org.usergrid.android.client.utils">DeviceUuidFactory</A>
+<A HREF="org/usergrid/android/client/utils/DeviceUuidFactory.html" title="class in org.apache.usergrid.android.client.utils">DeviceUuidFactory</A>
 <BR>
-<A HREF="org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>
+<A HREF="org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>
 <BR>
-<A HREF="org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A>
+<A HREF="org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A>
 <BR>
-<A HREF="org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.usergrid.android.client.callbacks"><I>GroupsRetrievedCallback</I></A>
+<A HREF="org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><I>GroupsRetrievedCallback</I></A>
 <BR>
-<A HREF="org/usergrid/android/client/utils/JsonUtils.html" title="class in org.usergrid.android.client.utils">JsonUtils</A>
+<A HREF="org/usergrid/android/client/utils/JsonUtils.html" title="class in org.apache.usergrid.android.client.utils">JsonUtils</A>
 <BR>
-<A HREF="org/usergrid/android/client/utils/MapUtils.html" title="class in org.usergrid.android.client.utils">MapUtils</A>
+<A HREF="org/usergrid/android/client/utils/MapUtils.html" title="class in org.apache.usergrid.android.client.utils">MapUtils</A>
 <BR>
-<A HREF="org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+<A HREF="org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <BR>
-<A HREF="org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.usergrid.android.client.utils">ObjectUtils</A>
+<A HREF="org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.apache.usergrid.android.client.utils">ObjectUtils</A>
 <BR>
-<A HREF="org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks"><I>QueryResultsCallback</I></A>
+<A HREF="org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><I>QueryResultsCallback</I></A>
 <BR>
-<A HREF="org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response">QueueInfo</A>
+<A HREF="org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response">QueueInfo</A>
 <BR>
-<A HREF="org/usergrid/android/client/utils/UrlUtils.html" title="class in org.usergrid.android.client.utils">UrlUtils</A>
+<A HREF="org/usergrid/android/client/utils/UrlUtils.html" title="class in org.apache.usergrid.android.client.utils">UrlUtils</A>
 <BR>
-<A HREF="org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+<A HREF="org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <BR>
 </FONT></TD>
 </TR>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/constant-values.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/constant-values.html b/sdks/android/doc/constant-values.html
index 19caa3a..04435d0 100644
--- a/sdks/android/doc/constant-values.html
+++ b/sdks/android/doc/constant-values.html
@@ -100,352 +100,352 @@ org.usergrid.*</FONT></TH>
 
 <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="3">org.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A></TH>
+<TH ALIGN="left" COLSPAN="3">org.apache.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.ENTITY_TYPE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.ENTITY_TYPE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#ENTITY_TYPE">ENTITY_TYPE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"activity"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.OBJECT_TYPE_ARTICLE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_ARTICLE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_ARTICLE">OBJECT_TYPE_ARTICLE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"article"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.OBJECT_TYPE_AUDIO"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_AUDIO"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_AUDIO">OBJECT_TYPE_AUDIO</A></CODE></TD>
 <TD ALIGN="right"><CODE>"audio"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.OBJECT_TYPE_BADGE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_BADGE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_BADGE">OBJECT_TYPE_BADGE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"badge"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.OBJECT_TYPE_BOOKMARK"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_BOOKMARK"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_BOOKMARK">OBJECT_TYPE_BOOKMARK</A></CODE></TD>
 <TD ALIGN="right"><CODE>"bookmark"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.OBJECT_TYPE_COLLECTION"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_COLLECTION"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_COLLECTION">OBJECT_TYPE_COLLECTION</A></CODE></TD>
 <TD ALIGN="right"><CODE>"collection"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.OBJECT_TYPE_COMMENT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_COMMENT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_COMMENT">OBJECT_TYPE_COMMENT</A></CODE></TD>
 <TD ALIGN="right"><CODE>"comment"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.OBJECT_TYPE_EVENT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_EVENT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_EVENT">OBJECT_TYPE_EVENT</A></CODE></TD>
 <TD ALIGN="right"><CODE>"event"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.OBJECT_TYPE_FILE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_FILE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_FILE">OBJECT_TYPE_FILE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"file"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.OBJECT_TYPE_GROUP"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_GROUP"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_GROUP">OBJECT_TYPE_GROUP</A></CODE></TD>
 <TD ALIGN="right"><CODE>"group"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.OBJECT_TYPE_IMAGE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_IMAGE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_IMAGE">OBJECT_TYPE_IMAGE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"image"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.OBJECT_TYPE_NOTE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_NOTE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_NOTE">OBJECT_TYPE_NOTE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"note"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.OBJECT_TYPE_PERSON"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_PERSON"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_PERSON">OBJECT_TYPE_PERSON</A></CODE></TD>
 <TD ALIGN="right"><CODE>"person"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.OBJECT_TYPE_PLACE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_PLACE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_PLACE">OBJECT_TYPE_PLACE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"place"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.OBJECT_TYPE_PRODUCT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_PRODUCT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_PRODUCT">OBJECT_TYPE_PRODUCT</A></CODE></TD>
 <TD ALIGN="right"><CODE>"product"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.OBJECT_TYPE_QUESTION"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_QUESTION"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_QUESTION">OBJECT_TYPE_QUESTION</A></CODE></TD>
 <TD ALIGN="right"><CODE>"question"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.OBJECT_TYPE_REVIEW"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_REVIEW"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_REVIEW">OBJECT_TYPE_REVIEW</A></CODE></TD>
 <TD ALIGN="right"><CODE>"review"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.OBJECT_TYPE_SERVICE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_SERVICE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_SERVICE">OBJECT_TYPE_SERVICE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"service"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.OBJECT_TYPE_VIDEO"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_VIDEO"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_VIDEO">OBJECT_TYPE_VIDEO</A></CODE></TD>
 <TD ALIGN="right"><CODE>"video"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.PROPERTY_ACTOR"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.PROPERTY_ACTOR"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#PROPERTY_ACTOR">PROPERTY_ACTOR</A></CODE></TD>
 <TD ALIGN="right"><CODE>"actor"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.PROPERTY_CATEGORY"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.PROPERTY_CATEGORY"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#PROPERTY_CATEGORY">PROPERTY_CATEGORY</A></CODE></TD>
 <TD ALIGN="right"><CODE>"category"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.PROPERTY_CONTENT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.PROPERTY_CONTENT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#PROPERTY_CONTENT">PROPERTY_CONTENT</A></CODE></TD>
 <TD ALIGN="right"><CODE>"content"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.PROPERTY_GENERATOR"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.PROPERTY_GENERATOR"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#PROPERTY_GENERATOR">PROPERTY_GENERATOR</A></CODE></TD>
 <TD ALIGN="right"><CODE>"generator"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.PROPERTY_ICON"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.PROPERTY_ICON"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#PROPERTY_ICON">PROPERTY_ICON</A></CODE></TD>
 <TD ALIGN="right"><CODE>"icon"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.PROPERTY_OBJECT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.PROPERTY_OBJECT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#PROPERTY_OBJECT">PROPERTY_OBJECT</A></CODE></TD>
 <TD ALIGN="right"><CODE>"object"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.PROPERTY_PUBLISHED"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.PROPERTY_PUBLISHED"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#PROPERTY_PUBLISHED">PROPERTY_PUBLISHED</A></CODE></TD>
 <TD ALIGN="right"><CODE>"published"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.PROPERTY_TITLE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.PROPERTY_TITLE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#PROPERTY_TITLE">PROPERTY_TITLE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"title"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.PROPERTY_VERB"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.PROPERTY_VERB"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#PROPERTY_VERB">PROPERTY_VERB</A></CODE></TD>
 <TD ALIGN="right"><CODE>"verb"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_ADD"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_ADD"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_ADD">VERB_ADD</A></CODE></TD>
 <TD ALIGN="right"><CODE>"add"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_CANCEL"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_CANCEL"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_CANCEL">VERB_CANCEL</A></CODE></TD>
 <TD ALIGN="right"><CODE>"cancel"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_CHECKIN"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_CHECKIN"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_CHECKIN">VERB_CHECKIN</A></CODE></TD>
 <TD ALIGN="right"><CODE>"checkin"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_DELETE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_DELETE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_DELETE">VERB_DELETE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"delete"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_FAVORITE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_FAVORITE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_FAVORITE">VERB_FAVORITE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"favorite"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_FOLLOW"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_FOLLOW"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_FOLLOW">VERB_FOLLOW</A></CODE></TD>
 <TD ALIGN="right"><CODE>"follow"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_GIVE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_GIVE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_GIVE">VERB_GIVE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"give"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_IGNORE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_IGNORE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_IGNORE">VERB_IGNORE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"ignore"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_INVITE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_INVITE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_INVITE">VERB_INVITE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"invite"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_JOIN"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_JOIN"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_JOIN">VERB_JOIN</A></CODE></TD>
 <TD ALIGN="right"><CODE>"join"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_LEAVE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_LEAVE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_LEAVE">VERB_LEAVE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"leave"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_LIKE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_LIKE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_LIKE">VERB_LIKE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"like"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_MAKE_FRIEND"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_MAKE_FRIEND"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_MAKE_FRIEND">VERB_MAKE_FRIEND</A></CODE></TD>
 <TD ALIGN="right"><CODE>"make-friend"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_PLAY"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_PLAY"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_PLAY">VERB_PLAY</A></CODE></TD>
 <TD ALIGN="right"><CODE>"play"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_POST"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_POST"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_POST">VERB_POST</A></CODE></TD>
 <TD ALIGN="right"><CODE>"post"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_RECEIVE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_RECEIVE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_RECEIVE">VERB_RECEIVE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"receive"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_REMOVE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_REMOVE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_REMOVE">VERB_REMOVE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"remove"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_REMOVE_FRIEND"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_REMOVE_FRIEND"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_REMOVE_FRIEND">VERB_REMOVE_FRIEND</A></CODE></TD>
 <TD ALIGN="right"><CODE>"remove-friend"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_REQUEST_FRIEND"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_REQUEST_FRIEND"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_REQUEST_FRIEND">VERB_REQUEST_FRIEND</A></CODE></TD>
 <TD ALIGN="right"><CODE>"request-friend"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_RSVP_MAYBE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_RSVP_MAYBE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_RSVP_MAYBE">VERB_RSVP_MAYBE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"rsvp-maybe"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_RSVP_NO"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_RSVP_NO"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_RSVP_NO">VERB_RSVP_NO</A></CODE></TD>
 <TD ALIGN="right"><CODE>"rsvp-no"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_RSVP_YES"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_RSVP_YES"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_RSVP_YES">VERB_RSVP_YES</A></CODE></TD>
 <TD ALIGN="right"><CODE>"rsvp-yes"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_SAVE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_SAVE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_SAVE">VERB_SAVE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"save"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_SHARE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_SHARE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_SHARE">VERB_SHARE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"share"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_STOP_FOLLOWING"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_STOP_FOLLOWING"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_STOP_FOLLOWING">VERB_STOP_FOLLOWING</A></CODE></TD>
 <TD ALIGN="right"><CODE>"stop-following"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_TAG"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_TAG"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_TAG">VERB_TAG</A></CODE></TD>
 <TD ALIGN="right"><CODE>"tag"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_UNFAVORITE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_UNFAVORITE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_UNFAVORITE">VERB_UNFAVORITE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"unfavorite"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_UNLIKE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_UNLIKE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_UNLIKE">VERB_UNLIKE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"unlike"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_UNSAVE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_UNSAVE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_UNSAVE">VERB_UNSAVE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"unsave"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Activity.VERB_UPDATE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Activity.VERB_UPDATE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Activity.html#VERB_UPDATE">VERB_UPDATE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"update"</CODE></TD>
@@ -460,16 +460,16 @@ org.usergrid.*</FONT></TH>
 
 <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="3">org.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities">Device</A></TH>
+<TH ALIGN="left" COLSPAN="3">org.apache.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities">Device</A></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Device.ENTITY_TYPE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Device.ENTITY_TYPE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Device.html#ENTITY_TYPE">ENTITY_TYPE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"device"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Device.PROPERTY_NAME"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Device.PROPERTY_NAME"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Device.html#PROPERTY_NAME">PROPERTY_NAME</A></CODE></TD>
 <TD ALIGN="right"><CODE>"name"</CODE></TD>
@@ -484,16 +484,16 @@ org.usergrid.*</FONT></TH>
 
 <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="3">org.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></TH>
+<TH ALIGN="left" COLSPAN="3">org.apache.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Entity.PROPERTY_TYPE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Entity.PROPERTY_TYPE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Entity.html#PROPERTY_TYPE">PROPERTY_TYPE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"type"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Entity.PROPERTY_UUID"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Entity.PROPERTY_UUID"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Entity.html#PROPERTY_UUID">PROPERTY_UUID</A></CODE></TD>
 <TD ALIGN="right"><CODE>"uuid"</CODE></TD>
@@ -508,22 +508,22 @@ org.usergrid.*</FONT></TH>
 
 <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="3">org.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A></TH>
+<TH ALIGN="left" COLSPAN="3">org.apache.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Group.ENTITY_TYPE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Group.ENTITY_TYPE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Group.html#ENTITY_TYPE">ENTITY_TYPE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"group"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Group.PROPERTY_PATH"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Group.PROPERTY_PATH"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Group.html#PROPERTY_PATH">PROPERTY_PATH</A></CODE></TD>
 <TD ALIGN="right"><CODE>"path"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Group.PROPERTY_TITLE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Group.PROPERTY_TITLE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Group.html#PROPERTY_TITLE">PROPERTY_TITLE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"title"</CODE></TD>
@@ -538,58 +538,58 @@ org.usergrid.*</FONT></TH>
 
 <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="3">org.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A></TH>
+<TH ALIGN="left" COLSPAN="3">org.apache.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Message.ENTITY_TYPE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Message.ENTITY_TYPE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Message.html#ENTITY_TYPE">ENTITY_TYPE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"message"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Message.PROPERTY_CATEGORY"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Message.PROPERTY_CATEGORY"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Message.html#PROPERTY_CATEGORY">PROPERTY_CATEGORY</A></CODE></TD>
 <TD ALIGN="right"><CODE>"category"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Message.PROPERTY_CORRELATION_ID"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Message.PROPERTY_CORRELATION_ID"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Message.html#PROPERTY_CORRELATION_ID">PROPERTY_CORRELATION_ID</A></CODE></TD>
 <TD ALIGN="right"><CODE>"correlation_id"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Message.PROPERTY_DESTINATION"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Message.PROPERTY_DESTINATION"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Message.html#PROPERTY_DESTINATION">PROPERTY_DESTINATION</A></CODE></TD>
 <TD ALIGN="right"><CODE>"destination"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Message.PROPERTY_INDEXED"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Message.PROPERTY_INDEXED"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Message.html#PROPERTY_INDEXED">PROPERTY_INDEXED</A></CODE></TD>
 <TD ALIGN="right"><CODE>"indexed"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Message.PROPERTY_PERSISTENT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Message.PROPERTY_PERSISTENT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Message.html#PROPERTY_PERSISTENT">PROPERTY_PERSISTENT</A></CODE></TD>
 <TD ALIGN="right"><CODE>"persistent"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Message.PROPERTY_REPLY_TO"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Message.PROPERTY_REPLY_TO"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Message.html#PROPERTY_REPLY_TO">PROPERTY_REPLY_TO</A></CODE></TD>
 <TD ALIGN="right"><CODE>"reply_to"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Message.PROPERTY_TIMESTAMP"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Message.PROPERTY_TIMESTAMP"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Message.html#PROPERTY_TIMESTAMP">PROPERTY_TIMESTAMP</A></CODE></TD>
 <TD ALIGN="right"><CODE>"timestamp"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.Message.PROPERTY_TYPE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.Message.PROPERTY_TYPE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/Message.html#PROPERTY_TYPE">PROPERTY_TYPE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"type"</CODE></TD>
@@ -604,64 +604,64 @@ org.usergrid.*</FONT></TH>
 
 <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="3">org.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A></TH>
+<TH ALIGN="left" COLSPAN="3">org.apache.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.User.ENTITY_TYPE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.User.ENTITY_TYPE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/User.html#ENTITY_TYPE">ENTITY_TYPE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"user"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.User.PROPERTY_ACTIVATED"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.User.PROPERTY_ACTIVATED"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/User.html#PROPERTY_ACTIVATED">PROPERTY_ACTIVATED</A></CODE></TD>
 <TD ALIGN="right"><CODE>"activated"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.User.PROPERTY_DISABLED"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.User.PROPERTY_DISABLED"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/User.html#PROPERTY_DISABLED">PROPERTY_DISABLED</A></CODE></TD>
 <TD ALIGN="right"><CODE>"disabled"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.User.PROPERTY_EMAIL"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.User.PROPERTY_EMAIL"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/User.html#PROPERTY_EMAIL">PROPERTY_EMAIL</A></CODE></TD>
 <TD ALIGN="right"><CODE>"email"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.User.PROPERTY_FIRSTNAME"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.User.PROPERTY_FIRSTNAME"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/User.html#PROPERTY_FIRSTNAME">PROPERTY_FIRSTNAME</A></CODE></TD>
 <TD ALIGN="right"><CODE>"firstname"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.User.PROPERTY_LASTNAME"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.User.PROPERTY_LASTNAME"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/User.html#PROPERTY_LASTNAME">PROPERTY_LASTNAME</A></CODE></TD>
 <TD ALIGN="right"><CODE>"lastname"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.User.PROPERTY_MIDDLENAME"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.User.PROPERTY_MIDDLENAME"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/User.html#PROPERTY_MIDDLENAME">PROPERTY_MIDDLENAME</A></CODE></TD>
 <TD ALIGN="right"><CODE>"middlename"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.User.PROPERTY_NAME"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.User.PROPERTY_NAME"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/User.html#PROPERTY_NAME">PROPERTY_NAME</A></CODE></TD>
 <TD ALIGN="right"><CODE>"name"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.User.PROPERTY_PICTURE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.User.PROPERTY_PICTURE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/User.html#PROPERTY_PICTURE">PROPERTY_PICTURE</A></CODE></TD>
 <TD ALIGN="right"><CODE>"picture"</CODE></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<A NAME="org.usergrid.android.client.entities.User.PROPERTY_USERNAME"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
+<A NAME="org.apache.usergrid.android.client.entities.User.PROPERTY_USERNAME"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
 <CODE>public&nbsp;static&nbsp;final&nbsp;java.lang.String</CODE></FONT></TD>
 <TD ALIGN="left"><CODE><A HREF="org/usergrid/android/client/entities/User.html#PROPERTY_USERNAME">PROPERTY_USERNAME</A></CODE></TD>
 <TD ALIGN="right"><CODE>"username"</CODE></TD>


[85/96] [abbrv] USERGRID-2 package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/entities/Activity.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/entities/Activity.html b/sdks/android/doc/org/usergrid/android/client/entities/Activity.html
index 400ccd7..89b9fa4 100644
--- a/sdks/android/doc/org/usergrid/android/client/entities/Activity.html
+++ b/sdks/android/doc/org/usergrid/android/client/entities/Activity.html
@@ -56,7 +56,7 @@ function windowTitle()
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 &nbsp;PREV CLASS&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.apache.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/entities/Activity.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="Activity.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
@@ -88,17 +88,17 @@ DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client.entities</FONT>
+org.apache.usergrid.android.client.entities</FONT>
 <BR>
 Class Activity</H2>
 <PRE>
 java.lang.Object
-  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">org.usergrid.android.client.entities.Entity</A>
-      <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.usergrid.android.client.entities.Activity</B>
+  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">org.apache.usergrid.android.client.entities.Entity</A>
+      <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.usergrid.android.client.entities.Activity</B>
 </PRE>
 <HR>
 <DL>
-<DT><PRE>public class <B>Activity</B><DT>extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></DL>
+<DT><PRE>public class <B>Activity</B><DT>extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></DL>
 </PRE>
 
 <P>
@@ -124,7 +124,7 @@ An entity type for representing activity stream actions. These are similar to
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>static&nbsp;class</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.usergrid.android.client.entities">Activity.ActivityCollection</A></B></CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityCollection</A></B></CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -132,7 +132,7 @@ An entity type for representing activity stream actions. These are similar to
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>static&nbsp;class</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A></B></CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A></B></CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -140,7 +140,7 @@ An entity type for representing activity stream actions. These are similar to
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>static&nbsp;class</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A></B></CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A></B></CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -622,7 +622,7 @@ An entity type for representing activity stream actions. These are similar to
 &nbsp;<A NAME="fields_inherited_from_class_org.usergrid.android.client.entities.Entity"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left"><B>Fields inherited from class org.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></B></TH>
+<TH ALIGN="left"><B>Fields inherited from class org.apache.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></B></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#CLASS_FOR_ENTITY_TYPE">CLASS_FOR_ENTITY_TYPE</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#PROPERTY_TYPE">PROPERTY_TYPE</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#PROPERTY_UUID">PROPERTY_UUID</A></CODE></TD>
@@ -644,7 +644,7 @@ An entity type for representing activity stream actions. These are similar to
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.html#Activity(org.usergrid.android.client.entities.Entity)">Activity</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;entity)</CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.html#Activity(org.apache.usergrid.android.client.entities.Entity)">Activity</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;entity)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -661,7 +661,7 @@ An entity type for representing activity stream actions. These are similar to
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.html#getActor()">getActor</A></B>()</CODE>
 
 <BR>
@@ -685,7 +685,7 @@ An entity type for representing activity stream actions. These are similar to
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.html#getGenerator()">getGenerator</A></B>()</CODE>
 
 <BR>
@@ -693,7 +693,7 @@ An entity type for representing activity stream actions. These are similar to
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.html#getIcon()">getIcon</A></B>()</CODE>
 
 <BR>
@@ -709,7 +709,7 @@ An entity type for representing activity stream actions. These are similar to
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.html#getObject()">getObject</A></B>()</CODE>
 
 <BR>
@@ -749,13 +749,13 @@ An entity type for representing activity stream actions. These are similar to
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>static&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A></CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.html#newActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.entities.User, org.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)">newActivity</A></B>(java.lang.String&nbsp;verb,
+<CODE>static&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A></CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.html#newActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.entities.User, org.apache.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)">newActivity</A></B>(java.lang.String&nbsp;verb,
             java.lang.String&nbsp;title,
             java.lang.String&nbsp;content,
             java.lang.String&nbsp;category,
-            <A HREF="../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>&nbsp;user,
-            <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;object,
+            <A HREF="../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>&nbsp;user,
+            <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;object,
             java.lang.String&nbsp;objectType,
             java.lang.String&nbsp;objectName,
             java.lang.String&nbsp;objectContent)</CODE>
@@ -766,7 +766,7 @@ An entity type for representing activity stream actions. These are similar to
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.html#setActor(org.usergrid.android.client.entities.Activity.ActivityObject)">setActor</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>&nbsp;actor)</CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.html#setActor(org.apache.usergrid.android.client.entities.Activity.ActivityObject)">setActor</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>&nbsp;actor)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -790,7 +790,7 @@ An entity type for representing activity stream actions. These are similar to
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.html#setGenerator(org.usergrid.android.client.entities.Activity.ActivityObject)">setGenerator</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>&nbsp;generator)</CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.html#setGenerator(org.apache.usergrid.android.client.entities.Activity.ActivityObject)">setGenerator</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>&nbsp;generator)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -798,7 +798,7 @@ An entity type for representing activity stream actions. These are similar to
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.html#setIcon(org.usergrid.android.client.entities.Activity.MediaLink)">setIcon</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A>&nbsp;icon)</CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.html#setIcon(org.apache.usergrid.android.client.entities.Activity.MediaLink)">setIcon</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A>&nbsp;icon)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -806,7 +806,7 @@ An entity type for representing activity stream actions. These are similar to
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.html#setObject(org.usergrid.android.client.entities.Activity.ActivityObject)">setObject</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>&nbsp;object)</CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.html#setObject(org.apache.usergrid.android.client.entities.Activity.ActivityObject)">setObject</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>&nbsp;object)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -839,10 +839,10 @@ An entity type for representing activity stream actions. These are similar to
 &nbsp;<A NAME="methods_inherited_from_class_org.usergrid.android.client.entities.Entity"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left"><B>Methods inherited from class org.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></B></TH>
+<TH ALIGN="left"><B>Methods inherited from class org.apache.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></B></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getProperties()">getProperties</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getType()">getType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getUuid()">getUuid</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setProperty(java.lang.String, org.codehaus.jackson.JsonNode)">setProperty</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setType(java.lang.String)">setType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setUuid(java.util.UUID)">setUuid</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toString()">toString</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(java.lang.Class)">toType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(org.usergrid.androi
 d.client.entities.Entity, java.lang.Class)">toType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(java.util.List, java.lang.Class)">toType</A></CODE></TD>
+<TD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getProperties()">getProperties</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getType()">getType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getUuid()">getUuid</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setProperty(java.lang.String, org.codehaus.jackson.JsonNode)">setProperty</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setType(java.lang.String)">setType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setUuid(java.util.UUID)">setUuid</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toString()">toString</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(java.lang.Class)">toType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(org.apache.usergrid
 .android.client.entities.Entity, java.lang.Class)">toType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(java.util.List, java.lang.Class)">toType</A></CODE></TD>
 </TR>
 </TABLE>
 &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
@@ -873,7 +873,7 @@ ENTITY_TYPE</H3>
 public static final java.lang.String <B>ENTITY_TYPE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.ENTITY_TYPE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.ENTITY_TYPE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -883,7 +883,7 @@ VERB_ADD</H3>
 public static final java.lang.String <B>VERB_ADD</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_ADD">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_ADD">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -893,7 +893,7 @@ VERB_CANCEL</H3>
 public static final java.lang.String <B>VERB_CANCEL</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_CANCEL">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_CANCEL">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -903,7 +903,7 @@ VERB_CHECKIN</H3>
 public static final java.lang.String <B>VERB_CHECKIN</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_CHECKIN">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_CHECKIN">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -913,7 +913,7 @@ VERB_DELETE</H3>
 public static final java.lang.String <B>VERB_DELETE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_DELETE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_DELETE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -923,7 +923,7 @@ VERB_FAVORITE</H3>
 public static final java.lang.String <B>VERB_FAVORITE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_FAVORITE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_FAVORITE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -933,7 +933,7 @@ VERB_FOLLOW</H3>
 public static final java.lang.String <B>VERB_FOLLOW</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_FOLLOW">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_FOLLOW">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -943,7 +943,7 @@ VERB_GIVE</H3>
 public static final java.lang.String <B>VERB_GIVE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_GIVE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_GIVE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -953,7 +953,7 @@ VERB_IGNORE</H3>
 public static final java.lang.String <B>VERB_IGNORE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_IGNORE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_IGNORE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -963,7 +963,7 @@ VERB_INVITE</H3>
 public static final java.lang.String <B>VERB_INVITE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_INVITE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_INVITE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -973,7 +973,7 @@ VERB_JOIN</H3>
 public static final java.lang.String <B>VERB_JOIN</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_JOIN">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_JOIN">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -983,7 +983,7 @@ VERB_LEAVE</H3>
 public static final java.lang.String <B>VERB_LEAVE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_LEAVE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_LEAVE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -993,7 +993,7 @@ VERB_LIKE</H3>
 public static final java.lang.String <B>VERB_LIKE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_LIKE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_LIKE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1003,7 +1003,7 @@ VERB_MAKE_FRIEND</H3>
 public static final java.lang.String <B>VERB_MAKE_FRIEND</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_MAKE_FRIEND">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_MAKE_FRIEND">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1013,7 +1013,7 @@ VERB_PLAY</H3>
 public static final java.lang.String <B>VERB_PLAY</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_PLAY">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_PLAY">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1023,7 +1023,7 @@ VERB_POST</H3>
 public static final java.lang.String <B>VERB_POST</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_POST">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_POST">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1033,7 +1033,7 @@ VERB_RECEIVE</H3>
 public static final java.lang.String <B>VERB_RECEIVE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_RECEIVE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_RECEIVE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1043,7 +1043,7 @@ VERB_REMOVE</H3>
 public static final java.lang.String <B>VERB_REMOVE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_REMOVE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_REMOVE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1053,7 +1053,7 @@ VERB_REMOVE_FRIEND</H3>
 public static final java.lang.String <B>VERB_REMOVE_FRIEND</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_REMOVE_FRIEND">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_REMOVE_FRIEND">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1063,7 +1063,7 @@ VERB_REQUEST_FRIEND</H3>
 public static final java.lang.String <B>VERB_REQUEST_FRIEND</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_REQUEST_FRIEND">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_REQUEST_FRIEND">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1073,7 +1073,7 @@ VERB_RSVP_MAYBE</H3>
 public static final java.lang.String <B>VERB_RSVP_MAYBE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_RSVP_MAYBE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_RSVP_MAYBE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1083,7 +1083,7 @@ VERB_RSVP_NO</H3>
 public static final java.lang.String <B>VERB_RSVP_NO</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_RSVP_NO">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_RSVP_NO">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1093,7 +1093,7 @@ VERB_RSVP_YES</H3>
 public static final java.lang.String <B>VERB_RSVP_YES</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_RSVP_YES">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_RSVP_YES">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1103,7 +1103,7 @@ VERB_SAVE</H3>
 public static final java.lang.String <B>VERB_SAVE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_SAVE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_SAVE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1113,7 +1113,7 @@ VERB_SHARE</H3>
 public static final java.lang.String <B>VERB_SHARE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_SHARE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_SHARE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1123,7 +1123,7 @@ VERB_STOP_FOLLOWING</H3>
 public static final java.lang.String <B>VERB_STOP_FOLLOWING</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_STOP_FOLLOWING">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_STOP_FOLLOWING">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1133,7 +1133,7 @@ VERB_TAG</H3>
 public static final java.lang.String <B>VERB_TAG</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_TAG">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_TAG">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1143,7 +1143,7 @@ VERB_UNFAVORITE</H3>
 public static final java.lang.String <B>VERB_UNFAVORITE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_UNFAVORITE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_UNFAVORITE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1153,7 +1153,7 @@ VERB_UNLIKE</H3>
 public static final java.lang.String <B>VERB_UNLIKE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_UNLIKE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_UNLIKE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1163,7 +1163,7 @@ VERB_UNSAVE</H3>
 public static final java.lang.String <B>VERB_UNSAVE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_UNSAVE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_UNSAVE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1173,7 +1173,7 @@ VERB_UPDATE</H3>
 public static final java.lang.String <B>VERB_UPDATE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.VERB_UPDATE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.VERB_UPDATE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1183,7 +1183,7 @@ OBJECT_TYPE_ARTICLE</H3>
 public static final java.lang.String <B>OBJECT_TYPE_ARTICLE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.OBJECT_TYPE_ARTICLE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_ARTICLE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1193,7 +1193,7 @@ OBJECT_TYPE_AUDIO</H3>
 public static final java.lang.String <B>OBJECT_TYPE_AUDIO</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.OBJECT_TYPE_AUDIO">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_AUDIO">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1203,7 +1203,7 @@ OBJECT_TYPE_BADGE</H3>
 public static final java.lang.String <B>OBJECT_TYPE_BADGE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.OBJECT_TYPE_BADGE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_BADGE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1213,7 +1213,7 @@ OBJECT_TYPE_BOOKMARK</H3>
 public static final java.lang.String <B>OBJECT_TYPE_BOOKMARK</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.OBJECT_TYPE_BOOKMARK">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_BOOKMARK">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1223,7 +1223,7 @@ OBJECT_TYPE_COLLECTION</H3>
 public static final java.lang.String <B>OBJECT_TYPE_COLLECTION</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.OBJECT_TYPE_COLLECTION">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_COLLECTION">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1233,7 +1233,7 @@ OBJECT_TYPE_COMMENT</H3>
 public static final java.lang.String <B>OBJECT_TYPE_COMMENT</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.OBJECT_TYPE_COMMENT">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_COMMENT">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1243,7 +1243,7 @@ OBJECT_TYPE_EVENT</H3>
 public static final java.lang.String <B>OBJECT_TYPE_EVENT</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.OBJECT_TYPE_EVENT">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_EVENT">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1253,7 +1253,7 @@ OBJECT_TYPE_FILE</H3>
 public static final java.lang.String <B>OBJECT_TYPE_FILE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.OBJECT_TYPE_FILE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_FILE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1263,7 +1263,7 @@ OBJECT_TYPE_GROUP</H3>
 public static final java.lang.String <B>OBJECT_TYPE_GROUP</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.OBJECT_TYPE_GROUP">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_GROUP">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1273,7 +1273,7 @@ OBJECT_TYPE_IMAGE</H3>
 public static final java.lang.String <B>OBJECT_TYPE_IMAGE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.OBJECT_TYPE_IMAGE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_IMAGE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1283,7 +1283,7 @@ OBJECT_TYPE_NOTE</H3>
 public static final java.lang.String <B>OBJECT_TYPE_NOTE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.OBJECT_TYPE_NOTE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_NOTE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1293,7 +1293,7 @@ OBJECT_TYPE_PERSON</H3>
 public static final java.lang.String <B>OBJECT_TYPE_PERSON</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.OBJECT_TYPE_PERSON">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_PERSON">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1303,7 +1303,7 @@ OBJECT_TYPE_PLACE</H3>
 public static final java.lang.String <B>OBJECT_TYPE_PLACE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.OBJECT_TYPE_PLACE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_PLACE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1313,7 +1313,7 @@ OBJECT_TYPE_PRODUCT</H3>
 public static final java.lang.String <B>OBJECT_TYPE_PRODUCT</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.OBJECT_TYPE_PRODUCT">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_PRODUCT">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1323,7 +1323,7 @@ OBJECT_TYPE_QUESTION</H3>
 public static final java.lang.String <B>OBJECT_TYPE_QUESTION</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.OBJECT_TYPE_QUESTION">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_QUESTION">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1333,7 +1333,7 @@ OBJECT_TYPE_REVIEW</H3>
 public static final java.lang.String <B>OBJECT_TYPE_REVIEW</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.OBJECT_TYPE_REVIEW">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_REVIEW">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1343,7 +1343,7 @@ OBJECT_TYPE_SERVICE</H3>
 public static final java.lang.String <B>OBJECT_TYPE_SERVICE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.OBJECT_TYPE_SERVICE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_SERVICE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1353,7 +1353,7 @@ OBJECT_TYPE_VIDEO</H3>
 public static final java.lang.String <B>OBJECT_TYPE_VIDEO</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.OBJECT_TYPE_VIDEO">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.OBJECT_TYPE_VIDEO">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1363,7 +1363,7 @@ PROPERTY_CONTENT</H3>
 public static final java.lang.String <B>PROPERTY_CONTENT</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.PROPERTY_CONTENT">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.PROPERTY_CONTENT">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1373,7 +1373,7 @@ PROPERTY_GENERATOR</H3>
 public static final java.lang.String <B>PROPERTY_GENERATOR</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.PROPERTY_GENERATOR">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.PROPERTY_GENERATOR">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1383,7 +1383,7 @@ PROPERTY_ICON</H3>
 public static final java.lang.String <B>PROPERTY_ICON</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.PROPERTY_ICON">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.PROPERTY_ICON">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1393,7 +1393,7 @@ PROPERTY_CATEGORY</H3>
 public static final java.lang.String <B>PROPERTY_CATEGORY</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.PROPERTY_CATEGORY">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.PROPERTY_CATEGORY">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1403,7 +1403,7 @@ PROPERTY_VERB</H3>
 public static final java.lang.String <B>PROPERTY_VERB</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.PROPERTY_VERB">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.PROPERTY_VERB">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1413,7 +1413,7 @@ PROPERTY_PUBLISHED</H3>
 public static final java.lang.String <B>PROPERTY_PUBLISHED</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.PROPERTY_PUBLISHED">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.PROPERTY_PUBLISHED">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1423,7 +1423,7 @@ PROPERTY_OBJECT</H3>
 public static final java.lang.String <B>PROPERTY_OBJECT</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.PROPERTY_OBJECT">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.PROPERTY_OBJECT">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1433,7 +1433,7 @@ PROPERTY_TITLE</H3>
 public static final java.lang.String <B>PROPERTY_TITLE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.PROPERTY_TITLE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.PROPERTY_TITLE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -1443,7 +1443,7 @@ PROPERTY_ACTOR</H3>
 public static final java.lang.String <B>PROPERTY_ACTOR</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Activity.PROPERTY_ACTOR">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Activity.PROPERTY_ACTOR">Constant Field Values</A></DL>
 </DL>
 
 <!-- ========= CONSTRUCTOR DETAIL ======== -->
@@ -1464,10 +1464,10 @@ public <B>Activity</B>()</PRE>
 </DL>
 <HR>
 
-<A NAME="Activity(org.usergrid.android.client.entities.Entity)"><!-- --></A><H3>
+<A NAME="Activity(org.apache.usergrid.android.client.entities.Entity)"><!-- --></A><H3>
 Activity</H3>
 <PRE>
-public <B>Activity</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;entity)</PRE>
+public <B>Activity</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;entity)</PRE>
 <DL>
 </DL>
 
@@ -1487,7 +1487,7 @@ getNativeType</H3>
 public java.lang.String <B>getNativeType</B>()</PRE>
 <DL>
 <DD><DL>
-<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getNativeType()">getNativeType</A></CODE> in class <CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></CODE></DL>
+<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getNativeType()">getNativeType</A></CODE> in class <CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></CODE></DL>
 </DD>
 <DD><DL>
 </DL>
@@ -1501,7 +1501,7 @@ getPropertyNames</H3>
 public java.util.List&lt;java.lang.String&gt; <B>getPropertyNames</B>()</PRE>
 <DL>
 <DD><DL>
-<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getPropertyNames()">getPropertyNames</A></CODE> in class <CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></CODE></DL>
+<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getPropertyNames()">getPropertyNames</A></CODE> in class <CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></CODE></DL>
 </DD>
 <DD><DL>
 </DL>
@@ -1509,15 +1509,15 @@ public java.util.List&lt;java.lang.String&gt; <B>getPropertyNames</B>()</PRE>
 </DL>
 <HR>
 
-<A NAME="newActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.entities.User, org.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)"><!-- --></A><H3>
+<A NAME="newActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.entities.User, org.apache.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)"><!-- --></A><H3>
 newActivity</H3>
 <PRE>
-public static <A HREF="../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A> <B>newActivity</B>(java.lang.String&nbsp;verb,
+public static <A HREF="../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A> <B>newActivity</B>(java.lang.String&nbsp;verb,
                                    java.lang.String&nbsp;title,
                                    java.lang.String&nbsp;content,
                                    java.lang.String&nbsp;category,
-                                   <A HREF="../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>&nbsp;user,
-                                   <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;object,
+                                   <A HREF="../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>&nbsp;user,
+                                   <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;object,
                                    java.lang.String&nbsp;objectType,
                                    java.lang.String&nbsp;objectName,
                                    java.lang.String&nbsp;objectContent)</PRE>
@@ -1531,7 +1531,7 @@ public static <A HREF="../../../../../org/usergrid/android/client/entities/Activ
 <A NAME="getActor()"><!-- --></A><H3>
 getActor</H3>
 <PRE>
-public <A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A> <B>getActor</B>()</PRE>
+public <A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A> <B>getActor</B>()</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1539,10 +1539,10 @@ public <A HREF="../../../../../org/usergrid/android/client/entities/Activity.Act
 </DL>
 <HR>
 
-<A NAME="setActor(org.usergrid.android.client.entities.Activity.ActivityObject)"><!-- --></A><H3>
+<A NAME="setActor(org.apache.usergrid.android.client.entities.Activity.ActivityObject)"><!-- --></A><H3>
 setActor</H3>
 <PRE>
-public void <B>setActor</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>&nbsp;actor)</PRE>
+public void <B>setActor</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>&nbsp;actor)</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1553,7 +1553,7 @@ public void <B>setActor</B>(<A HREF="../../../../../org/usergrid/android/client/
 <A NAME="getGenerator()"><!-- --></A><H3>
 getGenerator</H3>
 <PRE>
-public <A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A> <B>getGenerator</B>()</PRE>
+public <A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A> <B>getGenerator</B>()</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1561,10 +1561,10 @@ public <A HREF="../../../../../org/usergrid/android/client/entities/Activity.Act
 </DL>
 <HR>
 
-<A NAME="setGenerator(org.usergrid.android.client.entities.Activity.ActivityObject)"><!-- --></A><H3>
+<A NAME="setGenerator(org.apache.usergrid.android.client.entities.Activity.ActivityObject)"><!-- --></A><H3>
 setGenerator</H3>
 <PRE>
-public void <B>setGenerator</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>&nbsp;generator)</PRE>
+public void <B>setGenerator</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>&nbsp;generator)</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1641,7 +1641,7 @@ public void <B>setPublished</B>(java.lang.Long&nbsp;published)</PRE>
 <A NAME="getObject()"><!-- --></A><H3>
 getObject</H3>
 <PRE>
-public <A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A> <B>getObject</B>()</PRE>
+public <A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A> <B>getObject</B>()</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1649,10 +1649,10 @@ public <A HREF="../../../../../org/usergrid/android/client/entities/Activity.Act
 </DL>
 <HR>
 
-<A NAME="setObject(org.usergrid.android.client.entities.Activity.ActivityObject)"><!-- --></A><H3>
+<A NAME="setObject(org.apache.usergrid.android.client.entities.Activity.ActivityObject)"><!-- --></A><H3>
 setObject</H3>
 <PRE>
-public void <B>setObject</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>&nbsp;object)</PRE>
+public void <B>setObject</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>&nbsp;object)</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1685,7 +1685,7 @@ public void <B>setTitle</B>(java.lang.String&nbsp;title)</PRE>
 <A NAME="getIcon()"><!-- --></A><H3>
 getIcon</H3>
 <PRE>
-public <A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A> <B>getIcon</B>()</PRE>
+public <A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A> <B>getIcon</B>()</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1693,10 +1693,10 @@ public <A HREF="../../../../../org/usergrid/android/client/entities/Activity.Med
 </DL>
 <HR>
 
-<A NAME="setIcon(org.usergrid.android.client.entities.Activity.MediaLink)"><!-- --></A><H3>
+<A NAME="setIcon(org.apache.usergrid.android.client.entities.Activity.MediaLink)"><!-- --></A><H3>
 setIcon</H3>
 <PRE>
-public void <B>setIcon</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A>&nbsp;icon)</PRE>
+public void <B>setIcon</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A>&nbsp;icon)</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1756,7 +1756,7 @@ public void <B>setContent</B>(java.lang.String&nbsp;content)</PRE>
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 &nbsp;PREV CLASS&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.apache.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/entities/Activity.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="Activity.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/entities/Device.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/entities/Device.html b/sdks/android/doc/org/usergrid/android/client/entities/Device.html
index ada32f3..7d9fe49 100644
--- a/sdks/android/doc/org/usergrid/android/client/entities/Device.html
+++ b/sdks/android/doc/org/usergrid/android/client/entities/Device.html
@@ -55,8 +55,8 @@ function windowTitle()
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/entities/Device.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="Device.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
@@ -88,17 +88,17 @@ DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client.entities</FONT>
+org.apache.usergrid.android.client.entities</FONT>
 <BR>
 Class Device</H2>
 <PRE>
 java.lang.Object
-  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">org.usergrid.android.client.entities.Entity</A>
-      <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.usergrid.android.client.entities.Device</B>
+  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">org.apache.usergrid.android.client.entities.Entity</A>
+      <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.usergrid.android.client.entities.Device</B>
 </PRE>
 <HR>
 <DL>
-<DT><PRE>public class <B>Device</B><DT>extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></DL>
+<DT><PRE>public class <B>Device</B><DT>extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></DL>
 </PRE>
 
 <P>
@@ -133,7 +133,7 @@ java.lang.Object
 &nbsp;<A NAME="fields_inherited_from_class_org.usergrid.android.client.entities.Entity"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left"><B>Fields inherited from class org.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></B></TH>
+<TH ALIGN="left"><B>Fields inherited from class org.apache.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></B></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#CLASS_FOR_ENTITY_TYPE">CLASS_FOR_ENTITY_TYPE</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#PROPERTY_TYPE">PROPERTY_TYPE</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#PROPERTY_UUID">PROPERTY_UUID</A></CODE></TD>
@@ -155,7 +155,7 @@ java.lang.Object
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Device.html#Device(org.usergrid.android.client.entities.Entity)">Device</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;entity)</CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Device.html#Device(org.apache.usergrid.android.client.entities.Entity)">Device</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;entity)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -206,10 +206,10 @@ java.lang.Object
 &nbsp;<A NAME="methods_inherited_from_class_org.usergrid.android.client.entities.Entity"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left"><B>Methods inherited from class org.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></B></TH>
+<TH ALIGN="left"><B>Methods inherited from class org.apache.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></B></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getProperties()">getProperties</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getType()">getType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getUuid()">getUuid</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setProperty(java.lang.String, org.codehaus.jackson.JsonNode)">setProperty</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setType(java.lang.String)">setType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setUuid(java.util.UUID)">setUuid</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toString()">toString</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(java.lang.Class)">toType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(org.usergrid.androi
 d.client.entities.Entity, java.lang.Class)">toType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(java.util.List, java.lang.Class)">toType</A></CODE></TD>
+<TD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getProperties()">getProperties</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getType()">getType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getUuid()">getUuid</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setProperty(java.lang.String, org.codehaus.jackson.JsonNode)">setProperty</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setType(java.lang.String)">setType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setUuid(java.util.UUID)">setUuid</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toString()">toString</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(java.lang.Class)">toType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(org.apache.usergrid
 .android.client.entities.Entity, java.lang.Class)">toType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(java.util.List, java.lang.Class)">toType</A></CODE></TD>
 </TR>
 </TABLE>
 &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
@@ -240,7 +240,7 @@ ENTITY_TYPE</H3>
 public static final java.lang.String <B>ENTITY_TYPE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Device.ENTITY_TYPE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Device.ENTITY_TYPE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -250,7 +250,7 @@ PROPERTY_NAME</H3>
 public static final java.lang.String <B>PROPERTY_NAME</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Device.PROPERTY_NAME">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Device.PROPERTY_NAME">Constant Field Values</A></DL>
 </DL>
 
 <!-- ========= CONSTRUCTOR DETAIL ======== -->
@@ -271,10 +271,10 @@ public <B>Device</B>()</PRE>
 </DL>
 <HR>
 
-<A NAME="Device(org.usergrid.android.client.entities.Entity)"><!-- --></A><H3>
+<A NAME="Device(org.apache.usergrid.android.client.entities.Entity)"><!-- --></A><H3>
 Device</H3>
 <PRE>
-public <B>Device</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;entity)</PRE>
+public <B>Device</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;entity)</PRE>
 <DL>
 </DL>
 
@@ -294,7 +294,7 @@ getNativeType</H3>
 public java.lang.String <B>getNativeType</B>()</PRE>
 <DL>
 <DD><DL>
-<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getNativeType()">getNativeType</A></CODE> in class <CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></CODE></DL>
+<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getNativeType()">getNativeType</A></CODE> in class <CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></CODE></DL>
 </DD>
 <DD><DL>
 </DL>
@@ -308,7 +308,7 @@ getPropertyNames</H3>
 public java.util.List&lt;java.lang.String&gt; <B>getPropertyNames</B>()</PRE>
 <DL>
 <DD><DL>
-<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getPropertyNames()">getPropertyNames</A></CODE> in class <CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></CODE></DL>
+<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getPropertyNames()">getPropertyNames</A></CODE> in class <CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></CODE></DL>
 </DD>
 <DD><DL>
 </DL>
@@ -367,8 +367,8 @@ public void <B>setName</B>(java.lang.String&nbsp;name)</PRE>
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/entities/Device.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="Device.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/entities/Entity.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/entities/Entity.html b/sdks/android/doc/org/usergrid/android/client/entities/Entity.html
index ae63c36..0e282e0 100644
--- a/sdks/android/doc/org/usergrid/android/client/entities/Entity.html
+++ b/sdks/android/doc/org/usergrid/android/client/entities/Entity.html
@@ -55,8 +55,8 @@ function windowTitle()
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/entities/Entity.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="Entity.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
@@ -88,15 +88,15 @@ DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client.entities</FONT>
+org.apache.usergrid.android.client.entities</FONT>
 <BR>
 Class Entity</H2>
 <PRE>
 java.lang.Object
-  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.usergrid.android.client.entities.Entity</B>
+  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.usergrid.android.client.entities.Entity</B>
 </PRE>
 <DL>
-<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities">Device</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>, <A HREF="../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A></DD>
+<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities">Device</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>, <A HREF="../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A></DD>
 </DL>
 <HR>
 <DL>
@@ -117,7 +117,7 @@ java.lang.Object
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>static&nbsp;java.util.Map&lt;java.lang.String,java.lang.Class&lt;? extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt;&gt;</CODE></FONT></TD>
+<CODE>static&nbsp;java.util.Map&lt;java.lang.String,java.lang.Class&lt;? extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt;&gt;</CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#CLASS_FOR_ENTITY_TYPE">CLASS_FOR_ENTITY_TYPE</A></B></CODE>
 
 <BR>
@@ -250,7 +250,7 @@ java.lang.Object
 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
 <TR ALIGN="right" VALIGN="">
 <TD NOWRAP><FONT SIZE="-1">
-<CODE>&lt;T extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt; 
+<CODE>&lt;T extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt; 
 <BR>
 T</CODE></FONT></TD>
 </TR>
@@ -267,13 +267,13 @@ T</CODE></FONT></TD>
 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
 <TR ALIGN="right" VALIGN="">
 <TD NOWRAP><FONT SIZE="-1">
-<CODE>&lt;T extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt; 
+<CODE>&lt;T extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt; 
 <BR>
 T</CODE></FONT></TD>
 </TR>
 </TABLE>
 </CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(org.usergrid.android.client.entities.Entity, java.lang.Class)">toType</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;entity,
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(org.apache.usergrid.android.client.entities.Entity, java.lang.Class)">toType</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;entity,
        java.lang.Class&lt;T&gt;&nbsp;t)</CODE>
 
 <BR>
@@ -285,13 +285,13 @@ T</CODE></FONT></TD>
 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
 <TR ALIGN="right" VALIGN="">
 <TD NOWRAP><FONT SIZE="-1">
-<CODE>&lt;T extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt; 
+<CODE>&lt;T extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt; 
 <BR>
 java.util.List&lt;T&gt;</CODE></FONT></TD>
 </TR>
 </TABLE>
 </CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(java.util.List, java.lang.Class)">toType</A></B>(java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt;&nbsp;entities,
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(java.util.List, java.lang.Class)">toType</A></B>(java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt;&nbsp;entities,
        java.lang.Class&lt;T&gt;&nbsp;t)</CODE>
 
 <BR>
@@ -326,7 +326,7 @@ PROPERTY_UUID</H3>
 public static final java.lang.String <B>PROPERTY_UUID</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Entity.PROPERTY_UUID">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Entity.PROPERTY_UUID">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -336,14 +336,14 @@ PROPERTY_TYPE</H3>
 public static final java.lang.String <B>PROPERTY_TYPE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Entity.PROPERTY_TYPE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Entity.PROPERTY_TYPE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
 <A NAME="CLASS_FOR_ENTITY_TYPE"><!-- --></A><H3>
 CLASS_FOR_ENTITY_TYPE</H3>
 <PRE>
-public static java.util.Map&lt;java.lang.String,java.lang.Class&lt;? extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt;&gt; <B>CLASS_FOR_ENTITY_TYPE</B></PRE>
+public static java.util.Map&lt;java.lang.String,java.lang.Class&lt;? extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt;&gt; <B>CLASS_FOR_ENTITY_TYPE</B></PRE>
 <DL>
 <DL>
 </DL>
@@ -490,7 +490,7 @@ public java.lang.String <B>toString</B>()</PRE>
 <A NAME="toType(java.lang.Class)"><!-- --></A><H3>
 toType</H3>
 <PRE>
-public &lt;T extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt; T <B>toType</B>(java.lang.Class&lt;T&gt;&nbsp;t)</PRE>
+public &lt;T extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt; T <B>toType</B>(java.lang.Class&lt;T&gt;&nbsp;t)</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -498,10 +498,10 @@ public &lt;T extends <A HREF="../../../../../org/usergrid/android/client/entitie
 </DL>
 <HR>
 
-<A NAME="toType(org.usergrid.android.client.entities.Entity, java.lang.Class)"><!-- --></A><H3>
+<A NAME="toType(org.apache.usergrid.android.client.entities.Entity, java.lang.Class)"><!-- --></A><H3>
 toType</H3>
 <PRE>
-public static &lt;T extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt; T <B>toType</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;entity,
+public static &lt;T extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt; T <B>toType</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;entity,
                                           java.lang.Class&lt;T&gt;&nbsp;t)</PRE>
 <DL>
 <DD><DL>
@@ -513,7 +513,7 @@ public static &lt;T extends <A HREF="../../../../../org/usergrid/android/client/
 <A NAME="toType(java.util.List, java.lang.Class)"><!-- --></A><H3>
 toType</H3>
 <PRE>
-public static &lt;T extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt; java.util.List&lt;T&gt; <B>toType</B>(java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt;&nbsp;entities,
+public static &lt;T extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt; java.util.List&lt;T&gt; <B>toType</B>(java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt;&nbsp;entities,
                                                           java.lang.Class&lt;T&gt;&nbsp;t)</PRE>
 <DL>
 <DD><DL>
@@ -551,8 +551,8 @@ public static &lt;T extends <A HREF="../../../../../org/usergrid/android/client/
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/entities/Entity.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="Entity.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;


[21/96] [abbrv] [partial] Change package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/mq/QueueQuery.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/mq/QueueQuery.java b/stack/core/src/main/java/org/usergrid/mq/QueueQuery.java
deleted file mode 100644
index a689437..0000000
--- a/stack/core/src/main/java/org/usergrid/mq/QueueQuery.java
+++ /dev/null
@@ -1,306 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.mq;
-
-
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
-
-import org.usergrid.utils.ConversionUtils;
-
-import static java.util.UUID.nameUUIDFromBytes;
-
-import static org.apache.commons.lang.StringUtils.isNotBlank;
-import static org.usergrid.utils.ConversionUtils.getLong;
-import static org.usergrid.utils.ListUtils.first;
-import static org.usergrid.utils.UUIDUtils.isUUID;
-import static org.usergrid.utils.UUIDUtils.tryGetUUID;
-
-
-public class QueueQuery extends Query {
-
-    UUID consumerId;
-    long lastTimestamp;
-    UUID lastMessageId;
-    QueuePosition position = null;
-    boolean _synchronized;
-    boolean update = true;
-    long timeout;
-
-
-    public QueueQuery() {
-    }
-
-
-    public QueueQuery( Query q ) {
-        super( q );
-    }
-
-
-    public QueueQuery( QueueQuery q ) {
-        super( q );
-        if ( q != null ) {
-            consumerId = q.consumerId;
-            lastTimestamp = q.lastTimestamp;
-            lastMessageId = q.lastMessageId;
-            position = q.position;
-            _synchronized = q._synchronized;
-            update = q.update;
-        }
-    }
-
-
-    public static QueueQuery newQueryIfNull( QueueQuery query ) {
-        if ( query == null ) {
-            query = new QueueQuery();
-        }
-        return query;
-    }
-
-
-    public static QueueQuery fromQL( String ql ) {
-        if ( ql == null ) {
-            return null;
-        }
-        QueueQuery query = null;
-        Query q = Query.fromQL( ql );
-        if ( q != null ) {
-            query = new QueueQuery( q );
-        }
-        return query;
-    }
-
-
-    public static QueueQuery fromQueryParams( Map<String, List<String>> params ) {
-
-        QueueQuery query = null;
-
-        Query q = Query.fromQueryParams( params );
-        if ( q != null ) {
-            query = new QueueQuery( q );
-        }
-
-        String consumer = first( params.get( "consumer" ) );
-
-        if ( consumer != null ) {
-            query = newQueryIfNull( query );
-            query.setConsumerId( getConsumerId( consumer ) );
-        }
-
-        UUID last = tryGetUUID( first( params.get( "last" ) ) );
-        if ( last != null ) {
-            query = newQueryIfNull( query );
-            query.setLastMessageId( last );
-        }
-
-        if ( params.containsKey( "time" ) ) {
-            query = newQueryIfNull( query );
-            long t = getLong( first( params.get( "time" ) ) );
-            if ( t > 0 ) {
-                query.setLastTimestamp( t );
-            }
-        }
-        if ( params.containsKey( "pos" ) ) {
-            query = newQueryIfNull( query );
-            QueuePosition pos = QueuePosition.find( first( params.get( "pos" ) ) );
-            if ( pos != null ) {
-                query.setPosition( pos );
-            }
-        }
-
-        if ( params.containsKey( "update" ) ) {
-            query = newQueryIfNull( query );
-            query.setUpdate( ConversionUtils.getBoolean( first( params.get( "update" ) ) ) );
-        }
-
-        if ( params.containsKey( "synchronized" ) ) {
-            query = newQueryIfNull( query );
-            query.setSynchronized( ConversionUtils.getBoolean( first( params.get( "synchronized" ) ) ) );
-        }
-
-        if ( params.containsKey( "timeout" ) ) {
-            query = newQueryIfNull( query );
-            query.setTimeout( ConversionUtils.getLong( first( params.get( "timeout" ) ) ) );
-        }
-
-        if ( ( query != null ) && ( consumer != null ) ) {
-            query.setPositionIfUnset( QueuePosition.CONSUMER );
-        }
-
-        return query;
-    }
-
-
-    public UUID getConsumerId() {
-        return consumerId;
-    }
-
-
-    public void setConsumerId( UUID consumerId ) {
-        this.consumerId = consumerId;
-    }
-
-
-    public QueueQuery withConsumerId( UUID consumerId ) {
-        this.consumerId = consumerId;
-        setPositionIfUnset( QueuePosition.CONSUMER );
-        return this;
-    }
-
-
-    public QueueQuery withConsumer( String consumer ) {
-        consumerId = getConsumerId( consumer );
-        setPositionIfUnset( QueuePosition.CONSUMER );
-        return this;
-    }
-
-
-    public long getLastTimestamp() {
-        return lastTimestamp;
-    }
-
-
-    public void setLastTimestamp( long lastTimestamp ) {
-        this.lastTimestamp = lastTimestamp;
-    }
-
-
-    public QueueQuery withLastTimestamp( long lastTimestamp ) {
-        this.lastTimestamp = lastTimestamp;
-        return this;
-    }
-
-
-    public UUID getLastMessageId() {
-        return lastMessageId;
-    }
-
-
-    public void setLastMessageId( UUID lastMessageId ) {
-        this.lastMessageId = lastMessageId;
-    }
-
-
-    public QueueQuery withLastMessageId( UUID lastMessageId ) {
-        this.lastMessageId = lastMessageId;
-        return this;
-    }
-
-
-    public QueuePosition getPosition() {
-        if ( position != null ) {
-            return position;
-        }
-        return QueuePosition.LAST;
-    }
-
-
-    public boolean isPositionSet() {
-        return position != null;
-    }
-
-
-    public void setPosition( QueuePosition position ) {
-        this.position = position;
-    }
-
-
-    public void setPositionIfUnset( QueuePosition position ) {
-        if ( this.position == null ) {
-            this.position = position;
-        }
-    }
-
-
-    public QueueQuery withPosition( QueuePosition position ) {
-        this.position = position;
-        return this;
-    }
-
-
-    public QueueQuery withPositionInUnset( QueuePosition position ) {
-        if ( this.position == null ) {
-            this.position = position;
-        }
-        return this;
-    }
-
-
-    public static UUID getConsumerId( String consumer ) {
-        if ( consumer == null ) {
-            return null;
-        }
-        if ( isUUID( consumer ) ) {
-            return UUID.fromString( consumer );
-        }
-        else if ( isNotBlank( consumer ) ) {
-            return nameUUIDFromBytes( ( "consumer:" + consumer ).getBytes() );
-        }
-        return null;
-    }
-
-
-    public boolean isSynchronized() {
-        return _synchronized;
-    }
-
-
-    public void setSynchronized( boolean _synchronized ) {
-        this._synchronized = _synchronized;
-    }
-
-
-    public QueueQuery withSynchronized( boolean _synchronized ) {
-        this._synchronized = _synchronized;
-        return this;
-    }
-
-
-    public boolean isUpdate() {
-        return update;
-    }
-
-
-    public void setUpdate( boolean update ) {
-        this.update = update;
-    }
-
-
-    public QueueQuery withUpdate( boolean update ) {
-        this.update = update;
-        return this;
-    }
-
-
-    /** @return the timeout */
-    public long getTimeout() {
-        return timeout;
-    }
-
-
-    /** @param timeout the timeout to set */
-    public void setTimeout( long timeout ) {
-        this.timeout = timeout;
-        setSynchronized( true );
-    }
-
-
-    public QueueQuery withTimeout( long timeout ) {
-        setTimeout( timeout );
-        return this;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/mq/QueueResults.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/mq/QueueResults.java b/stack/core/src/main/java/org/usergrid/mq/QueueResults.java
deleted file mode 100644
index f150cad..0000000
--- a/stack/core/src/main/java/org/usergrid/mq/QueueResults.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.mq;
-
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.UUID;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
-
-
-@XmlRootElement
-public class QueueResults {
-
-    private String path;
-    private UUID queue;
-    private List<Message> messages = new ArrayList<Message>();
-    private UUID last;
-    private UUID consumer;
-
-
-    public QueueResults() {
-
-    }
-
-
-    public QueueResults( Message message ) {
-        if ( message != null ) {
-            messages.add( message );
-        }
-    }
-
-
-    public QueueResults( List<Message> messages ) {
-        if ( messages != null ) {
-            this.messages = messages;
-        }
-    }
-
-
-    public QueueResults( String path, UUID queue, List<Message> messages, UUID last, UUID consumer ) {
-        this.path = path;
-        this.queue = queue;
-        this.messages = messages;
-        this.last = last;
-        this.consumer = consumer;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public String getPath() {
-        return path;
-    }
-
-
-    public void setPath( String path ) {
-        this.path = path;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public UUID getQueue() {
-        return queue;
-    }
-
-
-    public void setQueue( UUID queue ) {
-        this.queue = queue;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public List<Message> getMessages() {
-        return messages;
-    }
-
-
-    public void setMessages( List<Message> messages ) {
-        if ( messages == null ) {
-            messages = new ArrayList<Message>();
-        }
-        this.messages = messages;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public UUID getLast() {
-        return last;
-    }
-
-
-    public void setLast( UUID last ) {
-        this.last = last;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public UUID getConsumer() {
-        return consumer;
-    }
-
-
-    public void setConsumer( UUID consumer ) {
-        this.consumer = consumer;
-    }
-
-
-    public int size() {
-        return messages.size();
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/mq/QueueSet.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/mq/QueueSet.java b/stack/core/src/main/java/org/usergrid/mq/QueueSet.java
deleted file mode 100644
index b1fc63d..0000000
--- a/stack/core/src/main/java/org/usergrid/mq/QueueSet.java
+++ /dev/null
@@ -1,192 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.mq;
-
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.UUID;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
-
-
-@XmlRootElement
-public class QueueSet {
-
-    List<QueueInfo> queues = new ArrayList<QueueInfo>();
-    boolean more;
-
-
-    public QueueSet() {
-
-    }
-
-
-    public List<QueueInfo> getQueues() {
-        return queues;
-    }
-
-
-    public void setQueues( List<QueueInfo> queues ) {
-        if ( queues == null ) {
-            queues = new ArrayList<QueueInfo>();
-        }
-        this.queues = queues;
-    }
-
-
-    public QueueSet addQueue( String queuePath, UUID queueId ) {
-        QueueInfo queue = new QueueInfo( queuePath, queueId );
-        queues.add( queue );
-        return this;
-    }
-
-
-    public boolean isMore() {
-        return more;
-    }
-
-
-    public void setMore( boolean more ) {
-        this.more = more;
-    }
-
-
-    public boolean hasMore() {
-        return more;
-    }
-
-
-    public int size() {
-        return queues.size();
-    }
-
-
-    @XmlRootElement
-    public static class QueueInfo {
-
-        String path;
-        UUID uuid;
-
-
-        public QueueInfo() {
-        }
-
-
-        public QueueInfo( String path, UUID uuid ) {
-            this.path = path;
-            this.uuid = uuid;
-        }
-
-
-        public String getPath() {
-            return path;
-        }
-
-
-        public void setPath( String path ) {
-            this.path = path;
-        }
-
-
-        public UUID getUuid() {
-            return uuid;
-        }
-
-
-        public void setUuid( UUID uuid ) {
-            this.uuid = uuid;
-        }
-
-
-        @Override
-        public int hashCode() {
-            final int prime = 31;
-            int result = 1;
-            result = ( prime * result ) + ( ( path == null ) ? 0 : path.hashCode() );
-            result = ( prime * result ) + ( ( uuid == null ) ? 0 : uuid.hashCode() );
-            return result;
-        }
-
-
-        @Override
-        public boolean equals( Object obj ) {
-            if ( this == obj ) {
-                return true;
-            }
-            if ( obj == null ) {
-                return false;
-            }
-            if ( getClass() != obj.getClass() ) {
-                return false;
-            }
-            QueueInfo other = ( QueueInfo ) obj;
-            if ( path == null ) {
-                if ( other.path != null ) {
-                    return false;
-                }
-            }
-            else if ( !path.equals( other.path ) ) {
-                return false;
-            }
-            if ( uuid == null ) {
-                if ( other.uuid != null ) {
-                    return false;
-                }
-            }
-            else if ( !uuid.equals( other.uuid ) ) {
-                return false;
-            }
-            return true;
-        }
-
-
-        @Override
-        public String toString() {
-            return "QueueInfo [path=" + path + ", uuid=" + uuid + "]";
-        }
-    }
-
-
-    public void setCursorToLastResult() {
-        // TODO Auto-generated method stub
-
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public Object getCursor() {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-
-    public void and( QueueSet r ) {
-        Set<QueueInfo> oldSet = new HashSet<QueueInfo>( queues );
-        List<QueueInfo> newList = new ArrayList<QueueInfo>();
-        for ( QueueInfo q : r.getQueues() ) {
-            if ( oldSet.contains( q ) ) {
-                newList.add( q );
-            }
-        }
-        queues = newList;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/mq/cassandra/CassandraMQUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/mq/cassandra/CassandraMQUtils.java b/stack/core/src/main/java/org/usergrid/mq/cassandra/CassandraMQUtils.java
deleted file mode 100644
index 266a15d..0000000
--- a/stack/core/src/main/java/org/usergrid/mq/cassandra/CassandraMQUtils.java
+++ /dev/null
@@ -1,278 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.mq.cassandra;
-
-
-import java.nio.ByteBuffer;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.UUID;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.usergrid.mq.Message;
-import org.usergrid.mq.Queue;
-import org.usergrid.mq.QueueQuery;
-import org.usergrid.utils.ConversionUtils;
-import org.usergrid.utils.JsonUtils;
-import org.usergrid.utils.UUIDUtils;
-
-import me.prettyprint.cassandra.serializers.ByteBufferSerializer;
-import me.prettyprint.cassandra.serializers.BytesArraySerializer;
-import me.prettyprint.cassandra.serializers.DynamicCompositeSerializer;
-import me.prettyprint.cassandra.serializers.LongSerializer;
-import me.prettyprint.cassandra.serializers.StringSerializer;
-import me.prettyprint.cassandra.serializers.UUIDSerializer;
-import me.prettyprint.hector.api.beans.HColumn;
-import me.prettyprint.hector.api.mutation.Mutator;
-
-import static me.prettyprint.hector.api.factory.HFactory.createColumn;
-import static org.usergrid.mq.Message.MESSAGE_ID;
-import static org.usergrid.mq.Message.MESSAGE_PROPERTIES;
-import static org.usergrid.mq.Message.MESSAGE_TYPE;
-import static org.usergrid.mq.Queue.QUEUE_NEWEST;
-import static org.usergrid.mq.Queue.QUEUE_OLDEST;
-import static org.usergrid.mq.Queue.QUEUE_PROPERTIES;
-import static org.usergrid.mq.QueuePosition.CONSUMER;
-import static org.usergrid.utils.ConversionUtils.bytebuffer;
-import static org.usergrid.utils.ConversionUtils.getLong;
-import static org.usergrid.utils.ConversionUtils.object;
-
-
-public class CassandraMQUtils {
-
-    public static final Logger logger = LoggerFactory.getLogger( CassandraMQUtils.class );
-
-    public static final StringSerializer se = new StringSerializer();
-    public static final ByteBufferSerializer be = new ByteBufferSerializer();
-    public static final UUIDSerializer ue = new UUIDSerializer();
-    public static final BytesArraySerializer bae = new BytesArraySerializer();
-    public static final DynamicCompositeSerializer dce = new DynamicCompositeSerializer();
-    public static final LongSerializer le = new LongSerializer();
-
-    /** Logger for batch operations */
-    private static final Logger batch_logger =
-            LoggerFactory.getLogger( CassandraMQUtils.class.getPackage().getName() + ".BATCH" );
-
-
-    public static void logBatchOperation( String operation, Object columnFamily, Object key, Object columnName,
-                                          Object columnValue, long timestamp ) {
-
-        if ( batch_logger.isInfoEnabled() ) {
-            batch_logger.info( "{} cf={} key={} name={} value={}", new Object[] {
-                    operation, columnFamily, key, columnName, columnValue
-            } );
-        }
-    }
-
-
-    /**
-     * Encode a message into a set of columns. JMS properties are encoded as strings and longs everything else is binary
-     * JSON.
-     */
-    public static Map<ByteBuffer, ByteBuffer> serializeMessage( Message message ) {
-        if ( message == null ) {
-            return null;
-        }
-        Map<ByteBuffer, ByteBuffer> columns = new HashMap<ByteBuffer, ByteBuffer>();
-        for ( Entry<String, Object> property : message.getProperties().entrySet() ) {
-            if ( property.getValue() == null ) {
-                columns.put( bytebuffer( property.getKey() ), null );
-            }
-            else if ( MESSAGE_TYPE.equals( property.getKey() ) || MESSAGE_ID.equals( property.getKey() ) ) {
-                columns.put( bytebuffer( property.getKey() ), bytebuffer( property.getValue() ) );
-            }
-            else {
-                columns.put( bytebuffer( property.getKey() ), JsonUtils.toByteBuffer( property.getValue() ) );
-            }
-        }
-        return columns;
-    }
-
-
-    public static Mutator<ByteBuffer> addMessageToMutator( Mutator<ByteBuffer> m, Message message, long timestamp ) {
-
-        Map<ByteBuffer, ByteBuffer> columns = serializeMessage( message );
-
-        if ( columns == null ) {
-            return m;
-        }
-
-        for ( Map.Entry<ByteBuffer, ByteBuffer> column_entry : columns.entrySet() ) {
-            if ( ( column_entry.getValue() != null ) && column_entry.getValue().hasRemaining() ) {
-                HColumn<ByteBuffer, ByteBuffer> column =
-                        createColumn( column_entry.getKey(), column_entry.getValue(), timestamp, be, be );
-                m.addInsertion( bytebuffer( message.getUuid() ), QueuesCF.MESSAGE_PROPERTIES.toString(), column );
-            }
-            else {
-                m.addDeletion( bytebuffer( message.getUuid() ), QueuesCF.MESSAGE_PROPERTIES.toString(),
-                        column_entry.getKey(), be, timestamp );
-            }
-        }
-
-        return m;
-    }
-
-
-    public static Message deserializeMessage( List<HColumn<String, ByteBuffer>> columns ) {
-        Message message = null;
-
-        Map<String, Object> properties = new HashMap<String, Object>();
-        for ( HColumn<String, ByteBuffer> column : columns ) {
-            if ( MESSAGE_TYPE.equals( column.getName() ) || MESSAGE_ID.equals( column.getName() ) ) {
-                properties.put( column.getName(),
-                        object( MESSAGE_PROPERTIES.get( column.getName() ), column.getValue() ) );
-            }
-            else {
-                properties.put( column.getName(), JsonUtils.fromByteBuffer( column.getValue() ) );
-            }
-        }
-        if ( !properties.isEmpty() ) {
-            message = new Message( properties );
-        }
-
-        return message;
-    }
-
-
-    public static Map<ByteBuffer, ByteBuffer> serializeQueue( Queue queue ) {
-        if ( queue == null ) {
-            return null;
-        }
-        Map<ByteBuffer, ByteBuffer> columns = new HashMap<ByteBuffer, ByteBuffer>();
-        for ( Entry<String, Object> property : queue.getProperties().entrySet() ) {
-            if ( property.getValue() == null ) {
-                continue;
-            }
-            if ( Queue.QUEUE_ID.equals( property.getKey() ) || QUEUE_NEWEST.equals( property.getKey() ) || QUEUE_OLDEST
-                    .equals( property.getKey() ) ) {
-                continue;
-            }
-            if ( QUEUE_PROPERTIES.containsKey( property.getKey() ) ) {
-                columns.put( bytebuffer( property.getKey() ), bytebuffer( property.getValue() ) );
-            }
-            else {
-                columns.put( bytebuffer( property.getKey() ), JsonUtils.toByteBuffer( property.getValue() ) );
-            }
-        }
-        return columns;
-    }
-
-
-    public static Queue deserializeQueue( List<HColumn<String, ByteBuffer>> columns ) {
-        Queue queue = null;
-
-        Map<String, Object> properties = new HashMap<String, Object>();
-        for ( HColumn<String, ByteBuffer> column : columns ) {
-            if ( QUEUE_PROPERTIES.containsKey( column.getName() ) ) {
-                properties
-                        .put( column.getName(), object( QUEUE_PROPERTIES.get( column.getName() ), column.getValue() ) );
-            }
-            else {
-                properties.put( column.getName(), JsonUtils.fromByteBuffer( column.getValue() ) );
-            }
-        }
-        if ( !properties.isEmpty() ) {
-            queue = new Queue( properties );
-        }
-
-        return queue;
-    }
-
-
-    public static Mutator<ByteBuffer> addQueueToMutator( Mutator<ByteBuffer> m, Queue queue, long timestamp ) {
-
-        Map<ByteBuffer, ByteBuffer> columns = serializeQueue( queue );
-
-        if ( columns == null ) {
-            return m;
-        }
-
-        for ( Map.Entry<ByteBuffer, ByteBuffer> column_entry : columns.entrySet() ) {
-            if ( ( column_entry.getValue() != null ) && column_entry.getValue().hasRemaining() ) {
-                HColumn<ByteBuffer, ByteBuffer> column =
-                        createColumn( column_entry.getKey(), column_entry.getValue(), timestamp, be, be );
-                m.addInsertion( bytebuffer( queue.getUuid() ), QueuesCF.QUEUE_PROPERTIES.toString(), column );
-            }
-            else {
-                m.addDeletion( bytebuffer( queue.getUuid() ), QueuesCF.QUEUE_PROPERTIES.toString(),
-                        column_entry.getKey(), be, timestamp );
-            }
-        }
-
-        return m;
-    }
-
-
-    public static ByteBuffer getQueueShardRowKey( UUID uuid, long ts ) {
-        ByteBuffer bytes = ByteBuffer.allocate( 24 );
-        bytes.putLong( uuid.getMostSignificantBits() );
-        bytes.putLong( uuid.getLeastSignificantBits() );
-        bytes.putLong( ts );
-        return ( ByteBuffer ) bytes.rewind();
-    }
-
-
-    /** Get a row key in format of queueId+clientId */
-    public static ByteBuffer getQueueClientTransactionKey( UUID queueId, UUID clientId ) {
-        ByteBuffer bytes = ByteBuffer.allocate( 32 );
-        bytes.putLong( queueId.getMostSignificantBits() );
-        bytes.putLong( queueId.getLeastSignificantBits() );
-        bytes.putLong( clientId.getMostSignificantBits() );
-        bytes.putLong( clientId.getLeastSignificantBits() );
-        return ( ByteBuffer ) bytes.rewind();
-    }
-
-
-    public static UUID getUUIDFromRowKey( ByteBuffer bytes ) {
-        return ConversionUtils.uuid( bytes );
-    }
-
-
-    public static long getLongFromRowKey( ByteBuffer bytes ) {
-        bytes = bytes.slice();
-        return getLong( 16 );
-    }
-
-
-    /** Get the queueId from the path */
-    public static UUID getQueueId( String path ) {
-        String queuePath = Queue.normalizeQueuePath( path );
-        if ( queuePath == null ) {
-            queuePath = "/";
-        }
-
-        logger.info( "QueueManagerFactoryImpl.getFromQueue: {}", queuePath );
-
-        return Queue.getQueueId( queuePath );
-    }
-
-
-    /** Get the consumer Id from the queue id */
-    public static UUID getConsumerId( UUID queueId, QueueQuery query ) {
-        UUID consumerId = queueId;
-
-        if ( query.getPosition() == CONSUMER ) {
-            consumerId = query.getConsumerId();
-            if ( ( consumerId == null ) && ( query.getPosition() == CONSUMER ) ) {
-                consumerId = UUIDUtils.newTimeUUID();
-            }
-        }
-        return consumerId;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/mq/cassandra/MessageIndexUpdate.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/mq/cassandra/MessageIndexUpdate.java b/stack/core/src/main/java/org/usergrid/mq/cassandra/MessageIndexUpdate.java
deleted file mode 100644
index 8626174..0000000
--- a/stack/core/src/main/java/org/usergrid/mq/cassandra/MessageIndexUpdate.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.mq.cassandra;
-
-
-import java.nio.ByteBuffer;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.UUID;
-
-import org.usergrid.mq.Message;
-
-import me.prettyprint.cassandra.serializers.ByteBufferSerializer;
-import me.prettyprint.cassandra.serializers.BytesArraySerializer;
-import me.prettyprint.cassandra.serializers.DynamicCompositeSerializer;
-import me.prettyprint.cassandra.serializers.LongSerializer;
-import me.prettyprint.cassandra.serializers.StringSerializer;
-import me.prettyprint.cassandra.serializers.UUIDSerializer;
-import me.prettyprint.hector.api.beans.DynamicComposite;
-import me.prettyprint.hector.api.mutation.Mutator;
-
-import static me.prettyprint.hector.api.factory.HFactory.createColumn;
-import static org.usergrid.mq.Message.MESSAGE_PROPERTIES;
-import static org.usergrid.mq.cassandra.QueueIndexUpdate.indexValueCode;
-import static org.usergrid.mq.cassandra.QueueIndexUpdate.validIndexableValue;
-import static org.usergrid.mq.cassandra.QueueIndexUpdate.validIndexableValueOrJson;
-import static org.usergrid.mq.cassandra.QueueManagerImpl.DICTIONARY_MESSAGE_INDEXES;
-import static org.usergrid.mq.cassandra.QueuesCF.PROPERTY_INDEX;
-import static org.usergrid.mq.cassandra.QueuesCF.QUEUE_DICTIONARIES;
-import static org.usergrid.persistence.cassandra.CassandraPersistenceUtils.key;
-import static org.usergrid.utils.ConversionUtils.bytebuffer;
-import static org.usergrid.utils.IndexUtils.getKeyValueList;
-
-
-public class MessageIndexUpdate {
-
-    public static final boolean FULLTEXT = false;
-
-    final Message message;
-    final Map<String, List<Map.Entry<String, Object>>> propertyEntryList;
-
-    public static final StringSerializer se = new StringSerializer();
-    public static final ByteBufferSerializer be = new ByteBufferSerializer();
-    public static final UUIDSerializer ue = new UUIDSerializer();
-    public static final BytesArraySerializer bae = new BytesArraySerializer();
-    public static final DynamicCompositeSerializer dce = new DynamicCompositeSerializer();
-    public static final LongSerializer le = new LongSerializer();
-
-
-    public MessageIndexUpdate( Message message ) {
-        this.message = message;
-
-        if ( message.isIndexed() ) {
-            propertyEntryList = new HashMap<String, List<Map.Entry<String, Object>>>();
-
-            for ( Map.Entry<String, Object> property : message.getProperties().entrySet() ) {
-
-                if ( !MESSAGE_PROPERTIES.containsKey( property.getKey() ) && validIndexableValueOrJson(
-                        property.getValue() ) ) {
-
-                    List<Map.Entry<String, Object>> list =
-                            getKeyValueList( property.getKey(), property.getValue(), FULLTEXT );
-
-                    propertyEntryList.put( property.getKey(), list );
-                }
-            }
-        }
-        else {
-            propertyEntryList = null;
-        }
-    }
-
-
-    public void addToMutation( Mutator<ByteBuffer> batch, UUID queueId, long shard_ts, long timestamp ) {
-
-        if ( propertyEntryList != null ) {
-            for ( Entry<String, List<Entry<String, Object>>> property : propertyEntryList.entrySet() ) {
-
-                for ( Map.Entry<String, Object> indexEntry : property.getValue() ) {
-
-                    if ( validIndexableValue( indexEntry.getValue() ) ) {
-
-                        batch.addInsertion( bytebuffer( key( queueId, shard_ts, indexEntry.getKey() ) ),
-                                PROPERTY_INDEX.getColumnFamily(), createColumn(
-                                new DynamicComposite( indexValueCode( indexEntry.getValue() ), indexEntry.getValue(),
-                                        message.getUuid() ), ByteBuffer.allocate( 0 ), timestamp, dce, be ) );
-
-                        batch.addInsertion( bytebuffer( key( queueId, DICTIONARY_MESSAGE_INDEXES ) ),
-                                QUEUE_DICTIONARIES.getColumnFamily(),
-                                createColumn( indexEntry.getKey(), ByteBuffer.allocate( 0 ), timestamp, se, be ) );
-                    }
-                }
-
-                batch.addInsertion( bytebuffer( key( queueId, DICTIONARY_MESSAGE_INDEXES ) ),
-                        QUEUE_DICTIONARIES.getColumnFamily(),
-                        createColumn( property.getKey(), ByteBuffer.allocate( 0 ), timestamp, se, be ) );
-            }
-        }
-    }
-
-
-    public Message getMessage() {
-        return message;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/mq/cassandra/QueueIndexUpdate.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/mq/cassandra/QueueIndexUpdate.java b/stack/core/src/main/java/org/usergrid/mq/cassandra/QueueIndexUpdate.java
deleted file mode 100644
index e1c31a0..0000000
--- a/stack/core/src/main/java/org/usergrid/mq/cassandra/QueueIndexUpdate.java
+++ /dev/null
@@ -1,349 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.mq.cassandra;
-
-
-import java.io.IOException;
-import java.math.BigInteger;
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.UUID;
-
-import org.codehaus.jackson.JsonNode;
-
-import com.fasterxml.uuid.UUIDComparator;
-
-import me.prettyprint.hector.api.beans.DynamicComposite;
-import me.prettyprint.hector.api.mutation.Mutator;
-
-import static java.nio.ByteBuffer.wrap;
-
-import static org.usergrid.utils.JsonUtils.toJsonNode;
-import static org.usergrid.utils.UUIDUtils.getTimestampInMicros;
-
-
-public class QueueIndexUpdate {
-
-    public static final byte VALUE_CODE_BYTES = 0;
-    public static final byte VALUE_CODE_UTF8 = 1;
-    public static final byte VALUE_CODE_UUID = 2;
-    public static final byte VALUE_CODE_INT = 3;
-    public static final byte VALUE_CODE_MAX = 127;
-
-    public static int INDEX_STRING_VALUE_LENGTH = 1024;
-
-    private Mutator<ByteBuffer> batch;
-    private String queuePath;
-    private UUID queueId;
-    private String entryName;
-    private Object entryValue;
-    private final List<QueueIndexEntry> prevEntries = new ArrayList<QueueIndexEntry>();
-    private final List<QueueIndexEntry> newEntries = new ArrayList<QueueIndexEntry>();
-    private final Set<String> indexesSet = new LinkedHashSet<String>();
-    private long timestamp;
-    private final UUID timestampUuid;
-
-
-    public QueueIndexUpdate( Mutator<ByteBuffer> batch, String queuePath, UUID queueId, String entryName,
-                             Object entryValue, UUID timestampUuid ) {
-        this.batch = batch;
-        this.queuePath = queuePath;
-        this.queueId = queueId;
-        this.entryName = entryName;
-        this.entryValue = entryValue;
-        timestamp = getTimestampInMicros( timestampUuid );
-        this.timestampUuid = timestampUuid;
-    }
-
-
-    public Mutator<ByteBuffer> getBatch() {
-        return batch;
-    }
-
-
-    public void setBatch( Mutator<ByteBuffer> batch ) {
-        this.batch = batch;
-    }
-
-
-    public String getQueuePath() {
-        return queuePath;
-    }
-
-
-    public void setQueuePath( String queuePath ) {
-        this.queuePath = queuePath;
-    }
-
-
-    public UUID getQueueId() {
-        return queueId;
-    }
-
-
-    public void setQueueId( UUID queueId ) {
-        this.queueId = queueId;
-    }
-
-
-    public String getEntryName() {
-        return entryName;
-    }
-
-
-    public void setEntryName( String entryName ) {
-        this.entryName = entryName;
-    }
-
-
-    public Object getEntryValue() {
-        return entryValue;
-    }
-
-
-    public void setEntryValue( Object entryValue ) {
-        this.entryValue = entryValue;
-    }
-
-
-    public long getTimestamp() {
-        return timestamp;
-    }
-
-
-    public void setTimestamp( long timestamp ) {
-        this.timestamp = timestamp;
-    }
-
-
-    public UUID getTimestampUuid() {
-        return timestampUuid;
-    }
-
-
-    public List<QueueIndexEntry> getPrevEntries() {
-        return prevEntries;
-    }
-
-
-    public void addPrevEntry( String path, Object value, UUID timestamp ) {
-        QueueIndexEntry entry = new QueueIndexEntry( path, value, timestamp );
-        prevEntries.add( entry );
-    }
-
-
-    public List<QueueIndexEntry> getNewEntries() {
-        return newEntries;
-    }
-
-
-    public void addNewEntry( String path, Object value ) {
-        QueueIndexEntry entry = new QueueIndexEntry( path, value, timestampUuid );
-        newEntries.add( entry );
-    }
-
-
-    public Set<String> getIndexesSet() {
-        return indexesSet;
-    }
-
-
-    public void addIndex( String index ) {
-        indexesSet.add( index );
-    }
-
-
-    public class QueueIndexEntry {
-        private final byte code;
-        private String path;
-        private final Object value;
-        private final UUID timestampUuid;
-
-
-        public QueueIndexEntry( String path, Object value, UUID timestampUuid ) {
-            this.path = path;
-            this.value = value;
-            code = indexValueCode( value );
-            this.timestampUuid = timestampUuid;
-        }
-
-
-        public String getPath() {
-            return path;
-        }
-
-
-        public void setPath( String path ) {
-            this.path = path;
-        }
-
-
-        public Object getValue() {
-            return value;
-        }
-
-
-        public byte getValueCode() {
-            return code;
-        }
-
-
-        public UUID getTimestampUuid() {
-            return timestampUuid;
-        }
-
-
-        public DynamicComposite getIndexComposite() {
-            return new DynamicComposite( code, value, getQueueId(), getQueuePath(), timestampUuid );
-        }
-    }
-
-
-    private static String prepStringForIndex( String str ) {
-        str = str.trim().toLowerCase();
-        str = str.substring( 0, Math.min( INDEX_STRING_VALUE_LENGTH, str.length() ) );
-        return str;
-    }
-
-
-    /**
-     * @param obj
-     * @return
-     */
-    public static Object toIndexableValue( Object obj ) {
-        if ( obj == null ) {
-            return null;
-        }
-
-        if ( obj instanceof String ) {
-            return prepStringForIndex( ( String ) obj );
-        }
-
-        // UUIDs, and BigIntegers map to Cassandra UTF8Type and IntegerType
-        if ( ( obj instanceof UUID ) || ( obj instanceof BigInteger ) ) {
-            return obj;
-        }
-
-        // For any numeric values, turn them into a long
-        // and make them BigIntegers for IntegerType
-        if ( obj instanceof Number ) {
-            return BigInteger.valueOf( ( ( Number ) obj ).longValue() );
-        }
-
-        if ( obj instanceof Boolean ) {
-            return BigInteger.valueOf( ( ( Boolean ) obj ) ? 1L : 0L );
-        }
-
-        if ( obj instanceof Date ) {
-            return BigInteger.valueOf( ( ( Date ) obj ).getTime() );
-        }
-
-        if ( obj instanceof byte[] ) {
-            return wrap( ( byte[] ) obj );
-        }
-
-        if ( obj instanceof ByteBuffer ) {
-            return obj;
-        }
-
-        JsonNode json = toJsonNode( obj );
-        if ( ( json != null ) && json.isValueNode() ) {
-            if ( json.isBigInteger() ) {
-                return json.getBigIntegerValue();
-            }
-            else if ( json.isNumber() || json.isBoolean() ) {
-                return BigInteger.valueOf( json.getValueAsLong() );
-            }
-            else if ( json.isTextual() ) {
-                return prepStringForIndex( json.getTextValue() );
-            }
-            else if ( json.isBinary() ) {
-                try {
-                    return wrap( json.getBinaryValue() );
-                }
-                catch ( IOException e ) {
-                }
-            }
-        }
-
-        return null;
-    }
-
-
-    public static boolean validIndexableValue( Object obj ) {
-        return toIndexableValue( obj ) != null;
-    }
-
-
-    public static boolean validIndexableValueOrJson( Object obj ) {
-        if ( ( obj instanceof Map ) || ( obj instanceof List ) || ( obj instanceof JsonNode ) ) {
-            return true;
-        }
-        return toIndexableValue( obj ) != null;
-    }
-
-
-    public static byte indexValueCode( Object obj ) {
-        obj = toIndexableValue( obj );
-        if ( obj instanceof String ) {
-            return VALUE_CODE_UTF8;
-        }
-        else if ( obj instanceof UUID ) {
-            return VALUE_CODE_UUID;
-        }
-        else if ( obj instanceof BigInteger ) {
-            return VALUE_CODE_INT;
-        }
-        else if ( obj instanceof Number ) {
-            return VALUE_CODE_INT;
-        }
-        else {
-            return VALUE_CODE_BYTES;
-        }
-    }
-
-
-    @SuppressWarnings({ "rawtypes", "unchecked" })
-    public static int compareIndexedValues( Object o1, Object o2 ) {
-        o1 = toIndexableValue( o1 );
-        o2 = toIndexableValue( o2 );
-        if ( ( o1 == null ) && ( o2 == null ) ) {
-            return 0;
-        }
-        else if ( o1 == null ) {
-            return -1;
-        }
-        else if ( o2 == null ) {
-            return 1;
-        }
-        int c1 = indexValueCode( o1 );
-        int c2 = indexValueCode( o2 );
-        if ( c1 == c2 ) {
-            if ( o1 instanceof UUID ) {
-                UUIDComparator.staticCompare( ( UUID ) o1, ( UUID ) o2 );
-            }
-            else if ( o1 instanceof Comparable ) {
-                return ( ( Comparable ) o1 ).compareTo( o2 );
-            }
-        }
-        return c1 - c2;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/mq/cassandra/QueueManagerFactoryImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/mq/cassandra/QueueManagerFactoryImpl.java b/stack/core/src/main/java/org/usergrid/mq/cassandra/QueueManagerFactoryImpl.java
deleted file mode 100644
index 4783452..0000000
--- a/stack/core/src/main/java/org/usergrid/mq/cassandra/QueueManagerFactoryImpl.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.mq.cassandra;
-
-
-import java.util.UUID;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.usergrid.locking.LockManager;
-import org.usergrid.mq.QueueManager;
-import org.usergrid.mq.QueueManagerFactory;
-import org.usergrid.persistence.cassandra.CassandraService;
-import org.usergrid.persistence.cassandra.CounterUtils;
-
-import me.prettyprint.cassandra.serializers.ByteBufferSerializer;
-import me.prettyprint.cassandra.serializers.BytesArraySerializer;
-import me.prettyprint.cassandra.serializers.DynamicCompositeSerializer;
-import me.prettyprint.cassandra.serializers.LongSerializer;
-import me.prettyprint.cassandra.serializers.StringSerializer;
-import me.prettyprint.cassandra.serializers.UUIDSerializer;
-
-
-public class QueueManagerFactoryImpl implements QueueManagerFactory {
-
-    public static final Logger logger = LoggerFactory.getLogger( QueueManagerFactoryImpl.class );
-
-    public static String IMPLEMENTATION_DESCRIPTION = "Cassandra Queue Manager Factory 1.0";
-
-    private CassandraService cass;
-    private CounterUtils counterUtils;
-    private LockManager lockManager;
-    private int lockTimeout;
-
-    public static final StringSerializer se = new StringSerializer();
-    public static final ByteBufferSerializer be = new ByteBufferSerializer();
-    public static final UUIDSerializer ue = new UUIDSerializer();
-    public static final BytesArraySerializer bae = new BytesArraySerializer();
-    public static final DynamicCompositeSerializer dce = new DynamicCompositeSerializer();
-    public static final LongSerializer le = new LongSerializer();
-
-
-    /**
-     * Must be constructed with a CassandraClientPool.
-     *
-     * @param cass the cassandra client pool
-     * @param counterUtils the CounterUtils
-     */
-    public QueueManagerFactoryImpl( CassandraService cass, CounterUtils counterUtils, LockManager lockManager, int lockTimeout ) {
-        this.cass = cass;
-        this.counterUtils = counterUtils;
-        this.lockManager = lockManager;
-        this.lockTimeout = lockTimeout;
-    }
-
-
-    @Override
-    public String getImpementationDescription() throws Exception {
-        return IMPLEMENTATION_DESCRIPTION;
-    }
-
-
-    @Override
-    public QueueManager getQueueManager( UUID applicationId ) {
-        QueueManagerImpl qm = new QueueManagerImpl();
-        qm.init( cass, counterUtils, lockManager, applicationId, lockTimeout );
-        return qm;
-        //return applicationContext.getAutowireCapableBeanFactory()
-        //		.createBean(QueueManagerImpl.class)
-        //		.init(this, cass, counterUtils, applicationId);
-    }
-}


[08/96] [abbrv] [partial] Change package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/exceptions/TransactionNotFoundException.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/exceptions/TransactionNotFoundException.java b/stack/core/src/main/java/org/usergrid/persistence/exceptions/TransactionNotFoundException.java
deleted file mode 100644
index 28baeca..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/exceptions/TransactionNotFoundException.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.exceptions;
-
-
-public class TransactionNotFoundException extends PersistenceException {
-
-    /**
-     *
-     */
-    private static final long serialVersionUID = -3579346096812510039L;
-
-
-    public TransactionNotFoundException() {
-        super();
-    }
-
-
-    public TransactionNotFoundException( String message, Throwable cause ) {
-        super( message, cause );
-    }
-
-
-    public TransactionNotFoundException( String message ) {
-        super( message );
-    }
-
-
-    public TransactionNotFoundException( Throwable cause ) {
-        super( cause );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/exceptions/UnexpectedEntityTypeException.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/exceptions/UnexpectedEntityTypeException.java b/stack/core/src/main/java/org/usergrid/persistence/exceptions/UnexpectedEntityTypeException.java
deleted file mode 100644
index 4734da5..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/exceptions/UnexpectedEntityTypeException.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.exceptions;
-
-
-public class UnexpectedEntityTypeException extends PersistenceException {
-
-    /**
-     *
-     */
-    private static final long serialVersionUID = 8221919267880904834L;
-
-
-    public UnexpectedEntityTypeException() {
-        super();
-    }
-
-
-    public UnexpectedEntityTypeException( String message, Throwable cause ) {
-        super( message, cause );
-    }
-
-
-    public UnexpectedEntityTypeException( String message ) {
-        super( message );
-    }
-
-
-    public UnexpectedEntityTypeException( Throwable cause ) {
-        super( cause );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/geo/CollectionGeoSearch.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/geo/CollectionGeoSearch.java b/stack/core/src/main/java/org/usergrid/persistence/geo/CollectionGeoSearch.java
deleted file mode 100644
index 43e8ff3..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/geo/CollectionGeoSearch.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package org.usergrid.persistence.geo;
-
-
-import java.nio.ByteBuffer;
-import java.util.List;
-import java.util.TreeSet;
-import java.util.UUID;
-
-import org.usergrid.persistence.EntityManager;
-import org.usergrid.persistence.EntityRef;
-import org.usergrid.persistence.IndexBucketLocator;
-import org.usergrid.persistence.cassandra.CassandraService;
-import org.usergrid.persistence.geo.model.Point;
-
-import me.prettyprint.hector.api.beans.HColumn;
-
-import static org.usergrid.persistence.cassandra.CassandraPersistenceUtils.key;
-
-
-/**
- * Class for loading collection search data
- *
- * @author tnine
- */
-public class CollectionGeoSearch extends GeoIndexSearcher {
-
-    private final String collectionName;
-    private final EntityRef headEntity;
-
-
-    public CollectionGeoSearch( EntityManager entityManager, IndexBucketLocator locator, CassandraService cass,
-                                EntityRef headEntity, String collectionName ) {
-        super( entityManager, locator, cass );
-        this.collectionName = collectionName;
-        this.headEntity = headEntity;
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see org.usergrid.persistence.query.ir.result.GeoIterator.GeoIndexSearcher
-     * #doSearch()
-     */
-    @Override
-    protected TreeSet<HColumn<ByteBuffer, ByteBuffer>> doSearch( List<String> geoCells, UUID startId, Point searchPoint,
-                                                                 String propertyName, int pageSize ) throws Exception {
-
-        return query( key( headEntity.getUuid(), collectionName, propertyName ), geoCells, searchPoint, startId,
-                pageSize );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/geo/ConnectionGeoSearch.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/geo/ConnectionGeoSearch.java b/stack/core/src/main/java/org/usergrid/persistence/geo/ConnectionGeoSearch.java
deleted file mode 100644
index 3928ac9..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/geo/ConnectionGeoSearch.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package org.usergrid.persistence.geo;
-
-
-import java.nio.ByteBuffer;
-import java.util.List;
-import java.util.TreeSet;
-import java.util.UUID;
-
-import org.usergrid.persistence.EntityManager;
-import org.usergrid.persistence.IndexBucketLocator;
-import org.usergrid.persistence.cassandra.CassandraService;
-import org.usergrid.persistence.geo.model.Point;
-
-import me.prettyprint.hector.api.beans.HColumn;
-
-import static org.usergrid.persistence.Schema.INDEX_CONNECTIONS;
-import static org.usergrid.persistence.cassandra.CassandraPersistenceUtils.key;
-
-
-/**
- * Class for loading connection data
- *
- * @author tnine
- */
-public class ConnectionGeoSearch extends GeoIndexSearcher {
-
-    private final UUID connectionId;
-
-
-    public ConnectionGeoSearch( EntityManager entityManager, IndexBucketLocator locator, CassandraService cass,
-                                UUID connectionId ) {
-        super( entityManager, locator, cass );
-
-        this.connectionId = connectionId;
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see
-     * org.usergrid.persistence.query.ir.result.GeoIterator.GeoIndexSearcher
-     * #doSearch()
-     */
-    @Override
-    protected TreeSet<HColumn<ByteBuffer, ByteBuffer>> doSearch( List<String> geoCells, UUID startId, Point searchPoint,
-                                                                 String propertyName, int pageSize ) throws Exception {
-
-        return query( key( connectionId, INDEX_CONNECTIONS, propertyName ), geoCells, searchPoint, startId, pageSize );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/geo/EntityLocationRef.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/geo/EntityLocationRef.java b/stack/core/src/main/java/org/usergrid/persistence/geo/EntityLocationRef.java
deleted file mode 100644
index da25424..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/geo/EntityLocationRef.java
+++ /dev/null
@@ -1,211 +0,0 @@
-package org.usergrid.persistence.geo;
-
-
-import java.util.UUID;
-
-import org.usergrid.persistence.EntityRef;
-import org.usergrid.persistence.geo.model.Point;
-import org.usergrid.utils.UUIDUtils;
-
-import me.prettyprint.hector.api.beans.DynamicComposite;
-
-import static org.apache.commons.lang.math.NumberUtils.toDouble;
-import static org.usergrid.utils.StringUtils.stringOrSubstringAfterLast;
-import static org.usergrid.utils.StringUtils.stringOrSubstringBeforeFirst;
-
-
-public class EntityLocationRef implements EntityRef {
-
-    private UUID uuid;
-
-    private String type;
-
-    private UUID timestampUuid = UUIDUtils.newTimeUUID();
-
-    private double latitude;
-
-    private double longitude;
-
-    private double distance;
-
-
-    public EntityLocationRef() {
-    }
-
-
-    public EntityLocationRef( EntityRef entity, double latitude, double longitude ) {
-        this( entity.getType(), entity.getUuid(), latitude, longitude );
-    }
-
-
-    public EntityLocationRef( String type, UUID uuid, double latitude, double longitude ) {
-        this.type = type;
-        this.uuid = uuid;
-        this.latitude = latitude;
-        this.longitude = longitude;
-    }
-
-
-    public EntityLocationRef( EntityRef entity, UUID timestampUuid, double latitude, double longitude ) {
-        this( entity.getType(), entity.getUuid(), timestampUuid, latitude, longitude );
-    }
-
-
-    public EntityLocationRef( String type, UUID uuid, UUID timestampUuid, double latitude, double longitude ) {
-        this.type = type;
-        this.uuid = uuid;
-        this.timestampUuid = timestampUuid;
-        this.latitude = latitude;
-        this.longitude = longitude;
-    }
-
-
-    public EntityLocationRef( EntityRef entity, UUID timestampUuid, String coord ) {
-        this.type = entity.getType();
-        this.uuid = entity.getUuid();
-        this.timestampUuid = timestampUuid;
-        this.latitude = toDouble( stringOrSubstringBeforeFirst( coord, ',' ) );
-        this.longitude = toDouble( stringOrSubstringAfterLast( coord, ',' ) );
-    }
-
-
-    @Override
-    public UUID getUuid() {
-        return uuid;
-    }
-
-
-    public void setUuid( UUID uuid ) {
-        this.uuid = uuid;
-    }
-
-
-    @Override
-    public String getType() {
-        return type;
-    }
-
-
-    public void setType( String type ) {
-        this.type = type;
-    }
-
-
-    public UUID getTimestampUuid() {
-        return timestampUuid;
-    }
-
-
-    public void setTimestampUuid( UUID timestampUuid ) {
-        this.timestampUuid = timestampUuid;
-    }
-
-
-    public double getLatitude() {
-        return latitude;
-    }
-
-
-    public void setLatitude( double latitude ) {
-        this.latitude = latitude;
-    }
-
-
-    public double getLongitude() {
-        return longitude;
-    }
-
-
-    public void setLongitude( double longitude ) {
-        this.longitude = longitude;
-    }
-
-
-    public Point getPoint() {
-        return new Point( latitude, longitude );
-    }
-
-
-    public DynamicComposite getColumnName() {
-        return new DynamicComposite( uuid, type, timestampUuid );
-    }
-
-
-    public DynamicComposite getColumnValue() {
-        return new DynamicComposite( latitude, longitude );
-    }
-
-
-    public long getTimestampInMicros() {
-        return UUIDUtils.getTimestampInMicros( timestampUuid );
-    }
-
-
-    public long getTimestampInMillis() {
-        return UUIDUtils.getTimestampInMillis( timestampUuid );
-    }
-
-
-    public double getDistance() {
-        return distance;
-    }
-
-
-    /** Calculate, set and return the distance from this location to the point specified */
-    public double calcDistance( Point point ) {
-        distance = GeocellUtils.distance( getPoint(), point );
-        return distance;
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see java.lang.Object#hashCode()
-     */
-    @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + ( ( type == null ) ? 0 : type.hashCode() );
-        result = prime * result + ( ( uuid == null ) ? 0 : uuid.hashCode() );
-        return result;
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see java.lang.Object#equals(java.lang.Object)
-     */
-    @Override
-    public boolean equals( Object obj ) {
-        if ( this == obj ) {
-            return true;
-        }
-        if ( obj == null ) {
-            return false;
-        }
-        if ( getClass() != obj.getClass() ) {
-            return false;
-        }
-        EntityLocationRef other = ( EntityLocationRef ) obj;
-        if ( type == null ) {
-            if ( other.type != null ) {
-                return false;
-            }
-        }
-        else if ( !type.equals( other.type ) ) {
-            return false;
-        }
-        if ( uuid == null ) {
-            if ( other.uuid != null ) {
-                return false;
-            }
-        }
-        else if ( !uuid.equals( other.uuid ) ) {
-            return false;
-        }
-        return true;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/geo/EntityLocationRefDistanceComparator.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/geo/EntityLocationRefDistanceComparator.java b/stack/core/src/main/java/org/usergrid/persistence/geo/EntityLocationRefDistanceComparator.java
deleted file mode 100644
index 5d1b228..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/geo/EntityLocationRefDistanceComparator.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.geo;
-
-
-import java.util.Comparator;
-
-import org.usergrid.utils.UUIDUtils;
-
-
-/**
- * Compares 2 entity location refs by distance.  The one with the larger distance is considered greater than one with a
- * smaller distance.  If the distances are the same they time uuids are compared based on the UUIDUtils.compare for time
- * uuids.  The one with a larger time is considered greater
- *
- * @author tnine
- */
-public class EntityLocationRefDistanceComparator implements Comparator<EntityLocationRef> {
-
-    /**
-     *
-     */
-    public EntityLocationRefDistanceComparator() {
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
-     */
-    @Override
-    public int compare( EntityLocationRef o1, EntityLocationRef o2 ) {
-
-        if ( o1 == null ) {
-
-            //second is not null
-            if ( o2 != null ) {
-                return 1;
-            }
-            //both null
-            return 0;
-        }
-        //second is null, first isn't
-        else if ( o2 == null ) {
-            return -1;
-        }
-
-        double o1Distance = o1.getDistance();
-        double o2Distance = o2.getDistance();
-
-
-        int doubleCompare = Double.compare( o1Distance, o2Distance );
-
-
-        //    int doubleCompare = Double.compare(o1.getDistance(), o2.getDistance());
-
-        if ( doubleCompare != 0 ) {
-            return doubleCompare;
-        }
-
-        return UUIDUtils.compare( o1.getUuid(), o2.getUuid() );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/geo/GeoIndexSearcher.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/geo/GeoIndexSearcher.java b/stack/core/src/main/java/org/usergrid/persistence/geo/GeoIndexSearcher.java
deleted file mode 100644
index 052e9ac..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/geo/GeoIndexSearcher.java
+++ /dev/null
@@ -1,368 +0,0 @@
-package org.usergrid.persistence.geo;
-
-
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.TreeSet;
-import java.util.UUID;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.usergrid.persistence.EntityManager;
-import org.usergrid.persistence.IndexBucketLocator;
-import org.usergrid.persistence.IndexBucketLocator.IndexType;
-import org.usergrid.persistence.cassandra.CassandraService;
-import org.usergrid.persistence.cassandra.GeoIndexManager;
-import org.usergrid.persistence.cassandra.index.IndexMultiBucketSetLoader;
-import org.usergrid.persistence.geo.model.Point;
-import org.usergrid.persistence.geo.model.Tuple;
-
-import org.apache.commons.lang.StringUtils;
-
-import me.prettyprint.cassandra.serializers.DoubleSerializer;
-import me.prettyprint.cassandra.serializers.StringSerializer;
-import me.prettyprint.cassandra.serializers.UUIDSerializer;
-import me.prettyprint.hector.api.beans.AbstractComposite.ComponentEquality;
-import me.prettyprint.hector.api.beans.DynamicComposite;
-import me.prettyprint.hector.api.beans.HColumn;
-
-import static org.usergrid.persistence.Schema.DICTIONARY_GEOCELL;
-import static org.usergrid.persistence.cassandra.ApplicationCF.ENTITY_INDEX;
-import static org.usergrid.persistence.cassandra.CassandraPersistenceUtils.key;
-import static org.usergrid.utils.CompositeUtils.setEqualityFlag;
-
-
-public abstract class GeoIndexSearcher {
-
-    private static final Logger logger = LoggerFactory.getLogger( GeoIndexSearcher.class );
-
-    private static final EntityLocationRefDistanceComparator COMP = new EntityLocationRefDistanceComparator();
-
-    // The maximum *practical* geocell resolution.
-    private static final int MAX_GEOCELL_RESOLUTION = GeoIndexManager.MAX_RESOLUTION;
-
-    /** Max number of records to read+parse from cass per tile */
-    private static final int MAX_FETCH_SIZE = 1000;
-
-    protected final EntityManager em;
-    protected final IndexBucketLocator locator;
-    protected final CassandraService cass;
-
-
-    /**
-     * @param entityManager
-     * @param pageSize
-     * @param headEntity
-     * @param searchPoint
-     * @param propertyName
-     * @param distance
-     */
-    public GeoIndexSearcher( EntityManager entityManager, IndexBucketLocator locator, CassandraService cass ) {
-        this.em = entityManager;
-        this.locator = locator;
-        this.cass = cass;
-    }
-
-
-    /**
-     * Perform a search from the center. The corresponding entities returned must be >= minDistance(inclusive) and <
-     * maxDistance (exclusive)
-     *
-     * @param maxResults The maximum number of results to include
-     * @param minDistance The minimum distance (inclusive)
-     * @param maxDistance The maximum distance (exclusive)
-     * @param entityClass The entity class
-     * @param baseQuery The base query
-     * @param queryEngine The query engine to use
-     * @param maxGeocellResolution The max resolution to use when searching
-     */
-    public final SearchResults proximitySearch( final EntityLocationRef minMatch, final List<String> geoCells,
-                                                Point searchPoint, String propertyName, double minDistance,
-                                                double maxDistance, final int maxResults ) throws Exception {
-
-        List<EntityLocationRef> entityLocations = new ArrayList<EntityLocationRef>( maxResults );
-
-        List<String> curGeocells = new ArrayList<String>();
-        String curContainingGeocell = null;
-
-        // we have some cells used from last time, re-use them
-        if ( geoCells != null && geoCells.size() > 0 ) {
-            curGeocells.addAll( geoCells );
-            curContainingGeocell = geoCells.get( 0 );
-        }
-        // start at the bottom
-        else {
-
-      /*
-       * The currently-being-searched geocells. NOTES: Start with max possible.
-       * Must always be of the same resolution. Must always form a rectangular
-       * region. One of these must be equal to the cur_containing_geocell.
-       */
-            curContainingGeocell = GeocellUtils.compute( searchPoint, MAX_GEOCELL_RESOLUTION );
-            curGeocells.add( curContainingGeocell );
-        }
-
-        if ( minMatch != null ) {
-            minMatch.calcDistance( searchPoint );
-        }
-        // Set of already searched cells
-        Set<String> searchedCells = new HashSet<String>();
-
-        List<String> curGeocellsUnique = null;
-
-        double closestPossibleNextResultDist = 0;
-
-    /*
-     * Assumes both a and b are lists of (entity, dist) tuples, *sorted by
-     * dist*. NOTE: This is an in-place merge, and there are guaranteed no
-     * duplicates in the resulting list.
-     */
-
-        int noDirection[] = { 0, 0 };
-        List<Tuple<int[], Double>> sortedEdgesDistances = Arrays.asList( new Tuple<int[], Double>( noDirection, 0d ) );
-        boolean done = false;
-        UUID lastReturned = null;
-
-        while ( !curGeocells.isEmpty() && entityLocations.size() < maxResults ) {
-            closestPossibleNextResultDist = sortedEdgesDistances.get( 0 ).getSecond();
-            if ( maxDistance > 0 && closestPossibleNextResultDist > maxDistance ) {
-                break;
-            }
-
-            Set<String> curTempUnique = new HashSet<String>( curGeocells );
-            curTempUnique.removeAll( searchedCells );
-            curGeocellsUnique = new ArrayList<String>( curTempUnique );
-
-            Set<HColumn<ByteBuffer, ByteBuffer>> queryResults = null;
-
-            lastReturned = null;
-
-            // we need to keep searching everything in our tiles until we don't get
-            // any more results, then we'll have the closest points and can move on
-            // do the next tiles
-            do {
-                queryResults = doSearch( curGeocellsUnique, lastReturned, searchPoint, propertyName, MAX_FETCH_SIZE );
-
-                if ( logger.isDebugEnabled() ) {
-                    logger.debug( "fetch complete for: {}", StringUtils.join( curGeocellsUnique, ", " ) );
-                }
-
-                searchedCells.addAll( curGeocells );
-
-                // Begin storing distance from the search result entity to the
-                // search center along with the search result itself, in a tuple.
-
-                // Merge new_results into results
-                for ( HColumn<ByteBuffer, ByteBuffer> column : queryResults ) {
-
-                    DynamicComposite composite = DynamicComposite.fromByteBuffer( column.getName() );
-
-                    UUID uuid = composite.get( 0, UUIDSerializer.get() );
-
-                    lastReturned = uuid;
-
-                    String type = composite.get( 1, StringSerializer.get() );
-                    UUID timestampUuid = composite.get( 2, UUIDSerializer.get() );
-                    composite = DynamicComposite.fromByteBuffer( column.getValue() );
-                    Double latitude = composite.get( 0, DoubleSerializer.get() );
-                    Double longitude = composite.get( 1, DoubleSerializer.get() );
-
-                    EntityLocationRef entityLocation =
-                            new EntityLocationRef( type, uuid, timestampUuid, latitude, longitude );
-
-                    double distance = entityLocation.calcDistance( searchPoint );
-
-                    // discard, it's too close or too far, of closer than the minimum we
-                    // should match, skip it
-                    if ( distance < minDistance || ( maxDistance != 0 && distance > maxDistance ) || ( minMatch != null
-                            && COMP.compare( entityLocation, minMatch ) <= 0 ) ) {
-                        continue;
-                    }
-
-                    int index = Collections.binarySearch( entityLocations, entityLocation, COMP );
-
-                    // already in the index
-                    if ( index > -1 ) {
-                        continue;
-                    }
-
-                    // set the insert index
-                    index = ( index + 1 ) * -1;
-
-                    // no point in adding it
-                    if ( index >= maxResults ) {
-                        continue;
-                    }
-
-                    // results.add(index, entity);
-                    // distances.add(index, distance);
-                    entityLocations.add( index, entityLocation );
-
-                    /**
-                     * Discard an additional entries as we iterate to avoid holding them
-                     * all in ram
-                     */
-                    while ( entityLocations.size() > maxResults ) {
-                        entityLocations.remove( entityLocations.size() - 1 );
-                    }
-                }
-            }
-            while ( queryResults != null && queryResults.size() == MAX_FETCH_SIZE );
-
-            /**
-             * We've searched everything and have a full set, we want to return the
-             * "current" tiles to search next time for the cursor, since cass could
-             * contain more results
-             */
-            if ( done || entityLocations.size() == maxResults ) {
-                break;
-            }
-
-            sortedEdgesDistances = GeocellUtils.distanceSortedEdges( curGeocells, searchPoint );
-
-            if ( queryResults.size() == 0 || curGeocells.size() == 4 ) {
-        /*
-         * Either no results (in which case we optimize by not looking at
-         * adjacents, go straight to the parent) or we've searched 4 adjacent
-         * geocells, in which case we should now search the parents of those
-         * geocells.
-         */
-                curContainingGeocell =
-                        curContainingGeocell.substring( 0, Math.max( curContainingGeocell.length() - 1, 0 ) );
-                if ( curContainingGeocell.length() == 0 ) {
-                    // final check - top level tiles
-                    curGeocells.clear();
-                    String[] items = "0123456789abcdef".split( "(?!^)" );
-                    for ( String item : items ) {
-                        curGeocells.add( item );
-                    }
-                    done = true;
-                }
-                else {
-                    List<String> oldCurGeocells = new ArrayList<String>( curGeocells );
-                    curGeocells.clear();
-                    for ( String cell : oldCurGeocells ) {
-                        if ( cell.length() > 0 ) {
-                            String newCell = cell.substring( 0, cell.length() - 1 );
-                            if ( !curGeocells.contains( newCell ) ) {
-                                curGeocells.add( newCell );
-                            }
-                        }
-                    }
-                }
-            }
-            else if ( curGeocells.size() == 1 ) {
-                // Get adjacent in one direction.
-                // TODO(romannurik): Watch for +/- 90 degree latitude edge case
-                // geocells.
-                for ( int i = 0; i < sortedEdgesDistances.size(); i++ ) {
-
-                    int nearestEdge[] = sortedEdgesDistances.get( i ).getFirst();
-                    String edge = GeocellUtils.adjacent( curGeocells.get( 0 ), nearestEdge );
-
-                    // we're at the edge of the world, search in a different direction
-                    if ( edge == null ) {
-                        continue;
-                    }
-
-                    curGeocells.add( edge );
-                    break;
-                }
-            }
-            else if ( curGeocells.size() == 2 ) {
-                // Get adjacents in perpendicular direction.
-                int nearestEdge[] =
-                        GeocellUtils.distanceSortedEdges( Arrays.asList( curContainingGeocell ), searchPoint ).get( 0 )
-                                    .getFirst();
-                int[] perpendicularNearestEdge = { 0, 0 };
-                if ( nearestEdge[0] == 0 ) {
-                    // Was vertical, perpendicular is horizontal.
-                    for ( Tuple<int[], Double> edgeDistance : sortedEdgesDistances ) {
-                        if ( edgeDistance.getFirst()[0] != 0 ) {
-                            perpendicularNearestEdge = edgeDistance.getFirst();
-                            break;
-                        }
-                    }
-                }
-                else {
-                    // Was horizontal, perpendicular is vertical.
-                    for ( Tuple<int[], Double> edgeDistance : sortedEdgesDistances ) {
-                        if ( edgeDistance.getFirst()[0] == 0 ) {
-                            perpendicularNearestEdge = edgeDistance.getFirst();
-                            break;
-                        }
-                    }
-                }
-                List<String> tempCells = new ArrayList<String>();
-                for ( String cell : curGeocells ) {
-                    tempCells.add( GeocellUtils.adjacent( cell, perpendicularNearestEdge ) );
-                }
-                curGeocells.addAll( tempCells );
-            }
-
-            logger.debug( "{} results found.", entityLocations.size() );
-        }
-
-        // now we have our final sets, construct the results
-
-        return new SearchResults( entityLocations, curGeocells );
-    }
-
-
-    protected TreeSet<HColumn<ByteBuffer, ByteBuffer>> query( Object key, List<String> curGeocellsUnique,
-                                                              Point searchPoint, UUID startId, int count )
-            throws Exception {
-
-        List<Object> keys = new ArrayList<Object>();
-
-        UUID appId = em.getApplicationRef().getUuid();
-
-        for ( String geoCell : curGeocellsUnique ) {
-
-            // add buckets for each geoCell
-
-            for ( String indexBucket : locator.getBuckets( appId, IndexType.GEO, geoCell ) ) {
-                keys.add( key( key, DICTIONARY_GEOCELL, geoCell, indexBucket ) );
-            }
-        }
-
-        DynamicComposite start = null;
-
-        if ( startId != null ) {
-            start = new DynamicComposite( startId );
-            setEqualityFlag( start, ComponentEquality.GREATER_THAN_EQUAL );
-        }
-
-        TreeSet<HColumn<ByteBuffer, ByteBuffer>> columns =
-                IndexMultiBucketSetLoader.load( cass, ENTITY_INDEX, appId, keys, start, null, count, false );
-
-        return columns;
-    }
-
-
-    protected abstract TreeSet<HColumn<ByteBuffer, ByteBuffer>> doSearch( List<String> geoCells, UUID startId,
-                                                                          Point searchPoint, String propertyName,
-                                                                          int pageSize ) throws Exception;
-
-
-    public static class SearchResults {
-
-        public final List<EntityLocationRef> entityLocations;
-        public final List<String> lastSearchedGeoCells;
-
-
-        /**
-         * @param entityLocations
-         * @param curGeocells
-         */
-        public SearchResults( List<EntityLocationRef> entityLocations, List<String> lastSearchedGeoCells ) {
-            this.entityLocations = entityLocations;
-            this.lastSearchedGeoCells = lastSearchedGeoCells;
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/geo/GeocellManager.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/geo/GeocellManager.java b/stack/core/src/main/java/org/usergrid/persistence/geo/GeocellManager.java
deleted file mode 100644
index be6f52a..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/geo/GeocellManager.java
+++ /dev/null
@@ -1,179 +0,0 @@
-package org.usergrid.persistence.geo;
-
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.usergrid.persistence.cassandra.GeoIndexManager;
-import org.usergrid.persistence.geo.model.BoundingBox;
-import org.usergrid.persistence.geo.model.CostFunction;
-import org.usergrid.persistence.geo.model.DefaultCostFunction;
-import org.usergrid.persistence.geo.model.Point;
-
-
-/**
- #
- # Copyright 2010 Alexandre Gellibert
- #
- # 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.
- */
-
-
-/**
- * Ported java version of python geocell: http://code.google.com/p/geomodel/source/browse/trunk/geo/geocell.py
- * <p/>
- * Defines the notion of 'geocells' and exposes methods to operate on them.
- * <p/>
- * A geocell is a hexadecimal string that defines a two dimensional rectangular region inside the [-90,90] x [-180,180]
- * latitude/longitude space. A geocell's 'resolution' is its length. For most practical purposes, at high resolutions,
- * geocells can be treated as single points.
- * <p/>
- * Much like geohashes (see http://en.wikipedia.org/wiki/Geohash), geocells are hierarchical, in that any prefix of a
- * geocell is considered its ancestor, with geocell[:-1] being geocell's immediate parent cell.
- * <p/>
- * To calculate the rectangle of a given geocell string, first divide the [-90,90] x [-180,180] latitude/longitude space
- * evenly into a 4x4 grid like so:
- * <p/>
- * +---+---+---+---+ (90, 180) | a | b | e | f | +---+---+---+---+ | 8 | 9 | c | d | +---+---+---+---+ | 2 | 3 | 6 | 7 |
- * +---+---+---+---+ | 0 | 1 | 4 | 5 | (-90,-180) +---+---+---+---+
- * <p/>
- * NOTE: The point (0, 0) is at the intersection of grid cells 3, 6, 9 and c. And, for example, cell 7 should be the
- * sub-rectangle from (-45, 90) to (0, 180).
- * <p/>
- * Calculate the sub-rectangle for the first character of the geocell string and re-divide this sub-rectangle into
- * another 4x4 grid. For example, if the geocell string is '78a', we will re-divide the sub-rectangle like so:
- * <p/>
- * .                   . .                   . . . +----+----+----+----+ (0, 180) | 7a | 7b | 7e | 7f |
- * +----+----+----+----+ | 78 | 79 | 7c | 7d | +----+----+----+----+ | 72 | 73 | 76 | 77 | +----+----+----+----+ | 70 |
- * 71 | 74 | 75 | . . (-45,90) +----+----+----+----+ .                   . .                   .
- * <p/>
- * Continue to re-divide into sub-rectangles and 4x4 grids until the entire geocell string has been exhausted. The final
- * sub-rectangle is the rectangular region for the geocell.
- *
- * @author api.roman.public@gmail.com (Roman Nurik)
- * @author (java portage) Alexandre Gellibert
- */
-
-public class GeocellManager {
-
-    // The maximum *practical* geocell resolution.
-    public static final int MAX_GEOCELL_RESOLUTION = GeoIndexManager.MAX_RESOLUTION;
-
-    // The maximum number of geocells to consider for a bounding box search.
-    private static final int MAX_FEASIBLE_BBOX_SEARCH_CELLS = 300;
-
-    // Function used if no custom function is used in bestBboxSearchCells method
-    private static final CostFunction DEFAULT_COST_FUNCTION = new DefaultCostFunction();
-
-    //    private static final Logger logger = GeocellLogger.get();
-
-
-    /**
-     * Returns the list of geocells (all resolutions) that are containing the point
-     *
-     * @return Returns the list of geocells (all resolutions) that are containing the point
-     */
-    public static List<String> generateGeoCell( Point point ) {
-        List<String> geocells = new ArrayList<String>();
-        String geocellMax = GeocellUtils.compute( point, GeocellManager.MAX_GEOCELL_RESOLUTION );
-        for ( int i = 1; i < GeocellManager.MAX_GEOCELL_RESOLUTION; i++ ) {
-            geocells.add( GeocellUtils.compute( point, i ) );
-        }
-        geocells.add( geocellMax );
-        return geocells;
-    }
-
-
-    /**
-     * Returns an efficient set of geocells to search in a bounding box query.
-     * <p/>
-     * This method is guaranteed to return a set of geocells having the same resolution (except in the case of
-     * antimeridian search i.e when east < west).
-     *
-     * @param bbox: A geotypes.Box indicating the bounding box being searched.
-     * @param costFunction: A function that accepts two arguments: numCells: the number of cells to search resolution:
-     * the resolution of each cell to search and returns the 'cost' of querying against this number of cells at the
-     * given resolution.)
-     *
-     * @return A list of geocell strings that contain the given box.
-     */
-    public static List<String> bestBboxSearchCells( BoundingBox bbox, CostFunction costFunction ) {
-        if ( bbox.getEast() < bbox.getWest() ) {
-            BoundingBox bboxAntimeridian1 =
-                    new BoundingBox( bbox.getNorth(), bbox.getEast(), bbox.getSouth(), GeocellUtils.MIN_LONGITUDE );
-            BoundingBox bboxAntimeridian2 =
-                    new BoundingBox( bbox.getNorth(), GeocellUtils.MAX_LONGITUDE, bbox.getSouth(), bbox.getWest() );
-            List<String> antimeridianList = bestBboxSearchCells( bboxAntimeridian1, costFunction );
-            antimeridianList.addAll( bestBboxSearchCells( bboxAntimeridian2, costFunction ) );
-            return antimeridianList;
-        }
-
-        String cellNE = GeocellUtils.compute( bbox.getNorthEast(), GeocellManager.MAX_GEOCELL_RESOLUTION );
-        String cellSW = GeocellUtils.compute( bbox.getSouthWest(), GeocellManager.MAX_GEOCELL_RESOLUTION );
-
-        // The current lowest BBOX-search cost found; start with practical infinity.
-        double minCost = Double.MAX_VALUE;
-
-        // The set of cells having the lowest calculated BBOX-search cost.
-        List<String> minCostCellSet = new ArrayList<String>();
-
-        // First find the common prefix, if there is one.. this will be the base
-        // resolution.. i.e. we don't have to look at any higher resolution cells.
-        int minResolution = 0;
-        int maxResoltuion = Math.min( cellNE.length(), cellSW.length() );
-        while ( minResolution < maxResoltuion && cellNE.substring( 0, minResolution + 1 )
-                                                       .startsWith( cellSW.substring( 0, minResolution + 1 ) ) ) {
-            minResolution++;
-        }
-
-        // Iteravely calculate all possible sets of cells that wholely contain
-        // the requested bounding box.
-        for ( int curResolution = minResolution; curResolution < GeocellManager.MAX_GEOCELL_RESOLUTION + 1;
-              curResolution++ ) {
-            String curNE = cellNE.substring( 0, curResolution );
-            String curSW = cellSW.substring( 0, curResolution );
-
-            int numCells = GeocellUtils.interpolationCount( curNE, curSW );
-            if ( numCells > MAX_FEASIBLE_BBOX_SEARCH_CELLS ) {
-                continue;
-            }
-
-            List<String> cellSet = GeocellUtils.interpolate( curNE, curSW );
-            Collections.sort( cellSet );
-
-            double cost;
-            if ( costFunction == null ) {
-                cost = DEFAULT_COST_FUNCTION.defaultCostFunction( cellSet.size(), curResolution );
-            }
-            else {
-                cost = costFunction.defaultCostFunction( cellSet.size(), curResolution );
-            }
-
-            if ( cost <= minCost ) {
-                minCost = cost;
-                minCostCellSet = cellSet;
-            }
-            else {
-                if ( minCostCellSet.size() == 0 ) {
-                    minCostCellSet = cellSet;
-                }
-                // Once the cost starts rising, we won't be able to do better, so abort.
-                break;
-            }
-        }
-        //        logger.log(Level.INFO, "Calculate cells "+StringUtils.join(minCostCellSet, ",
-        // ")+" in box ("+bbox.getSouth()+","+bbox.getWest()+") ("+bbox.getNorth()+","+bbox.getEast()+")");
-        return minCostCellSet;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/geo/GeocellUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/geo/GeocellUtils.java b/stack/core/src/main/java/org/usergrid/persistence/geo/GeocellUtils.java
deleted file mode 100644
index 9d9df0f..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/geo/GeocellUtils.java
+++ /dev/null
@@ -1,539 +0,0 @@
-/*
-Copyright 2010 Alexandre Gellibert
-
-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.usergrid.persistence.geo;
-
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.usergrid.persistence.geo.comparator.DoubleTupleComparator;
-import org.usergrid.persistence.geo.model.BoundingBox;
-import org.usergrid.persistence.geo.model.Point;
-import org.usergrid.persistence.geo.model.Tuple;
-
-/**
- #
- # Copyright 2010 Alexandre Gellibert
- #
- # 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.
- */
-
-
-/**
- * Utils class to compute geocells.
- *
- * @author api.roman.public@gmail.com (Roman Nurik)
- * @author (java portage) Alexandre Gellibert
- */
-public final class GeocellUtils {
-
-    public static final float MIN_LONGITUDE = -180.0f;
-    public static final float MAX_LONGITUDE = 180.0f;
-    public static final float MIN_LATITUDE = -90.0f;
-    public static final float MAX_LATITUDE = 90.0f;
-    // Geocell algorithm constants.
-    public static final int GEOCELL_GRID_SIZE = 4;
-    private static final String GEOCELL_ALPHABET = "0123456789abcdef";
-
-    // Direction enumerations.
-    private static final int[] NORTHWEST = new int[] { -1, 1 };
-    private static final int[] NORTH = new int[] { 0, 1 };
-    private static final int[] NORTHEAST = new int[] { 1, 1 };
-    private static final int[] EAST = new int[] { 1, 0 };
-    private static final int[] SOUTHEAST = new int[] { 1, -1 };
-    private static final int[] SOUTH = new int[] { 0, -1 };
-    private static final int[] SOUTHWEST = new int[] { -1, -1 };
-    private static final int[] WEST = new int[] { -1, 0 };
-
-    private static final int RADIUS = 6378135;
-
-
-    private GeocellUtils() {
-        // no instantiation allowed
-    }
-
-
-    /**
-     * Determines whether the given cells are collinear along a dimension.
-     * <p/>
-     * Returns True if the given cells are in the same row (columnTest=False) or in the same column (columnTest=True).
-     *
-     * @param cell1 : The first geocell string.
-     * @param cell2 : The second geocell string.
-     * @param columnTest : A boolean, where False invokes a row collinearity test and 1 invokes a column collinearity
-     * test.
-     *
-     * @return A bool indicating whether or not the given cells are collinear in the given dimension.
-     */
-    public static boolean collinear( String cell1, String cell2, boolean columnTest ) {
-
-        for ( int i = 0; i < Math.min( cell1.length(), cell2.length() ); i++ ) {
-            int l1[] = subdivXY( cell1.charAt( i ) );
-            int x1 = l1[0];
-            int y1 = l1[1];
-            int l2[] = subdivXY( cell2.charAt( i ) );
-            int x2 = l2[0];
-            int y2 = l2[1];
-
-            // Check row collinearity (assure y's are always the same).
-            if ( !columnTest && y1 != y2 ) {
-                return false;
-            }
-
-            // Check column collinearity (assure x's are always the same).
-            if ( columnTest && x1 != x2 ) {
-                return false;
-            }
-        }
-        return true;
-    }
-
-
-    /**
-     * Calculates the grid of cells formed between the two given cells.
-     * <p/>
-     * Generates the set of cells in the grid created by interpolating from the given Northeast geocell to the given
-     * Southwest geocell.
-     * <p/>
-     * Assumes the Northeast geocell is actually Northeast of Southwest geocell.
-     *
-     * @param cellNE : The Northeast geocell string.
-     * @param cellSW : The Southwest geocell string.
-     *
-     * @return A list of geocell strings in the interpolation.
-     */
-    public static List<String> interpolate( String cellNE, String cellSW ) {
-        // 2D array, will later be flattened.
-        LinkedList<LinkedList<String>> cellSet = new LinkedList<LinkedList<String>>();
-        LinkedList<String> cellFirst = new LinkedList<String>();
-        cellFirst.add( cellSW );
-        cellSet.add( cellFirst );
-
-        // First get adjacent geocells across until Southeast--collinearity with
-        // Northeast in vertical direction (0) means we're at Southeast.
-        while ( !collinear( cellFirst.getLast(), cellNE, true ) ) {
-            String cellTmp = adjacent( cellFirst.getLast(), EAST );
-            if ( cellTmp == null ) {
-                break;
-            }
-            cellFirst.add( cellTmp );
-        }
-
-        // Then get adjacent geocells upwards.
-        while ( !cellSet.getLast().getLast().equalsIgnoreCase( cellNE ) ) {
-
-            LinkedList<String> cellTmpRow = new LinkedList<String>();
-            for ( String g : cellSet.getLast() ) {
-                cellTmpRow.add( adjacent( g, NORTH ) );
-            }
-            if ( cellTmpRow.getFirst() == null ) {
-                break;
-            }
-            cellSet.add( cellTmpRow );
-        }
-
-        // Flatten cellSet, since it's currently a 2D array.
-        List<String> result = new ArrayList<String>();
-        for ( LinkedList<String> list : cellSet ) {
-            result.addAll( list );
-        }
-        return result;
-    }
-
-
-    /**
-     * Computes the number of cells in the grid formed between two given cells.
-     * <p/>
-     * Computes the number of cells in the grid created by interpolating from the given Northeast geocell to the given
-     * Southwest geocell. Assumes the Northeast geocell is actually Northeast of Southwest geocell.
-     *
-     * @param cellNE : The Northeast geocell string.
-     * @param cellSW : The Southwest geocell string.
-     *
-     * @return An int, indicating the number of geocells in the interpolation.
-     */
-    public static int interpolationCount( String cellNE, String cellSW ) {
-
-        BoundingBox bboxNE = computeBox( cellNE );
-        BoundingBox bboxSW = computeBox( cellSW );
-
-        double cellLatSpan = bboxSW.getNorth() - bboxSW.getSouth();
-        double cellLonSpan = bboxSW.getEast() - bboxSW.getWest();
-
-        double numCols = ( ( bboxNE.getEast() - bboxSW.getWest() ) / cellLonSpan );
-        double numRows = ( ( bboxNE.getNorth() - bboxSW.getSouth() ) / cellLatSpan );
-
-        double totalCols = numCols * numRows * 1.0;
-        if ( totalCols > Integer.MAX_VALUE ) {
-            return Integer.MAX_VALUE;
-        }
-        return ( int ) totalCols;
-    }
-
-
-    /**
-     * Calculates all of the given geocell's adjacent geocells.
-     *
-     * @param cell : The geocell string for which to calculate adjacent/neighboring cells.
-     *
-     * @return A list of 8 geocell strings and/or None values indicating adjacent cells.
-     */
-
-    public static List<String> allAdjacents( String cell ) {
-        List<String> result = new ArrayList<String>();
-        for ( int[] d : Arrays.asList( NORTHWEST, NORTH, NORTHEAST, EAST, SOUTHEAST, SOUTH, SOUTHWEST, WEST ) ) {
-            result.add( adjacent( cell, d ) );
-        }
-        return result;
-    }
-
-
-    /**
-     * Calculates the geocell adjacent to the given cell in the given direction.
-     *
-     * @param cell : The geocell string whose neighbor is being calculated.
-     * @param dir : An (x, y) tuple indicating direction, where x and y can be -1, 0, or 1. -1 corresponds to West for x
-     * and South for y, and 1 corresponds to East for x and North for y. Available helper constants are NORTH, EAST,
-     * SOUTH, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, and SOUTHWEST.
-     *
-     * @return The geocell adjacent to the given cell in the given direction, or None if there is no such cell.
-     */
-    public static String adjacent( String cell, int[] dir ) {
-        if ( cell == null ) {
-            return null;
-        }
-        int dx = dir[0];
-        int dy = dir[1];
-        char[] cellAdjArr = cell.toCharArray(); // Split the geocell string
-        // characters into a list.
-        int i = cellAdjArr.length - 1;
-
-        while ( i >= 0 && ( dx != 0 || dy != 0 ) ) {
-            int l[] = subdivXY( cellAdjArr[i] );
-            int x = l[0];
-            int y = l[1];
-
-            // Horizontal adjacency.
-            if ( dx == -1 ) { // Asking for left.
-                if ( x == 0 ) { // At left of parent cell.
-                    x = GEOCELL_GRID_SIZE - 1; // Becomes right edge of adjacent parent.
-                }
-                else {
-                    x--; // Adjacent, same parent.
-                    dx = 0; // Done with x.
-                }
-            }
-            else if ( dx == 1 ) { // Asking for right.
-                if ( x == GEOCELL_GRID_SIZE - 1 ) { // At right of parent cell.
-                    x = 0; // Becomes left edge of adjacent parent.
-                }
-                else {
-                    x++; // Adjacent, same parent.
-                    dx = 0; // Done with x.
-                }
-            }
-
-            // Vertical adjacency.
-            if ( dy == 1 ) { // Asking for above.
-                if ( y == GEOCELL_GRID_SIZE - 1 ) { // At top of parent cell.
-                    y = 0; // Becomes bottom edge of adjacent parent.
-                }
-                else {
-                    y++; // Adjacent, same parent.
-                    dy = 0; // Done with y.
-                }
-            }
-            else if ( dy == -1 ) { // Asking for below.
-                if ( y == 0 ) { // At bottom of parent cell.
-                    y = GEOCELL_GRID_SIZE - 1; // Becomes top edge of adjacent parent.
-                }
-                else {
-                    y--; // Adjacent, same parent.
-                    dy = 0; // Done with y.
-                }
-            }
-
-            int l2[] = { x, y };
-            cellAdjArr[i] = subdivChar( l2 );
-            i--;
-        }
-        // If we're not done with y then it's trying to wrap vertically,
-        // which is a failure.
-        if ( dy != 0 ) {
-            return null;
-        }
-
-        // At this point, horizontal wrapping is done inherently.
-        return new String( cellAdjArr );
-    }
-
-
-    /**
-     * Returns whether or not the given cell contains the given point.
-     *
-     * @return Returns whether or not the given cell contains the given point.
-     */
-    public static boolean containsPoint( String cell, Point point ) {
-        return compute( point, cell.length() ).equalsIgnoreCase( cell );
-    }
-
-
-    /**
-     * Returns the shortest distance between a point and a geocell bounding box.
-     * <p/>
-     * If the point is inside the cell, the shortest distance is always to a 'edge' of the cell rectangle. If the point
-     * is outside the cell, the shortest distance will be to either a 'edge' or 'corner' of the cell rectangle.
-     *
-     * @return The shortest distance from the point to the geocell's rectangle, in meters.
-     */
-    public static double pointDistance( String cell, Point point ) {
-        BoundingBox bbox = computeBox( cell );
-
-        boolean betweenWE = bbox.getWest() <= point.getLon() && point.getLon() <= bbox.getEast();
-        boolean betweenNS = bbox.getSouth() <= point.getLat() && point.getLat() <= bbox.getNorth();
-
-        if ( betweenWE ) {
-            if ( betweenNS ) {
-                // Inside the geocell.
-                return Math.min( Math.min( distance( point, new Point( bbox.getSouth(), point.getLon() ) ),
-                        distance( point, new Point( bbox.getNorth(), point.getLon() ) ) ),
-                        Math.min( distance( point, new Point( point.getLat(), bbox.getEast() ) ),
-                                distance( point, new Point( point.getLat(), bbox.getWest() ) ) ) );
-            }
-            else {
-                return Math.min( distance( point, new Point( bbox.getSouth(), point.getLon() ) ),
-                        distance( point, new Point( bbox.getNorth(), point.getLon() ) ) );
-            }
-        }
-        else {
-            if ( betweenNS ) {
-                return Math.min( distance( point, new Point( point.getLat(), bbox.getEast() ) ),
-                        distance( point, new Point( point.getLat(), bbox.getWest() ) ) );
-            }
-            else {
-                // TODO(romannurik): optimize
-                return Math.min( Math.min( distance( point, new Point( bbox.getSouth(), bbox.getEast() ) ),
-                        distance( point, new Point( bbox.getNorth(), bbox.getEast() ) ) ),
-                        Math.min( distance( point, new Point( bbox.getSouth(), bbox.getWest() ) ),
-                                distance( point, new Point( bbox.getNorth(), bbox.getWest() ) ) ) );
-            }
-        }
-    }
-
-
-    /**
-     * Computes the geocell containing the given point to the given resolution.
-     * <p/>
-     * This is a simple 16-tree lookup to an arbitrary depth (resolution).
-     *
-     * @param point : The geotypes.Point to compute the cell for.
-     * @param resolution : An int indicating the resolution of the cell to compute.
-     *
-     * @return The geocell string containing the given point, of length resolution.
-     */
-    public static String compute( Point point, int resolution ) {
-        float north = MAX_LATITUDE;
-        float south = MIN_LATITUDE;
-        float east = MAX_LONGITUDE;
-        float west = MIN_LONGITUDE;
-
-        StringBuilder cell = new StringBuilder();
-        while ( cell.length() < resolution ) {
-            float subcellLonSpan = ( east - west ) / GEOCELL_GRID_SIZE;
-            float subcellLatSpan = ( north - south ) / GEOCELL_GRID_SIZE;
-
-            int x = Math.min( ( int ) ( GEOCELL_GRID_SIZE * ( point.getLon() - west ) / ( east - west ) ),
-                    GEOCELL_GRID_SIZE - 1 );
-            int y = Math.min( ( int ) ( GEOCELL_GRID_SIZE * ( point.getLat() - south ) / ( north - south ) ),
-                    GEOCELL_GRID_SIZE - 1 );
-
-            int l[] = { x, y };
-            cell.append( subdivChar( l ) );
-
-            south += subcellLatSpan * y;
-            north = south + subcellLatSpan;
-
-            west += subcellLonSpan * x;
-            east = west + subcellLonSpan;
-        }
-        return cell.toString();
-    }
-
-
-    /**
-     * Computes the rectangular boundaries (bounding box) of the given geocell.
-     *
-     * @param cell_ : The geocell string whose boundaries are to be computed.
-     *
-     * @return A geotypes.Box corresponding to the rectangular boundaries of the geocell.
-     */
-    public static BoundingBox computeBox( String cell_ ) {
-        if ( cell_ == null ) {
-            return null;
-        }
-
-        BoundingBox bbox = new BoundingBox( 90.0, 180.0, -90.0, -180.0 );
-        StringBuilder cell = new StringBuilder( cell_ );
-        while ( cell.length() > 0 ) {
-            double subcellLonSpan = ( bbox.getEast() - bbox.getWest() ) / GEOCELL_GRID_SIZE;
-            double subcellLatSpan = ( bbox.getNorth() - bbox.getSouth() ) / GEOCELL_GRID_SIZE;
-
-            int l[] = subdivXY( cell.charAt( 0 ) );
-            int x = l[0];
-            int y = l[1];
-
-            bbox = new BoundingBox( bbox.getSouth() + subcellLatSpan * ( y + 1 ),
-                    bbox.getWest() + subcellLonSpan * ( x + 1 ), bbox.getSouth() + subcellLatSpan * y,
-                    bbox.getWest() + subcellLonSpan * x );
-
-            cell.deleteCharAt( 0 );
-        }
-
-        return bbox;
-    }
-
-
-    /**
-     * Returns whether or not the given geocell string defines a valid geocell.
-     *
-     * @return Returns whether or not the given geocell string defines a valid geocell.
-     */
-    public static boolean isValid( String cell ) {
-        if ( cell == null || cell.trim().length() == 0 ) {
-            return false;
-        }
-        for ( char c : cell.toCharArray() ) {
-            if ( GEOCELL_ALPHABET.indexOf( c ) < 0 ) {
-                return false;
-            }
-        }
-        return true;
-    }
-
-
-    /**
-     * Returns the (x, y) of the geocell character in the 4x4 alphabet grid.
-     *
-     * @return Returns the (x, y) of the geocell character in the 4x4 alphabet grid.
-     */
-    public static int[] subdivXY( char char_ ) {
-        // NOTE: This only works for grid size 4.
-        int charI = GEOCELL_ALPHABET.indexOf( char_ );
-        return new int[] {
-                ( charI & 4 ) >> 1 | ( charI & 1 ) >> 0, ( charI & 8 ) >> 2 | ( charI & 2 ) >> 1
-        };
-    }
-
-
-    /**
-     * Returns the geocell character in the 4x4 alphabet grid at pos. (x, y).
-     *
-     * @return Returns the geocell character in the 4x4 alphabet grid at pos. (x, y).
-     */
-    public static char subdivChar( int[] pos ) {
-        // NOTE: This only works for grid size 4.
-        return GEOCELL_ALPHABET.charAt( ( pos[1] & 2 ) << 2 |
-                ( pos[0] & 2 ) << 1 |
-                ( pos[1] & 1 ) << 1 |
-                ( pos[0] & 1 ) << 0 );
-    }
-
-
-    /**
-     * Calculates the great circle distance between two points (law of cosines).
-     *
-     * @param p1 : indicating the first point.
-     * @param p2 : indicating the second point.
-     *
-     * @return The 2D great-circle distance between the two given points, in meters.
-     */
-    public static double distance( Point p1, Point p2 ) {
-        double p1lat = Math.toRadians( p1.getLat() );
-        double p1lon = Math.toRadians( p1.getLon() );
-        double p2lat = Math.toRadians( p2.getLat() );
-        double p2lon = Math.toRadians( p2.getLon() );
-        return RADIUS * Math.acos( makeDoubleInRange(
-                Math.sin( p1lat ) * Math.sin( p2lat ) + Math.cos( p1lat ) * Math.cos( p2lat ) * Math
-                        .cos( p2lon - p1lon ) ) );
-    }
-
-
-    /**
-     * This function is used to fix issue 10: GeocellUtils.distance(...) uses Math.acos(arg) method. In some cases arg >
-     * 1 (i.e 1.0000000002), so acos cannot be calculated and the method returns NaN.
-     *
-     * @return a double between -1 and 1
-     */
-    public static double makeDoubleInRange( double d ) {
-        double result = d;
-        if ( d > 1 ) {
-            result = 1;
-        }
-        else if ( d < -1 ) {
-            result = -1;
-        }
-        return result;
-    }
-
-
-    /**
-     * Returns the edges of the rectangular region containing all of the given geocells, sorted by distance from the
-     * given point, along with the actual distances from the point to these edges.
-     *
-     * @param cells : The cells (should be adjacent) defining the rectangular region whose edge distances are
-     * requested.
-     * @param point : The point that should determine the edge sort order.
-     *
-     * @return A list of (direction, distance) tuples, where direction is the edge and distance is the distance from the
-     *         point to that edge. A direction value of (0,-1), for example, corresponds to the South edge of the
-     *         rectangular region containing all of the given geocells.
-     *         <p/>
-     *         TODO(romannurik): Assert that lat,lon are actually inside the geocell.
-     */
-    public static List<Tuple<int[], Double>> distanceSortedEdges( List<String> cells, Point point ) {
-        List<BoundingBox> boxes = new ArrayList<BoundingBox>();
-        for ( String cell : cells ) {
-            boxes.add( computeBox( cell ) );
-        }
-        double maxNorth = Double.NEGATIVE_INFINITY;
-        double maxEast = Double.NEGATIVE_INFINITY;
-        double maxSouth = Double.POSITIVE_INFINITY;
-        double maxWest = Double.POSITIVE_INFINITY;
-        for ( BoundingBox box : boxes ) {
-            maxNorth = Math.max( maxNorth, box.getNorth() );
-            maxEast = Math.max( maxEast, box.getEast() );
-            maxSouth = Math.min( maxSouth, box.getSouth() );
-            maxWest = Math.min( maxWest, box.getWest() );
-        }
-        List<Tuple<int[], Double>> result = new ArrayList<Tuple<int[], Double>>();
-        result.add( new Tuple<int[], Double>( SOUTH, distance( new Point( maxSouth, point.getLon() ), point ) ) );
-        result.add( new Tuple<int[], Double>( NORTH, distance( new Point( maxNorth, point.getLon() ), point ) ) );
-        result.add( new Tuple<int[], Double>( WEST, distance( new Point( point.getLat(), maxWest ), point ) ) );
-        result.add( new Tuple<int[], Double>( EAST, distance( new Point( point.getLat(), maxEast ), point ) ) );
-        Collections.sort( result, new DoubleTupleComparator() );
-        return result;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/geo/comparator/DoubleTupleComparator.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/geo/comparator/DoubleTupleComparator.java b/stack/core/src/main/java/org/usergrid/persistence/geo/comparator/DoubleTupleComparator.java
deleted file mode 100644
index 6780662..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/geo/comparator/DoubleTupleComparator.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package org.usergrid.persistence.geo.comparator;
-
-
-import java.util.Comparator;
-
-import org.usergrid.persistence.geo.model.Tuple;
-
-
-public class DoubleTupleComparator implements Comparator<Tuple<int[], Double>> {
-
-    public int compare( Tuple<int[], Double> o1, Tuple<int[], Double> o2 ) {
-        if ( o1 == null && o2 == null ) {
-            return 0;
-        }
-        if ( o1 == null ) {
-            return -1;
-        }
-        if ( o2 == null ) {
-            return 1;
-        }
-        return o1.getSecond().compareTo( o2.getSecond() );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/geo/model/BoundingBox.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/geo/model/BoundingBox.java b/stack/core/src/main/java/org/usergrid/persistence/geo/model/BoundingBox.java
deleted file mode 100644
index 47aee1c..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/geo/model/BoundingBox.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
-Copyright 2010 Alexandre Gellibert
-
-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.usergrid.persistence.geo.model;
-
-
-/** @author Alexandre Gellibert */
-public class BoundingBox {
-
-    private Point northEast;
-    private Point southWest;
-
-
-    public BoundingBox( double north, double east, double south, double west ) {
-        double north_, south_;
-        if ( south > north ) {
-            south_ = north;
-            north_ = south;
-        }
-        else {
-            south_ = south;
-            north_ = north;
-        }
-
-        // Don't swap east and west to allow disambiguation of
-        // antimeridian crossing.
-
-        northEast = new Point( north_, east );
-        southWest = new Point( south_, west );
-    }
-
-
-    public double getNorth() {
-        return northEast.getLat();
-    }
-
-
-    public double getSouth() {
-        return southWest.getLat();
-    }
-
-
-    public double getWest() {
-        return southWest.getLon();
-    }
-
-
-    public double getEast() {
-        return northEast.getLon();
-    }
-
-
-    public Point getNorthEast() {
-        return northEast;
-    }
-
-
-    public Point getSouthWest() {
-        return southWest;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/geo/model/CostFunction.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/geo/model/CostFunction.java b/stack/core/src/main/java/org/usergrid/persistence/geo/model/CostFunction.java
deleted file mode 100644
index 894810e..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/geo/model/CostFunction.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
-Copyright 2010 Alexandre Gellibert
-
-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.usergrid.persistence.geo.model;
-
-
-/**
- * Interface to create a cost function used in geocells algorithm. This function will determine the cost of an operation
- * depending of number of cells and resolution. When the cost is going higher, the algorithm stops. The cost depends on
- * application use of geocells.
- *
- * @author Alexandre Gellibert
- */
-public interface CostFunction {
-
-    /**
-     * @param numCells number of cells found
-     * @param resolution resolution of those cells
-     *
-     * @return the cost of the operation
-     */
-    public double defaultCostFunction( int numCells, int resolution );
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/geo/model/DefaultCostFunction.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/geo/model/DefaultCostFunction.java b/stack/core/src/main/java/org/usergrid/persistence/geo/model/DefaultCostFunction.java
deleted file mode 100644
index 2880ccf..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/geo/model/DefaultCostFunction.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
-Copyright 2010 Alexandre Gellibert 
-
-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.usergrid.persistence.geo.model;
-
-
-import org.usergrid.persistence.geo.GeocellUtils;
-
-
-/**
- * Default cost function used if no cost function is specified in Geocell.bestBboxSearchCells method.
- *
- * @author Alexandre Gellibert
- */
-public class DefaultCostFunction implements CostFunction {
-
-    /*
-     * (non-Javadoc)
-     * @see com.beoui.utils.CostFunction#defaultCostFunction(int, int)
-     */
-    public double defaultCostFunction( int numCells, int resolution ) {
-        return numCells > Math.pow( GeocellUtils.GEOCELL_GRID_SIZE, 2 ) ? Double.MAX_VALUE : 0;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/geo/model/Point.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/geo/model/Point.java b/stack/core/src/main/java/org/usergrid/persistence/geo/model/Point.java
deleted file mode 100644
index d9cccc1..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/geo/model/Point.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
-Copyright 2010 Alexandre Gellibert
-
-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.usergrid.persistence.geo.model;
-
-
-import org.apache.commons.lang.Validate;
-
-
-/** @author Alexandre Gellibert */
-public class Point {
-
-    private double lat;
-    private double lon;
-
-
-    public Point() {
-
-    }
-
-
-    public Point( double lat, double lon ) {
-        Validate.isTrue( !( lat > 90.0 || lat < -90.0 ), "Latitude must be in [-90, 90]  but was ", lat );
-        Validate.isTrue( !( lon > 180.0 || lon < -180.0 ), "Longitude must be in [-180, 180] but was ", lon );
-        this.lat = lat;
-        this.lon = lon;
-    }
-
-
-    public double getLat() {
-        return lat;
-    }
-
-
-    public void setLat( double lat ) {
-        this.lat = lat;
-    }
-
-
-    public double getLon() {
-        return lon;
-    }
-
-
-    public void setLon( double lon ) {
-        this.lon = lon;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/geo/model/Tuple.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/geo/model/Tuple.java b/stack/core/src/main/java/org/usergrid/persistence/geo/model/Tuple.java
deleted file mode 100644
index b13a272..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/geo/model/Tuple.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package org.usergrid.persistence.geo.model;
-
-
-public class Tuple<A, B> {
-
-    private A first;
-    private B second;
-
-
-    public Tuple( A first, B second ) {
-        this.first = first;
-        this.second = second;
-    }
-
-
-    public A getFirst() {
-        return first;
-    }
-
-
-    public B getSecond() {
-        return second;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/ir/AllNode.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/ir/AllNode.java b/stack/core/src/main/java/org/usergrid/persistence/query/ir/AllNode.java
deleted file mode 100644
index f624283..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/ir/AllNode.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package org.usergrid.persistence.query.ir;
-
-
-/**
- * Used to represent a "select all".  This will iterate over the entities by UUID
- *
- * @author tnine
- */
-public class AllNode extends QueryNode {
-
-
-    private final QuerySlice slice;
-    private final boolean forceKeepFirst;
-
-
-    /**
-     * Note that the slice isn't used on select, but is used when creating cursors
-     *
-     * @param id. The unique numeric id for this node
-     * @param forceKeepFirst True if we don't allow the iterator to skip the first result, regardless of cursor state.
-     * Used for startUUID paging
-     */
-    public AllNode( int id, boolean forceKeepFirst ) {
-        this.slice = new QuerySlice( "uuid", id );
-        this.forceKeepFirst = forceKeepFirst;
-    }
-
-
-    /* (non-Javadoc)
-     * @see org.usergrid.persistence.query.ir.QueryNode#visit(org.usergrid.persistence.query.ir.NodeVisitor)
-     */
-    @Override
-    public void visit( NodeVisitor visitor ) throws Exception {
-        visitor.visit( this );
-    }
-
-
-    @Override
-    public String toString() {
-        return "AllNode";
-    }
-
-
-    /** @return the slice */
-    public QuerySlice getSlice() {
-        return slice;
-    }
-
-
-    /** @return the skipFirstMatch */
-    public boolean isForceKeepFirst() {
-        return forceKeepFirst;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/ir/AndNode.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/ir/AndNode.java b/stack/core/src/main/java/org/usergrid/persistence/query/ir/AndNode.java
deleted file mode 100644
index 7ea61ca..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/ir/AndNode.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.query.ir;
-
-
-/**
- * Node where the results need intersected.  Used instead of a SliceNode when one of the children is an operation other
- * than slices.  I.E OR, NOT etc
- *
- * @author tnine
- */
-public class AndNode extends BooleanNode {
-
-    /**
-     * @param left
-     * @param right
-     */
-    public AndNode( QueryNode left, QueryNode right ) {
-        super( left, right );
-    }
-
-
-    /* (non-Javadoc)
-     * @see org.usergrid.persistence.query.ir.QueryNode#visit(org.usergrid.persistence.query.ir.NodeVisitor)
-     */
-    @Override
-    public void visit( NodeVisitor visitor ) throws Exception {
-        visitor.visit( this );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/ir/BooleanNode.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/ir/BooleanNode.java b/stack/core/src/main/java/org/usergrid/persistence/query/ir/BooleanNode.java
deleted file mode 100644
index 7b268ea..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/ir/BooleanNode.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.query.ir;
-
-
-/** @author tnine */
-public abstract class BooleanNode extends QueryNode {
-
-    protected QueryNode left;
-    protected QueryNode right;
-
-
-    public BooleanNode( QueryNode left, QueryNode right ) {
-        this.left = left;
-        this.right = right;
-    }
-
-
-    /** @return the left */
-    public QueryNode getLeft() {
-        return left;
-    }
-
-
-    /** @return the right */
-    public QueryNode getRight() {
-        return right;
-    }
-
-
-    @Override
-    public String toString() {
-        return "BooleanNode [left=" + left + ", right=" + right + "]";
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/ir/EmailIdentifierNode.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/ir/EmailIdentifierNode.java b/stack/core/src/main/java/org/usergrid/persistence/query/ir/EmailIdentifierNode.java
deleted file mode 100644
index 972beda..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/ir/EmailIdentifierNode.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package org.usergrid.persistence.query.ir;
-
-
-import org.usergrid.persistence.Identifier;
-
-
-/**
- * Class to represent a UUID based Identifier query
- *
- * @author tnine
- */
-public class EmailIdentifierNode extends QueryNode {
-
-    private final Identifier identifier;
-
-
-    public EmailIdentifierNode( Identifier identifier ) {
-        this.identifier = identifier;
-    }
-
-
-    @Override
-    public void visit( NodeVisitor visitor ) throws Exception {
-        visitor.visit( this );
-    }
-
-
-    public Identifier getIdentifier() {
-        return identifier;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/ir/NameIdentifierNode.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/ir/NameIdentifierNode.java b/stack/core/src/main/java/org/usergrid/persistence/query/ir/NameIdentifierNode.java
deleted file mode 100644
index 90fc13a..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/ir/NameIdentifierNode.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package org.usergrid.persistence.query.ir;
-
-
-/**
- * Class to represent a UUID based Identifier query
- *
- * @author tnine
- */
-public class NameIdentifierNode extends QueryNode {
-
-    private final String name;
-
-
-    public NameIdentifierNode( String name ) {
-        this.name = name;
-    }
-
-
-    @Override
-    public void visit( NodeVisitor visitor ) throws Exception {
-        visitor.visit( this );
-    }
-
-
-    public String getName() {
-        return name;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/ir/NodeVisitor.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/ir/NodeVisitor.java b/stack/core/src/main/java/org/usergrid/persistence/query/ir/NodeVisitor.java
deleted file mode 100644
index e08a93c..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/ir/NodeVisitor.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.query.ir;
-
-
-/** @author tnine */
-public interface NodeVisitor {
-
-    /**
-     *
-     * @param node
-     * @throws Exception
-     */
-    public void visit( AndNode node ) throws Exception;
-
-    /**
-     *
-     * @param node
-     * @throws Exception
-     */
-    public void visit( NotNode node ) throws Exception;
-
-    /**
-     *
-     * @param node
-     * @throws Exception
-     */
-    public void visit( OrNode node ) throws Exception;
-
-    /**
-     *
-     * @param node
-     * @throws Exception
-     */
-    public void visit( SliceNode node ) throws Exception;
-
-    /**
-     *
-     * @param node
-     * @throws Exception
-     */
-    public void visit( WithinNode node ) throws Exception;
-
-    /**
-     *
-     * @param node
-     * @throws Exception
-     */
-    public void visit( AllNode node ) throws Exception;
-
-    /** Visit the name identifier node */
-    public void visit( NameIdentifierNode nameIdentifierNode ) throws Exception;
-
-    /** Visit the uuid identifier node */
-    public void visit( UuidIdentifierNode uuidIdentifierNode );
-
-    /**
-     * @param orderByNode
-     * @throws Exception
-     */
-    public void visit( OrderByNode orderByNode ) throws Exception;
-
-    /** Visit the email id node */
-    public void visit( EmailIdentifierNode emailIdentifierNode ) throws Exception;
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/ir/NotNode.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/ir/NotNode.java b/stack/core/src/main/java/org/usergrid/persistence/query/ir/NotNode.java
deleted file mode 100644
index 2784d65..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/ir/NotNode.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.query.ir;
-
-
-/** @author tnine */
-public class NotNode extends QueryNode {
-
-    protected QueryNode subtractNode, keepNode;
-
-
-    /** @param keepNode may be null if there are parents to this */
-    public NotNode( QueryNode subtractNode, QueryNode keepNode ) {
-        this.subtractNode = subtractNode;
-        this.keepNode = keepNode;
-//        throw new RuntimeException( "I'm a not node" );
-    }
-
-
-    /** @return the child */
-    public QueryNode getSubtractNode() {
-        return subtractNode;
-    }
-
-
-    /** @return the all */
-    public QueryNode getKeepNode() {
-        return keepNode;
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see
-     * org.usergrid.persistence.query.ir.QueryNode#visit(org.usergrid.persistence
-     * .query.ir.NodeVisitor)
-     */
-    @Override
-    public void visit( NodeVisitor visitor ) throws Exception {
-        visitor.visit( this );
-    }
-
-
-    @Override
-    public String toString() {
-        return "NotNode [child=" + subtractNode + "]";
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/ir/OrNode.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/ir/OrNode.java b/stack/core/src/main/java/org/usergrid/persistence/query/ir/OrNode.java
deleted file mode 100644
index 2597312..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/ir/OrNode.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.query.ir;
-
-
-/**
- * @author tnine
- */
-public class OrNode extends BooleanNode {
-
-    private final int id;
-
-
-    /**
-     * @param left
-     * @param right
-     */
-    public OrNode( QueryNode left, QueryNode right, int id ) {
-        super( left, right );
-        this.id = id;
-    }
-
-
-    /**
-     * Get the context id
-     */
-    public int getId() {
-        return this.id;
-    }
-
-
-    /* (non-Javadoc)
-     * @see org.usergrid.persistence.query.ir.QueryNode#visit(org.usergrid.persistence.query.ir.NodeVisitor)
-     */
-    @Override
-    public void visit( NodeVisitor visitor ) throws Exception {
-        visitor.visit( this );
-    }
-}


[60/96] [abbrv] USERGRID-2 package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/response/AggregateCounterSet.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/response/AggregateCounterSet.html b/sdks/android/doc/org/usergrid/android/client/response/AggregateCounterSet.html
index 288709a..88fc7fa 100644
--- a/sdks/android/doc/org/usergrid/android/client/response/AggregateCounterSet.html
+++ b/sdks/android/doc/org/usergrid/android/client/response/AggregateCounterSet.html
@@ -55,8 +55,8 @@ function windowTitle()
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/response/AggregateCounterSet.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="AggregateCounterSet.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
@@ -88,12 +88,12 @@ DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&n
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client.response</FONT>
+org.apache.usergrid.android.client.response</FONT>
 <BR>
 Class AggregateCounterSet</H2>
 <PRE>
 java.lang.Object
-  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.usergrid.android.client.response.AggregateCounterSet</B>
+  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.usergrid.android.client.response.AggregateCounterSet</B>
 </PRE>
 <HR>
 <DL>
@@ -117,7 +117,7 @@ java.lang.Object
 <TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/AggregateCounterSet.html#AggregateCounterSet(java.lang.String, java.util.UUID, java.lang.String, java.util.List)">AggregateCounterSet</A></B>(java.lang.String&nbsp;name,
                     java.util.UUID&nbsp;queue,
                     java.lang.String&nbsp;category,
-                    java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response">AggregateCounter</A>&gt;&nbsp;values)</CODE>
+                    java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response">AggregateCounter</A>&gt;&nbsp;values)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -127,7 +127,7 @@ java.lang.Object
                     java.util.UUID&nbsp;user,
                     java.util.UUID&nbsp;group,
                     java.lang.String&nbsp;category,
-                    java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response">AggregateCounter</A>&gt;&nbsp;values)</CODE>
+                    java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response">AggregateCounter</A>&gt;&nbsp;values)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -184,7 +184,7 @@ java.lang.Object
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response">AggregateCounter</A>&gt;</CODE></FONT></TD>
+<CODE>&nbsp;java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response">AggregateCounter</A>&gt;</CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/AggregateCounterSet.html#getValues()">getValues</A></B>()</CODE>
 
 <BR>
@@ -233,7 +233,7 @@ java.lang.Object
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/AggregateCounterSet.html#setValues(java.util.List)">setValues</A></B>(java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response">AggregateCounter</A>&gt;&nbsp;values)</CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/AggregateCounterSet.html#setValues(java.util.List)">setValues</A></B>(java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response">AggregateCounter</A>&gt;&nbsp;values)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -276,7 +276,7 @@ public <B>AggregateCounterSet</B>(java.lang.String&nbsp;name,
                            java.util.UUID&nbsp;user,
                            java.util.UUID&nbsp;group,
                            java.lang.String&nbsp;category,
-                           java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response">AggregateCounter</A>&gt;&nbsp;values)</PRE>
+                           java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response">AggregateCounter</A>&gt;&nbsp;values)</PRE>
 <DL>
 </DL>
 <HR>
@@ -287,7 +287,7 @@ AggregateCounterSet</H3>
 public <B>AggregateCounterSet</B>(java.lang.String&nbsp;name,
                            java.util.UUID&nbsp;queue,
                            java.lang.String&nbsp;category,
-                           java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response">AggregateCounter</A>&gt;&nbsp;values)</PRE>
+                           java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response">AggregateCounter</A>&gt;&nbsp;values)</PRE>
 <DL>
 </DL>
 
@@ -392,7 +392,7 @@ public void <B>setName</B>(java.lang.String&nbsp;name)</PRE>
 <A NAME="getValues()"><!-- --></A><H3>
 getValues</H3>
 <PRE>
-public java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response">AggregateCounter</A>&gt; <B>getValues</B>()</PRE>
+public java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response">AggregateCounter</A>&gt; <B>getValues</B>()</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -403,7 +403,7 @@ public java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/res
 <A NAME="setValues(java.util.List)"><!-- --></A><H3>
 setValues</H3>
 <PRE>
-public void <B>setValues</B>(java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response">AggregateCounter</A>&gt;&nbsp;values)</PRE>
+public void <B>setValues</B>(java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response">AggregateCounter</A>&gt;&nbsp;values)</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -476,8 +476,8 @@ public java.lang.String <B>toString</B>()</PRE>
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/response/AggregateCounterSet.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="AggregateCounterSet.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/response/ApiResponse.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/response/ApiResponse.html b/sdks/android/doc/org/usergrid/android/client/response/ApiResponse.html
index 56a480e..3255412 100644
--- a/sdks/android/doc/org/usergrid/android/client/response/ApiResponse.html
+++ b/sdks/android/doc/org/usergrid/android/client/response/ApiResponse.html
@@ -55,8 +55,8 @@ function windowTitle()
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/response/ApiResponse.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="ApiResponse.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
@@ -88,12 +88,12 @@ DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&n
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client.response</FONT>
+org.apache.usergrid.android.client.response</FONT>
 <BR>
 Class ApiResponse</H2>
 <PRE>
 java.lang.Object
-  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.usergrid.android.client.response.ApiResponse</B>
+  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.usergrid.android.client.response.ApiResponse</B>
 </PRE>
 <HR>
 <DL>
@@ -171,7 +171,7 @@ java.lang.Object
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response">AggregateCounterSet</A>&gt;</CODE></FONT></TD>
+<CODE>&nbsp;java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response">AggregateCounterSet</A>&gt;</CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html#getCounters()">getCounters</A></B>()</CODE>
 
 <BR>
@@ -179,7 +179,7 @@ java.lang.Object
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response">ClientCredentialsInfo</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response">ClientCredentialsInfo</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html#getCredentials()">getCredentials</A></B>()</CODE>
 
 <BR>
@@ -203,7 +203,7 @@ java.lang.Object
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt;</CODE></FONT></TD>
+<CODE>&nbsp;java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt;</CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html#getEntities()">getEntities</A></B>()</CODE>
 
 <BR>
@@ -215,7 +215,7 @@ java.lang.Object
 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
 <TR ALIGN="right" VALIGN="">
 <TD NOWRAP><FONT SIZE="-1">
-<CODE>&lt;T extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt; 
+<CODE>&lt;T extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt; 
 <BR>
 java.util.List&lt;T&gt;</CODE></FONT></TD>
 </TR>
@@ -268,7 +268,7 @@ java.util.List&lt;T&gt;</CODE></FONT></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html#getFirstEntity()">getFirstEntity</A></B>()</CODE>
 
 <BR>
@@ -280,7 +280,7 @@ java.util.List&lt;T&gt;</CODE></FONT></TD>
 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
 <TR ALIGN="right" VALIGN="">
 <TD NOWRAP><FONT SIZE="-1">
-<CODE>&lt;T extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt; 
+<CODE>&lt;T extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt; 
 <BR>
 T</CODE></FONT></TD>
 </TR>
@@ -293,7 +293,7 @@ T</CODE></FONT></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html#getFirstMessage()">getFirstMessage</A></B>()</CODE>
 
 <BR>
@@ -301,7 +301,7 @@ T</CODE></FONT></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response">QueueInfo</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response">QueueInfo</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html#getFirstQueue()">getFirstQueue</A></B>()</CODE>
 
 <BR>
@@ -317,7 +317,7 @@ T</CODE></FONT></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html#getLastEntity()">getLastEntity</A></B>()</CODE>
 
 <BR>
@@ -329,7 +329,7 @@ T</CODE></FONT></TD>
 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
 <TR ALIGN="right" VALIGN="">
 <TD NOWRAP><FONT SIZE="-1">
-<CODE>&lt;T extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt; 
+<CODE>&lt;T extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt; 
 <BR>
 T</CODE></FONT></TD>
 </TR>
@@ -342,7 +342,7 @@ T</CODE></FONT></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html#getLastMessage()">getLastMessage</A></B>()</CODE>
 
 <BR>
@@ -350,7 +350,7 @@ T</CODE></FONT></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response">QueueInfo</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response">QueueInfo</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html#getLastQueue()">getLastQueue</A></B>()</CODE>
 
 <BR>
@@ -382,7 +382,7 @@ T</CODE></FONT></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>&gt;</CODE></FONT></TD>
+<CODE>&nbsp;java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>&gt;</CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html#getMessages()">getMessages</A></B>()</CODE>
 
 <BR>
@@ -438,7 +438,7 @@ T</CODE></FONT></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response">QueueInfo</A>&gt;</CODE></FONT></TD>
+<CODE>&nbsp;java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response">QueueInfo</A>&gt;</CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html#getQueues()">getQueues</A></B>()</CODE>
 
 <BR>
@@ -470,7 +470,7 @@ T</CODE></FONT></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html#getUser()">getUser</A></B>()</CODE>
 
 <BR>
@@ -519,7 +519,7 @@ T</CODE></FONT></TD>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html#setCounters(java.util.List)">setCounters</A></B>(java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response">AggregateCounterSet</A>&gt;&nbsp;counters)</CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html#setCounters(java.util.List)">setCounters</A></B>(java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response">AggregateCounterSet</A>&gt;&nbsp;counters)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -527,7 +527,7 @@ T</CODE></FONT></TD>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html#setCredentials(org.usergrid.android.client.response.ClientCredentialsInfo)">setCredentials</A></B>(<A HREF="../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response">ClientCredentialsInfo</A>&nbsp;credentials)</CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html#setCredentials(org.apache.usergrid.android.client.response.ClientCredentialsInfo)">setCredentials</A></B>(<A HREF="../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response">ClientCredentialsInfo</A>&nbsp;credentials)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -551,7 +551,7 @@ T</CODE></FONT></TD>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html#setEntities(java.util.List)">setEntities</A></B>(java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt;&nbsp;entities)</CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html#setEntities(java.util.List)">setEntities</A></B>(java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt;&nbsp;entities)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -607,7 +607,7 @@ T</CODE></FONT></TD>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html#setMessages(java.util.List)">setMessages</A></B>(java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>&gt;&nbsp;messages)</CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html#setMessages(java.util.List)">setMessages</A></B>(java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>&gt;&nbsp;messages)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -664,7 +664,7 @@ T</CODE></FONT></TD>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html#setQueues(java.util.List)">setQueues</A></B>(java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response">QueueInfo</A>&gt;&nbsp;queues)</CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html#setQueues(java.util.List)">setQueues</A></B>(java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response">QueueInfo</A>&gt;&nbsp;queues)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -696,7 +696,7 @@ T</CODE></FONT></TD>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html#setUser(org.usergrid.android.client.entities.User)">setUser</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>&nbsp;user)</CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html#setUser(org.apache.usergrid.android.client.entities.User)">setUser</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>&nbsp;user)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -995,7 +995,7 @@ public void <B>setApplication</B>(java.util.UUID&nbsp;application)</PRE>
 <A NAME="getEntities()"><!-- --></A><H3>
 getEntities</H3>
 <PRE>
-public java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt; <B>getEntities</B>()</PRE>
+public java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt; <B>getEntities</B>()</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1006,7 +1006,7 @@ public java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/ent
 <A NAME="setEntities(java.util.List)"><!-- --></A><H3>
 setEntities</H3>
 <PRE>
-public void <B>setEntities</B>(java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt;&nbsp;entities)</PRE>
+public void <B>setEntities</B>(java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt;&nbsp;entities)</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1028,7 +1028,7 @@ public int <B>getEntityCount</B>()</PRE>
 <A NAME="getFirstEntity()"><!-- --></A><H3>
 getFirstEntity</H3>
 <PRE>
-public <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A> <B>getFirstEntity</B>()</PRE>
+public <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A> <B>getFirstEntity</B>()</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1039,7 +1039,7 @@ public <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html"
 <A NAME="getFirstEntity(java.lang.Class)"><!-- --></A><H3>
 getFirstEntity</H3>
 <PRE>
-public &lt;T extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt; T <B>getFirstEntity</B>(java.lang.Class&lt;T&gt;&nbsp;t)</PRE>
+public &lt;T extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt; T <B>getFirstEntity</B>(java.lang.Class&lt;T&gt;&nbsp;t)</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1050,7 +1050,7 @@ public &lt;T extends <A HREF="../../../../../org/usergrid/android/client/entitie
 <A NAME="getLastEntity()"><!-- --></A><H3>
 getLastEntity</H3>
 <PRE>
-public <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A> <B>getLastEntity</B>()</PRE>
+public <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A> <B>getLastEntity</B>()</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1061,7 +1061,7 @@ public <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html"
 <A NAME="getLastEntity(java.lang.Class)"><!-- --></A><H3>
 getLastEntity</H3>
 <PRE>
-public &lt;T extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt; T <B>getLastEntity</B>(java.lang.Class&lt;T&gt;&nbsp;t)</PRE>
+public &lt;T extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt; T <B>getLastEntity</B>(java.lang.Class&lt;T&gt;&nbsp;t)</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1072,7 +1072,7 @@ public &lt;T extends <A HREF="../../../../../org/usergrid/android/client/entitie
 <A NAME="getEntities(java.lang.Class)"><!-- --></A><H3>
 getEntities</H3>
 <PRE>
-public &lt;T extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt; java.util.List&lt;T&gt; <B>getEntities</B>(java.lang.Class&lt;T&gt;&nbsp;t)</PRE>
+public &lt;T extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt; java.util.List&lt;T&gt; <B>getEntities</B>(java.lang.Class&lt;T&gt;&nbsp;t)</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1259,7 +1259,7 @@ public void <B>setParams</B>(java.util.Map&lt;java.lang.String,java.util.List&lt
 <A NAME="getCounters()"><!-- --></A><H3>
 getCounters</H3>
 <PRE>
-public java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response">AggregateCounterSet</A>&gt; <B>getCounters</B>()</PRE>
+public java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response">AggregateCounterSet</A>&gt; <B>getCounters</B>()</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1270,7 +1270,7 @@ public java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/res
 <A NAME="setCounters(java.util.List)"><!-- --></A><H3>
 setCounters</H3>
 <PRE>
-public void <B>setCounters</B>(java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response">AggregateCounterSet</A>&gt;&nbsp;counters)</PRE>
+public void <B>setCounters</B>(java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response">AggregateCounterSet</A>&gt;&nbsp;counters)</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1281,7 +1281,7 @@ public void <B>setCounters</B>(java.util.List&lt;<A HREF="../../../../../org/use
 <A NAME="getCredentials()"><!-- --></A><H3>
 getCredentials</H3>
 <PRE>
-public <A HREF="../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response">ClientCredentialsInfo</A> <B>getCredentials</B>()</PRE>
+public <A HREF="../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response">ClientCredentialsInfo</A> <B>getCredentials</B>()</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1289,10 +1289,10 @@ public <A HREF="../../../../../org/usergrid/android/client/response/ClientCreden
 </DL>
 <HR>
 
-<A NAME="setCredentials(org.usergrid.android.client.response.ClientCredentialsInfo)"><!-- --></A><H3>
+<A NAME="setCredentials(org.apache.usergrid.android.client.response.ClientCredentialsInfo)"><!-- --></A><H3>
 setCredentials</H3>
 <PRE>
-public void <B>setCredentials</B>(<A HREF="../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response">ClientCredentialsInfo</A>&nbsp;credentials)</PRE>
+public void <B>setCredentials</B>(<A HREF="../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response">ClientCredentialsInfo</A>&nbsp;credentials)</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1303,7 +1303,7 @@ public void <B>setCredentials</B>(<A HREF="../../../../../org/usergrid/android/c
 <A NAME="getUser()"><!-- --></A><H3>
 getUser</H3>
 <PRE>
-public <A HREF="../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A> <B>getUser</B>()</PRE>
+public <A HREF="../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A> <B>getUser</B>()</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1311,10 +1311,10 @@ public <A HREF="../../../../../org/usergrid/android/client/entities/User.html" t
 </DL>
 <HR>
 
-<A NAME="setUser(org.usergrid.android.client.entities.User)"><!-- --></A><H3>
+<A NAME="setUser(org.apache.usergrid.android.client.entities.User)"><!-- --></A><H3>
 setUser</H3>
 <PRE>
-public void <B>setUser</B>(<A HREF="../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>&nbsp;user)</PRE>
+public void <B>setUser</B>(<A HREF="../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>&nbsp;user)</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1339,7 +1339,7 @@ public java.lang.String <B>toString</B>()</PRE>
 <A NAME="getMessages()"><!-- --></A><H3>
 getMessages</H3>
 <PRE>
-public java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>&gt; <B>getMessages</B>()</PRE>
+public java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>&gt; <B>getMessages</B>()</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1350,7 +1350,7 @@ public java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/ent
 <A NAME="setMessages(java.util.List)"><!-- --></A><H3>
 setMessages</H3>
 <PRE>
-public void <B>setMessages</B>(java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>&gt;&nbsp;messages)</PRE>
+public void <B>setMessages</B>(java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>&gt;&nbsp;messages)</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1372,7 +1372,7 @@ public int <B>getMessageCount</B>()</PRE>
 <A NAME="getFirstMessage()"><!-- --></A><H3>
 getFirstMessage</H3>
 <PRE>
-public <A HREF="../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A> <B>getFirstMessage</B>()</PRE>
+public <A HREF="../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A> <B>getFirstMessage</B>()</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1383,7 +1383,7 @@ public <A HREF="../../../../../org/usergrid/android/client/entities/Message.html
 <A NAME="getLastMessage()"><!-- --></A><H3>
 getLastMessage</H3>
 <PRE>
-public <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A> <B>getLastMessage</B>()</PRE>
+public <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A> <B>getLastMessage</B>()</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1416,7 +1416,7 @@ public void <B>setLast</B>(java.util.UUID&nbsp;last)</PRE>
 <A NAME="getQueues()"><!-- --></A><H3>
 getQueues</H3>
 <PRE>
-public java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response">QueueInfo</A>&gt; <B>getQueues</B>()</PRE>
+public java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response">QueueInfo</A>&gt; <B>getQueues</B>()</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1427,7 +1427,7 @@ public java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/res
 <A NAME="setQueues(java.util.List)"><!-- --></A><H3>
 setQueues</H3>
 <PRE>
-public void <B>setQueues</B>(java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response">QueueInfo</A>&gt;&nbsp;queues)</PRE>
+public void <B>setQueues</B>(java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response">QueueInfo</A>&gt;&nbsp;queues)</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1438,7 +1438,7 @@ public void <B>setQueues</B>(java.util.List&lt;<A HREF="../../../../../org/userg
 <A NAME="getFirstQueue()"><!-- --></A><H3>
 getFirstQueue</H3>
 <PRE>
-public <A HREF="../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response">QueueInfo</A> <B>getFirstQueue</B>()</PRE>
+public <A HREF="../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response">QueueInfo</A> <B>getFirstQueue</B>()</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1449,7 +1449,7 @@ public <A HREF="../../../../../org/usergrid/android/client/response/QueueInfo.ht
 <A NAME="getLastQueue()"><!-- --></A><H3>
 getLastQueue</H3>
 <PRE>
-public <A HREF="../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response">QueueInfo</A> <B>getLastQueue</B>()</PRE>
+public <A HREF="../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response">QueueInfo</A> <B>getLastQueue</B>()</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1541,8 +1541,8 @@ public void <B>setConsumer</B>(java.util.UUID&nbsp;consumer)</PRE>
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/response/ApiResponse.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="ApiResponse.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/response/ClientCredentialsInfo.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/response/ClientCredentialsInfo.html b/sdks/android/doc/org/usergrid/android/client/response/ClientCredentialsInfo.html
index 74e3587..8d0df17 100644
--- a/sdks/android/doc/org/usergrid/android/client/response/ClientCredentialsInfo.html
+++ b/sdks/android/doc/org/usergrid/android/client/response/ClientCredentialsInfo.html
@@ -55,8 +55,8 @@ function windowTitle()
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/response/ClientCredentialsInfo.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="ClientCredentialsInfo.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
@@ -88,12 +88,12 @@ DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&n
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client.response</FONT>
+org.apache.usergrid.android.client.response</FONT>
 <BR>
 Class ClientCredentialsInfo</H2>
 <PRE>
 java.lang.Object
-  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.usergrid.android.client.response.ClientCredentialsInfo</B>
+  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.usergrid.android.client.response.ClientCredentialsInfo</B>
 </PRE>
 <HR>
 <DL>
@@ -298,8 +298,8 @@ public java.lang.String <B>toString</B>()</PRE>
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/response/ClientCredentialsInfo.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="ClientCredentialsInfo.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/response/QueueInfo.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/response/QueueInfo.html b/sdks/android/doc/org/usergrid/android/client/response/QueueInfo.html
index c282feb..d4a9a1a 100644
--- a/sdks/android/doc/org/usergrid/android/client/response/QueueInfo.html
+++ b/sdks/android/doc/org/usergrid/android/client/response/QueueInfo.html
@@ -55,7 +55,7 @@ function windowTitle()
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response"><B>PREV CLASS</B></A>&nbsp;
 &nbsp;NEXT CLASS</FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/response/QueueInfo.html" target="_top"><B>FRAMES</B></A>  &nbsp;
@@ -88,12 +88,12 @@ DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&n
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client.response</FONT>
+org.apache.usergrid.android.client.response</FONT>
 <BR>
 Class QueueInfo</H2>
 <PRE>
 java.lang.Object
-  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.usergrid.android.client.response.QueueInfo</B>
+  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.usergrid.android.client.response.QueueInfo</B>
 </PRE>
 <HR>
 <DL>
@@ -274,7 +274,7 @@ public void <B>setQueue</B>(java.util.UUID&nbsp;queue)</PRE>
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response"><B>PREV CLASS</B></A>&nbsp;
 &nbsp;NEXT CLASS</FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/response/QueueInfo.html" target="_top"><B>FRAMES</B></A>  &nbsp;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/response/class-use/AggregateCounter.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/response/class-use/AggregateCounter.html b/sdks/android/doc/org/usergrid/android/client/response/class-use/AggregateCounter.html
index e29502b..f585384 100644
--- a/sdks/android/doc/org/usergrid/android/client/response/class-use/AggregateCounter.html
+++ b/sdks/android/doc/org/usergrid/android/client/response/class-use/AggregateCounter.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Class org.usergrid.android.client.response.AggregateCounter
+Uses of Class org.apache.usergrid.android.client.response.AggregateCounter
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Class org.usergrid.android.client.response.AggregateCounter
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Class org.usergrid.android.client.response.AggregateCounter";
+        parent.document.title="Uses of Class org.apache.usergrid.android.client.response.AggregateCounter";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,26 +81,26 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Class<br>org.usergrid.android.client.response.AggregateCounter</B></H2>
+<B>Uses of Class<br>org.apache.usergrid.android.client.response.AggregateCounter</B></H2>
 </CENTER>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Packages that use <A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response">AggregateCounter</A></FONT></TH>
+Packages that use <A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response">AggregateCounter</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client.response"><B>org.usergrid.android.client.response</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client.response"><B>org.apache.usergrid.android.client.response</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client.response"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client.response"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response">AggregateCounter</A> in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A></FONT></TH>
+Uses of <A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response">AggregateCounter</A> in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -108,11 +108,11 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/Aggregat
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A> that return types with arguments of type <A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response">AggregateCounter</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A> that return types with arguments of type <A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response">AggregateCounter</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response">AggregateCounter</A>&gt;</CODE></FONT></TD>
+<CODE>&nbsp;java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response">AggregateCounter</A>&gt;</CODE></FONT></TD>
 <TD><CODE><B>AggregateCounterSet.</B><B><A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounterSet.html#getValues()">getValues</A></B>()</CODE>
 
 <BR>
@@ -124,12 +124,12 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/Aggregat
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Method parameters in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A> with type arguments of type <A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response">AggregateCounter</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Method parameters in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A> with type arguments of type <A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response">AggregateCounter</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>AggregateCounterSet.</B><B><A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounterSet.html#setValues(java.util.List)">setValues</A></B>(java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response">AggregateCounter</A>&gt;&nbsp;values)</CODE>
+<TD><CODE><B>AggregateCounterSet.</B><B><A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounterSet.html#setValues(java.util.List)">setValues</A></B>(java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response">AggregateCounter</A>&gt;&nbsp;values)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -140,13 +140,13 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/Aggregat
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Constructor parameters in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A> with type arguments of type <A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response">AggregateCounter</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Constructor parameters in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A> with type arguments of type <A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response">AggregateCounter</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounterSet.html#AggregateCounterSet(java.lang.String, java.util.UUID, java.lang.String, java.util.List)">AggregateCounterSet</A></B>(java.lang.String&nbsp;name,
                     java.util.UUID&nbsp;queue,
                     java.lang.String&nbsp;category,
-                    java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response">AggregateCounter</A>&gt;&nbsp;values)</CODE>
+                    java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response">AggregateCounter</A>&gt;&nbsp;values)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -156,7 +156,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/Aggregat
                     java.util.UUID&nbsp;user,
                     java.util.UUID&nbsp;group,
                     java.lang.String&nbsp;category,
-                    java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response">AggregateCounter</A>&gt;&nbsp;values)</CODE>
+                    java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response">AggregateCounter</A>&gt;&nbsp;values)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -178,7 +178,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/Aggregat
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/response/class-use/AggregateCounterSet.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/response/class-use/AggregateCounterSet.html b/sdks/android/doc/org/usergrid/android/client/response/class-use/AggregateCounterSet.html
index 8311293..df14dbc 100644
--- a/sdks/android/doc/org/usergrid/android/client/response/class-use/AggregateCounterSet.html
+++ b/sdks/android/doc/org/usergrid/android/client/response/class-use/AggregateCounterSet.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Class org.usergrid.android.client.response.AggregateCounterSet
+Uses of Class org.apache.usergrid.android.client.response.AggregateCounterSet
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Class org.usergrid.android.client.response.AggregateCounterSet
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Class org.usergrid.android.client.response.AggregateCounterSet";
+        parent.document.title="Uses of Class org.apache.usergrid.android.client.response.AggregateCounterSet";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,26 +81,26 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Class<br>org.usergrid.android.client.response.AggregateCounterSet</B></H2>
+<B>Uses of Class<br>org.apache.usergrid.android.client.response.AggregateCounterSet</B></H2>
 </CENTER>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Packages that use <A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response">AggregateCounterSet</A></FONT></TH>
+Packages that use <A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response">AggregateCounterSet</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client.response"><B>org.usergrid.android.client.response</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client.response"><B>org.apache.usergrid.android.client.response</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client.response"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client.response"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response">AggregateCounterSet</A> in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A></FONT></TH>
+Uses of <A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response">AggregateCounterSet</A> in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -108,11 +108,11 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/Aggregat
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A> that return types with arguments of type <A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response">AggregateCounterSet</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A> that return types with arguments of type <A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response">AggregateCounterSet</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response">AggregateCounterSet</A>&gt;</CODE></FONT></TD>
+<CODE>&nbsp;java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response">AggregateCounterSet</A>&gt;</CODE></FONT></TD>
 <TD><CODE><B>ApiResponse.</B><B><A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html#getCounters()">getCounters</A></B>()</CODE>
 
 <BR>
@@ -124,12 +124,12 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/Aggregat
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Method parameters in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A> with type arguments of type <A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response">AggregateCounterSet</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Method parameters in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A> with type arguments of type <A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response">AggregateCounterSet</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>ApiResponse.</B><B><A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html#setCounters(java.util.List)">setCounters</A></B>(java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response">AggregateCounterSet</A>&gt;&nbsp;counters)</CODE>
+<TD><CODE><B>ApiResponse.</B><B><A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html#setCounters(java.util.List)">setCounters</A></B>(java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response">AggregateCounterSet</A>&gt;&nbsp;counters)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -151,7 +151,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/Aggregat
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>


[76/96] [abbrv] USERGRID-2 package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/usergrid/java/client/Client.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/usergrid/java/client/Client.java b/sdks/java/src/main/java/org/usergrid/java/client/Client.java
deleted file mode 100644
index afd93dc..0000000
--- a/sdks/java/src/main/java/org/usergrid/java/client/Client.java
+++ /dev/null
@@ -1,1276 +0,0 @@
-package org.usergrid.java.client;
-
-import static org.springframework.util.StringUtils.arrayToDelimitedString;
-import static org.springframework.util.StringUtils.tokenizeToStringArray;
-import static org.usergrid.java.client.utils.JsonUtils.parse;
-import static org.usergrid.java.client.utils.ObjectUtils.isEmpty;
-import static org.usergrid.java.client.utils.UrlUtils.addQueryParams;
-import static org.usergrid.java.client.utils.UrlUtils.encodeParams;
-import static org.usergrid.java.client.utils.UrlUtils.path;
-
-import java.util.Collections;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
-import java.util.concurrent.ConcurrentHashMap;
-
-import com.fasterxml.jackson.databind.node.JsonNodeFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.http.HttpEntity;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.HttpMethod;
-import org.springframework.http.MediaType;
-import org.springframework.http.ResponseEntity;
-import org.springframework.web.client.HttpClientErrorException;
-import org.springframework.web.client.RestTemplate;
-import org.usergrid.java.client.entities.Activity;
-import org.usergrid.java.client.entities.Device;
-import org.usergrid.java.client.entities.Entity;
-import org.usergrid.java.client.entities.Group;
-import org.usergrid.java.client.entities.User;
-import org.usergrid.java.client.response.ApiResponse;
-
-/**
- * The Client class for accessing the Usergrid API. Start by instantiating this
- * class though the appropriate constructor.
- * 
- */
-public class Client {
-
-    private static final Logger log = LoggerFactory.getLogger(Client.class);
-
-    public static boolean FORCE_PUBLIC_API = false;
-
-    // Public API
-    public static String PUBLIC_API_URL = "http://api.usergrid.com";
-
-    // Local API of standalone server
-    public static String LOCAL_STANDALONE_API_URL = "http://localhost:8080";
-
-    // Local API of Tomcat server in Eclipse
-    public static String LOCAL_TOMCAT_API_URL = "http://localhost:8080/ROOT";
-
-    // Local API
-    public static String LOCAL_API_URL = LOCAL_STANDALONE_API_URL;
-
-    private String apiUrl = PUBLIC_API_URL;
-
-    private String organizationId;
-    private String applicationId;
-    private String clientId;
-    private String clientSecret;
-
-    private User loggedInUser = null;
-
-    private String accessToken = null;
-
-    private String currentOrganization = null;
-
-    static RestTemplate restTemplate = new RestTemplate();
-
-    /**
-     * Default constructor for instantiating a client.
-     */
-    public Client() {
-        init();
-    }
-
-    /**
-     * Instantiate client for a specific app
-     * 
-     * @param applicationId
-     *            the application id or name
-     */
-    public Client(String organizationId, String applicationId) {
-        init();
-        this.organizationId = organizationId;
-        this.applicationId = applicationId;
-    }
-
-    public void init() {
-
-    }
-
-    /**
-     * @return the Usergrid API url (default: http://api.usergrid.com)
-     */
-    public String getApiUrl() {
-        return apiUrl;
-    }
-
-    /**
-     * @param apiUrl
-     *            the Usergrid API url (default: http://api.usergrid.com)
-     */
-    public void setApiUrl(String apiUrl) {
-        this.apiUrl = apiUrl;
-    }
-
-    /**
-     * @param apiUrl
-     *            the Usergrid API url (default: http://api.usergrid.com)
-     * @return Client object for method call chaining
-     */
-    public Client withApiUrl(String apiUrl) {
-        this.apiUrl = apiUrl;
-        return this;
-    }
-    
-    
-    /**
-     * the organizationId to set
-     * @param organizationId
-     * @return
-     */
-    public Client withOrganizationId(String organizationId){
-        this.organizationId = organizationId;
-        return this;
-    }
-    
-    
-
-    /**
-     * @return the organizationId
-     */
-    public String getOrganizationId() {
-        return organizationId;
-    }
-
-    /**
-     * @param organizationId the organizationId to set
-     */
-    public void setOrganizationId(String organizationId) {
-        this.organizationId = organizationId;
-    }
-
-    /**
-     * @return the application id or name
-     */
-    public String getApplicationId() {
-        return applicationId;
-    }
-
-    /**
-     * @param applicationId
-     *            the application id or name
-     */
-    public void setApplicationId(String applicationId) {
-        this.applicationId = applicationId;
-    }
-   
-
-    /**
-     * @param applicationId
-     *            the application id or name
-     * @return Client object for method call chaining
-     */
-    public Client withApplicationId(String applicationId) {
-        this.applicationId = applicationId;
-        return this;
-    }
-
-    /**
-     * @return the client key id for making calls as the application-owner. Not
-     *         safe for most mobile use.
-     */
-    public String getClientId() {
-        return clientId;
-    }
-
-    /**
-     * @param clientId
-     *            the client key id for making calls as the application-owner.
-     *            Not safe for most mobile use.
-     */
-    public void setClientId(String clientId) {
-        this.clientId = clientId;
-    }
-
-    /**
-     * @param clientId
-     *            the client key id for making calls as the application-owner.
-     *            Not safe for most mobile use.
-     * @return Client object for method call chaining
-     */
-    public Client withClientId(String clientId) {
-        this.clientId = clientId;
-        return this;
-    }
-
-    /**
-     * @return the client key id for making calls as the application-owner. Not
-     *         safe for most mobile use.
-     */
-    public String getClientSecret() {
-        return clientSecret;
-    }
-
-    /**
-     * @param clientSecret
-     *            the client key id for making calls as the application-owner.
-     *            Not safe for most mobile use.
-     */
-    public void setClientSecret(String clientSecret) {
-        this.clientSecret = clientSecret;
-    }
-
-    /**
-     * @param clientSecret
-     *            the client key id for making calls as the application-owner.
-     *            Not safe for most mobile use.
-     * @return Client object for method call chaining
-     */
-    public Client withClientSecret(String clientSecret) {
-        this.clientSecret = clientSecret;
-        return this;
-    }
-
-    /**
-     * @return the logged-in user after a successful authorizeAppUser request
-     */
-    public User getLoggedInUser() {
-        return loggedInUser;
-    }
-
-    /**
-     * @param loggedInUser
-     *            the logged-in user, usually not set by host application
-     */
-    public void setLoggedInUser(User loggedInUser) {
-        this.loggedInUser = loggedInUser;
-    }
-
-    /**
-     * @return the OAuth2 access token after a successful authorize request
-     */
-    public String getAccessToken() {
-        return accessToken;
-    }
-
-    /**
-     * @param accessToken
-     *            an OAuth2 access token. Usually not set by host application
-     */
-    public void setAccessToken(String accessToken) {
-        this.accessToken = accessToken;
-    }
-
-    /**
-     * @return the currentOrganization
-     */
-    public String getCurrentOrganization() {
-        return currentOrganization;
-    }
-
-    /**
-     * @param currentOrganization
-     */
-    public void setCurrentOrganization(String currentOrganization) {
-        this.currentOrganization = currentOrganization;
-    }
-
-    /**
-     * Low-level HTTP request method. Synchronous, blocks till response or
-     * timeout.
-     * 
-     * @param method
-     *            HttpMethod method
-     * @param cls
-     *            class for the return type
-     * @param params
-     *            parameters to encode as querystring or body parameters
-     * @param data
-     *            JSON data to put in body
-     * @param segments
-     *            REST url path segments (i.e. /segment1/segment2/segment3)
-     * @return results marshalled into class specified in cls parameter
-     */
-    public <T> T httpRequest(HttpMethod method, Class<T> cls,
-            Map<String, Object> params, Object data, String... segments) {
-        HttpHeaders requestHeaders = new HttpHeaders();
-        requestHeaders.setAccept(Collections
-                .singletonList(MediaType.APPLICATION_JSON));
-        if (accessToken != null) {
-            String auth = "Bearer " + accessToken;
-            requestHeaders.set("Authorization", auth);
-            log.info("Authorization: " + auth);
-        }
-        String url = path(apiUrl, segments);
-
-        MediaType contentType = MediaType.APPLICATION_JSON;
-        if (method.equals(HttpMethod.POST) && isEmpty(data) && !isEmpty(params)) {
-            data = encodeParams(params);
-            contentType = MediaType.APPLICATION_FORM_URLENCODED;
-        } else {
-            url = addQueryParams(url, params);
-        }
-        requestHeaders.setContentType(contentType);
-        HttpEntity<?> requestEntity = null;
-
-        if (method.equals(HttpMethod.POST) || method.equals(HttpMethod.PUT)) {
-            if (isEmpty(data)) {
-                data = JsonNodeFactory.instance.objectNode();
-            }
-            requestEntity = new HttpEntity<Object>(data, requestHeaders);
-        } else {
-            requestEntity = new HttpEntity<Object>(requestHeaders);
-        }
-        log.info("Client.httpRequest(): url: " + url);
-        ResponseEntity<T> responseEntity = restTemplate.exchange(url, method,
-                requestEntity, cls);
-        log.info("Client.httpRequest(): reponse body: "
-                + responseEntity.getBody().toString());
-        return responseEntity.getBody();
-    }
-
-    /**
-     * High-level Usergrid API request.
-     * 
-     * @param method
-     * @param params
-     * @param data
-     * @param segments
-     * @return
-     */
-    public ApiResponse apiRequest(HttpMethod method,
-            Map<String, Object> params, Object data, String... segments) {
-        ApiResponse response = null;
-        try {
-            response = httpRequest(method, ApiResponse.class, params, data,
-                    segments);
-            log.info("Client.apiRequest(): Response: " + response);
-        } catch (HttpClientErrorException e) {
-            log.error("Client.apiRequest(): HTTP error: "
-                    + e.getLocalizedMessage());
-            response = parse(e.getResponseBodyAsString(), ApiResponse.class);
-            if ((response != null) && !isEmpty(response.getError())) {
-                log.error("Client.apiRequest(): Response error: "
-                        + response.getError());
-                if (!isEmpty(response.getException())) {
-                    log.error("Client.apiRequest(): Response exception: "
-                            + response.getException());
-                }
-            }
-        }
-        return response;
-    }
-
-    protected void assertValidApplicationId() {
-        if (isEmpty(applicationId)) {
-            throw new IllegalArgumentException("No application id specified");
-        }
-    }
-
-    /**
-     * Log the user in and get a valid access token.
-     * 
-     * @param email
-     * @param password
-     * @return non-null ApiResponse if request succeeds, check getError() for
-     *         "invalid_grant" to see if access is denied.
-     */
-    public ApiResponse authorizeAppUser(String email, String password) {
-        validateNonEmptyParam(email, "email");
-        validateNonEmptyParam(password,"password");
-        assertValidApplicationId();
-        loggedInUser = null;
-        accessToken = null;
-        currentOrganization = null;
-        Map<String, Object> formData = new HashMap<String, Object>();
-        formData.put("grant_type", "password");
-        formData.put("username", email);
-        formData.put("password", password);
-        ApiResponse response = apiRequest(HttpMethod.POST, formData, null,
-                organizationId, applicationId, "token");
-        if (response == null) {
-            return response;
-        }
-        if (!isEmpty(response.getAccessToken()) && (response.getUser() != null)) {
-            loggedInUser = response.getUser();
-            accessToken = response.getAccessToken();
-            currentOrganization = null;
-            log.info("Client.authorizeAppUser(): Access token: " + accessToken);
-        } else {
-            log.info("Client.authorizeAppUser(): Response: " + response);
-        }
-        return response;
-    }
-
-    /**
-     * Change the password for the currently logged in user. You must supply the
-     * old password and the new password.
-     * 
-     * @param username
-     * @param oldPassword
-     * @param newPassword
-     * @return
-     */
-    public ApiResponse changePassword(String username, String oldPassword,
-            String newPassword) {
-
-        Map<String, Object> data = new HashMap<String, Object>();
-        data.put("newpassword", newPassword);
-        data.put("oldpassword", oldPassword);
-
-        return apiRequest(HttpMethod.POST, null, data, organizationId,  applicationId, "users",
-                username, "password");
-
-    }
-
-    /**
-     * Log the user in with their numeric pin-code and get a valid access token.
-     * 
-     * @param email
-     * @param pin
-     * @return non-null ApiResponse if request succeeds, check getError() for
-     *         "invalid_grant" to see if access is denied.
-     */
-    public ApiResponse authorizeAppUserViaPin(String email, String pin) {
-        validateNonEmptyParam(email, "email");
-        validateNonEmptyParam(pin, "pin");
-        assertValidApplicationId();
-        loggedInUser = null;
-        accessToken = null;
-        currentOrganization = null;
-        Map<String, Object> formData = new HashMap<String, Object>();
-        formData.put("grant_type", "pin");
-        formData.put("username", email);
-        formData.put("pin", pin);
-        ApiResponse response = apiRequest(HttpMethod.POST, formData, null,
-                organizationId,  applicationId, "token");
-        if (response == null) {
-            return response;
-        }
-        if (!isEmpty(response.getAccessToken()) && (response.getUser() != null)) {
-            loggedInUser = response.getUser();
-            accessToken = response.getAccessToken();
-            currentOrganization = null;
-            log.info("Client.authorizeAppUser(): Access token: " + accessToken);
-        } else {
-            log.info("Client.authorizeAppUser(): Response: " + response);
-        }
-        return response;
-    }
-
-    /**
-     * Log the user in with their Facebook access token retrived via Facebook
-     * OAuth.
-     * 
-     * @param email
-     * @param pin
-     * @return non-null ApiResponse if request succeeds, check getError() for
-     *         "invalid_grant" to see if access is denied.
-     */
-    public ApiResponse authorizeAppUserViaFacebook(String fb_access_token) {
-        validateNonEmptyParam(fb_access_token, "Facebook token");
-        assertValidApplicationId();
-        loggedInUser = null;
-        accessToken = null;
-        currentOrganization = null;
-        Map<String, Object> formData = new HashMap<String, Object>();
-        formData.put("fb_access_token", fb_access_token);
-        ApiResponse response = apiRequest(HttpMethod.POST, formData, null,
-                organizationId,  applicationId, "auth", "facebook");
-        if (response == null) {
-            return response;
-        }
-        if (!isEmpty(response.getAccessToken()) && (response.getUser() != null)) {
-            loggedInUser = response.getUser();
-            accessToken = response.getAccessToken();
-            currentOrganization = null;
-            log.info("Client.authorizeAppUserViaFacebook(): Access token: "
-                    + accessToken);
-        } else {
-            log.info("Client.authorizeAppUserViaFacebook(): Response: "
-                    + response);
-        }
-        return response;
-    }
-
-    /**
-     * Log the app in with it's client id and client secret key. Not recommended
-     * for production apps.
-     * 
-     * @param email
-     * @param pin
-     * @return non-null ApiResponse if request succeeds, check getError() for
-     *         "invalid_grant" to see if access is denied.
-     */
-    public ApiResponse authorizeAppClient(String clientId, String clientSecret) {
-        validateNonEmptyParam(clientId, "client identifier");
-        validateNonEmptyParam(clientSecret, "client secret");
-        assertValidApplicationId();
-        loggedInUser = null;
-        accessToken = null;
-        currentOrganization = null;
-        Map<String, Object> formData = new HashMap<String, Object>();
-        formData.put("grant_type", "client_credentials");
-        formData.put("client_id", clientId);
-        formData.put("client_secret", clientSecret);
-        ApiResponse response = apiRequest(HttpMethod.POST, formData, null,
-                organizationId, applicationId, "token");
-        if (response == null) {
-            return response;
-        }
-        if (!isEmpty(response.getAccessToken())) {
-            loggedInUser = null;
-            accessToken = response.getAccessToken();
-            currentOrganization = null;
-            log.info("Client.authorizeAppClient(): Access token: "
-                    + accessToken);
-        } else {
-            log.info("Client.authorizeAppClient(): Response: " + response);
-        }
-        return response;
-    }
-
-    private void validateNonEmptyParam(Object param, String paramName) {
-        if ( isEmpty(param) ) {
-            throw new IllegalArgumentException(paramName + " cannot be null or empty");
-        }
-    }
-
-    /**
-     * Registers a device using the device's unique device ID.
-     * 
-     * @param context
-     * @param properties
-     * @return a Device object if success
-     */
-    public Device registerDevice(UUID deviceId, Map<String, Object> properties) {
-        assertValidApplicationId();
-        if (properties == null) {
-            properties = new HashMap<String, Object>();
-        }
-        properties.put("refreshed", System.currentTimeMillis());
-        ApiResponse response = apiRequest(HttpMethod.PUT, null, properties,
-                organizationId, applicationId, "devices", deviceId.toString());
-        return response.getFirstEntity(Device.class);
-    }
-
-    /**
-     * Registers a device using the device's unique device ID.
-     *
-     * @param context
-     * @param properties
-     * @return a Device object if success
-     */
-    public Device registerDeviceForPush(UUID deviceId,
-                                        String notifier,
-                                        String token,
-                                        Map<String, Object> properties) {
-      if (properties == null) {
-          properties = new HashMap<String, Object>();
-      }
-      String notifierKey = notifier + ".notifier.id";
-      properties.put(notifierKey, token);
-      return registerDevice(deviceId, properties);
-    }
-
-    /**
-     * Create a new entity on the server.
-     * 
-     * @param entity
-     * @return an ApiResponse with the new entity in it.
-     */
-    public ApiResponse createEntity(Entity entity) {
-        assertValidApplicationId();
-        if (isEmpty(entity.getType())) {
-            throw new IllegalArgumentException("Missing entity type");
-        }
-        ApiResponse response = apiRequest(HttpMethod.POST, null, entity,
-                organizationId, applicationId, entity.getType());
-        return response;
-    }
-
-    /**
-     * Create a new entity on the server from a set of properties. Properties
-     * must include a "type" property.
-     * 
-     * @param properties
-     * @return an ApiResponse with the new entity in it.
-     */
-    public ApiResponse createEntity(Map<String, Object> properties) {
-        assertValidApplicationId();
-        if (isEmpty(properties.get("type"))) {
-            throw new IllegalArgumentException("Missing entity type");
-        }
-        ApiResponse response = apiRequest(HttpMethod.POST, null, properties,
-                organizationId, applicationId, properties.get("type").toString());
-        return response;
-    }
-
-    /**
-     * Creates a user.
-     * 
-     * @param username
-     *            required
-     * @param name
-     * @param email
-     * @param password
-     * @return
-     */
-    public ApiResponse createUser(String username, String name, String email,
-            String password) {
-        Map<String, Object> properties = new HashMap<String, Object>();
-        properties.put("type", "user");
-        if (username != null) {
-            properties.put("username", username);
-        }
-        if (name != null) {
-            properties.put("name", name);
-        }
-        if (email != null) {
-            properties.put("email", email);
-        }
-        if (password != null) {
-            properties.put("password", password);
-        }
-        return createEntity(properties);
-    }
-
-    /**
-     * Get the groups for the user.
-     * 
-     * @param userId
-     * @return a map with the group path as the key and the Group entity as the
-     *         value
-     */
-    public Map<String, Group> getGroupsForUser(String userId) {
-        ApiResponse response = apiRequest(HttpMethod.GET, null, null,
-                organizationId, applicationId, "users", userId, "groups");
-        Map<String, Group> groupMap = new HashMap<String, Group>();
-        if (response != null) {
-            List<Group> groups = response.getEntities(Group.class);
-            for (Group group : groups) {
-                groupMap.put(group.getPath(), group);
-            }
-        }
-        return groupMap;
-    }
-
-    /**
-     * Get a user's activity feed. Returned as a query to ease paging.
-     * 
-     * @param userId
-     * @return
-     */
-    public Query queryActivityFeedForUser(String userId) {
-        Query q = queryEntitiesRequest(HttpMethod.GET, null, null,
-                organizationId, applicationId, "users", userId, "feed");
-        return q;
-    }
-
-    /**
-     * Posts an activity to a user. Activity must already be created.
-     * 
-     * @param userId
-     * @param activity
-     * @return
-     */
-    public ApiResponse postUserActivity(String userId, Activity activity) {
-        return apiRequest(HttpMethod.POST, null, activity,  organizationId, applicationId, "users",
-                userId, "activities");
-    }
-
-    /**
-     * Creates and posts an activity to a user.
-     * 
-     * @param verb
-     * @param title
-     * @param content
-     * @param category
-     * @param user
-     * @param object
-     * @param objectType
-     * @param objectName
-     * @param objectContent
-     * @return
-     */
-    public ApiResponse postUserActivity(String verb, String title,
-            String content, String category, User user, Entity object,
-            String objectType, String objectName, String objectContent) {
-        Activity activity = Activity.newActivity(verb, title, content,
-                category, user, object, objectType, objectName, objectContent);
-        return postUserActivity(user.getUuid().toString(), activity);
-    }
-
-    /**
-     * Posts an activity to a group. Activity must already be created.
-     * 
-     * @param userId
-     * @param activity
-     * @return
-     */
-    public ApiResponse postGroupActivity(String groupId, Activity activity) {
-        return apiRequest(HttpMethod.POST, null, activity, organizationId, applicationId, "groups",
-                groupId, "activities");
-    }
-
-    /**
-     * Creates and posts an activity to a group.
-     * 
-     * @param groupId
-     * @param verb
-     * @param title
-     * @param content
-     * @param category
-     * @param user
-     * @param object
-     * @param objectType
-     * @param objectName
-     * @param objectContent
-     * @return
-     */
-    public ApiResponse postGroupActivity(String groupId, String verb, String title,
-            String content, String category, User user, Entity object,
-            String objectType, String objectName, String objectContent) {
-        Activity activity = Activity.newActivity(verb, title, content,
-                category, user, object, objectType, objectName, objectContent);
-        return postGroupActivity(groupId, activity);
-    }
-
-    /**
-     * Post an activity to the stream.
-     * 
-     * @param activity
-     * @return
-     */
-    public ApiResponse postActivity(Activity activity) {
-        return createEntity(activity);
-    }
-
-    /**
-     * Creates and posts an activity to a group.
-     * 
-     * @param verb
-     * @param title
-     * @param content
-     * @param category
-     * @param user
-     * @param object
-     * @param objectType
-     * @param objectName
-     * @param objectContent
-     * @return
-     */
-    public ApiResponse postActivity(String verb, String title,
-            String content, String category, User user, Entity object,
-            String objectType, String objectName, String objectContent) {
-        Activity activity = Activity.newActivity(verb, title, content,
-                category, user, object, objectType, objectName, objectContent);
-        return createEntity(activity);
-    }
-    
-    /**
-     * Get a group's activity feed. Returned as a query to ease paging.
-     * 
-     * @param userId
-     * @return
-     */
-    public Query queryActivity() {
-        Query q = queryEntitiesRequest(HttpMethod.GET, null, null,
-               organizationId, applicationId, "activities");
-        return q;
-    }
-
-    
-
-    /**
-     * Get a group's activity feed. Returned as a query to ease paging.
-     * 
-     * @param userId
-     * @return
-     */
-    public Query queryActivityFeedForGroup(String groupId) {
-        Query q = queryEntitiesRequest(HttpMethod.GET, null, null,
-                organizationId,  applicationId, "groups", groupId, "feed");
-        return q;
-    }
-
-    /**
-     * Perform a query request and return a query object. The Query object
-     * provides a simple way of dealing with result sets that need to be
-     * iterated or paged through.
-     * 
-     * @param method
-     * @param params
-     * @param data
-     * @param segments
-     * @return
-     */
-    public Query queryEntitiesRequest(HttpMethod method,
-            Map<String, Object> params, Object data, String... segments) {
-        ApiResponse response = apiRequest(method, params, data, segments);
-        return new EntityQuery(response, method, params, data, segments);
-    }
-
-    /**
-     * Perform a query of the users collection.
-     * 
-     * @return
-     */
-    public Query queryUsers() {
-        Query q = queryEntitiesRequest(HttpMethod.GET, null, null,
-                organizationId,  applicationId, "users");
-        return q;
-    }
-
-    /**
-     * Perform a query of the users collection using the provided query command.
-     * For example: "name contains 'ed'".
-     * 
-     * @param ql
-     * @return
-     */
-    public Query queryUsers(String ql) {
-        Map<String, Object> params = new HashMap<String, Object>();
-        params.put("ql", ql);
-        Query q = queryEntitiesRequest(HttpMethod.GET, params, null,organizationId,
-                applicationId, "users");
-        return q;
-    }
-
-    /**
-     * Perform a query of the users collection within the specified distance of
-     * the specified location and optionally using the provided query command.
-     * For example: "name contains 'ed'".
-     * 
-     * @param distance
-     * @param location
-     * @param ql
-     * @return
-     */
-    public Query queryUsersWithinLocation(float distance, float lattitude,
-            float longitude, String ql) {
-        Map<String, Object> params = new HashMap<String, Object>();
-        params.put("ql",
-                this.makeLocationQL(distance, lattitude, longitude, ql));
-        Query q = queryEntitiesRequest(HttpMethod.GET, params, null, organizationId,
-                applicationId, "users");
-        return q;
-    }
-
-    /**
-     * Queries the users for the specified group.
-     * 
-     * @param groupId
-     * @return
-     */
-    public Query queryUsersForGroup(String groupId) {
-        Query q = queryEntitiesRequest(HttpMethod.GET, null, null, organizationId,
-                applicationId, "groups", groupId, "users");
-        return q;
-    }
-
-    /**
-     * Adds a user to the specified groups.
-     * 
-     * @param userId
-     * @param groupId
-     * @return
-     */
-    public ApiResponse addUserToGroup(String userId, String groupId) {
-        return apiRequest(HttpMethod.POST, null, null, organizationId,  applicationId, "groups",
-                groupId, "users", userId);
-    }
-
-    /**
-     * Creates a group with the specified group path. Group paths can be slash
-     * ("/") delimited like file paths for hierarchical group relationships.
-     * 
-     * @param groupPath
-     * @return
-     */
-    public ApiResponse createGroup(String groupPath) {
-        return createGroup(groupPath, null);
-    }
-
-    /**
-     * Creates a group with the specified group path and group title. Group
-     * paths can be slash ("/") delimited like file paths for hierarchical group
-     * relationships.
-     * 
-     * @param groupPath
-     * @param groupTitle
-     * @return
-     */
-    public ApiResponse createGroup(String groupPath, String groupTitle) {
-     return createGroup(groupPath, groupTitle, null);  
-    }
-    
-    /**
-     * Create a group with a path, title and name
-     * @param groupPath
-     * @param groupTitle
-     * @param groupName
-     * @return
-     */
-    public ApiResponse createGroup(String groupPath, String groupTitle, String groupName){
-        Map<String, Object> data = new HashMap<String, Object>();
-        data.put("type", "group");
-        data.put("path", groupPath);
-        
-        if (groupTitle != null) {
-            data.put("title", groupTitle);
-        }
-        
-        if(groupName != null){
-            data.put("name", groupName);
-        }
-        
-        return apiRequest(HttpMethod.POST, null, data,  organizationId, applicationId, "groups");
-    }
-    
-    /**
-     * Perform a query of the users collection using the provided query command.
-     * For example: "name contains 'ed'".
-     * 
-     * @param ql
-     * @return
-     */
-    public Query queryGroups(String ql) {
-        Map<String, Object> params = new HashMap<String, Object>();
-        params.put("ql", ql);
-        Query q = queryEntitiesRequest(HttpMethod.GET, params, null, organizationId,
-                applicationId, "groups");
-        return q;
-    }
-
-    
-
-    /**
-     * Connect two entities together.
-     * 
-     * @param connectingEntityType
-     * @param connectingEntityId
-     * @param connectionType
-     * @param connectedEntityId
-     * @return
-     */
-    public ApiResponse connectEntities(String connectingEntityType,
-            String connectingEntityId, String connectionType,
-            String connectedEntityId) {
-        return apiRequest(HttpMethod.POST, null, null,  organizationId, applicationId,
-                connectingEntityType, connectingEntityId, connectionType,
-                connectedEntityId);
-    }
-
-    /**
-     * Disconnect two entities.
-     * 
-     * @param connectingEntityType
-     * @param connectingEntityId
-     * @param connectionType
-     * @param connectedEntityId
-     * @return
-     */
-    public ApiResponse disconnectEntities(String connectingEntityType,
-            String connectingEntityId, String connectionType,
-            String connectedEntityId) {
-        return apiRequest(HttpMethod.DELETE, null, null,  organizationId, applicationId,
-                connectingEntityType, connectingEntityId, connectionType,
-                connectedEntityId);
-    }
-
-    /**
-     * Query the connected entities.
-     * 
-     * @param connectingEntityType
-     * @param connectingEntityId
-     * @param connectionType
-     * @param ql
-     * @return
-     */
-    public Query queryEntityConnections(String connectingEntityType,
-            String connectingEntityId, String connectionType, String ql) {
-        Map<String, Object> params = new HashMap<String, Object>();
-        params.put("ql", ql);
-        Query q = queryEntitiesRequest(HttpMethod.GET, params, null,
-                organizationId, applicationId, connectingEntityType, connectingEntityId,
-                connectionType);
-        return q;
-    }
-
-    protected String makeLocationQL(float distance, double lattitude,
-            double longitude, String ql) {
-        String within = String.format("within %d of %d , %d", distance,
-                lattitude, longitude);
-        ql = ql == null ? within : within + " and " + ql;
-        return ql;
-    }
-
-    /**
-     * Query the connected entities within distance of a specific point.
-     * 
-     * @param connectingEntityType
-     * @param connectingEntityId
-     * @param connectionType
-     * @param distance
-     * @param latitude
-     * @param longitude
-     * @return
-     */
-    public Query queryEntityConnectionsWithinLocation(
-            String connectingEntityType, String connectingEntityId,
-            String connectionType, float distance, float lattitude,
-            float longitude, String ql) {
-        Map<String, Object> params = new HashMap<String, Object>();
-        params.put("ql", makeLocationQL(distance, lattitude, longitude, ql));
-        Query q = queryEntitiesRequest(HttpMethod.GET, params, null, organizationId,
-                applicationId, connectingEntityType, connectingEntityId,
-                connectionType);
-        return q;
-    }
-
-    public interface Query {
-
-        public ApiResponse getResponse();
-
-        public boolean more();
-
-        public Query next();
-
-    }
-
-    /**
-     * Query object
-     * 
-     */
-    private class EntityQuery implements Query {
-        final HttpMethod method;
-        final Map<String, Object> params;
-        final Object data;
-        final String[] segments;
-        final ApiResponse response;
-
-        private EntityQuery(ApiResponse response, HttpMethod method,
-                Map<String, Object> params, Object data, String[] segments) {
-            this.response = response;
-            this.method = method;
-            this.params = params;
-            this.data = data;
-            this.segments = segments;
-        }
-
-        private EntityQuery(ApiResponse response, EntityQuery q) {
-            this.response = response;
-            method = q.method;
-            params = q.params;
-            data = q.data;
-            segments = q.segments;
-        }
-
-        /**
-         * @return the api response of the last request
-         */
-        public ApiResponse getResponse() {
-            return response;
-        }
-
-        /**
-         * @return true if the server indicates more results are available
-         */
-        public boolean more() {
-            if ((response != null) && (response.getCursor() != null)
-                    && (response.getCursor().length() > 0)) {
-                return true;
-            }
-            return false;
-        }
-
-        /**
-         * Performs a request for the next set of results
-         * 
-         * @return query that contains results and where to get more from.
-         */
-        public Query next() {
-            if (more()) {
-                Map<String, Object> nextParams = null;
-                if (params != null) {
-                    nextParams = new HashMap<String, Object>(params);
-                } else {
-                    nextParams = new HashMap<String, Object>();
-                }
-                nextParams.put("cursor", response.getCursor());
-                ApiResponse nextResponse = apiRequest(method, nextParams, data,
-                        segments);
-                return new EntityQuery(nextResponse, this);
-            }
-            return null;
-        }
-
-    }
-
-    private String normalizeQueuePath(String path) {
-        return arrayToDelimitedString(
-                tokenizeToStringArray(path, "/", true, true), "/");
-    }
-
-    public ApiResponse postMessage(String path, Map<String, Object> message) {
-        return apiRequest(HttpMethod.POST, null, message, organizationId,  applicationId,
-                "queues", normalizeQueuePath(path));
-    }
-
-    public ApiResponse postMessage(String path,
-            List<Map<String, Object>> messages) {
-        return apiRequest(HttpMethod.POST, null, messages,  organizationId, applicationId,
-                "queues", normalizeQueuePath(path));
-    }
-
-    public enum QueuePosition {
-        START("start"), END("end"), LAST("last"), CONSUMER("consumer");
-
-        private final String shortName;
-
-        QueuePosition(String shortName) {
-            this.shortName = shortName;
-        }
-
-        static Map<String, QueuePosition> nameMap = new ConcurrentHashMap<String, QueuePosition>();
-
-        static {
-            for (QueuePosition op : EnumSet.allOf(QueuePosition.class)) {
-                if (op.shortName != null) {
-                    nameMap.put(op.shortName, op);
-                }
-            }
-        }
-
-        public static QueuePosition find(String s) {
-            if (s == null) {
-                return null;
-            }
-            return nameMap.get(s);
-        }
-
-        @Override
-        public String toString() {
-            return shortName;
-        }
-    }
-
-    public ApiResponse getMessages(String path, String consumer, UUID last,
-            Long time, Integer prev, Integer next, Integer limit,
-            QueuePosition pos, Boolean update, Boolean sync) {
-        Map<String, Object> params = new HashMap<String, Object>();
-        if (consumer != null) {
-            params.put("consumer", consumer);
-        }
-        if (last != null) {
-            params.put("last", last);
-        }
-        if (time != null) {
-            params.put("time", time);
-        }
-        if (prev != null) {
-            params.put("prev", prev);
-        }
-        if (next != null) {
-            params.put("next", next);
-        }
-        if (limit != null) {
-            params.put("limit", limit);
-        }
-        if (pos != null) {
-            params.put("pos", pos.toString());
-        }
-        if (update != null) {
-            params.put("update", update);
-        }
-        if (sync != null) {
-            params.put("synchronized", sync);
-        }
-        return apiRequest(HttpMethod.GET, params, null,  organizationId, applicationId,
-                "queues", normalizeQueuePath(path));
-    }
-
-    public ApiResponse addSubscriber(String publisherQueue,
-            String subscriberQueue) {
-        return apiRequest(HttpMethod.POST, null, null, organizationId,  applicationId, "queues",
-                normalizeQueuePath(publisherQueue), "subscribers",
-                normalizeQueuePath(subscriberQueue));
-    }
-
-    public ApiResponse removeSubscriber(String publisherQueue,
-            String subscriberQueue) {
-        return apiRequest(HttpMethod.DELETE, null, null, organizationId,  applicationId,
-                "queues", normalizeQueuePath(publisherQueue), "subscribers",
-                normalizeQueuePath(subscriberQueue));
-    }
-
-    private class QueueQuery implements Query {
-        final HttpMethod method;
-        final Map<String, Object> params;
-        final Object data;
-        final String queuePath;
-        final ApiResponse response;
-
-        private QueueQuery(ApiResponse response, HttpMethod method,
-                Map<String, Object> params, Object data, String queuePath) {
-            this.response = response;
-            this.method = method;
-            this.params = params;
-            this.data = data;
-            this.queuePath = normalizeQueuePath(queuePath);
-        }
-
-        private QueueQuery(ApiResponse response, QueueQuery q) {
-            this.response = response;
-            method = q.method;
-            params = q.params;
-            data = q.data;
-            queuePath = q.queuePath;
-        }
-
-        /**
-         * @return the api response of the last request
-         */
-        public ApiResponse getResponse() {
-            return response;
-        }
-
-        /**
-         * @return true if the server indicates more results are available
-         */
-        public boolean more() {
-            if ((response != null) && (response.getCursor() != null)
-                    && (response.getCursor().length() > 0)) {
-                return true;
-            }
-            return false;
-        }
-
-        /**
-         * Performs a request for the next set of results
-         * 
-         * @return query that contains results and where to get more from.
-         */
-        public Query next() {
-            if (more()) {
-                Map<String, Object> nextParams = null;
-                if (params != null) {
-                    nextParams = new HashMap<String, Object>(params);
-                } else {
-                    nextParams = new HashMap<String, Object>();
-                }
-                nextParams.put("start", response.getCursor());
-                ApiResponse nextResponse = apiRequest(method, nextParams, data,
-                        queuePath);
-                return new QueueQuery(nextResponse, this);
-            }
-            return null;
-        }
-
-    }
-
-    public Query queryQueuesRequest(HttpMethod method,
-            Map<String, Object> params, Object data, String queuePath) {
-        ApiResponse response = apiRequest(method, params, data, queuePath);
-        return new QueueQuery(response, method, params, data, queuePath);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/usergrid/java/client/entities/Activity.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/usergrid/java/client/entities/Activity.java b/sdks/java/src/main/java/org/usergrid/java/client/entities/Activity.java
deleted file mode 100644
index 8889646..0000000
--- a/sdks/java/src/main/java/org/usergrid/java/client/entities/Activity.java
+++ /dev/null
@@ -1,627 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2011 Ed Anuff and Usergrid, all rights reserved.
- * http://www.usergrid.com
- * 
- * This file is part of Usergrid Core.
- * 
- * Usergrid Core is free software: you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation, either version 3 of the License, or (at your option) any later
- * version.
- * 
- * Usergrid Core is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * Usergrid Core. If not, see <http://www.gnu.org/licenses/>.
- ******************************************************************************/
-package org.usergrid.java.client.entities;
-
-
-import static org.usergrid.java.client.utils.JsonUtils.getStringProperty;
-
-import java.util.Arrays;
-import java.util.Date;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeMap;
-import java.util.UUID;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-import com.fasterxml.jackson.annotation.JsonAnyGetter;
-import com.fasterxml.jackson.annotation.JsonAnySetter;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion;
-
-/**
- * An entity type for representing activity stream actions. These are similar to
- * the more generic message entity type except provide the necessary properties
- * for supporting activity stream implementations.
- * 
- * @see http://activitystrea.ms/specs/json/1.0/
- */
-public class Activity extends Entity {
-
-    public static final String ENTITY_TYPE = "activity";
-
-    public static final String PROP_ACTOR = "actor";
-
-    public static final String VERB_ADD = "add";
-    public static final String VERB_CANCEL = "cancel";
-    public static final String VERB_CHECKIN = "checkin";
-    public static final String VERB_DELETE = "delete";
-    public static final String VERB_FAVORITE = "favorite";
-    public static final String VERB_FOLLOW = "follow";
-    public static final String VERB_GIVE = "give";
-    public static final String VERB_IGNORE = "ignore";
-    public static final String VERB_INVITE = "invite";
-    public static final String VERB_JOIN = "join";
-    public static final String VERB_LEAVE = "leave";
-    public static final String VERB_LIKE = "like";
-    public static final String VERB_MAKE_FRIEND = "make-friend";
-    public static final String VERB_PLAY = "play";
-    public static final String VERB_POST = "post";
-    public static final String VERB_RECEIVE = "receive";
-    public static final String VERB_REMOVE = "remove";
-    public static final String VERB_REMOVE_FRIEND = "remove-friend";
-    public static final String VERB_REQUEST_FRIEND = "request-friend";
-    public static final String VERB_RSVP_MAYBE = "rsvp-maybe";
-    public static final String VERB_RSVP_NO = "rsvp-no";
-    public static final String VERB_RSVP_YES = "rsvp-yes";
-    public static final String VERB_SAVE = "save";
-    public static final String VERB_SHARE = "share";
-    public static final String VERB_STOP_FOLLOWING = "stop-following";
-    public static final String VERB_TAG = "tag";
-    public static final String VERB_UNFAVORITE = "unfavorite";
-    public static final String VERB_UNLIKE = "unlike";
-    public static final String VERB_UNSAVE = "unsave";
-    public static final String VERB_UPDATE = "update";
-
-    public static final String OBJECT_TYPE_ARTICLE = "article";
-    public static final String OBJECT_TYPE_AUDIO = "audio";
-    public static final String OBJECT_TYPE_BADGE = "badge";
-    public static final String OBJECT_TYPE_BOOKMARK = "bookmark";
-    public static final String OBJECT_TYPE_COLLECTION = "collection";
-    public static final String OBJECT_TYPE_COMMENT = "comment";
-    public static final String OBJECT_TYPE_EVENT = "event";
-    public static final String OBJECT_TYPE_FILE = "file";
-    public static final String OBJECT_TYPE_GROUP = "group";
-    public static final String OBJECT_TYPE_IMAGE = "image";
-    public static final String OBJECT_TYPE_NOTE = "note";
-    public static final String OBJECT_TYPE_PERSON = "person";
-    public static final String OBJECT_TYPE_PLACE = "place";
-    public static final String OBJECT_TYPE_PRODUCT = "product";
-    public static final String OBJECT_TYPE_QUESTION = "question";
-    public static final String OBJECT_TYPE_REVIEW = "review";
-    public static final String OBJECT_TYPE_SERVICE = "service";
-    public static final String OBJECT_TYPE_VIDEO = "video";
-
-    protected ActivityObject actor;
-
-    protected String content;
-
-    protected ActivityObject generator;
-
-    protected MediaLink icon;
-
-    protected String category;
-
-    protected String verb;
-
-    protected Long published;
-
-    protected ActivityObject object;
-
-    // protected
-    // String objectType;
-
-    // protected
-    // String objectEntityType;
-
-    // protected
-    // String objectName;
-
-    protected String title;
-
-    protected Set<String> connections;
-
-    public Activity() {
-        setType("activity");
-    }
-
-    public Activity(UUID id) {
-        this();
-        setUuid(id);
-    }
-
-    public static Activity newActivity(String verb, String title,
-            String content, String category, Entity user, Entity object,
-            String objectType, String objectName, String objectContent){
-
-        Activity activity = new Activity();
-        activity.setVerb(verb);
-        activity.setCategory(category);
-        activity.setContent(content);
-        activity.setTitle(title);
-        
-        ActivityObject actor = new ActivityObject();
-        actor.setObjectType("person");
-        
-        if (user != null) {
-            actor.setDisplayName(getStringProperty(user.properties, "name"));
-            actor.setEntityType(user.getType());
-            actor.setUuid(user.getUuid());
-        }
-        
-        activity.setActor(actor);
-
-        ActivityObject obj = new ActivityObject();
-        obj.setDisplayName(objectName);
-        obj.setObjectType(objectType);
-        if (object != null) {
-            obj.setEntityType(object.getType());
-            obj.setUuid(object.getUuid());
-        }
-        if (objectContent != null) {
-            obj.setContent(objectContent);
-        } else {
-            obj.setContent(content);
-        }
-        activity.setObject(obj);
-
-        return activity;
-    }
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public ActivityObject getActor() {
-        return actor;
-    }
-
-    public void setActor(ActivityObject actor) {
-        this.actor = actor;
-    }
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public ActivityObject getGenerator() {
-        return generator;
-    }
-
-    public void setGenerator(ActivityObject generator) {
-        this.generator = generator;
-    }
-
-    /*
-     * @JsonSerialize(include = Inclusion.NON_NULL) public String getActorName()
-     * { return actorName; }
-     * 
-     * public void setActorName(String actorName) { this.actorName = actorName;
-     * }
-     */
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public String getCategory() {
-        return category;
-    }
-
-    public void setCategory(String category) {
-        this.category = category;
-    }
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public String getVerb() {
-        return verb;
-    }
-
-    public void setVerb(String verb) {
-        this.verb = verb;
-    }
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public Long getPublished() {
-        return published;
-    }
-
-    public void setPublished(Long published) {
-        this.published = published;
-    }
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public ActivityObject getObject() {
-        return object;
-    }
-
-    public void setObject(ActivityObject object) {
-        this.object = object;
-    }
-
-    /*
-     * @JsonSerialize(include = Inclusion.NON_NULL) public String
-     * getObjectType() { return objectType; }
-     * 
-     * public void setObjectType(String objectType) { this.objectType =
-     * objectType; }
-     * 
-     * @JsonSerialize(include = Inclusion.NON_NULL) public String
-     * getObjectEntityType() { return objectEntityType; }
-     * 
-     * public void setObjectEntityType(String objectEntityType) {
-     * this.objectEntityType = objectEntityType; }
-     * 
-     * @JsonSerialize(include = Inclusion.NON_NULL) public String
-     * getObjectName() { return objectName; }
-     * 
-     * public void setObjectName(String objectName) { this.objectName =
-     * objectName; }
-     */
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public String getTitle() {
-        return title;
-    }
-
-    public void setTitle(String title) {
-        this.title = title;
-    }
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public MediaLink getIcon() {
-        return icon;
-    }
-
-    public void setIcon(MediaLink icon) {
-        this.icon = icon;
-    }
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public String getContent() {
-        return content;
-    }
-
-    public void setContent(String content) {
-        this.content = content;
-    }
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public Set<String> getConnections() {
-        return connections;
-    }
-
-    public void setConnections(Set<String> connections) {
-        this.connections = connections;
-    }
-
-    @XmlRootElement
-    static public class MediaLink {
-
-        int duration;
-
-        int height;
-
-        String url;
-
-        int width;
-
-        protected Map<String, Object> dynamic_properties = new TreeMap<String, Object>(
-                String.CASE_INSENSITIVE_ORDER);
-
-        public MediaLink() {
-        }
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public int getDuration() {
-            return duration;
-        }
-
-        public void setDuration(int duration) {
-            this.duration = duration;
-        }
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public int getHeight() {
-            return height;
-        }
-
-        public void setHeight(int height) {
-            this.height = height;
-        }
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public String getUrl() {
-            return url;
-        }
-
-        public void setUrl(String url) {
-            this.url = url;
-        }
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public int getWidth() {
-            return width;
-        }
-
-        public void setWidth(int width) {
-            this.width = width;
-        }
-
-        @JsonAnySetter
-        public void setDynamicProperty(String key, Object value) {
-            dynamic_properties.put(key, value);
-        }
-
-        @JsonAnyGetter
-        public Map<String, Object> getDynamicProperties() {
-            return dynamic_properties;
-        }
-
-        @Override
-        public String toString() {
-            return "MediaLink [duration=" + duration + ", height=" + height
-                    + ", url=" + url + ", width=" + width
-                    + ", dynamic_properties=" + dynamic_properties + "]";
-        }
-
-    }
-
-    @XmlRootElement
-    static public class ActivityObject {
-
-        ActivityObject[] attachments;
-
-        ActivityObject author;
-
-        String content;
-
-        String displayName;
-
-        String[] downstreamDuplicates;
-
-        String id;
-
-        MediaLink image;
-
-        String objectType;
-
-        Date published;
-
-        String summary;
-
-        String updated;
-
-        String upstreamDuplicates;
-
-        String url;
-
-        UUID uuid;
-
-        String entityType;
-
-        protected Map<String, Object> dynamic_properties = new TreeMap<String, Object>(
-                String.CASE_INSENSITIVE_ORDER);
-
-        public ActivityObject() {
-        }
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public ActivityObject[] getAttachments() {
-            return attachments;
-        }
-
-        public void setAttachments(ActivityObject[] attachments) {
-            this.attachments = attachments;
-        }
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public ActivityObject getAuthor() {
-            return author;
-        }
-
-        public void setAuthor(ActivityObject author) {
-            this.author = author;
-        }
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public String getContent() {
-            return content;
-        }
-
-        public void setContent(String content) {
-            this.content = content;
-        }
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public String getDisplayName() {
-            return displayName;
-        }
-
-        public void setDisplayName(String displayName) {
-            this.displayName = displayName;
-        }
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public String[] getDownstreamDuplicates() {
-            return downstreamDuplicates;
-        }
-
-        public void setDownstreamDuplicates(String[] downstreamDuplicates) {
-            this.downstreamDuplicates = downstreamDuplicates;
-        }
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public String getId() {
-            return id;
-        }
-
-        public void setId(String id) {
-            this.id = id;
-        }
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public MediaLink getImage() {
-            return image;
-        }
-
-        public void setImage(MediaLink image) {
-            this.image = image;
-        }
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public String getObjectType() {
-            return objectType;
-        }
-
-        public void setObjectType(String objectType) {
-            this.objectType = objectType;
-        }
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public Date getPublished() {
-            return published;
-        }
-
-        public void setPublished(Date published) {
-            this.published = published;
-        }
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public String getSummary() {
-            return summary;
-        }
-
-        public void setSummary(String summary) {
-            this.summary = summary;
-        }
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public String getUpdated() {
-            return updated;
-        }
-
-        public void setUpdated(String updated) {
-            this.updated = updated;
-        }
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public String getUpstreamDuplicates() {
-            return upstreamDuplicates;
-        }
-
-        public void setUpstreamDuplicates(String upstreamDuplicates) {
-            this.upstreamDuplicates = upstreamDuplicates;
-        }
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public String getUrl() {
-            return url;
-        }
-
-        public void setUrl(String url) {
-            this.url = url;
-        }
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public UUID getUuid() {
-            return uuid;
-        }
-
-        public void setUuid(UUID uuid) {
-            this.uuid = uuid;
-        }
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public String getEntityType() {
-            return entityType;
-        }
-
-        public void setEntityType(String entityType) {
-            this.entityType = entityType;
-        }
-
-        @JsonAnySetter
-        public void setDynamicProperty(String key, Object value) {
-            dynamic_properties.put(key, value);
-        }
-
-        @JsonAnyGetter
-        public Map<String, Object> getDynamicProperties() {
-            return dynamic_properties;
-        }
-
-        @Override
-        public String toString() {
-            return "ActivityObject [attachments="
-                    + Arrays.toString(attachments) + ", author=" + author
-                    + ", content=" + content + ", displayName=" + displayName
-                    + ", downstreamDuplicates="
-                    + Arrays.toString(downstreamDuplicates) + ", id=" + id
-                    + ", image=" + image + ", objectType=" + objectType
-                    + ", published=" + published + ", summary=" + summary
-                    + ", updated=" + updated + ", upstreamDuplicates="
-                    + upstreamDuplicates + ", url=" + url + ", uuid=" + uuid
-                    + ", entityType=" + entityType + ", dynamic_properties="
-                    + dynamic_properties + "]";
-        }
-
-    }
-
-    @XmlRootElement
-    static public class ActivityCollection {
-
-        int totalItems;
-
-        ActivityObject[] items;
-
-        String url;
-
-        protected Map<String, Object> dynamic_properties = new TreeMap<String, Object>(
-                String.CASE_INSENSITIVE_ORDER);
-
-        public ActivityCollection() {
-        }
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public int getTotalItems() {
-            return totalItems;
-        }
-
-        public void setTotalItems(int totalItems) {
-            this.totalItems = totalItems;
-        }
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public ActivityObject[] getItems() {
-            return items;
-        }
-
-        public void setItems(ActivityObject[] items) {
-            this.items = items;
-        }
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public String getUrl() {
-            return url;
-        }
-
-        public void setUrl(String url) {
-            this.url = url;
-        }
-
-        @JsonAnySetter
-        public void setDynamicProperty(String key, Object value) {
-            dynamic_properties.put(key, value);
-        }
-
-        @JsonAnyGetter
-        public Map<String, Object> getDynamicProperties() {
-            return dynamic_properties;
-        }
-
-        @Override
-        public String toString() {
-            return "ActivityCollection [totalItems=" + totalItems + ", items="
-                    + Arrays.toString(items) + ", url=" + url
-                    + ", dynamic_properties=" + dynamic_properties + "]";
-        }
-
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/usergrid/java/client/entities/Device.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/usergrid/java/client/entities/Device.java b/sdks/java/src/main/java/org/usergrid/java/client/entities/Device.java
deleted file mode 100644
index f0cf3f0..0000000
--- a/sdks/java/src/main/java/org/usergrid/java/client/entities/Device.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package org.usergrid.java.client.entities;
-
-import static com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL;
-import static org.usergrid.java.client.utils.JsonUtils.getStringProperty;
-import static org.usergrid.java.client.utils.JsonUtils.setStringProperty;
-
-import java.util.List;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-
-public class Device extends Entity {
-
-	public final static String ENTITY_TYPE = "device";
-
-	public final static String PROPERTY_NAME = "name";
-
-	public Device() {
-		super();
-		setType(ENTITY_TYPE);
-	}
-
-	public Device(Entity entity) {
-		super();
-		properties = entity.properties;
-		setType(ENTITY_TYPE);
-	}
-
-	@Override
-	@JsonIgnore
-	public String getNativeType() {
-		return ENTITY_TYPE;
-	}
-
-	@Override
-	@JsonIgnore
-	public List<String> getPropertyNames() {
-		List<String> properties = super.getPropertyNames();
-		properties.add(PROPERTY_NAME);
-		return properties;
-	}
-
-	@JsonSerialize(include = NON_NULL)
-	public String getName() {
-		return getStringProperty(properties, PROPERTY_NAME);
-	}
-
-	public void setName(String name) {
-		setStringProperty(properties, PROPERTY_NAME, name);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/usergrid/java/client/entities/Entity.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/usergrid/java/client/entities/Entity.java b/sdks/java/src/main/java/org/usergrid/java/client/entities/Entity.java
deleted file mode 100644
index 55b4697..0000000
--- a/sdks/java/src/main/java/org/usergrid/java/client/entities/Entity.java
+++ /dev/null
@@ -1,175 +0,0 @@
-package org.usergrid.java.client.entities;
-
-import static org.usergrid.java.client.utils.JsonUtils.getStringProperty;
-import static org.usergrid.java.client.utils.JsonUtils.getUUIDProperty;
-import static org.usergrid.java.client.utils.JsonUtils.setStringProperty;
-import static org.usergrid.java.client.utils.JsonUtils.*;
-import static org.usergrid.java.client.utils.MapUtils.newMapWithoutKeys;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
-
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.annotation.JsonAnyGetter;
-import com.fasterxml.jackson.annotation.JsonAnySetter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-
-public class Entity {
-
-    public final static String PROPERTY_UUID = "uuid";
-    public final static String PROPERTY_TYPE = "type";
-
-    protected Map<String, JsonNode> properties = new HashMap<String, JsonNode>();
-
-    public static Map<String, Class<? extends Entity>> CLASS_FOR_ENTITY_TYPE = new HashMap<String, Class<? extends Entity>>();
-    static {
-        CLASS_FOR_ENTITY_TYPE.put(User.ENTITY_TYPE, User.class);
-    }
-
-    public Entity() {
-    }
-
-    public Entity(String type) {
-        setType(type);
-    }
-
-    @JsonIgnore
-    public String getNativeType() {
-        return getType();
-    }
-
-    @JsonIgnore
-    public List<String> getPropertyNames() {
-        List<String> properties = new ArrayList<String>();
-        properties.add(PROPERTY_TYPE);
-        properties.add(PROPERTY_UUID);
-        return properties;
-    }
-
-    public String getType() {
-        return getStringProperty(properties, PROPERTY_TYPE);
-    }
-
-    public void setType(String type) {
-        setStringProperty(properties, PROPERTY_TYPE, type);
-    }
-
-    public UUID getUuid() {
-        return getUUIDProperty(properties, PROPERTY_UUID);
-    }
-
-    public void setUuid(UUID uuid) {
-        setUUIDProperty(properties, PROPERTY_UUID, uuid);
-    }
-
-    @JsonAnyGetter
-    public Map<String, JsonNode> getProperties() {
-        return newMapWithoutKeys(properties, getPropertyNames());
-    }
-
-    @JsonAnySetter
-    public void setProperty(String name, JsonNode value) {
-        if (value == null) {
-            properties.remove(name);
-        } else {
-            properties.put(name, value);
-        }
-    }
-
-  
-    /**
-     * Set the property
-     * 
-     * @param name
-     * @param value
-     */
-    public void setProperty(String name, String value) {
-        setStringProperty(properties, name, value);
-    }
-
-    /**
-     * Set the property
-     * 
-     * @param name
-     * @param value
-     */
-    public void setProperty(String name, boolean value) {
-        setBooleanProperty(properties, name, value);
-    }
-
-    /**
-     * Set the property
-     * 
-     * @param name
-     * @param value
-     */
-    public void setProperty(String name, long value) {
-        setLongProperty(properties, name, value);
-    }
-
-    /**
-     * Set the property
-     * 
-     * @param name
-     * @param value
-     */
-    public void setProperty(String name, int value) {
-        setProperty(name, (long) value);
-    }
-
-    /**
-     * Set the property
-     * 
-     * @param name
-     * @param value
-     */
-    public void setProperty(String name, float value) {
-        setFloatProperty(properties, name, value);
-    }
-
-    @Override
-    public String toString() {
-        return toJsonString(this);
-    }
-
-    public <T extends Entity> T toType(Class<T> t) {
-        return toType(this, t);
-    }
-
-    public static <T extends Entity> T toType(Entity entity, Class<T> t) {
-        if (entity == null) {
-            return null;
-        }
-        T newEntity = null;
-        if (entity.getClass().isAssignableFrom(t)) {
-            try {
-                newEntity = (t.newInstance());
-                if ((newEntity.getNativeType() != null)
-                        && newEntity.getNativeType().equals(entity.getType())) {
-                    newEntity.properties = entity.properties;
-                }
-            } catch (Exception e) {
-                e.printStackTrace();
-            }
-        }
-        return newEntity;
-    }
-
-    public static <T extends Entity> List<T> toType(List<Entity> entities,
-            Class<T> t) {
-        List<T> l = new ArrayList<T>(entities != null ? entities.size() : 0);
-        if (entities != null) {
-            for (Entity entity : entities) {
-                T newEntity = entity.toType(t);
-                if (newEntity != null) {
-                    l.add(newEntity);
-                }
-            }
-        }
-        return l;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/usergrid/java/client/entities/Group.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/usergrid/java/client/entities/Group.java b/sdks/java/src/main/java/org/usergrid/java/client/entities/Group.java
deleted file mode 100644
index 9fa7ddf..0000000
--- a/sdks/java/src/main/java/org/usergrid/java/client/entities/Group.java
+++ /dev/null
@@ -1,63 +0,0 @@
-package org.usergrid.java.client.entities;
-
-import static com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL;
-import static org.usergrid.java.client.utils.JsonUtils.getStringProperty;
-import static org.usergrid.java.client.utils.JsonUtils.setStringProperty;
-
-import java.util.List;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-
-public class Group extends Entity {
-
-	public final static String ENTITY_TYPE = "group";
-
-	public final static String PROPERTY_PATH = "path";
-	public final static String PROPERTY_TITLE = "title";
-
-	public Group() {
-		super();
-		setType(ENTITY_TYPE);
-	}
-
-	public Group(Entity entity) {
-		super();
-		properties = entity.properties;
-		setType(ENTITY_TYPE);
-	}
-
-	@Override
-	@JsonIgnore
-	public String getNativeType() {
-		return ENTITY_TYPE;
-	}
-
-	@Override
-	@JsonIgnore
-	public List<String> getPropertyNames() {
-		List<String> properties = super.getPropertyNames();
-		properties.add(PROPERTY_PATH);
-		properties.add(PROPERTY_TITLE);
-		return properties;
-	}
-
-	@JsonSerialize(include = NON_NULL)
-	public String getPath() {
-		return getStringProperty(properties, PROPERTY_PATH);
-	}
-
-	public void setPath(String path) {
-		setStringProperty(properties, PROPERTY_PATH, path);
-	}
-
-	@JsonSerialize(include = NON_NULL)
-	public String getTitle() {
-		return getStringProperty(properties, PROPERTY_TITLE);
-	}
-
-	public void setTitle(String title) {
-		setStringProperty(properties, PROPERTY_TITLE, title);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/usergrid/java/client/entities/Message.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/usergrid/java/client/entities/Message.java b/sdks/java/src/main/java/org/usergrid/java/client/entities/Message.java
deleted file mode 100644
index 90f7c09..0000000
--- a/sdks/java/src/main/java/org/usergrid/java/client/entities/Message.java
+++ /dev/null
@@ -1,132 +0,0 @@
-package org.usergrid.java.client.entities;
-
-import static com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL;
-import static org.usergrid.java.client.utils.JsonUtils.getBooleanProperty;
-import static org.usergrid.java.client.utils.JsonUtils.getLongProperty;
-import static org.usergrid.java.client.utils.JsonUtils.getStringProperty;
-import static org.usergrid.java.client.utils.JsonUtils.getUUIDProperty;
-import static org.usergrid.java.client.utils.JsonUtils.setBooleanProperty;
-import static org.usergrid.java.client.utils.JsonUtils.setLongProperty;
-import static org.usergrid.java.client.utils.JsonUtils.setStringProperty;
-import static org.usergrid.java.client.utils.JsonUtils.setUUIDProperty;
-
-import java.util.List;
-import java.util.UUID;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion;
-
-public class Message extends Entity {
-
-	public static final String ENTITY_TYPE = "message";
-
-	public static final String PROPERTY_CORRELATION_ID = "correlation_id";
-	public static final String PROPERTY_DESTINATION = "destination";
-	public static final String PROPERTY_REPLY_TO = "reply_to";
-	public static final String PROPERTY_TIMESTAMP = "timestamp";
-	public static final String PROPERTY_TYPE = "type";
-	public static final String PROPERTY_CATEGORY = "category";
-	public static final String PROPERTY_INDEXED = "indexed";
-	public static final String PROPERTY_PERSISTENT = "persistent";
-
-	public Message() {
-		super();
-		setType(ENTITY_TYPE);
-	}
-
-	public Message(Entity entity) {
-		super();
-		properties = entity.properties;
-		setType(ENTITY_TYPE);
-	}
-
-	@Override
-	@JsonIgnore
-	public String getNativeType() {
-		return ENTITY_TYPE;
-	}
-
-	@Override
-	@JsonIgnore
-	public List<String> getPropertyNames() {
-		List<String> properties = super.getPropertyNames();
-		properties.add(PROPERTY_CORRELATION_ID);
-		properties.add(PROPERTY_DESTINATION);
-		properties.add(PROPERTY_REPLY_TO);
-		properties.add(PROPERTY_TIMESTAMP);
-		properties.add(PROPERTY_CATEGORY);
-		properties.add(PROPERTY_INDEXED);
-		properties.add(PROPERTY_PERSISTENT);
-		return properties;
-	}
-
-	@JsonSerialize(include = NON_NULL)
-	@JsonProperty(PROPERTY_CORRELATION_ID)
-	public UUID getCorrelationId() {
-		return getUUIDProperty(properties, PROPERTY_CORRELATION_ID);
-	}
-
-	@JsonProperty(PROPERTY_CORRELATION_ID)
-	public void setCorrelationId(UUID uuid) {
-		setUUIDProperty(properties, PROPERTY_CORRELATION_ID, uuid);
-	}
-
-	@JsonSerialize(include = NON_NULL)
-	public String getDestination() {
-		return getStringProperty(properties, PROPERTY_DESTINATION);
-	}
-
-	public void setDestination(String destination) {
-		setStringProperty(properties, PROPERTY_DESTINATION, destination);
-	}
-
-	@JsonSerialize(include = NON_NULL)
-	@JsonProperty(PROPERTY_REPLY_TO)
-	public String getReplyTo() {
-		return getStringProperty(properties, PROPERTY_DESTINATION);
-	}
-
-	@JsonProperty(PROPERTY_REPLY_TO)
-	public void setReplyTo(String replyTo) {
-		setStringProperty(properties, PROPERTY_DESTINATION, replyTo);
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public Long getTimestamp() {
-		return getLongProperty(properties, PROPERTY_TIMESTAMP);
-	}
-
-	public void setTimestamp(Long timestamp) {
-		setLongProperty(properties, PROPERTY_TIMESTAMP, timestamp);
-	}
-
-	@JsonSerialize(include = NON_NULL)
-	public String getCategory() {
-		return getStringProperty(properties, PROPERTY_CATEGORY);
-	}
-
-	public void setCategory(String category) {
-		setStringProperty(properties, PROPERTY_CATEGORY, category);
-	}
-
-	@JsonSerialize(include = NON_NULL)
-	public Boolean isIndexed() {
-		return getBooleanProperty(properties, PROPERTY_INDEXED);
-	}
-
-	public void setIndexed(Boolean indexed) {
-		setBooleanProperty(properties, PROPERTY_INDEXED, indexed);
-	}
-
-	@JsonSerialize(include = NON_NULL)
-	public Boolean isPersistent() {
-		return getBooleanProperty(properties, PROPERTY_INDEXED);
-	}
-
-	public void setPersistent(Boolean persistent) {
-		setBooleanProperty(properties, PROPERTY_INDEXED, persistent);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/usergrid/java/client/entities/User.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/usergrid/java/client/entities/User.java b/sdks/java/src/main/java/org/usergrid/java/client/entities/User.java
deleted file mode 100644
index 455fe16..0000000
--- a/sdks/java/src/main/java/org/usergrid/java/client/entities/User.java
+++ /dev/null
@@ -1,142 +0,0 @@
-package org.usergrid.java.client.entities;
-
-import static com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL;
-import static org.usergrid.java.client.utils.JsonUtils.getBooleanProperty;
-import static org.usergrid.java.client.utils.JsonUtils.getStringProperty;
-import static org.usergrid.java.client.utils.JsonUtils.setBooleanProperty;
-import static org.usergrid.java.client.utils.JsonUtils.setStringProperty;
-
-import java.util.List;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-
-public class User extends Entity {
-
-	public final static String ENTITY_TYPE = "user";
-
-	public final static String PROPERTY_USERNAME = "username";
-	public final static String PROPERTY_EMAIL = "email";
-	public final static String PROPERTY_NAME = "name";
-	public final static String PROPERTY_FIRSTNAME = "firstname";
-	public final static String PROPERTY_MIDDLENAME = "middlename";
-	public final static String PROPERTY_LASTNAME = "lastname";
-	public final static String PROPERTY_ACTIVATED = "activated";
-	public final static String PROPERTY_PICTURE = "picture";
-	public final static String PROPERTY_DISABLED = "disabled";
-
-	public User() {
-		super();
-		setType(ENTITY_TYPE);
-	}
-
-	public User(Entity entity) {
-		super();
-		properties = entity.properties;
-		setType(ENTITY_TYPE);
-	}
-
-	@Override
-	@JsonIgnore
-	public String getNativeType() {
-		return ENTITY_TYPE;
-	}
-
-	@Override
-	@JsonIgnore
-	public List<String> getPropertyNames() {
-		List<String> properties = super.getPropertyNames();
-		properties.add(PROPERTY_USERNAME);
-		properties.add(PROPERTY_EMAIL);
-		properties.add(PROPERTY_NAME);
-		properties.add(PROPERTY_FIRSTNAME);
-		properties.add(PROPERTY_MIDDLENAME);
-		properties.add(PROPERTY_LASTNAME);
-		properties.add(PROPERTY_ACTIVATED);
-		properties.add(PROPERTY_PICTURE);
-		properties.add(PROPERTY_DISABLED);
-		return properties;
-	}
-
-	@JsonSerialize(include = NON_NULL)
-	public String getUsername() {
-		return getStringProperty(properties, PROPERTY_USERNAME);
-	}
-
-	public void setUsername(String username) {
-		setStringProperty(properties, PROPERTY_USERNAME, username);
-	}
-
-	@JsonSerialize(include = NON_NULL)
-	public String getName() {
-		return getStringProperty(properties, PROPERTY_NAME);
-	}
-
-	public void setName(String name) {
-		setStringProperty(properties, PROPERTY_NAME, name);
-	}
-
-	@JsonSerialize(include = NON_NULL)
-	public String getEmail() {
-		return getStringProperty(properties, PROPERTY_EMAIL);
-	}
-
-	public void setEmail(String email) {
-		setStringProperty(properties, PROPERTY_EMAIL, email);
-	}
-
-	@JsonSerialize(include = NON_NULL)
-	public Boolean isActivated() {
-		return getBooleanProperty(properties, PROPERTY_ACTIVATED);
-	}
-
-	public void setActivated(Boolean activated) {
-		setBooleanProperty(properties, PROPERTY_ACTIVATED, activated);
-	}
-
-	@JsonSerialize(include = NON_NULL)
-	public Boolean isDisabled() {
-		return getBooleanProperty(properties, PROPERTY_DISABLED);
-	}
-
-	public void setDisabled(Boolean disabled) {
-		setBooleanProperty(properties, PROPERTY_DISABLED, disabled);
-	}
-
-	@JsonSerialize(include = NON_NULL)
-	public String getFirstname() {
-		return getStringProperty(properties, PROPERTY_FIRSTNAME);
-	}
-
-	public void setFirstname(String firstname) {
-		setStringProperty(properties, PROPERTY_FIRSTNAME, firstname);
-	}
-
-	@JsonSerialize(include = NON_NULL)
-	public String getMiddlename() {
-		return getStringProperty(properties, PROPERTY_MIDDLENAME);
-	}
-
-	public void setMiddlename(String middlename) {
-		setStringProperty(properties, PROPERTY_MIDDLENAME, middlename);
-	}
-
-	@JsonSerialize(include = NON_NULL)
-	public String getLastname() {
-		return getStringProperty(properties, PROPERTY_LASTNAME);
-	}
-
-	public void setLastname(String lastname) {
-		setStringProperty(properties, PROPERTY_LASTNAME, lastname);
-	}
-
-	@JsonSerialize(include = NON_NULL)
-	public String getPicture() {
-		return getStringProperty(properties, PROPERTY_PICTURE);
-	}
-
-	public void setPicture(String picture) {
-		setStringProperty(properties, PROPERTY_PICTURE, picture);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/usergrid/java/client/exception/ClientException.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/usergrid/java/client/exception/ClientException.java b/sdks/java/src/main/java/org/usergrid/java/client/exception/ClientException.java
deleted file mode 100644
index 151a99a..0000000
--- a/sdks/java/src/main/java/org/usergrid/java/client/exception/ClientException.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- * 
- * 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.usergrid.java.client.exception;
-
-/**
- * Simple wrapper for client exceptions
- * @author tnine
- *
- */
-public class ClientException extends RuntimeException{
-
-    /**
-     * 
-     */
-    private static final long serialVersionUID = 1L;
-
-    /**
-     * @param message
-     * @param cause
-     */
-    public ClientException(String message, Throwable cause) {
-        super(message, cause);
-    }
-    
-    
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/usergrid/java/client/response/AggregateCounter.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/usergrid/java/client/response/AggregateCounter.java b/sdks/java/src/main/java/org/usergrid/java/client/response/AggregateCounter.java
deleted file mode 100644
index 0e350d4..0000000
--- a/sdks/java/src/main/java/org/usergrid/java/client/response/AggregateCounter.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package org.usergrid.java.client.response;
-
-import static org.usergrid.java.client.utils.JsonUtils.toJsonString;
-
-public class AggregateCounter {
-
-	private long timestamp;
-	private long value;
-
-	public AggregateCounter(long timestamp, long value) {
-		this.timestamp = timestamp;
-		this.value = value;
-	}
-
-	public long getTimestamp() {
-		return timestamp;
-	}
-
-	public void setTimestamp(long timestamp) {
-		this.timestamp = timestamp;
-	}
-
-	public long getValue() {
-		return value;
-	}
-
-	public void setValue(long value) {
-		this.value = value;
-	}
-
-	@Override
-	public String toString() {
-		return toJsonString(this);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/usergrid/java/client/response/AggregateCounterSet.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/usergrid/java/client/response/AggregateCounterSet.java b/sdks/java/src/main/java/org/usergrid/java/client/response/AggregateCounterSet.java
deleted file mode 100644
index 651d395..0000000
--- a/sdks/java/src/main/java/org/usergrid/java/client/response/AggregateCounterSet.java
+++ /dev/null
@@ -1,95 +0,0 @@
-package org.usergrid.java.client.response;
-
-import static org.usergrid.java.client.utils.JsonUtils.toJsonString;
-
-import java.util.List;
-import java.util.UUID;
-
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion;
-
-public class AggregateCounterSet {
-	private String name;
-	private UUID user;
-	private UUID group;
-	private UUID queue;
-	private String category;
-	private List<AggregateCounter> values;
-
-	public AggregateCounterSet(String name, UUID user, UUID group,
-			String category, List<AggregateCounter> values) {
-		this.name = name;
-		this.user = user;
-		this.group = group;
-		this.category = category;
-		this.values = values;
-	}
-
-	public AggregateCounterSet(String name, UUID queue, String category,
-			List<AggregateCounter> values) {
-		this.name = name;
-		setQueue(queue);
-		this.category = category;
-		this.values = values;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public UUID getUser() {
-		return user;
-	}
-
-	public void setUser(UUID user) {
-		this.user = user;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public UUID getGroup() {
-		return group;
-	}
-
-	public void setGroup(UUID group) {
-		this.group = group;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public String getCategory() {
-		return category;
-	}
-
-	public void setCategory(String category) {
-		this.category = category;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public String getName() {
-		return name;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public List<AggregateCounter> getValues() {
-		return values;
-	}
-
-	public void setValues(List<AggregateCounter> values) {
-		this.values = values;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public UUID getQueue() {
-		return queue;
-	}
-
-	public void setQueue(UUID queue) {
-		this.queue = queue;
-	}
-
-	@Override
-	public String toString() {
-		return toJsonString(this);
-	}
-
-}


[19/96] [abbrv] [partial] Change package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/mq/cassandra/io/ConsumerTransaction.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/mq/cassandra/io/ConsumerTransaction.java b/stack/core/src/main/java/org/usergrid/mq/cassandra/io/ConsumerTransaction.java
deleted file mode 100644
index 6466c47..0000000
--- a/stack/core/src/main/java/org/usergrid/mq/cassandra/io/ConsumerTransaction.java
+++ /dev/null
@@ -1,471 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.mq.cassandra.io;
-
-
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.UUID;
-import java.util.concurrent.TimeUnit;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.usergrid.locking.Lock;
-import org.usergrid.locking.LockManager;
-import org.usergrid.locking.exception.UGLockException;
-import org.usergrid.mq.Message;
-import org.usergrid.mq.QueueQuery;
-import org.usergrid.mq.QueueResults;
-import org.usergrid.persistence.cassandra.CassandraService;
-import org.usergrid.persistence.exceptions.QueueException;
-import org.usergrid.persistence.exceptions.TransactionNotFoundException;
-import org.usergrid.utils.UUIDUtils;
-
-import me.prettyprint.hector.api.Keyspace;
-import me.prettyprint.hector.api.beans.HColumn;
-import me.prettyprint.hector.api.mutation.Mutator;
-import me.prettyprint.hector.api.query.SliceQuery;
-
-import static me.prettyprint.hector.api.factory.HFactory.createColumn;
-import static me.prettyprint.hector.api.factory.HFactory.createMutator;
-import static me.prettyprint.hector.api.factory.HFactory.createSliceQuery;
-import static org.usergrid.mq.cassandra.CassandraMQUtils.getConsumerId;
-import static org.usergrid.mq.cassandra.CassandraMQUtils.getQueueClientTransactionKey;
-import static org.usergrid.mq.cassandra.CassandraMQUtils.getQueueId;
-import static org.usergrid.mq.cassandra.QueuesCF.CONSUMER_QUEUE_TIMEOUTS;
-
-
-/**
- * Reads from the queue and starts a transaction
- *
- * @author tnine
- */
-public class ConsumerTransaction extends NoTransactionSearch
-{
-
-    private static final Logger logger = LoggerFactory.getLogger( ConsumerTransaction.class );
-    private static final int MAX_READ = 10000;
-    private final LockManager lockManager;
-    private final UUID applicationId;
-    protected final CassandraService cass;
-
-    //timeout on reading lock
-    private final int lockTimeout;
-
-
-    /**
-     * @param ko
-     */
-    public ConsumerTransaction( UUID applicationId, Keyspace ko, LockManager lockManager, CassandraService cass, int lockTimeout )
-    {
-        super( ko );
-        this.applicationId = applicationId;
-        this.lockManager = lockManager;
-        this.cass = cass;
-        this.lockTimeout = lockTimeout;
-    }
-
-
-    /**
-     * Renew the existing transaction. Does so by deleting the exiting timeout, and replacing it with a new value
-     *
-     * @param queuePath The queue path
-     * @param transactionId The transaction id
-     * @param query The query params
-     *
-     * @return The new transaction uuid
-     */
-    public UUID renewTransaction( String queuePath, UUID transactionId, QueueQuery query )
-            throws TransactionNotFoundException
-    {
-        long now = System.currentTimeMillis();
-
-        if ( query == null )
-        {
-            query = new QueueQuery();
-        }
-
-        UUID queueId = getQueueId( queuePath );
-        UUID consumerId = getConsumerId( queueId, query );
-        ByteBuffer key = getQueueClientTransactionKey( queueId, consumerId );
-
-        // read the original transaction, if it's not there, then we can't possibly
-        // extend it
-        SliceQuery<ByteBuffer, UUID, UUID> q = createSliceQuery( ko, be, ue, ue );
-        q.setColumnFamily( CONSUMER_QUEUE_TIMEOUTS.getColumnFamily() );
-        q.setKey( key );
-        q.setColumnNames( transactionId );
-
-        HColumn<UUID, UUID> col = q.execute().get().getColumnByName( transactionId );
-
-        if ( col == null )
-        {
-            throw new TransactionNotFoundException(
-                    String.format( "No transaction with id %s exists", transactionId ) );
-        }
-
-        UUID origTrans = col.getName();
-        UUID messageId = col.getValue();
-
-        // Generate a new expiration and insert it
-        UUID expirationId = UUIDUtils.newTimeUUID( now + query.getTimeout() );
-
-        logger.debug( "Writing new timeout at '{}' for message '{}'", expirationId, messageId );
-
-        Mutator<ByteBuffer> mutator = createMutator( ko, be );
-
-        mutator.addInsertion( key, CONSUMER_QUEUE_TIMEOUTS.getColumnFamily(),
-                createColumn( expirationId, messageId, cass.createTimestamp(), ue, ue ) );
-
-        mutator.execute();
-
-        // now delete the old value
-        deleteTransaction( queueId, consumerId, origTrans );
-
-        return expirationId;
-    }
-
-
-    /** Delete the specified transaction */
-    public void deleteTransaction( String queuePath, UUID transactionId, QueueQuery query )
-    {
-
-        if ( query == null )
-        {
-            query = new QueueQuery();
-        }
-
-        UUID queueId = getQueueId( queuePath );
-        UUID consumerId = getConsumerId( queueId, query );
-
-        deleteTransaction( queueId, consumerId, transactionId );
-    }
-
-
-    /** Delete the specified transaction */
-    private void deleteTransaction( UUID queueId, UUID consumerId, UUID transactionId )
-    {
-
-        Mutator<ByteBuffer> mutator = createMutator( ko, be );
-        ByteBuffer key = getQueueClientTransactionKey( queueId, consumerId );
-
-        mutator.addDeletion( key, CONSUMER_QUEUE_TIMEOUTS.getColumnFamily(), transactionId, ue,
-                cass.createTimestamp() );
-
-        mutator.execute();
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see org.usergrid.mq.cassandra.io.QueueSearch#getResults(java.lang.String,
-     * org.usergrid.mq.QueueQuery)
-     */
-    @Override
-    public QueueResults getResults( String queuePath, QueueQuery query )
-    {
-
-        UUID queueId = getQueueId( queuePath );
-        UUID consumerId = getConsumerId( queueId, query );
-
-        if ( query.getLimit() > MAX_READ )
-        {
-            throw new IllegalArgumentException( String.format(
-                    "You specified a size of %d, you cannot specify a size larger than %d when using transations",
-                    query.getLimit( DEFAULT_READ ), MAX_READ ) );
-        }
-
-        QueueResults results = null;
-
-        Lock lock = lockManager.createLock( applicationId, queueId.toString(), consumerId.toString() );
-
-        try
-        {
-
-            //only try to get a lock with a timeout, if we can't bail
-            if(!lock.tryLock(lockTimeout, TimeUnit.SECONDS)){
-                throw new QueueException( "Unable to obtain a lock on queue '" + queuePath + "' after '" + lockTimeout + "'seconds" );
-            }
-
-            long startTime = System.currentTimeMillis();
-
-            UUID startTimeUUID = UUIDUtils.newTimeUUID( startTime, 0 );
-
-            QueueBounds bounds = getQueueBounds( queueId );
-
-            //queue has never been written to
-            if ( bounds == null )
-            {
-                return createResults( new ArrayList<Message>( 0 ), queuePath, queueId, consumerId );
-            }
-
-            // with transactional reads, we can't read into the future, set the bounds
-            // to be now
-            bounds = new QueueBounds( bounds.getOldest(), startTimeUUID );
-
-            SearchParam params = getParams( queueId, consumerId, query );
-
-            List<UUID> ids = getQueueRange( queueId, bounds, params );
-
-            // get a list of ids from the consumer.
-
-            List<TransactionPointer> pointers = getConsumerIds( queueId, consumerId, params, startTimeUUID );
-
-            TransactionPointer pointer = null;
-
-            int lastTransactionIndex = -1;
-
-            for ( int i = 0; i < pointers.size(); i++ )
-            {
-
-                pointer = pointers.get( i );
-
-                int insertIndex = Collections.binarySearch( ids, pointer.expiration );
-
-                // we're done, this message goes at the end, no point in continuing
-                // since
-                // we have our full result set
-                if ( insertIndex <= params.limit * -1 - 1 )
-                {
-                    break;
-                }
-
-                // get the insertion index into the set
-                insertIndex = ( insertIndex + 1 ) * -1;
-
-                ids.add( insertIndex, pointer.targetMessage );
-
-                lastTransactionIndex = i;
-            }
-
-            // now we've merge the results, trim them to size;
-            if ( ids.size() > params.limit )
-            {
-                ids = ids.subList( 0, params.limit );
-            }
-
-            // load the messages
-            List<Message> messages = loadMessages( ids, params.reversed );
-
-            // write our future timeouts for all these messages
-            writeTransactions( messages, query.getTimeout() + startTime, queueId, consumerId );
-
-            // remove all read transaction pointers
-            deleteTransactionPointers( pointers, lastTransactionIndex + 1, queueId, consumerId );
-
-            // return the results
-            results = createResults( messages, queuePath, queueId, consumerId );
-
-            UUID lastReadTransactionPointer =
-                    lastTransactionIndex == -1 ? null : pointers.get( lastTransactionIndex ).expiration;
-
-            UUID lastId = messages.size() == 0 ? null : messages.get( messages.size() - 1 ).getUuid();
-
-            // our last read id will either be the last read transaction pointer, or
-            // the
-            // last read messages uuid, whichever is greater
-            UUID lastReadId = UUIDUtils.max( lastReadTransactionPointer, lastId );
-
-            writeClientPointer( queueId, consumerId, lastReadId );
-        }
-        catch ( UGLockException e )
-        {
-            logger.debug( "Unable to acquire lock", e );
-            throw new QueueException( "Unable to acquire lock", e );
-        }
-        finally
-        {
-            try
-            {
-                lock.unlock();
-            }
-            catch ( UGLockException e )
-            {
-                logger.debug( "Unable to release lock", e );
-                throw new QueueException( "Unable to release lock", e );
-            }
-        }
-
-        return results;
-    }
-
-
-    /**
-     * Get all pending transactions that have timed out
-     *
-     * @param queueId The queue id
-     * @param consumerId The consumer id
-     * @param params The server params
-     * @param startTimeUUID The start time
-     */
-    protected List<TransactionPointer> getConsumerIds( UUID queueId, UUID consumerId, SearchParam params,
-                                                       UUID startTimeUUID )
-    {
-
-        SliceQuery<ByteBuffer, UUID, UUID> q = createSliceQuery( ko, be, ue, ue );
-        q.setColumnFamily( CONSUMER_QUEUE_TIMEOUTS.getColumnFamily() );
-        q.setKey( getQueueClientTransactionKey( queueId, consumerId ) );
-        q.setRange( params.startId, startTimeUUID, false, params.limit + 1 );
-
-        List<HColumn<UUID, UUID>> cassResults = q.execute().get().getColumns();
-
-        List<TransactionPointer> results = new ArrayList<TransactionPointer>( params.limit );
-
-        for ( HColumn<UUID, UUID> column : cassResults )
-        {
-
-            if ( logger.isDebugEnabled() )
-            {
-                logger.debug( "Adding uuid '{}' for original message '{}' to results for queue '{}' and consumer '{}'",
-                        new Object[] { column.getName(), column.getValue(), queueId, consumerId } );
-                logger.debug( "Max timeuuid : '{}', Current timeuuid : '{}', comparison '{}'", new Object[] {
-                        startTimeUUID, column.getName(), UUIDUtils.compare( startTimeUUID, column.getName() )
-                } );
-            }
-
-            results.add( new TransactionPointer( column.getName(), column.getValue() ) );
-        }
-
-        return results;
-    }
-
-
-    public boolean hasOutstandingTransactions( UUID queueId, UUID consumerId )
-    {
-        SliceQuery<ByteBuffer, UUID, UUID> q = createSliceQuery( ko, be, ue, ue );
-        q.setColumnFamily( CONSUMER_QUEUE_TIMEOUTS.getColumnFamily() );
-        q.setKey( getQueueClientTransactionKey( queueId, consumerId ) );
-        q.setRange( null, null, false, 1 );
-        return q.execute().get().getColumns().size() > 0;
-    }
-
-
-    /**
-     * Delete all re-read transaction pointers
-     *
-     * @param pointers The list of transaction pointers
-     * @param maxIndex The index to stop at (exclusive)
-     * @param queueId The queue id
-     * @param consumerId The consumer id
-     */
-    protected void deleteTransactionPointers( List<TransactionPointer> pointers, int maxIndex, UUID queueId,
-                                              UUID consumerId )
-    {
-
-        if ( maxIndex == 0 || pointers.size() == 0 )
-        {
-            return;
-        }
-
-        Mutator<ByteBuffer> mutator = createMutator( ko, be );
-        ByteBuffer key = getQueueClientTransactionKey( queueId, consumerId );
-
-        for ( int i = 0; i < maxIndex && i < pointers.size(); i++ )
-        {
-            UUID pointer = pointers.get( i ).expiration;
-
-            if ( logger.isDebugEnabled() )
-            {
-                logger.debug( "Removing transaction pointer '{}' for queue '{}' and consumer '{}'", new Object[] {
-                        pointer, queueId, consumerId
-                } );
-            }
-
-            mutator.addDeletion( key, CONSUMER_QUEUE_TIMEOUTS.getColumnFamily(), pointer, ue, cass.createTimestamp() );
-        }
-
-        mutator.execute();
-    }
-
-
-    /**
-     * Write the transaction timeouts
-     *
-     * @param messages The messages to load
-     * @param futureTimeout The time these message should expire
-     * @param queueId The queue UUId
-     * @param consumerId The consumer Id
-     */
-    protected void writeTransactions( List<Message> messages, final long futureTimeout, UUID queueId, UUID consumerId )
-    {
-
-        Mutator<ByteBuffer> mutator = createMutator( ko, be );
-
-        ByteBuffer key = getQueueClientTransactionKey( queueId, consumerId );
-
-        int counter = 0;
-
-        long time = cass.createTimestamp();
-
-        for ( Message message : messages )
-        {
-            // note we're not incrementing futureSnapshot on purpose. The uuid
-            // generation should give us a sequenced unique ID for each response, even
-            // if the
-            // time is the same since we increment the counter. If we read more than
-            // 10k messages in a single transaction, our millisecond will roll to the
-            // next due to 10k being the max amount of 1/10 microsecond headroom. Not
-            // possible to avoid this given the way time uuids are encoded.
-            UUID expirationId = UUIDUtils.newTimeUUID( futureTimeout, counter );
-            UUID messageId = message.getUuid();
-
-            logger.debug( "Writing new timeout at '{}' for message '{}'", expirationId, messageId );
-
-            mutator.addInsertion( key, CONSUMER_QUEUE_TIMEOUTS.getColumnFamily(),
-                    createColumn( expirationId, messageId, time, ue, ue ) );
-
-            // add the transactionid to the message
-            message.setTransaction( expirationId );
-            counter++;
-        }
-
-        mutator.execute();
-    }
-
-
-    private static class TransactionPointer
-    {
-        private UUID expiration;
-        private UUID targetMessage;
-
-
-        /**
-         * @param expiration
-         * @param targetMessage
-         */
-        public TransactionPointer( UUID expiration, UUID targetMessage )
-        {
-            super();
-            this.expiration = expiration;
-            this.targetMessage = targetMessage;
-        }
-
-
-        /*
-         * (non-Javadoc)
-         *
-         * @see java.lang.Object#toString()
-         */
-        @Override
-        public String toString()
-        {
-            return "TransactionPointer [expiration=" + expiration + ", targetMessage=" + targetMessage + "]";
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/mq/cassandra/io/EndSearch.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/mq/cassandra/io/EndSearch.java b/stack/core/src/main/java/org/usergrid/mq/cassandra/io/EndSearch.java
deleted file mode 100644
index 4ca09aa..0000000
--- a/stack/core/src/main/java/org/usergrid/mq/cassandra/io/EndSearch.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.mq.cassandra.io;
-
-
-import java.util.UUID;
-
-import org.usergrid.mq.QueueQuery;
-
-import me.prettyprint.hector.api.Keyspace;
-
-
-/**
- * Reads from the queue without starting transactions.
- *
- * @author tnine
- */
-public class EndSearch extends NoTransactionSearch
-{
-
-    /**
-     * @param ko
-     * @param cassTimestamp
-     */
-    public EndSearch( Keyspace ko )
-    {
-        super( ko );
-    } /*
-     * (non-Javadoc)
-     * 
-     * @see org.usergrid.mq.cassandra.io.NoTransaction#getParams(java.util.UUID,
-     * java.util.UUID, org.usergrid.mq.QueueQuery)
-     */
-
-
-    @Override
-    protected SearchParam getParams( UUID queueId, UUID consumerId, QueueQuery query )
-    {
-        UUID lastMessageId = query.getLastMessageId();
-        return new SearchParam( lastMessageId, true, lastMessageId != null, query.getLimit( DEFAULT_READ ) );
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see
-     * org.usergrid.mq.cassandra.io.FifoSearch#writeClientPointer(java.util.UUID,
-     * java.util.UUID, java.util.UUID)
-     */
-    @Override
-    protected void writeClientPointer( UUID queueId, UUID consumerId, UUID lastReturnedId )
-    {
-        // no op for searches from the end
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/mq/cassandra/io/FilterSearch.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/mq/cassandra/io/FilterSearch.java b/stack/core/src/main/java/org/usergrid/mq/cassandra/io/FilterSearch.java
deleted file mode 100644
index 0f629a3..0000000
--- a/stack/core/src/main/java/org/usergrid/mq/cassandra/io/FilterSearch.java
+++ /dev/null
@@ -1,259 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.mq.cassandra.io;
-
-
-import java.nio.ByteBuffer;
-import java.util.Iterator;
-import java.util.List;
-import java.util.SortedSet;
-import java.util.TreeSet;
-import java.util.UUID;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.usergrid.mq.Message;
-import org.usergrid.mq.QueryProcessor;
-import org.usergrid.mq.QueryProcessor.QuerySlice;
-import org.usergrid.mq.QueueQuery;
-import org.usergrid.mq.QueueResults;
-
-import com.fasterxml.uuid.UUIDComparator;
-
-import me.prettyprint.hector.api.Keyspace;
-import me.prettyprint.hector.api.beans.AbstractComposite.ComponentEquality;
-import me.prettyprint.hector.api.beans.DynamicComposite;
-import me.prettyprint.hector.api.beans.HColumn;
-
-import static me.prettyprint.hector.api.factory.HFactory.createSliceQuery;
-import static org.usergrid.mq.Queue.getQueueId;
-import static org.usergrid.mq.cassandra.CassandraMQUtils.getConsumerId;
-import static org.usergrid.mq.cassandra.QueueManagerImpl.DEFAULT_SEARCH_COUNT;
-import static org.usergrid.mq.cassandra.QueueManagerImpl.QUEUE_SHARD_INTERVAL;
-import static org.usergrid.mq.cassandra.QueuesCF.PROPERTY_INDEX;
-import static org.usergrid.persistence.cassandra.CassandraPersistenceUtils.key;
-import static org.usergrid.utils.CompositeUtils.setEqualityFlag;
-import static org.usergrid.utils.ConversionUtils.bytebuffer;
-import static org.usergrid.utils.NumberUtils.roundLong;
-import static org.usergrid.utils.UUIDUtils.getTimestampInMillis;
-
-
-/**
- * Searches in the queue without transactions
- *
- * @author tnine
- */
-public class FilterSearch extends NoTransactionSearch
-{
-
-    private static final Logger logger = LoggerFactory.getLogger( FilterSearch.class );
-
-
-    /**
-     *
-     */
-    public FilterSearch( Keyspace ko )
-    {
-        super( ko );
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see org.usergrid.mq.cassandra.io.QueueSearch#getResults(java.lang.String,
-     * org.usergrid.mq.QueueQuery)
-     */
-    @Override
-    public QueueResults getResults( String queuePath, QueueQuery query )
-    {
-
-        QueryProcessor qp = new QueryProcessor( query );
-        List<QuerySlice> slices = qp.getSlices();
-
-        long limit = query.getLimit();
-
-        UUID queueId = getQueueId( queuePath );
-        UUID consumerId = getConsumerId( queueId, query );
-        QueueBounds bounds = getQueueBounds( queueId );
-
-        UUIDComparator comparator = query.isReversed() ? new ReverseUUIDComparator() : new UUIDComparator();
-
-        SortedSet<UUID> merged = null;
-
-        for ( QuerySlice slice : slices )
-        {
-            SortedSet<UUID> results =
-                    searchQueueRange( ko, queueId, bounds, slice, query.getLastMessageId(), query.isReversed(),
-                            comparator );
-
-            if ( merged == null )
-            {
-                merged = results;
-            }
-            else
-            {
-                merged.retainAll( results );
-            }
-        }
-
-        // now trim. Not efficient, but when indexing is updated, seeking will
-        // change, so I'm not worried about this.
-        if ( merged.size() > limit )
-        {
-            Iterator<UUID> current = merged.iterator();
-            UUID max = null;
-
-
-            for ( int i = 0; i <= limit && current.hasNext(); i++ )
-            {
-                max = current.next();
-            }
-
-            merged = merged.headSet( max );
-        }
-
-        List<Message> messages = loadMessages( merged, query.isReversed() );
-
-        QueueResults results = createResults( messages, queuePath, queueId, consumerId );
-
-        return results;
-    }
-
-
-    public SortedSet<UUID> searchQueueRange( Keyspace ko, UUID queueId, QueueBounds bounds, QuerySlice slice, UUID last,
-                                             boolean reversed, UUIDComparator comparator )
-    {
-
-        TreeSet<UUID> uuid_set = new TreeSet<UUID>( comparator );
-
-        if ( bounds == null )
-        {
-            logger.error( "Necessary queue bounds not found" );
-            return uuid_set;
-        }
-
-        UUID start_uuid = reversed ? bounds.getNewest() : bounds.getOldest();
-
-        UUID finish_uuid = reversed ? bounds.getOldest() : bounds.getNewest();
-
-        if ( last != null )
-        {
-            start_uuid = last;
-        }
-
-
-        if ( finish_uuid == null )
-        {
-            logger.error( "No last message in queue" );
-            return uuid_set;
-        }
-
-        long start_ts_shard = roundLong( getTimestampInMillis( start_uuid ), QUEUE_SHARD_INTERVAL );
-
-        long finish_ts_shard = roundLong( getTimestampInMillis( finish_uuid ), QUEUE_SHARD_INTERVAL );
-
-        long current_ts_shard = start_ts_shard;
-
-        if ( reversed )
-        {
-            current_ts_shard = finish_ts_shard;
-        }
-
-        ByteBuffer start = null;
-        if ( slice.getCursor() != null )
-        {
-            start = slice.getCursor();
-        }
-        else if ( slice.getStart() != null )
-        {
-            DynamicComposite s = new DynamicComposite( slice.getStart().getCode(), slice.getStart().getValue() );
-            if ( !slice.getStart().isInclusive() )
-            {
-                setEqualityFlag( s, ComponentEquality.GREATER_THAN_EQUAL );
-            }
-            start = s.serialize();
-        }
-
-        ByteBuffer finish = null;
-        if ( slice.getFinish() != null )
-        {
-            DynamicComposite f = new DynamicComposite( slice.getFinish().getCode(), slice.getFinish().getValue() );
-            if ( slice.getFinish().isInclusive() )
-            {
-                setEqualityFlag( f, ComponentEquality.GREATER_THAN_EQUAL );
-            }
-            finish = f.serialize();
-        }
-
-        while ( ( current_ts_shard >= start_ts_shard ) && ( current_ts_shard <= finish_ts_shard ) && ( uuid_set.size()
-                < DEFAULT_SEARCH_COUNT ) )
-        {
-
-            while ( true )
-            {
-                List<HColumn<ByteBuffer, ByteBuffer>> results =
-                        createSliceQuery( ko, be, be, be ).setColumnFamily( PROPERTY_INDEX.getColumnFamily() )
-                                .setKey( bytebuffer( key( queueId, current_ts_shard, slice.getPropertyName() ) ) )
-                                .setRange( start, finish, false, DEFAULT_SEARCH_COUNT ).execute().get().getColumns();
-
-                for ( HColumn<ByteBuffer, ByteBuffer> column : results )
-                {
-                    DynamicComposite c = DynamicComposite.fromByteBuffer( column.getName().duplicate() );
-                    UUID uuid = c.get( 2, ue );
-
-                    uuid_set.add( uuid );
-                }
-
-                if ( results.size() < DEFAULT_SEARCH_COUNT )
-                {
-                    break;
-                }
-
-                start = results.get( results.size() - 1 ).getName().duplicate();
-            }
-
-            if ( reversed )
-            {
-                current_ts_shard -= QUEUE_SHARD_INTERVAL;
-            }
-            else
-            {
-                current_ts_shard += QUEUE_SHARD_INTERVAL;
-            }
-        }
-
-        // trim the results
-        return uuid_set.headSet( finish_uuid ).tailSet( start_uuid );
-    }
-
-
-    private static class ReverseUUIDComparator extends UUIDComparator
-    {
-
-        /*
-         * (non-Javadoc)
-         *
-         * @see com.fasterxml.uuid.UUIDComparator#compare(java.util.UUID,
-         * java.util.UUID)
-         */
-        @Override
-        public int compare( UUID u1, UUID u2 )
-        {
-            return super.compare( u1, u2 ) * -1;
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/mq/cassandra/io/NoTransactionSearch.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/mq/cassandra/io/NoTransactionSearch.java b/stack/core/src/main/java/org/usergrid/mq/cassandra/io/NoTransactionSearch.java
deleted file mode 100644
index 3ac4f6f..0000000
--- a/stack/core/src/main/java/org/usergrid/mq/cassandra/io/NoTransactionSearch.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.mq.cassandra.io;
-
-
-import java.util.List;
-import java.util.UUID;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.usergrid.mq.Message;
-import org.usergrid.mq.QueueQuery;
-import org.usergrid.mq.QueueResults;
-
-import me.prettyprint.hector.api.Keyspace;
-
-import static org.usergrid.mq.cassandra.CassandraMQUtils.getConsumerId;
-import static org.usergrid.mq.cassandra.CassandraMQUtils.getQueueId;
-
-
-/**
- * Reads from the queue without starting transactions.
- *
- * @author tnine
- */
-public class NoTransactionSearch extends AbstractSearch
-{
-
-    private static final Logger logger = LoggerFactory.getLogger( NoTransactionSearch.class );
-
-    protected static final int DEFAULT_READ = 1;
-
-
-    /**
-     * @param ko
-     */
-    public NoTransactionSearch( Keyspace ko )
-    {
-        super( ko );
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see org.usergrid.mq.cassandra.io.QueueSearch#getResults(java.lang.String,
-     * org.usergrid.mq.QueueQuery)
-     */
-    @Override
-    public QueueResults getResults( String queuePath, QueueQuery query )
-    {
-
-        UUID queueId = getQueueId( queuePath );
-        UUID consumerId = getConsumerId( queueId, query );
-        QueueBounds bounds = getQueueBounds( queueId );
-        SearchParam params = getParams( queueId, consumerId, query );
-
-        List<UUID> ids = getIds( queueId, consumerId, bounds, params );
-
-        List<Message> messages = loadMessages( ids, params.reversed );
-
-        QueueResults results = createResults( messages, queuePath, queueId, consumerId );
-
-        writeClientPointer( queueId, consumerId, results.getLast() );
-
-        return results;
-    }
-
-
-    /** Get information for reading no transactionally from the query. Subclasses can override this behavior */
-    protected SearchParam getParams( UUID queueId, UUID consumerId, QueueQuery query )
-    {
-        UUID lastReadMessageId = getConsumerQueuePosition( queueId, consumerId );
-
-        if ( logger.isDebugEnabled() )
-        {
-            logger.debug( "Last message id is '{}' for queueId '{}' and clientId '{}'",
-                    new Object[] { lastReadMessageId, queueId, consumerId } );
-        }
-
-        return new SearchParam( lastReadMessageId, false, lastReadMessageId != null, query.getLimit( DEFAULT_READ ) );
-    }
-
-
-    /** Get the list of ids we should load and return to the client. Message ids should be in order on return */
-    protected List<UUID> getIds( UUID queueId, UUID consumerId, QueueBounds bounds, SearchParam params )
-    {
-        return getQueueRange( queueId, bounds, params );
-    }
-
-
-    protected static class SearchParam
-    {
-
-        /** The uuid to start seeking from */
-        protected final UUID startId;
-
-        /** true if we should seek from high to low */
-        protected final boolean reversed;
-        /** The number of results to include */
-        protected final int limit;
-        /** true if the first result should be skipped. Useful for paging from a previous result */
-        protected final boolean skipFirst;
-
-
-        /**
-         * @param startId
-         * @param reversed
-         * @param count
-         */
-        public SearchParam( UUID startId, boolean reversed, boolean skipFirst, int count )
-        {
-            this.startId = startId;
-            this.reversed = reversed;
-            this.skipFirst = skipFirst;
-            this.limit = count;
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/mq/cassandra/io/QueueBounds.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/mq/cassandra/io/QueueBounds.java b/stack/core/src/main/java/org/usergrid/mq/cassandra/io/QueueBounds.java
deleted file mode 100644
index df5121b..0000000
--- a/stack/core/src/main/java/org/usergrid/mq/cassandra/io/QueueBounds.java
+++ /dev/null
@@ -1,91 +0,0 @@
-package org.usergrid.mq.cassandra.io;
-
-
-import java.util.UUID;
-
-
-public class QueueBounds
-{
-
-    private final UUID oldest;
-    private final UUID newest;
-
-
-    public QueueBounds( UUID oldest, UUID newest )
-    {
-        this.oldest = oldest;
-        this.newest = newest;
-    }
-
-
-    public UUID getOldest()
-    {
-        return oldest;
-    }
-
-
-    public UUID getNewest()
-    {
-        return newest;
-    }
-
-
-    @Override
-    public int hashCode()
-    {
-        final int prime = 31;
-        int result = 1;
-        result = ( prime * result ) + ( ( newest == null ) ? 0 : newest.hashCode() );
-        result = ( prime * result ) + ( ( oldest == null ) ? 0 : oldest.hashCode() );
-        return result;
-    }
-
-
-    @Override
-    public boolean equals( Object obj )
-    {
-        if ( this == obj )
-        {
-            return true;
-        }
-        if ( obj == null )
-        {
-            return false;
-        }
-        if ( getClass() != obj.getClass() )
-        {
-            return false;
-        }
-        QueueBounds other = ( QueueBounds ) obj;
-        if ( newest == null )
-        {
-            if ( other.newest != null )
-            {
-                return false;
-            }
-        }
-        else if ( !newest.equals( other.newest ) )
-        {
-            return false;
-        }
-        if ( oldest == null )
-        {
-            if ( other.oldest != null )
-            {
-                return false;
-            }
-        }
-        else if ( !oldest.equals( other.oldest ) )
-        {
-            return false;
-        }
-        return true;
-    }
-
-
-    @Override
-    public String toString()
-    {
-        return "QueueBounds [oldest=" + oldest + ", newest=" + newest + "]";
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/mq/cassandra/io/QueueSearch.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/mq/cassandra/io/QueueSearch.java b/stack/core/src/main/java/org/usergrid/mq/cassandra/io/QueueSearch.java
deleted file mode 100644
index 6832418..0000000
--- a/stack/core/src/main/java/org/usergrid/mq/cassandra/io/QueueSearch.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.mq.cassandra.io;
-
-
-import org.usergrid.mq.QueueQuery;
-import org.usergrid.mq.QueueResults;
-
-
-/** @author tnine */
-public interface QueueSearch
-{
-
-    /** Get the results for this queue search */
-    public QueueResults getResults( String queuePath, QueueQuery query );
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/mq/cassandra/io/StartSearch.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/mq/cassandra/io/StartSearch.java b/stack/core/src/main/java/org/usergrid/mq/cassandra/io/StartSearch.java
deleted file mode 100644
index fbef8dd..0000000
--- a/stack/core/src/main/java/org/usergrid/mq/cassandra/io/StartSearch.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.mq.cassandra.io;
-
-
-import java.util.UUID;
-
-import org.usergrid.mq.QueueQuery;
-
-import me.prettyprint.hector.api.Keyspace;
-
-
-/**
- * Reads from the queue without starting transactions.
- *
- * @author tnine
- */
-public class StartSearch extends NoTransactionSearch
-{
-
-    /**
-     * @param ko
-     * @param cassTimestamp
-     */
-    public StartSearch( Keyspace ko )
-    {
-        super( ko );
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see org.usergrid.mq.cassandra.io.NoTransaction#getParams(java.util.UUID,
-     * java.util.UUID, org.usergrid.mq.QueueQuery)
-     */
-    @Override
-    protected SearchParam getParams( UUID queueId, UUID consumerId, QueueQuery query )
-    {
-        UUID lastMessageId = query.getLastMessageId();
-
-
-        return new SearchParam( lastMessageId, false, lastMessageId != null, query.getLimit( DEFAULT_READ ) );
-    }
-
-
-    /* (non-Javadoc)
-     * @see org.usergrid.mq.cassandra.io.FifoSearch#writeClientPointer(java.util.UUID, java.util.UUID, java.util.UUID)
-     */
-    @Override
-    protected void writeClientPointer( UUID queueId, UUID consumerId, UUID lastReturnedId )
-    {
-        //no op for searches from the start
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/AbstractEntity.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/AbstractEntity.java b/stack/core/src/main/java/org/usergrid/persistence/AbstractEntity.java
deleted file mode 100644
index 4c7e9c3..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/AbstractEntity.java
+++ /dev/null
@@ -1,342 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence;
-
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-import java.util.TreeMap;
-import java.util.UUID;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-import org.codehaus.jackson.annotate.JsonAnyGetter;
-import org.codehaus.jackson.annotate.JsonAnySetter;
-import org.codehaus.jackson.annotate.JsonIgnore;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
-import org.usergrid.persistence.annotations.EntityProperty;
-
-import static org.usergrid.persistence.Schema.PROPERTY_NAME;
-
-
-/**
- * The abstract superclass implementation of the Entity interface.
- *
- * @author edanuff
- */
-@XmlRootElement
-public abstract class AbstractEntity implements Entity {
-
-    protected UUID uuid;
-
-    protected Long created;
-
-    protected Long modified;
-
-    protected Map<String, Object> dynamic_properties = new TreeMap<String, Object>( String.CASE_INSENSITIVE_ORDER );
-
-    protected Map<String, Set<Object>> dynamic_sets = new TreeMap<String, Set<Object>>( String.CASE_INSENSITIVE_ORDER );
-
-
-    @Override
-    @EntityProperty(required = true, mutable = false, basic = true, indexed = false)
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public UUID getUuid() {
-        return uuid;
-    }
-
-
-    @Override
-    public void setUuid( UUID uuid ) {
-        this.uuid = uuid;
-    }
-
-
-    @Override
-    @EntityProperty(required = true, mutable = false, basic = true, indexed = false)
-    public String getType() {
-        return Schema.getDefaultSchema().getEntityType( this.getClass() );
-    }
-
-
-    @Override
-    public void setType( String type ) {
-    }
-
-
-    @Override
-    @EntityProperty(indexed = true, required = true, mutable = false)
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public Long getCreated() {
-        return created;
-    }
-
-
-    @Override
-    public void setCreated( Long created ) {
-        if ( created == null ) {
-            created = System.currentTimeMillis();
-        }
-        this.created = created;
-    }
-
-
-    @Override
-    @EntityProperty(indexed = true, required = true, mutable = true)
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public Long getModified() {
-        return modified;
-    }
-
-
-    @Override
-    public void setModified( Long modified ) {
-        if ( modified == null ) {
-            modified = System.currentTimeMillis();
-        }
-        this.modified = modified;
-    }
-
-
-    @Override
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public String getName() {
-        Object value = getProperty( PROPERTY_NAME );
-
-        if ( value instanceof UUID ) {
-            // fixes existing data that uses UUID in USERGRID-2099
-            return value.toString();
-        }
-
-        return ( String ) value;
-    }
-
-
-    @Override
-    @JsonIgnore
-    public Map<String, Object> getProperties() {
-        return Schema.getDefaultSchema().getEntityProperties( this );
-    }
-
-
-    @Override
-    public final Object getProperty( String propertyName ) {
-        return Schema.getDefaultSchema().getEntityProperty( this, propertyName );
-    }
-
-
-    @Override
-    public final void setProperty( String propertyName, Object propertyValue ) {
-        Schema.getDefaultSchema().setEntityProperty( this, propertyName, propertyValue );
-    }
-
-
-    @Override
-    public void setProperties( Map<String, Object> properties ) {
-        dynamic_properties = new TreeMap<String, Object>( String.CASE_INSENSITIVE_ORDER );
-        addProperties( properties );
-    }
-
-
-    @Override
-    public void addProperties( Map<String, Object> properties ) {
-        if ( properties == null ) {
-            return;
-        }
-        for ( Entry<String, Object> entry : properties.entrySet() ) {
-            setProperty( entry.getKey(), entry.getValue() );
-        }
-    }
-
-
-    @Override
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public Object getMetadata( String key ) {
-        return getDataset( "metadata", key );
-    }
-
-
-    @Override
-    public void setMetadata( String key, Object value ) {
-        setDataset( "metadata", key, value );
-    }
-
-
-    @Override
-    public void mergeMetadata( Map<String, Object> new_metadata ) {
-        mergeDataset( "metadata", new_metadata );
-    }
-
-
-    @Override
-    public void clearMetadata() {
-        clearDataset( "metadata" );
-    }
-
-
-    public <T> T getDataset( String property, String key ) {
-        Object md = dynamic_properties.get( property );
-        if ( md == null ) {
-            return null;
-        }
-        if ( !( md instanceof Map<?, ?> ) ) {
-            return null;
-        }
-        @SuppressWarnings("unchecked") Map<String, T> metadata = ( Map<String, T> ) md;
-        return metadata.get( key );
-    }
-
-
-    public <T> void setDataset( String property, String key, T value ) {
-        if ( key == null ) {
-            return;
-        }
-        Object md = dynamic_properties.get( property );
-        if ( !( md instanceof Map<?, ?> ) ) {
-            md = new HashMap<String, T>();
-            dynamic_properties.put( property, md );
-        }
-        @SuppressWarnings("unchecked") Map<String, T> metadata = ( Map<String, T> ) md;
-        metadata.put( key, value );
-    }
-
-
-    public <T> void mergeDataset( String property, Map<String, T> new_metadata ) {
-        Object md = dynamic_properties.get( property );
-        if ( !( md instanceof Map<?, ?> ) ) {
-            md = new HashMap<String, T>();
-            dynamic_properties.put( property, md );
-        }
-        @SuppressWarnings("unchecked") Map<String, T> metadata = ( Map<String, T> ) md;
-        metadata.putAll( new_metadata );
-    }
-
-
-    public void clearDataset( String property ) {
-        dynamic_properties.remove( property );
-    }
-
-
-    @Override
-    public List<Entity> getCollections( String key ) {
-        return getDataset( "collections", key );
-    }
-
-
-    @Override
-    public void setCollections( String key, List<Entity> results ) {
-        setDataset( "collections", key, results );
-    }
-
-
-    @Override
-    public List<Entity> getConnections( String key ) {
-        return getDataset( "connections", key );
-    }
-
-
-    @Override
-    public void setConnections( String key, List<Entity> results ) {
-        setDataset( "connections", key, results );
-    }
-
-
-    @Override
-    public String toString() {
-        return "Entity(" + getProperties() + ")";
-    }
-
-
-    @Override
-    @JsonAnySetter
-    public void setDynamicProperty( String key, Object value ) {
-        dynamic_properties.put( key, value );
-    }
-
-
-    @Override
-    @JsonAnyGetter
-    public Map<String, Object> getDynamicProperties() {
-        return dynamic_properties;
-    }
-
-
-    @Override
-    public final int compareTo( Entity o ) {
-        if ( o == null ) {
-            return 1;
-        }
-        try {
-            long t1 = getUuid().timestamp();
-            long t2 = o.getUuid().timestamp();
-            return ( t1 < t2 ) ? -1 : ( t1 == t2 ) ? 0 : 1;
-        }
-        catch ( UnsupportedOperationException e ) {
-        }
-        return getUuid().compareTo( o.getUuid() );
-    }
-
-
-    @Override
-    public Entity toTypedEntity() {
-        Entity entity = EntityFactory.newEntity( getUuid(), getType() );
-        entity.setProperties( getProperties() );
-        return entity;
-    }
-
-
-    /* (non-Javadoc)
-     * @see java.lang.Object#hashCode()
-     */
-    @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + ( ( uuid == null ) ? 0 : uuid.hashCode() );
-        return result;
-    }
-
-
-    /* (non-Javadoc)
-     * @see java.lang.Object#equals(java.lang.Object)
-     */
-    @Override
-    public boolean equals( Object obj ) {
-        if ( this == obj ) {
-            return true;
-        }
-        if ( obj == null ) {
-            return false;
-        }
-        if ( getClass() != obj.getClass() ) {
-            return false;
-        }
-        AbstractEntity other = ( AbstractEntity ) obj;
-        if ( uuid == null ) {
-            if ( other.uuid != null ) {
-                return false;
-            }
-        }
-        else if ( !uuid.equals( other.uuid ) ) {
-            return false;
-        }
-        return true;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/AggregateCounter.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/AggregateCounter.java b/stack/core/src/main/java/org/usergrid/persistence/AggregateCounter.java
deleted file mode 100644
index b78234a..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/AggregateCounter.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence;
-
-
-public class AggregateCounter {
-    private long timestamp;
-    private long value;
-
-
-    public AggregateCounter( long timestamp, long value ) {
-        this.timestamp = timestamp;
-        this.value = value;
-    }
-
-
-    public long getTimestamp() {
-        return timestamp;
-    }
-
-
-    public void setTimestamp( long timestamp ) {
-        this.timestamp = timestamp;
-    }
-
-
-    public long getValue() {
-        return value;
-    }
-
-
-    public void setValue( long value ) {
-        this.value = value;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/AggregateCounterSet.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/AggregateCounterSet.java b/stack/core/src/main/java/org/usergrid/persistence/AggregateCounterSet.java
deleted file mode 100644
index 44c1d34..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/AggregateCounterSet.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence;
-
-
-import java.util.List;
-import java.util.UUID;
-
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
-
-
-public class AggregateCounterSet {
-    private String name;
-    private UUID user;
-    private UUID group;
-    private UUID queue;
-    private String category;
-    private List<AggregateCounter> values;
-
-
-    public AggregateCounterSet( String name, UUID user, UUID group, String category, List<AggregateCounter> values ) {
-        this.name = name;
-        this.user = user;
-        this.group = group;
-        this.category = category;
-        this.values = values;
-    }
-
-
-    public AggregateCounterSet( String name, UUID queue, String category, List<AggregateCounter> values ) {
-        this.name = name;
-        setQueue( queue );
-        this.category = category;
-        this.values = values;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public UUID getUser() {
-        return user;
-    }
-
-
-    public void setUser( UUID user ) {
-        this.user = user;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public UUID getGroup() {
-        return group;
-    }
-
-
-    public void setGroup( UUID group ) {
-        this.group = group;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public String getCategory() {
-        return category;
-    }
-
-
-    public void setCategory( String category ) {
-        this.category = category;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public String getName() {
-        return name;
-    }
-
-
-    public void setName( String name ) {
-        this.name = name;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public List<AggregateCounter> getValues() {
-        return values;
-    }
-
-
-    public void setValues( List<AggregateCounter> values ) {
-        this.values = values;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public UUID getQueue() {
-        return queue;
-    }
-
-
-    public void setQueue( UUID queue ) {
-        this.queue = queue;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/AssociatedEntityRef.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/AssociatedEntityRef.java b/stack/core/src/main/java/org/usergrid/persistence/AssociatedEntityRef.java
deleted file mode 100644
index 27eda53..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/AssociatedEntityRef.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence;
-
-
-public interface AssociatedEntityRef extends EntityRef {
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/CollectionRef.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/CollectionRef.java b/stack/core/src/main/java/org/usergrid/persistence/CollectionRef.java
deleted file mode 100644
index 13b2712..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/CollectionRef.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence;
-
-
-public interface CollectionRef extends AssociatedEntityRef {
-
-    public EntityRef getOwnerEntity();
-
-    public String getCollectionName();
-
-    public EntityRef getItemRef();
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/ConnectedEntityRef.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/ConnectedEntityRef.java b/stack/core/src/main/java/org/usergrid/persistence/ConnectedEntityRef.java
deleted file mode 100644
index fb734a5..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/ConnectedEntityRef.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence;
-
-
-public interface ConnectedEntityRef extends EntityRef {
-
-    public String getConnectionType();
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/ConnectionRef.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/ConnectionRef.java b/stack/core/src/main/java/org/usergrid/persistence/ConnectionRef.java
deleted file mode 100644
index 10ae473..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/ConnectionRef.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence;
-
-
-import java.util.List;
-
-
-/**
- * Connection tuple
- *
- * @author edanuff
- */
-public interface ConnectionRef extends ConnectedEntityRef, AssociatedEntityRef {
-
-    public EntityRef getConnectingEntity();
-
-    public List<ConnectedEntityRef> getPairedConnections();
-
-    public ConnectedEntityRef getConnectedEntity();
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/CounterQuery.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/CounterQuery.java b/stack/core/src/main/java/org/usergrid/persistence/CounterQuery.java
deleted file mode 100644
index 9c645ce..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/CounterQuery.java
+++ /dev/null
@@ -1,313 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence;
-
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.usergrid.persistence.Query.CounterFilterPredicate;
-import org.usergrid.utils.JsonUtils;
-
-import static org.usergrid.utils.ClassUtils.cast;
-import static org.usergrid.utils.ListUtils.firstBoolean;
-import static org.usergrid.utils.ListUtils.firstInteger;
-import static org.usergrid.utils.ListUtils.firstLong;
-import static org.usergrid.utils.ListUtils.isEmpty;
-import static org.usergrid.utils.MapUtils.toMapList;
-
-
-public class CounterQuery {
-
-    public static final Logger logger = LoggerFactory.getLogger( CounterQuery.class );
-
-    public static final int DEFAULT_MAX_RESULTS = 10;
-
-    private int limit = 0;
-    boolean limitSet = false;
-
-    private Long startTime;
-    private Long finishTime;
-    private boolean pad;
-    private CounterResolution resolution = CounterResolution.ALL;
-    private List<String> categories;
-    private List<CounterFilterPredicate> counterFilters;
-
-
-    public CounterQuery() {
-    }
-
-
-    public CounterQuery( CounterQuery q ) {
-        if ( q != null ) {
-            limit = q.limit;
-            limitSet = q.limitSet;
-            startTime = q.startTime;
-            finishTime = q.finishTime;
-            resolution = q.resolution;
-            pad = q.pad;
-            categories = q.categories != null ? new ArrayList<String>( q.categories ) : null;
-            counterFilters =
-                    q.counterFilters != null ? new ArrayList<CounterFilterPredicate>( q.counterFilters ) : null;
-        }
-    }
-
-
-    public static CounterQuery newQueryIfNull( CounterQuery query ) {
-        if ( query == null ) {
-            query = new CounterQuery();
-        }
-        return query;
-    }
-
-
-    public static CounterQuery fromJsonString( String json ) {
-        Object o = JsonUtils.parse( json );
-        if ( o instanceof Map ) {
-            @SuppressWarnings({ "unchecked", "rawtypes" }) Map<String, List<String>> params =
-                    cast( toMapList( ( Map ) o ) );
-            return fromQueryParams( params );
-        }
-        return null;
-    }
-
-
-    public static CounterQuery fromQueryParams( Map<String, List<String>> params ) {
-
-        CounterQuery q = null;
-        Integer limit = null;
-        Long startTime = null;
-        Long finishTime = null;
-        Boolean pad = null;
-        CounterResolution resolution = null;
-        List<CounterFilterPredicate> counterFilters = null;
-        List<String> categories = null;
-
-        List<String> l = null;
-
-        limit = firstInteger( params.get( "limit" ) );
-        startTime = firstLong( params.get( "start_time" ) );
-        finishTime = firstLong( params.get( "end_time" ) );
-
-        l = params.get( "resolution" );
-        if ( !isEmpty( l ) ) {
-            resolution = CounterResolution.fromString( l.get( 0 ) );
-        }
-
-        categories = params.get( "category" );
-
-        l = params.get( "counter" );
-        if ( !isEmpty( l ) ) {
-            counterFilters = CounterFilterPredicate.fromList( l );
-        }
-
-        pad = firstBoolean( params.get( "pad" ) );
-
-        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 ( categories != null ) {
-            q = newQueryIfNull( q );
-            q.setCategories( categories );
-        }
-
-        if ( counterFilters != null ) {
-            q = newQueryIfNull( q );
-            q.setCounterFilters( counterFilters );
-        }
-
-        if ( pad != null ) {
-            q = newQueryIfNull( q );
-            q.setPad( pad );
-        }
-
-        return q;
-    }
-
-
-    public int getLimit() {
-        return getLimit( DEFAULT_MAX_RESULTS );
-    }
-
-
-    public int getLimit( int defaultMax ) {
-        if ( limit <= 0 ) {
-            if ( defaultMax > 0 ) {
-                return defaultMax;
-            }
-            else {
-                return DEFAULT_MAX_RESULTS;
-            }
-        }
-        return limit;
-    }
-
-
-    public void setLimit( int limit ) {
-        limitSet = true;
-        this.limit = limit;
-    }
-
-
-    public CounterQuery withLimit( int limit ) {
-        limitSet = true;
-        this.limit = limit;
-        return this;
-    }
-
-
-    public boolean isLimitSet() {
-        return limitSet;
-    }
-
-
-    public Long getStartTime() {
-        return startTime;
-    }
-
-
-    public void setStartTime( Long startTime ) {
-        this.startTime = startTime;
-    }
-
-
-    public CounterQuery withStartTime( Long startTime ) {
-        this.startTime = startTime;
-        return this;
-    }
-
-
-    public Long getFinishTime() {
-        return finishTime;
-    }
-
-
-    public void setFinishTime( Long finishTime ) {
-        this.finishTime = finishTime;
-    }
-
-
-    public CounterQuery withFinishTime( Long finishTime ) {
-        this.finishTime = finishTime;
-        return this;
-    }
-
-
-    public boolean isPad() {
-        return pad;
-    }
-
-
-    public void setPad( boolean pad ) {
-        this.pad = pad;
-    }
-
-
-    public CounterQuery withPad( boolean pad ) {
-        this.pad = pad;
-        return this;
-    }
-
-
-    public void setResolution( CounterResolution resolution ) {
-        this.resolution = resolution;
-    }
-
-
-    public CounterResolution getResolution() {
-        return resolution;
-    }
-
-
-    public CounterQuery withResolution( CounterResolution resolution ) {
-        this.resolution = resolution;
-        return this;
-    }
-
-
-    public List<String> getCategories() {
-        return categories;
-    }
-
-
-    public CounterQuery addCategory( String category ) {
-        if ( categories == null ) {
-            categories = new ArrayList<String>();
-        }
-        categories.add( category );
-        return this;
-    }
-
-
-    public void setCategories( List<String> categories ) {
-        this.categories = categories;
-    }
-
-
-    public CounterQuery withCategories( List<String> categories ) {
-        this.categories = categories;
-        return this;
-    }
-
-
-    public List<CounterFilterPredicate> getCounterFilters() {
-        return counterFilters;
-    }
-
-
-    public CounterQuery addCounterFilter( String counter ) {
-        CounterFilterPredicate p = CounterFilterPredicate.fromString( counter );
-        if ( p == null ) {
-            return this;
-        }
-        if ( counterFilters == null ) {
-            counterFilters = new ArrayList<CounterFilterPredicate>();
-        }
-        counterFilters.add( p );
-        return this;
-    }
-
-
-    public void setCounterFilters( List<CounterFilterPredicate> counterFilters ) {
-        this.counterFilters = counterFilters;
-    }
-
-
-    public CounterQuery withCounterFilters( List<CounterFilterPredicate> counterFilters ) {
-        this.counterFilters = counterFilters;
-        return this;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/CounterResolution.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/CounterResolution.java b/stack/core/src/main/java/org/usergrid/persistence/CounterResolution.java
deleted file mode 100644
index 2a640e5..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/CounterResolution.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence;
-
-
-public enum CounterResolution {
-    ALL( 0 ), MINUTE( 1 ), FIVE_MINUTES( 5 ), HALF_HOUR( 30 ), HOUR( 60 ), SIX_HOUR( 60 * 6 ), HALF_DAY( 60 * 12 ),
-    DAY( 60 * 24 ), WEEK( 60 * 24 * 7 ), MONTH( 60 * 24 * ( 365 / 12 ) );
-
-    private final long interval;
-
-
-    CounterResolution( long minutes ) {
-        interval = minutes * 60 * 1000;
-    }
-
-
-    public long interval() {
-        return interval;
-    }
-
-
-    public long round( long timestamp ) {
-        if ( interval == 0 ) {
-            return 1;
-        }
-        return ( timestamp / interval ) * interval;
-    }
-
-
-    public long next( long timestamp ) {
-        return round( timestamp ) + interval;
-    }
-
-
-    public static CounterResolution fromOrdinal( int i ) {
-        if ( ( i < 0 ) || ( i >= CounterResolution.values().length ) ) {
-            throw new IndexOutOfBoundsException( "Invalid ordinal" );
-        }
-        return CounterResolution.values()[i];
-    }
-
-
-    public static CounterResolution fromMinutes( int m ) {
-        m = m * 60 * 1000;
-        for ( int i = CounterResolution.values().length - 1; i >= 0; i-- ) {
-            if ( CounterResolution.values()[i].interval <= m ) {
-                return CounterResolution.values()[i];
-            }
-        }
-        return ALL;
-    }
-
-
-    public static CounterResolution fromString( String s ) {
-        if ( s == null ) {
-            return ALL;
-        }
-        try {
-            return CounterResolution.valueOf( s.toUpperCase() );
-        }
-        catch ( IllegalArgumentException e ) {
-        }
-        try {
-            return fromMinutes( Integer.valueOf( s ) );
-        }
-        catch ( NumberFormatException e ) {
-        }
-        return ALL;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/CredentialsInfo.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/CredentialsInfo.java b/stack/core/src/main/java/org/usergrid/persistence/CredentialsInfo.java
deleted file mode 100644
index 146af43..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/CredentialsInfo.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence;
-
-
-import java.util.Map;
-import java.util.TreeMap;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-import org.codehaus.jackson.annotate.JsonAnyGetter;
-import org.codehaus.jackson.annotate.JsonAnySetter;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
-
-
-@XmlRootElement
-public class CredentialsInfo implements Comparable<CredentialsInfo> {
-
-    boolean recoverable;
-    boolean encrypted;
-    String cipher;
-    String key;
-    String secret;
-    String hashType;
-    Long created;
-
-    /**
-     * A list of crypto algorithms to apply to unecrypted input for comparison. Note that cipher and hashtype should be
-     * deprecated
-     */
-    private String[] cryptoChain;
-
-    protected Map<String, Object> properties = new TreeMap<String, Object>( String.CASE_INSENSITIVE_ORDER );
-
-
-    public CredentialsInfo() {
-        created = System.currentTimeMillis();
-    }
-
-
-    public boolean getRecoverable() {
-        return recoverable;
-    }
-
-
-    public void setRecoverable( boolean recoverable ) {
-        this.recoverable = recoverable;
-    }
-
-
-    public boolean getEncrypted() {
-        return encrypted;
-    }
-
-
-    public void setEncrypted( boolean encrypted ) {
-        this.encrypted = encrypted;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public String getCipher() {
-        return cipher;
-    }
-
-
-    public void setCipher( String cipher ) {
-        this.cipher = cipher;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public String getKey() {
-        return key;
-    }
-
-
-    public void setKey( String key ) {
-        this.key = key;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public String getSecret() {
-        return secret;
-    }
-
-
-    public void setSecret( String secret ) {
-        this.secret = secret;
-    }
-
-
-    public static String getCredentialsSecret( CredentialsInfo credentials ) {
-        if ( credentials == null ) {
-            return null;
-        }
-        return credentials.getSecret();
-    }
-
-
-    @JsonAnyGetter
-    public Map<String, Object> getProperties() {
-        return properties;
-    }
-
-
-    @JsonAnySetter
-    public void setProperty( String key, Object value ) {
-        properties.put( key, value );
-    }
-
-
-    public Object getProperty( String key ) {
-        return properties.get( key );
-    }
-
-
-    /** @return the hashType */
-    public String getHashType() {
-        return hashType;
-    }
-
-
-    /**
-     * Used for handling legacy passwords encrypted in md5 or similar.
-     *
-     * @param hashType the hashType to set
-     */
-    public void setHashType( String hashType ) {
-        this.hashType = hashType;
-    }
-
-
-    /** @return the cryptoChain */
-    public String[] getCryptoChain() {
-        return cryptoChain;
-    }
-
-
-    /** @param cryptoChain the cryptoChain to set */
-    public void setCryptoChain( String[] cryptoChain ) {
-        this.cryptoChain = cryptoChain;
-    }
-
-
-    public Long getCreated() {
-        return created;
-    }
-
-
-    @Override
-    public int compareTo( CredentialsInfo o ) {
-        if ( created == o.created ) {
-            return 0;
-        }
-        if ( o.created == null ) {
-            return 1;
-        }
-        return o.created.compareTo( created );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/DynamicEntity.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/DynamicEntity.java b/stack/core/src/main/java/org/usergrid/persistence/DynamicEntity.java
deleted file mode 100644
index 455cfbc..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/DynamicEntity.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence;
-
-
-import java.util.Map;
-import java.util.UUID;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-import org.usergrid.persistence.annotations.EntityProperty;
-import org.usergrid.utils.UUIDUtils;
-
-
-/**
- * Dynamic entities can represent any entity type whether specified in the Schema or not.
- *
- * @author edanuff
- */
-@XmlRootElement
-public class DynamicEntity extends AbstractEntity {
-
-    @EntityProperty(indexed = true, fulltextIndexed = false, required = false, mutable = true, aliasProperty = true,
-            basic = true)
-    protected String name;
-
-    protected String type;
-
-
-    /**
-     *
-     */
-    public DynamicEntity() {
-        // setId(UUIDUtils.newTimeUUID());
-    }
-
-
-    /**
-     * @param id
-     */
-    public DynamicEntity( UUID id ) {
-        setUuid( id );
-    }
-
-
-    /**
-     * @param type
-     */
-    public DynamicEntity( String type ) {
-        setUuid( UUIDUtils.newTimeUUID() );
-        setType( type );
-    }
-
-
-    /**
-     * @param id
-     * @param type
-     */
-    public DynamicEntity( String type, UUID id ) {
-        setUuid( id );
-        setType( type );
-    }
-
-
-    /**
-     * @param id
-     * @param type
-     */
-    public DynamicEntity( String type, UUID id, Map<String, Object> propertyMap ) {
-        setUuid( id );
-        setType( type );
-        setProperties( propertyMap );
-    }
-
-
-    @Override
-    @EntityProperty(required = true, mutable = false, basic = true, indexed = false)
-    public String getType() {
-        return type;
-    }
-
-
-    @Override
-    public void setType( String type ) {
-        this.type = type;
-    }
-
-
-    @Override
-    public String getName() {
-        return name;
-    }
-
-
-    public void setName( String name ) {
-        this.name = name;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/Entity.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/Entity.java b/stack/core/src/main/java/org/usergrid/persistence/Entity.java
deleted file mode 100644
index 2b47060..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/Entity.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence;
-
-
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-import org.codehaus.jackson.annotate.JsonAnyGetter;
-import org.codehaus.jackson.annotate.JsonAnySetter;
-import org.codehaus.jackson.annotate.JsonIgnore;
-import org.codehaus.jackson.annotate.JsonPropertyOrder;
-import org.usergrid.persistence.annotations.EntityProperty;
-
-import static org.usergrid.persistence.Schema.PROPERTY_NAME;
-import static org.usergrid.persistence.Schema.PROPERTY_TYPE;
-import static org.usergrid.persistence.Schema.PROPERTY_URI;
-import static org.usergrid.persistence.Schema.PROPERTY_UUID;
-
-
-/** Entities are the base object type in the service. */
-@XmlRootElement
-@JsonPropertyOrder({ PROPERTY_UUID, PROPERTY_TYPE, PROPERTY_URI, PROPERTY_NAME })
-public interface Entity extends EntityRef, Comparable<Entity> {
-
-    @Override
-    @EntityProperty(required = true, mutable = false, basic = true, indexed = false)
-    public UUID getUuid();
-
-    public void setUuid( UUID id );
-
-    @Override
-    @EntityProperty(required = true, mutable = false, basic = true, indexed = true)
-    public String getType();
-
-    public void setType( String type );
-
-    public abstract String getName();
-
-    @EntityProperty(indexed = true, required = true, mutable = false)
-    public abstract Long getCreated();
-
-    public abstract void setCreated( Long created );
-
-    @EntityProperty(indexed = true, required = true, mutable = true)
-    public abstract Long getModified();
-
-    public abstract void setModified( Long modified );
-
-    @JsonIgnore
-    public Map<String, Object> getProperties();
-
-    public void setProperties( Map<String, Object> properties );
-
-    public void addProperties( Map<String, Object> properties );
-
-    public abstract Object getProperty( String propertyName );
-
-    public abstract void setProperty( String propertyName, Object propertyValue );
-
-    @Override
-    public abstract int compareTo( Entity o );
-
-    public abstract Entity toTypedEntity();
-
-    public abstract Object getMetadata( String key );
-
-    public abstract void setMetadata( String key, Object value );
-
-    public abstract void mergeMetadata( Map<String, Object> metadata );
-
-    public abstract void clearMetadata();
-
-    public abstract List<Entity> getCollections( String key );
-
-    public abstract void setCollections( String name, List<Entity> results );
-
-    public abstract List<Entity> getConnections( String key );
-
-    public abstract void setConnections( String name, List<Entity> results );
-
-    @JsonAnySetter
-    public abstract void setDynamicProperty( String key, Object value );
-
-    @JsonAnyGetter
-    public abstract Map<String, Object> getDynamicProperties();
-}


[31/96] [abbrv] [partial] Change package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/OrNode.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/OrNode.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/OrNode.java
new file mode 100644
index 0000000..2ce0b65
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/OrNode.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.query.ir;
+
+
+/**
+ * @author tnine
+ */
+public class OrNode extends BooleanNode {
+
+    private final int id;
+
+
+    /**
+     * @param left
+     * @param right
+     */
+    public OrNode( QueryNode left, QueryNode right, int id ) {
+        super( left, right );
+        this.id = id;
+    }
+
+
+    /**
+     * Get the context id
+     */
+    public int getId() {
+        return this.id;
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.usergrid.persistence.query.ir.QueryNode#visit(org.apache.usergrid.persistence.query.ir.NodeVisitor)
+     */
+    @Override
+    public void visit( NodeVisitor visitor ) throws Exception {
+        visitor.visit( this );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/OrderByNode.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/OrderByNode.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/OrderByNode.java
new file mode 100644
index 0000000..db7f869
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/OrderByNode.java
@@ -0,0 +1,92 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.query.ir;
+
+
+import java.util.List;
+
+import org.apache.usergrid.persistence.Query.SortPredicate;
+
+
+/**
+ * Intermediate representation of ordering operations
+ *
+ * @author tnine
+ */
+public class OrderByNode extends QueryNode {
+
+
+    private final SliceNode firstPredicate;
+    private final List<SortPredicate> secondarySorts;
+    private final QueryNode queryOperations;
+
+
+    /**
+     * @param firstPredicate The first predicate that is in the order by statement
+     * @param secondarySorts Any subsequent terms
+     * @param queryOperations The subtree for boolean evaluation
+     */
+    public OrderByNode( SliceNode firstPredicate, List<SortPredicate> secondarySorts, QueryNode queryOperations ) {
+        this.firstPredicate = firstPredicate;
+        this.secondarySorts = secondarySorts;
+        this.queryOperations = queryOperations;
+    }
+
+
+    /** @return the sorts */
+    public List<SortPredicate> getSecondarySorts() {
+        return secondarySorts;
+    }
+
+
+    /** @return the firstPredicate */
+    public SliceNode getFirstPredicate() {
+        return firstPredicate;
+    }
+
+
+    public QueryNode getQueryOperations() {
+        return queryOperations;
+    }
+
+
+    /*
+       * (non-Javadoc)
+       *
+       * @see
+       * org.apache.usergrid.persistence.query.ir.QueryNode#visit(org.apache.usergrid.persistence
+       * .query.ir.NodeVisitor)
+       */
+    @Override
+    public void visit( NodeVisitor visitor ) throws Exception {
+        visitor.visit( this );
+    }
+
+
+    /** Return true if this order has secondary sorts */
+    public boolean hasSecondarySorts() {
+        return secondarySorts != null && secondarySorts.size() > 0;
+    }
+
+
+    /* (non-Javadoc)
+     * @see java.lang.Object#toString()
+     */
+    @Override
+    public String toString() {
+        return "OrderByNode [sorts=" + secondarySorts + "]";
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/QueryNode.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/QueryNode.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/QueryNode.java
new file mode 100644
index 0000000..f6881f0
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/QueryNode.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.query.ir;
+
+
+/**
+ * The visit the node
+ *
+ * @author tnine
+ */
+public abstract class QueryNode {
+
+    /** Visit this node */
+    public abstract void visit( NodeVisitor visitor ) throws Exception;
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/QuerySlice.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/QuerySlice.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/QuerySlice.java
new file mode 100644
index 0000000..861fc70
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/QuerySlice.java
@@ -0,0 +1,343 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.query.ir;
+
+
+import java.nio.ByteBuffer;
+
+import org.apache.usergrid.utils.NumberUtils;
+
+import me.prettyprint.hector.api.beans.AbstractComposite.ComponentEquality;
+import me.prettyprint.hector.api.beans.DynamicComposite;
+import static org.apache.usergrid.utils.CompositeUtils.setEqualityFlag;
+
+
+/**
+ * Node that represents a query slice operation
+ *
+ * @author tnine
+ */
+public class QuerySlice {
+
+    private final String propertyName;
+    private final int nodeId;
+    // Object value;
+    private RangeValue start;
+    private RangeValue finish;
+    private ByteBuffer cursor;
+    private boolean reversed;
+
+
+    /**
+     * @param propertyName
+     * @param nodeId
+     */
+    public QuerySlice( String propertyName, int nodeId ) {
+        this.propertyName = propertyName;
+        this.nodeId = nodeId;
+    }
+
+
+    /** Reverse this slice. Flips the reversed switch and correctly changes the start and finish */
+    public void reverse() {
+        reversed = !reversed;
+
+        RangeValue oldStart = start;
+
+        start = finish;
+
+        finish = oldStart;
+    }
+
+
+    public String getPropertyName() {
+        return propertyName;
+    }
+
+
+    public RangeValue getStart() {
+        return start;
+    }
+
+
+    public void setStart( RangeValue start ) {
+        this.start = start;
+    }
+
+
+    public RangeValue getFinish() {
+        return finish;
+    }
+
+
+    public void setFinish( RangeValue finish ) {
+        this.finish = finish;
+    }
+
+
+    public ByteBuffer getCursor() {
+        return hasCursor() ? cursor.duplicate() : null;
+    }
+
+
+    public void setCursor( ByteBuffer cursor ) {
+        this.cursor = cursor;
+    }
+
+
+    /** True if a cursor has been set */
+    public boolean hasCursor() {
+        return this.cursor != null;
+    }
+
+
+    public boolean isReversed() {
+        return reversed;
+    }
+
+
+    /**
+     * Return true if we have a cursor and it's empty. This means that we've already returned all possible values from
+     * this slice range with our existing data in a previous invocation of search
+     */
+    public boolean isComplete() {
+        return cursor != null && cursor.remaining() == 0;
+    }
+
+
+    /**
+     * Get the slice range to be used during querying
+     *
+     * @return An array of dynamic composites to use. Index 0 is the start, index 1 is the finish. One or more could be
+     *         null
+     */
+    public DynamicComposite[] getRange() {
+        DynamicComposite startComposite = null;
+        DynamicComposite finishComposite = null;
+
+        // calc
+        if ( hasCursor() ) {
+            startComposite = DynamicComposite.fromByteBuffer( cursor.duplicate() );
+        }
+
+        else if ( start != null ) {
+            startComposite = new DynamicComposite( start.getCode(), start.getValue() );
+
+            // forward scanning from a >= 100 OR //reverse scanning from MAX to >= 100
+            if ( ( !reversed && !start.isInclusive() ) || ( reversed && start.isInclusive() ) ) {
+                setEqualityFlag( startComposite, ComponentEquality.GREATER_THAN_EQUAL );
+            }
+        }
+
+        if ( finish != null ) {
+            finishComposite = new DynamicComposite( finish.getCode(), finish.getValue() );
+
+            // forward scan to <= 100 OR reverse scan ININITY to > 100
+            if ( ( !reversed && finish.isInclusive() ) || reversed && !finish.isInclusive() ) {
+                setEqualityFlag( finishComposite, ComponentEquality.GREATER_THAN_EQUAL );
+            }
+        }
+
+        return new DynamicComposite[] { startComposite, finishComposite };
+    }
+
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ( ( finish == null ) ? 0 : finish.hashCode() );
+        result = prime * result + ( ( propertyName == null ) ? 0 : propertyName.hashCode() );
+        result = prime * result + ( reversed ? 1231 : 1237 );
+        result = prime * result + ( ( start == null ) ? 0 : start.hashCode() );
+        result = prime * result + nodeId;
+        return result;
+    }
+
+
+    @Override
+    public boolean equals( Object obj ) {
+        if ( this == obj ) {
+            return true;
+        }
+        if ( obj == null ) {
+            return false;
+        }
+        if ( getClass() != obj.getClass() ) {
+            return false;
+        }
+        QuerySlice other = ( QuerySlice ) obj;
+        if ( finish == null ) {
+            if ( other.finish != null ) {
+                return false;
+            }
+        }
+        else if ( !finish.equals( other.finish ) ) {
+            return false;
+        }
+        if ( propertyName == null ) {
+            if ( other.propertyName != null ) {
+                return false;
+            }
+        }
+        else if ( !propertyName.equals( other.propertyName ) ) {
+            return false;
+        }
+        if ( reversed != other.reversed ) {
+            return false;
+        }
+        if ( start == null ) {
+            if ( other.start != null ) {
+                return false;
+            }
+        }
+        else if ( !start.equals( other.start ) ) {
+            return false;
+        }
+        return true;
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see java.lang.Object#toString()
+     */
+    @Override
+    public String toString() {
+        return "QuerySlice [propertyName=" + propertyName + ", start=" + start + ", finish=" + finish + ", cursor="
+                + cursor + ", reversed=" + reversed + ", nodeId=" + nodeId + "]";
+    }
+
+
+    public static class RangeValue {
+        final byte code;
+        final Object value;
+        final boolean inclusive;
+
+
+        public RangeValue( byte code, Object value, boolean inclusive ) {
+            this.code = code;
+            this.value = value;
+            this.inclusive = inclusive;
+        }
+
+
+        public byte getCode() {
+            return code;
+        }
+
+
+        public Object getValue() {
+            return value;
+        }
+
+
+        public boolean isInclusive() {
+            return inclusive;
+        }
+
+
+        @Override
+        public int hashCode() {
+            final int prime = 31;
+            int result = 1;
+            result = prime * result + code;
+            result = prime * result + ( inclusive ? 1231 : 1237 );
+            result = prime * result + ( ( value == null ) ? 0 : value.hashCode() );
+            return result;
+        }
+
+
+        @Override
+        public boolean equals( Object obj ) {
+            if ( this == obj ) {
+                return true;
+            }
+            if ( obj == null ) {
+                return false;
+            }
+            if ( getClass() != obj.getClass() ) {
+                return false;
+            }
+            RangeValue other = ( RangeValue ) obj;
+            if ( code != other.code ) {
+                return false;
+            }
+            if ( inclusive != other.inclusive ) {
+                return false;
+            }
+            if ( value == null ) {
+                if ( other.value != null ) {
+                    return false;
+                }
+            }
+            else if ( !value.equals( other.value ) ) {
+                return false;
+            }
+            return true;
+        }
+
+
+        public int compareTo( RangeValue other, boolean finish ) {
+            if ( other == null ) {
+                return 1;
+            }
+            if ( code != other.code ) {
+                return NumberUtils.sign( code - other.code );
+            }
+            @SuppressWarnings({ "unchecked", "rawtypes" }) int c = ( ( Comparable ) value ).compareTo( other.value );
+            if ( c != 0 ) {
+                return c;
+            }
+            if ( finish ) {
+                // for finish values, inclusive means <= which is greater than <
+                if ( inclusive != other.inclusive ) {
+                    return inclusive ? 1 : -1;
+                }
+            }
+            else {
+                // for start values, inclusive means >= which is lest than >
+                if ( inclusive != other.inclusive ) {
+                    return inclusive ? -1 : 1;
+                }
+            }
+            return 0;
+        }
+
+
+        /*
+         * (non-Javadoc)
+         *
+         * @see java.lang.Object#toString()
+         */
+        @Override
+        public String toString() {
+            return "RangeValue [code=" + code + ", value=" + value + ", inclusive=" + inclusive + "]";
+        }
+
+
+        public static int compare( RangeValue v1, RangeValue v2, boolean finish ) {
+            if ( v1 == null ) {
+                if ( v2 == null ) {
+                    return 0;
+                }
+                return -1;
+            }
+            return v1.compareTo( v2, finish );
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/SearchVisitor.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/SearchVisitor.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/SearchVisitor.java
new file mode 100644
index 0000000..885e055
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/SearchVisitor.java
@@ -0,0 +1,255 @@
+package org.apache.usergrid.persistence.query.ir;
+
+
+import java.util.Stack;
+
+import org.apache.usergrid.persistence.EntityManager;
+import org.apache.usergrid.persistence.EntityRef;
+import org.apache.usergrid.persistence.Query;
+import org.apache.usergrid.persistence.cassandra.QueryProcessor;
+import org.apache.usergrid.persistence.cassandra.index.IndexScanner;
+import org.apache.usergrid.persistence.cassandra.index.NoOpIndexScanner;
+import org.apache.usergrid.persistence.query.ir.result.EmptyIterator;
+import org.apache.usergrid.persistence.query.ir.result.IntersectionIterator;
+import org.apache.usergrid.persistence.query.ir.result.OrderByIterator;
+import org.apache.usergrid.persistence.query.ir.result.ResultIterator;
+import org.apache.usergrid.persistence.query.ir.result.SecondaryIndexSliceParser;
+import org.apache.usergrid.persistence.query.ir.result.SliceIterator;
+import org.apache.usergrid.persistence.query.ir.result.StaticIdIterator;
+import org.apache.usergrid.persistence.query.ir.result.SubtractionIterator;
+import org.apache.usergrid.persistence.query.ir.result.UnionIterator;
+
+
+/**
+ * Simple search visitor that performs all the joining in memory for results.
+ * <p/>
+ * Subclasses will want to implement visiting SliceNode and WithinNode to actually perform the search on the Cassandra
+ * indexes. This class can perform joins on all index entries that conform to the Results object
+ *
+ * @author tnine
+ */
+public abstract class SearchVisitor implements NodeVisitor {
+
+    private static final SecondaryIndexSliceParser COLLECTION_PARSER = new SecondaryIndexSliceParser();
+
+    protected final Query query;
+
+    protected final QueryProcessor queryProcessor;
+
+    protected final EntityManager em;
+
+    protected final Stack<ResultIterator> results = new Stack<ResultIterator>();
+
+
+    /**
+     * @param queryProcessor
+     */
+    public SearchVisitor( QueryProcessor queryProcessor ) {
+        this.query = queryProcessor.getQuery();
+        this.queryProcessor = queryProcessor;
+        this.em = queryProcessor.getEntityManager();
+    }
+
+
+    /** Return the results if they exist, null otherwise */
+    public ResultIterator getResults() {
+        return results.isEmpty() ? null : results.pop();
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.apache.usergrid.persistence.query.ir.NodeVisitor#visit(org.apache.usergrid.
+     * persistence.query.ir.AndNode)
+     */
+    @Override
+    public void visit( AndNode node ) throws Exception {
+        node.getLeft().visit( this );
+        node.getRight().visit( this );
+
+        ResultIterator right = results.pop();
+        ResultIterator left = results.pop();
+
+        /**
+         * NOTE: TN We should always maintain post order traversal of the tree. It
+         * is required for sorting to work correctly
+         */
+        IntersectionIterator intersection = new IntersectionIterator( queryProcessor.getPageSizeHint( node ) );
+        intersection.addIterator( left );
+        intersection.addIterator( right );
+
+        results.push( intersection );
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.apache.usergrid.persistence.query.ir.NodeVisitor#visit(org.apache.usergrid.
+     * persistence.query.ir.NotNode)
+     */
+    @Override
+    public void visit( NotNode node ) throws Exception {
+        node.getSubtractNode().visit( this );
+        ResultIterator not = results.pop();
+
+        node.getKeepNode().visit( this );
+        ResultIterator keep = results.pop();
+
+        SubtractionIterator subtraction = new SubtractionIterator( queryProcessor.getPageSizeHint( node ) );
+        subtraction.setSubtractIterator( not );
+        subtraction.setKeepIterator( keep );
+
+        results.push( subtraction );
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.apache.usergrid.persistence.query.ir.NodeVisitor#visit(org.apache.usergrid.
+     * persistence.query.ir.OrNode)
+     */
+    @Override
+    public void visit( OrNode node ) throws Exception {
+        node.getLeft().visit( this );
+        node.getRight().visit( this );
+
+        ResultIterator right = results.pop();
+        ResultIterator left = results.pop();
+
+        final int nodeId = node.getId();
+
+        UnionIterator union = new UnionIterator( queryProcessor.getPageSizeHint( node ), nodeId, queryProcessor.getCursorCache(nodeId  ) );
+
+        if ( left != null ) {
+            union.addIterator( left );
+        }
+        if ( right != null ) {
+            union.addIterator( right );
+        }
+
+        results.push( union );
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see
+     * org.apache.usergrid.persistence.query.ir.NodeVisitor#visit(org.apache.usergrid.persistence
+     * .query.ir.OrderByNode)
+     */
+    @Override
+    public void visit( OrderByNode orderByNode ) throws Exception {
+
+        QuerySlice slice = orderByNode.getFirstPredicate().getAllSlices().iterator().next();
+
+        queryProcessor.applyCursorAndSort( slice );
+
+        QueryNode subOperations = orderByNode.getQueryOperations();
+
+        ResultIterator subResults = null;
+
+        if ( subOperations != null ) {
+            //visit our sub operation
+            subOperations.visit( this );
+
+            subResults = results.pop();
+        }
+
+        ResultIterator orderIterator;
+
+        /**
+         * We have secondary sorts, we need to evaluate the candidate results and sort them in memory
+         */
+        if ( orderByNode.hasSecondarySorts() ) {
+
+            //only order by with no query, start scanning the first field
+            if ( subResults == null ) {
+                QuerySlice firstFieldSlice = new QuerySlice( slice.getPropertyName(), -1 );
+                subResults =
+                        new SliceIterator( slice, secondaryIndexScan( orderByNode, firstFieldSlice ), COLLECTION_PARSER,
+                                slice.hasCursor() );
+            }
+
+            orderIterator = new OrderByIterator( slice, orderByNode.getSecondarySorts(), subResults, em,
+                    queryProcessor.getPageSizeHint( orderByNode ) );
+        }
+
+        //we don't have multi field sorting, we can simply do intersection with a single scan range
+        else {
+
+            IndexScanner scanner;
+
+            if ( slice.isComplete() ) {
+                scanner = new NoOpIndexScanner();
+            }
+            else {
+                scanner = secondaryIndexScan( orderByNode, slice );
+            }
+
+            SliceIterator joinSlice = new SliceIterator( slice, scanner, COLLECTION_PARSER, slice.hasCursor() );
+
+            IntersectionIterator union = new IntersectionIterator( queryProcessor.getPageSizeHint( orderByNode ) );
+            union.addIterator( joinSlice );
+
+            if ( subResults != null ) {
+                union.addIterator( subResults );
+            }
+
+            orderIterator = union;
+        }
+
+        // now create our intermediate iterator with our real results
+        results.push( orderIterator );
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see
+     * org.apache.usergrid.persistence.query.ir.NodeVisitor#visit(org.apache.usergrid.persistence
+     * .query.ir.SliceNode)
+     */
+    @Override
+    public void visit( SliceNode node ) throws Exception {
+        IntersectionIterator intersections = new IntersectionIterator( queryProcessor.getPageSizeHint( node ) );
+
+        for ( QuerySlice slice : node.getAllSlices() ) {
+            IndexScanner scanner = secondaryIndexScan( node, slice );
+
+            intersections.addIterator( new SliceIterator( slice, scanner, COLLECTION_PARSER, slice.hasCursor() ) );
+        }
+
+        results.push( intersections );
+    }
+
+
+    /**
+     * Create a secondary index scan for the given slice node. DOES NOT apply to the "all" case. This should only
+     * generate a slice for secondary property scanning
+     */
+    protected abstract IndexScanner secondaryIndexScan( QueryNode node, QuerySlice slice ) throws Exception;
+
+
+    @Override
+    public void visit( UuidIdentifierNode uuidIdentifierNode ) {
+        this.results.push( new StaticIdIterator( uuidIdentifierNode.getUuid() ) );
+    }
+
+
+    @Override
+    public void visit( EmailIdentifierNode emailIdentifierNode ) throws Exception {
+        EntityRef user = queryProcessor.getEntityManager().getUserByIdentifier( emailIdentifierNode.getIdentifier() );
+
+        if ( user == null ) {
+            this.results.push( new EmptyIterator() );
+            return;
+        }
+
+        this.results.push( new StaticIdIterator( user.getUuid() ) );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/SliceNode.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/SliceNode.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/SliceNode.java
new file mode 100644
index 0000000..fa4483e
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/SliceNode.java
@@ -0,0 +1,168 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.query.ir;
+
+
+import java.util.Collection;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import org.apache.usergrid.persistence.query.ir.QuerySlice.RangeValue;
+
+import static org.apache.usergrid.persistence.cassandra.IndexUpdate.indexValueCode;
+import static org.apache.usergrid.persistence.cassandra.IndexUpdate.toIndexableValue;
+
+
+/**
+ * A node which has 1 or more query Slices that can be unioned together. I.E and && operation with either 1 or more
+ * children
+ *
+ * @author tnine
+ */
+public class SliceNode extends QueryNode {
+
+    /**
+     * A context within a tree to allow for operand and range scan optimizations. In the event that the user enters a
+     * query in the following way
+     * <p/>
+     * (x > 5 and x < 15 and z > 10 and z < 20) or (y > 10 and y < 20)
+     * <p/>
+     * You will have 2 contexts. The first is for (x > 5 and x < 15 and z > 10 and z < 20), the second is for (y > 10
+     * and y < 20). This allows us to compress these operations into a single range scan per context.
+     */
+    // private class TreeContext {
+
+    private Map<String, QuerySlice> pairs = new LinkedHashMap<String, QuerySlice>();
+
+    private int id;
+
+
+    /**
+     * Set the id for construction. Just a counter. Used for creating tokens and things like tokens where the same
+     * property can be used in 2 different subtrees
+     */
+    public SliceNode( int id ) {
+        this.id = id;
+    }
+
+
+    /**
+     * Set the start value. If the range pair doesn't exist, it's created
+     *
+     * @param start The start value. this will be processed and turned into an indexed value
+     */
+    public void setStart( String fieldName, Object start, boolean inclusive ) {
+        QuerySlice slice = getOrCreateSlice( fieldName );
+
+        // if the value is null don't set the range on the slice
+        if ( start == null ) {
+            return;
+        }
+
+        RangeValue existingStart = slice.getStart();
+
+        Object indexedValue = toIndexableValue( start );
+        byte code = indexValueCode( indexedValue );
+
+        RangeValue newStart = new RangeValue( code, indexedValue, inclusive );
+
+        if ( existingStart == null ) {
+            slice.setStart( newStart );
+            return;
+        }
+
+        // check if we're before the currently set start in this
+        // context. If so set the value to increase the range scan size;
+        if ( existingStart != null && newStart == null || ( existingStart != null
+                && existingStart.compareTo( newStart, false ) < 0 ) ) {
+            slice.setStart( newStart );
+        }
+    }
+
+
+    /** Set the finish. If finish value is greater than the existing, I.E. null or higher comparison, then */
+    public void setFinish( String fieldName, Object finish, boolean inclusive ) {
+        QuerySlice slice = getOrCreateSlice( fieldName );
+
+        // if the value is null don't set the range on the slice
+        if ( finish == null ) {
+            return;
+        }
+
+        RangeValue existingFinish = slice.getFinish();
+
+        Object indexedValue = toIndexableValue( finish );
+        byte code = indexValueCode( indexedValue );
+
+        RangeValue newFinish = new RangeValue( code, indexedValue, inclusive );
+
+        if ( existingFinish == null ) {
+            slice.setFinish( newFinish );
+            return;
+        }
+
+        // check if we're before the currently set start in this
+        // context. If so set the value to increase the range scan size;
+        if ( existingFinish != null && newFinish == null || ( existingFinish != null
+                && existingFinish.compareTo( newFinish, false ) < 0 ) ) {
+            slice.setFinish( newFinish );
+        }
+    }
+
+
+    /** Lazy instanciate a field pair if required. Otherwise return the existing pair */
+    private QuerySlice getOrCreateSlice( String fieldName ) {
+        QuerySlice pair = this.pairs.get( fieldName );
+
+        if ( pair == null ) {
+            pair = new QuerySlice( fieldName, id );
+            this.pairs.put( fieldName, pair );
+        }
+
+        return pair;
+    }
+
+
+    /** Get the slice by field name if it exists. Null otherwise */
+    public QuerySlice getSlice( String fieldName ) {
+        return this.pairs.get( fieldName );
+    }
+
+
+    /** Get all slices in our context */
+    public Collection<QuerySlice> getAllSlices() {
+        return this.pairs.values();
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see
+     * org.apache.usergrid.persistence.query.ir.QueryNode#visit(org.apache.usergrid.persistence
+     * .query.ir.NodeVisitor)
+     */
+    @Override
+    public void visit( NodeVisitor visitor ) throws Exception {
+        visitor.visit( this );
+    }
+
+
+    @Override
+    public String toString() {
+        return "SliceNode [pairs=" + pairs + ", id=" + id + "]";
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/UuidIdentifierNode.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/UuidIdentifierNode.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/UuidIdentifierNode.java
new file mode 100644
index 0000000..ce7ffa8
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/UuidIdentifierNode.java
@@ -0,0 +1,32 @@
+package org.apache.usergrid.persistence.query.ir;
+
+
+import java.util.UUID;
+
+
+/**
+ * Class to represent a UUID based Identifier query
+ *
+ * @author tnine
+ */
+public class UuidIdentifierNode extends QueryNode {
+
+
+    private final UUID uuid;
+
+
+    public UuidIdentifierNode( UUID uuid ) {
+        this.uuid = uuid;
+    }
+
+
+    @Override
+    public void visit( NodeVisitor visitor ) throws Exception {
+        visitor.visit( this );
+    }
+
+
+    public UUID getUuid() {
+        return uuid;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/WithinNode.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/WithinNode.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/WithinNode.java
new file mode 100644
index 0000000..57cb241
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/WithinNode.java
@@ -0,0 +1,96 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.query.ir;
+
+
+/**
+ * Intermediate represnetation of the within operator
+ *
+ * @author tnine
+ */
+public class WithinNode extends QueryNode {
+
+    private final String propertyName;
+    private final float distance;
+    private final float lattitude;
+    private final float longitude;
+    private final QuerySlice slice;
+
+
+    /**
+     * @param propertyName
+     * @param distance
+     * @param lattitude
+     * @param longitude
+     */
+    public WithinNode( String propertyName, float distance, float lattitude, float longitude, int nodeId ) {
+        this.propertyName = propertyName;
+        this.distance = distance;
+        this.lattitude = lattitude;
+        this.longitude = longitude;
+        this.slice = new QuerySlice( "location", nodeId );
+    }
+
+
+    /** @return the propertyName */
+    public String getPropertyName() {
+        return propertyName;
+    }
+
+
+    /** @return the distance */
+    public float getDistance() {
+        return distance;
+    }
+
+
+    /** @return the lattitude */
+    public float getLattitude() {
+        return lattitude;
+    }
+
+
+    /** @return the longitude */
+    public float getLongitude() {
+        return longitude;
+    }
+
+
+    /** @return the slice */
+    public QuerySlice getSlice() {
+        return slice;
+    }
+
+
+    /*
+       * (non-Javadoc)
+       *
+       * @see
+       * org.apache.usergrid.persistence.query.ir.QueryNode#visit(org.apache.usergrid.persistence
+       * .query.ir.NodeVisitor)
+       */
+    @Override
+    public void visit( NodeVisitor visitor ) throws Exception {
+        visitor.visit( this );
+    }
+
+
+    @Override
+    public String toString() {
+        return "WithinNode [propertyName=" + propertyName + ", distance=" + distance + ", lattitude=" + lattitude
+                + ", longitude=" + longitude + "]";
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/AbstractScanColumn.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/AbstractScanColumn.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/AbstractScanColumn.java
new file mode 100644
index 0000000..9fe71df
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/AbstractScanColumn.java
@@ -0,0 +1,70 @@
+package org.apache.usergrid.persistence.query.ir.result;
+
+
+import java.nio.ByteBuffer;
+import java.util.UUID;
+import org.apache.cassandra.utils.ByteBufferUtil;
+
+
+/**
+ *
+ * @author: tnine
+ *
+ */
+public abstract class AbstractScanColumn implements ScanColumn {
+
+    private final UUID uuid;
+    private final ByteBuffer buffer;
+
+
+    protected AbstractScanColumn( UUID uuid, ByteBuffer buffer ) {
+        this.uuid = uuid;
+        this.buffer = buffer;
+    }
+
+
+    @Override
+    public UUID getUUID() {
+        return uuid;
+    }
+
+
+    @Override
+    public ByteBuffer getCursorValue() {
+        return buffer == null ? null :buffer.duplicate();
+    }
+
+
+    @Override
+    public boolean equals( Object o ) {
+        if ( this == o ) {
+            return true;
+        }
+        if ( !( o instanceof AbstractScanColumn ) ) {
+            return false;
+        }
+
+        AbstractScanColumn that = ( AbstractScanColumn ) o;
+
+        if ( !uuid.equals( that.uuid ) ) {
+            return false;
+        }
+
+        return true;
+    }
+
+
+    @Override
+    public int hashCode() {
+        return uuid.hashCode();
+    }
+
+
+    @Override
+    public String toString() {
+        return "AbstractScanColumn{" +
+                "uuid=" + uuid +
+                ", buffer=" + ByteBufferUtil.bytesToHex( buffer ) +
+                '}';
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/CollectionResultsLoaderFactory.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/CollectionResultsLoaderFactory.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/CollectionResultsLoaderFactory.java
new file mode 100644
index 0000000..f17115b
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/CollectionResultsLoaderFactory.java
@@ -0,0 +1,23 @@
+package org.apache.usergrid.persistence.query.ir.result;
+
+
+import org.apache.usergrid.persistence.EntityManager;
+import org.apache.usergrid.persistence.Query;
+import org.apache.usergrid.persistence.Results;
+
+
+/** Implementation for loading collection results */
+public class CollectionResultsLoaderFactory implements ResultsLoaderFactory {
+
+    @Override
+    public ResultsLoader getResultsLoader( EntityManager em, Query query, Results.Level level ) {
+        switch ( level ) {
+            case IDS:
+                return new IDLoader();
+            case REFS:
+                return new EntityRefLoader( query.getEntityType() );
+            default:
+                return new EntityResultsLoader( em );
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/ConnectionIndexSliceParser.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/ConnectionIndexSliceParser.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/ConnectionIndexSliceParser.java
new file mode 100644
index 0000000..11ed7f6
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/ConnectionIndexSliceParser.java
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.query.ir.result;
+
+
+import java.nio.ByteBuffer;
+import java.util.UUID;
+
+import org.apache.usergrid.persistence.Schema;
+
+import me.prettyprint.hector.api.beans.DynamicComposite;
+
+
+/**
+ * Parser for reading uuid connections from ENTITY_COMPOSITE_DICTIONARIES and DICTIONARY_CONNECTED_ENTITIES type
+ *
+ * @author tnine
+ */
+public class ConnectionIndexSliceParser implements SliceParser {
+
+    private final String connectedEntityType;
+
+
+    /** @param connectedEntityType Could be null if we want to return all types */
+    public ConnectionIndexSliceParser( String connectedEntityType ) {
+        this.connectedEntityType = connectedEntityType;
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.usergrid.persistence.query.ir.result.SliceParser#parse(java.nio.ByteBuffer)
+     */
+    @Override
+    public ScanColumn parse( ByteBuffer buff ) {
+        DynamicComposite composite = DynamicComposite.fromByteBuffer( buff.duplicate() );
+
+        String connectedType = ( String ) composite.get( 1 );
+
+
+        //connection type has been defined and it doesn't match, skip it
+        if ( connectedEntityType != null && !connectedEntityType.equals( connectedType ) ) {
+            return null;
+        }
+
+        //we're checking a loopback and it wasn't specified, skip it
+        if ( ( connectedEntityType != null && !connectedEntityType.equalsIgnoreCase( connectedType ) ) || Schema
+                .TYPE_CONNECTION.equalsIgnoreCase( connectedType ) ) {
+            return null;
+        }
+
+        return new ConnectionColumn( ( UUID ) composite.get( 0 ), connectedType, buff );
+        //    return composite;
+        //    return null;
+    }
+
+
+    public static class ConnectionColumn extends AbstractScanColumn {
+
+        private final String connectedType;
+
+
+        public ConnectionColumn( UUID uuid, String connectedType, ByteBuffer column ) {
+            super( uuid, column );
+            this.connectedType = connectedType;
+        }
+
+
+        /** Get the target type from teh column */
+        public String getTargetType() {
+            return connectedType;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/ConnectionRefLoader.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/ConnectionRefLoader.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/ConnectionRefLoader.java
new file mode 100644
index 0000000..e0540e0
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/ConnectionRefLoader.java
@@ -0,0 +1,65 @@
+package org.apache.usergrid.persistence.query.ir.result;
+
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.UUID;
+
+import org.apache.usergrid.persistence.ConnectionRef;
+import org.apache.usergrid.persistence.EntityRef;
+import org.apache.usergrid.persistence.Results;
+import org.apache.usergrid.persistence.SimpleEntityRef;
+import org.apache.usergrid.persistence.cassandra.ConnectionRefImpl;
+
+
+/**
+ *
+ * @author: tnine
+ *
+ */
+public class ConnectionRefLoader implements ResultsLoader {
+
+    private final UUID sourceEntityId;
+    private final String sourceType;
+    private final String connectionType;
+    private final String targetEntityType;
+
+
+    public ConnectionRefLoader( ConnectionRef connectionRef ) {
+        this.sourceType = connectionRef.getConnectingEntity().getType();
+        this.sourceEntityId = connectionRef.getConnectingEntity().getUuid();
+        this.connectionType = connectionRef.getConnectionType();
+        this.targetEntityType = connectionRef.getConnectedEntity().getType();
+    }
+
+
+    @Override
+    public Results getResults( List<ScanColumn> entityIds ) throws Exception {
+
+
+        final EntityRef sourceRef = new SimpleEntityRef( sourceType, sourceEntityId );
+
+        List<ConnectionRef> refs = new ArrayList<ConnectionRef>( entityIds.size() );
+
+        for ( ScanColumn column : entityIds ) {
+
+            SimpleEntityRef targetRef;
+
+            if ( column instanceof ConnectionIndexSliceParser.ConnectionColumn ) {
+                final ConnectionIndexSliceParser.ConnectionColumn connectionColumn =
+                        ( ConnectionIndexSliceParser.ConnectionColumn ) column;
+                targetRef = new SimpleEntityRef( connectionColumn.getTargetType(), connectionColumn.getUUID() );
+            }
+
+            else {
+                targetRef = new SimpleEntityRef( targetEntityType, column.getUUID() );
+            }
+
+            final ConnectionRef ref = new ConnectionRefImpl( sourceRef, connectionType, targetRef );
+
+            refs.add( ref );
+        }
+
+        return Results.fromConnections( refs );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/ConnectionResultsLoaderFactory.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/ConnectionResultsLoaderFactory.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/ConnectionResultsLoaderFactory.java
new file mode 100644
index 0000000..2a3b024
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/ConnectionResultsLoaderFactory.java
@@ -0,0 +1,32 @@
+package org.apache.usergrid.persistence.query.ir.result;
+
+
+import org.apache.usergrid.persistence.ConnectionRef;
+import org.apache.usergrid.persistence.EntityManager;
+import org.apache.usergrid.persistence.Query;
+import org.apache.usergrid.persistence.Results;
+
+
+/** Implementation for loading connectionResults results */
+public class ConnectionResultsLoaderFactory implements ResultsLoaderFactory {
+
+    private final ConnectionRef connection;
+
+
+    public ConnectionResultsLoaderFactory( ConnectionRef connection ) {
+        this.connection = connection;
+    }
+
+
+    @Override
+    public ResultsLoader getResultsLoader( EntityManager em, Query query, Results.Level level ) {
+        switch ( level ) {
+            case IDS://Note that this is technically wrong.  However, to support backwards compatibility with the
+                // existing apis and usage, both ids and refs return a connection ref when dealing with connections
+            case REFS:
+                return new ConnectionRefLoader( connection );
+            default:
+                return new EntityResultsLoader( em );
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/ConnectionTypesIterator.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/ConnectionTypesIterator.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/ConnectionTypesIterator.java
new file mode 100644
index 0000000..8fb47b1
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/ConnectionTypesIterator.java
@@ -0,0 +1,178 @@
+package org.apache.usergrid.persistence.query.ir.result;
+
+
+import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.NoSuchElementException;
+import java.util.UUID;
+
+import org.apache.usergrid.persistence.Schema;
+import org.apache.usergrid.persistence.cassandra.CassandraService;
+
+import me.prettyprint.cassandra.serializers.StringSerializer;
+import me.prettyprint.hector.api.beans.HColumn;
+import static org.apache.usergrid.persistence.Schema.DICTIONARY_CONNECTED_TYPES;
+import static org.apache.usergrid.persistence.Schema.DICTIONARY_CONNECTING_TYPES;
+import static org.apache.usergrid.persistence.cassandra.ApplicationCF.ENTITY_DICTIONARIES;
+import static org.apache.usergrid.persistence.cassandra.CassandraPersistenceUtils.key;
+
+
+/** Iterator to iterate all types of connections the entity participates in */
+public class ConnectionTypesIterator implements Iterator<String>, Iterable<String> {
+
+
+    private static final StringSerializer STRING_SER = StringSerializer.get();
+
+
+    private final CassandraService cass;
+    private final UUID applicationId;
+    private final Object key;
+    //  private final UUID entityId;
+    private final int pageSize;
+    //  private static final String dictionaryName;
+
+
+    private boolean hasMore = true;
+    private Object start = null;
+
+    private Iterator<String> lastResults;
+
+
+    /**
+     * The connection types iterator.
+     *
+     * @param cass The cassandra service to use
+     * @param applicationId The application id to use
+     * @param entityId The entityId to use.  Can be a source for outgoing connections, or target for incoming
+     * connections
+     * @param outgoing True if this is a search from source->target on the edge, false if it is a search from
+     * target<-source
+     * @param pageSize The page size to use for batch fetching
+     */
+    public ConnectionTypesIterator( CassandraService cass, UUID applicationId, UUID entityId, boolean outgoing,
+                                    int pageSize ) {
+        this.cass = cass;
+        this.applicationId = applicationId;
+        this.pageSize = pageSize;
+
+        this.key =
+                outgoing ? key( entityId, DICTIONARY_CONNECTED_TYPES ) : key( entityId, DICTIONARY_CONNECTING_TYPES );
+    }
+
+
+    @Override
+    public Iterator<String> iterator() {
+        return this;
+    }
+
+
+    /*
+       * (non-Javadoc)
+       *
+       * @see java.util.Iterator#hasNext()
+       */
+    @Override
+    public boolean hasNext() {
+
+        // We've either 1) paged everything we should and have 1 left from our
+        // "next page" pointer
+        // Our currently buffered results don't exist or don't have a next. Try to
+        // load them again if they're less than the page size
+        if ( ( lastResults == null || !lastResults.hasNext() ) && hasMore ) {
+            try {
+                return load();
+            }
+            catch ( Exception e ) {
+                throw new RuntimeException( "Error loading next page of indexbucket scanner", e );
+            }
+        }
+
+        return lastResults.hasNext();
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see java.util.Iterator#next()
+     */
+    @Override
+    public String next() {
+
+        if ( !hasNext() ) {
+            throw new NoSuchElementException( "There are no elements left in this iterator" );
+        }
+
+        return lastResults.next();
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see java.util.Iterator#remove()
+     */
+    @Override
+    public void remove() {
+        throw new UnsupportedOperationException( "You can't remove from a result set, only advance" );
+    }
+
+
+    /**
+     * Search the collection index using all the buckets for the given collection. Load the next page. Return false if
+     * nothing was loaded, true otherwise
+     */
+
+    public boolean load() throws Exception {
+
+        // nothing left to load
+        if ( !hasMore ) {
+            return false;
+        }
+
+        // if we skip the first we need to set the load to page size +2, since we'll
+        // discard the first
+        // and start paging at the next entity, otherwise we'll just load the page
+        // size we need
+        int selectSize = pageSize + 1;
+
+
+        List<HColumn<ByteBuffer, ByteBuffer>> results =
+                cass.getColumns( cass.getApplicationKeyspace( applicationId ), ENTITY_DICTIONARIES, key, start, null,
+                        selectSize, false );
+
+        // we loaded a full page, there might be more
+        if ( results.size() == selectSize ) {
+            hasMore = true;
+
+            // set the bytebuffer for the next pass
+            start = results.get( results.size() - 1 ).getName();
+
+            results.remove( results.size() - 1 );
+        }
+        else {
+            hasMore = false;
+        }
+
+
+        List<String> stringResults = new ArrayList<String>( results.size() );
+
+        //do the parse here
+        for ( HColumn<ByteBuffer, ByteBuffer> col : results ) {
+            final String value = STRING_SER.fromByteBuffer( col.getName() );
+
+            //always ignore loopback, this is legacy data that needs cleaned up, and it doesn't belong here
+            if ( !Schema.TYPE_CONNECTION.equalsIgnoreCase( value ) ) {
+                stringResults.add( value );
+            }
+        }
+
+
+        lastResults = stringResults.iterator();
+
+
+        return stringResults.size() > 0;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/EmptyIterator.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/EmptyIterator.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/EmptyIterator.java
new file mode 100644
index 0000000..1615143
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/EmptyIterator.java
@@ -0,0 +1,47 @@
+package org.apache.usergrid.persistence.query.ir.result;
+
+
+import java.util.Iterator;
+import java.util.Set;
+import java.util.UUID;
+
+import org.apache.usergrid.persistence.cassandra.CursorCache;
+
+
+/** Iterator that never returns results */
+public class EmptyIterator implements ResultIterator {
+    @Override
+    public void reset() {
+        //no op
+    }
+
+
+    @Override
+    public void finalizeCursor( CursorCache cache, UUID lastValue ) {
+        //no op
+    }
+
+
+    @Override
+    public Iterator<Set<ScanColumn>> iterator() {
+        return this;
+    }
+
+
+    @Override
+    public boolean hasNext() {
+        return false;
+    }
+
+
+    @Override
+    public Set<ScanColumn> next() {
+        return null;
+    }
+
+
+    @Override
+    public void remove() {
+        throw new UnsupportedOperationException( "Not supported" );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/EntityRefLoader.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/EntityRefLoader.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/EntityRefLoader.java
new file mode 100644
index 0000000..88a7be4
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/EntityRefLoader.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.query.ir.result;
+
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.usergrid.persistence.EntityRef;
+import org.apache.usergrid.persistence.Results;
+import org.apache.usergrid.persistence.SimpleEntityRef;
+
+
+public class EntityRefLoader implements ResultsLoader {
+
+    private String type;
+
+
+    public EntityRefLoader( String type ) {
+        this.type = type;
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.usergrid.persistence.query.ir.result.ResultsLoader#getResults(java.util.List)
+     */
+    @Override
+    public Results getResults( List<ScanColumn> entityIds ) throws Exception {
+        Results r = new Results();
+        List<EntityRef> refs = new ArrayList<EntityRef>( entityIds.size() );
+        for ( ScanColumn id : entityIds ) {
+            refs.add( new SimpleEntityRef( type, id.getUUID() ) );
+        }
+        r.setRefs( refs );
+        return r;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/EntityResultsLoader.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/EntityResultsLoader.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/EntityResultsLoader.java
new file mode 100644
index 0000000..5fb7d80
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/EntityResultsLoader.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.query.ir.result;
+
+
+import java.util.List;
+
+import org.apache.usergrid.persistence.EntityManager;
+import org.apache.usergrid.persistence.Results;
+
+
+/** @author tnine */
+public class EntityResultsLoader implements ResultsLoader {
+
+    private EntityManager em;
+
+
+    /**
+     *
+     */
+    public EntityResultsLoader( EntityManager em ) {
+        this.em = em;
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.usergrid.persistence.query.ir.result.ResultsLoader#getResults(java.util.List)
+     */
+    @Override
+    public Results getResults( List<ScanColumn> entityIds ) throws Exception {
+        return em.get( ScanColumnTransformer.getIds( entityIds ) );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/GeoIterator.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/GeoIterator.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/GeoIterator.java
new file mode 100644
index 0000000..0aab7e9
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/GeoIterator.java
@@ -0,0 +1,355 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.query.ir.result;
+
+
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.NoSuchElementException;
+import java.util.Set;
+import java.util.UUID;
+
+import org.apache.usergrid.persistence.cassandra.CursorCache;
+import org.apache.usergrid.persistence.geo.EntityLocationRef;
+import org.apache.usergrid.persistence.geo.GeoIndexSearcher;
+import org.apache.usergrid.persistence.geo.GeoIndexSearcher.SearchResults;
+import org.apache.usergrid.persistence.geo.model.Point;
+import org.apache.usergrid.persistence.query.ir.QuerySlice;
+
+import me.prettyprint.cassandra.serializers.StringSerializer;
+
+
+/**
+ * Simple wrapper around list results until the geo library is updated so support iteration and set returns
+ *
+ * @author tnine
+ */
+public class GeoIterator implements ResultIterator {
+
+    /**
+     *
+     */
+    private static final String DELIM = "+";
+    private static final String TILE_DELIM = "TILE";
+
+    private static final StringSerializer STR_SER = StringSerializer.get();
+
+
+    private final GeoIndexSearcher searcher;
+    private final int resultSize;
+    private final QuerySlice slice;
+    private final LinkedHashMap<UUID, LocationScanColumn> idOrder;
+    private final Point center;
+    private final double distance;
+    private final String propertyName;
+
+    private Set<ScanColumn> toReturn;
+    private Set<ScanColumn> lastLoaded;
+
+    // set when parsing cursor. If the cursor has gone to the end, this will be
+    // true, we should return no results
+    private boolean done = false;
+
+    /** Moved and used as part of cursors */
+    private EntityLocationRef last;
+    private List<String> lastCellsSearched;
+
+    /** counter that's incremented as we load pages. If pages loaded = 1 when reset,
+     * we don't have to reload from cass */
+    private int pagesLoaded = 0;
+
+
+    /**
+     *
+     */
+    public GeoIterator( GeoIndexSearcher searcher, int resultSize, QuerySlice slice, String propertyName, Point center,
+                        double distance ) {
+        this.searcher = searcher;
+        this.resultSize = resultSize;
+        this.slice = slice;
+        this.propertyName = propertyName;
+        this.center = center;
+        this.distance = distance;
+        this.idOrder = new LinkedHashMap<UUID, LocationScanColumn>( resultSize );
+        this.lastLoaded = new LinkedHashSet<ScanColumn>( resultSize );
+        parseCursor();
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see java.lang.Iterable#iterator()
+     */
+    @Override
+    public Iterator<Set<ScanColumn>> iterator() {
+        return this;
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see java.util.Iterator#hasNext()
+     */
+    @Override
+    public boolean hasNext() {
+        advance();
+        return !done || toReturn != null;
+    }
+
+
+    private void advance() {
+        // already loaded, do nothing
+        if ( done || toReturn != null ) {
+            return;
+        }
+
+        idOrder.clear();
+        lastLoaded.clear();
+
+
+        SearchResults results;
+
+        try {
+            results =
+                    searcher.proximitySearch( last, lastCellsSearched, center, propertyName, 0, distance, resultSize );
+        }
+        catch ( Exception e ) {
+            throw new RuntimeException( "Unable to search geo locations", e );
+        }
+
+        List<EntityLocationRef> locations = results.entityLocations;
+
+        lastCellsSearched = results.lastSearchedGeoCells;
+
+        for ( int i = 0; i < locations.size(); i++ ) {
+
+            final EntityLocationRef location = locations.get( i );
+            final UUID id = location.getUuid();
+
+            final LocationScanColumn locationScan = new LocationScanColumn( location );
+
+            idOrder.put( id, locationScan );
+            lastLoaded.add( locationScan );
+
+            last = location;
+        }
+
+        if ( locations.size() < resultSize ) {
+            done = true;
+        }
+
+        if ( lastLoaded.size() > 0 ) {
+            toReturn = lastLoaded;
+        }
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see java.util.Iterator#next()
+     */
+    @Override
+    public Set<ScanColumn> next() {
+        if ( !hasNext() ) {
+            throw new NoSuchElementException();
+        }
+
+        Set<ScanColumn> temp = toReturn;
+
+        toReturn = null;
+
+        return temp;
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see java.util.Iterator#remove()
+     */
+    @Override
+    public void remove() {
+        throw new UnsupportedOperationException( "You cannot reove elements from this iterator" );
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.apache.usergrid.persistence.query.ir.result.ResultIterator#reset()
+     */
+    @Override
+    public void reset() {
+        //only 1 iteration was invoked.  Just reset the pointer rather than re-search
+        if ( pagesLoaded == 1 ) {
+            toReturn = lastLoaded;
+            return;
+        }
+
+        idOrder.clear();
+        lastLoaded.clear();
+        lastCellsSearched = null;
+        last = null;
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see
+     * org.apache.usergrid.persistence.query.ir.result.ResultIterator#finalizeCursor(
+     * org.apache.usergrid.persistence.cassandra.CursorCache, java.util.UUID)
+     */
+    @Override
+    public void finalizeCursor( CursorCache cache, UUID uuid ) {
+
+        LocationScanColumn col = idOrder.get( uuid );
+
+        if ( col == null ) {
+            return;
+        }
+
+        final EntityLocationRef location = col.location;
+
+        if ( location == null ) {
+            return;
+        }
+
+        final int sliceHash = slice.hashCode();
+
+        // get our next distance
+        final double latitude = location.getLatitude();
+
+        final double longitude = location.getLongitude();
+
+        // now create a string value for this
+        final StringBuilder builder = new StringBuilder();
+
+        builder.append( uuid ).append( DELIM );
+        builder.append( latitude ).append( DELIM );
+        builder.append( longitude );
+
+        if ( lastCellsSearched != null ) {
+            builder.append( DELIM );
+
+            for ( String geoCell : lastCellsSearched ) {
+                builder.append( geoCell ).append( TILE_DELIM );
+            }
+
+            int length = builder.length();
+
+            builder.delete( length - TILE_DELIM.length() - 1, length );
+        }
+
+        ByteBuffer buff = STR_SER.toByteBuffer( builder.toString() );
+
+
+        cache.setNextCursor( sliceHash, buff );
+    }
+
+
+    /** Get the last cells searched in the iteraton */
+    public List<String> getLastCellsSearched() {
+        return Collections.unmodifiableList( lastCellsSearched );
+    }
+
+
+    private void parseCursor() {
+        if ( !slice.hasCursor() ) {
+            return;
+        }
+
+        String string = STR_SER.fromByteBuffer( slice.getCursor() );
+
+        // was set to the end, set the no op flag
+        if ( string.length() == 0 ) {
+            done = true;
+            return;
+        }
+
+        String[] parts = string.split( "\\" + DELIM );
+
+        if ( parts.length < 3 ) {
+            throw new RuntimeException(
+                    "Geo cursors must contain 3 or more parts.  Incorrect cursor, please execute the query again" );
+        }
+
+        UUID startId = UUID.fromString( parts[0] );
+        double latitude = Double.parseDouble( parts[1] );
+        double longitude = Double.parseDouble( parts[2] );
+
+        if ( parts.length >= 4 ) {
+            String[] geoCells = parts[3].split( TILE_DELIM );
+
+            lastCellsSearched = Arrays.asList( geoCells );
+        }
+
+        last = new EntityLocationRef( ( String ) null, startId, latitude, longitude );
+    }
+
+
+    private class LocationScanColumn implements ScanColumn {
+
+        private final EntityLocationRef location;
+
+
+        public LocationScanColumn( EntityLocationRef location ) {
+            this.location = location;
+        }
+
+
+        @Override
+        public UUID getUUID() {
+            return location.getUuid();
+        }
+
+
+        @Override
+        public ByteBuffer getCursorValue() {
+            throw new UnsupportedOperationException(
+                    "This is not supported for location scan columns.  It requires iterator information" );
+        }
+
+
+        @Override
+        public boolean equals( Object o ) {
+            if ( this == o ) {
+                return true;
+            }
+            if ( !( o instanceof ScanColumn ) ) {
+                return false;
+            }
+
+            ScanColumn that = ( ScanColumn ) o;
+
+            return location.getUuid().equals( that.getUUID() );
+        }
+
+
+        @Override
+        public int hashCode() {
+            return location.getUuid().hashCode();
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/IDLoader.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/IDLoader.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/IDLoader.java
new file mode 100644
index 0000000..03a4586
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/IDLoader.java
@@ -0,0 +1,24 @@
+package org.apache.usergrid.persistence.query.ir.result;
+
+
+import java.util.List;
+
+import org.apache.usergrid.persistence.Results;
+
+
+public class IDLoader implements ResultsLoader {
+
+    public IDLoader() {
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.usergrid.persistence.query.ir.result.ResultsLoader#getResults(java.util.List)
+     */
+    @Override
+    public Results getResults( List<ScanColumn> entityIds ) throws Exception {
+        Results r = new Results();
+        r.setIds( ScanColumnTransformer.getIds( entityIds ) );
+        return r;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/IntersectionIterator.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/IntersectionIterator.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/IntersectionIterator.java
new file mode 100644
index 0000000..6b463ef
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/IntersectionIterator.java
@@ -0,0 +1,167 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.query.ir.result;
+
+
+import java.util.LinkedHashSet;
+import java.util.Set;
+import java.util.UUID;
+
+import org.apache.usergrid.persistence.cassandra.CursorCache;
+
+import com.google.common.collect.Sets;
+
+
+/**
+ * An iterator that unions 1 or more subsets. It makes the assuming that sub iterators iterate from min(uuid) to
+ * max(uuid)
+ *
+ * @author tnine
+ */
+public class IntersectionIterator extends MultiIterator {
+
+
+    /**
+     *
+     */
+    public IntersectionIterator( int pageSize ) {
+        super( pageSize );
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.apache.usergrid.persistence.query.ir.result.ResultIterator#reset()
+     */
+    @Override
+    public void doReset() {
+        for ( ResultIterator itr : iterators ) {
+            itr.reset();
+        }
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.apache.usergrid.persistence.query.ir.result.MergeIterator#advance()
+     */
+    @Override
+    protected Set<ScanColumn> advance() {
+        /**
+         * Advance our sub iterators until the UUID's all line up
+         */
+
+        int size = iterators.size();
+
+        if ( size == 0 ) {
+            return null;
+        }
+
+        // edge case with only 1 iterator
+        if ( size == 1 ) {
+
+            ResultIterator itr = iterators.get( 0 );
+
+            if ( !itr.hasNext() ) {
+                return null;
+            }
+
+            return itr.next();
+        }
+
+        // begin our tree merge of the iterators
+
+        return merge();
+    }
+
+
+    private Set<ScanColumn> merge() {
+
+        Set<ScanColumn> results = new LinkedHashSet<ScanColumn>();
+        ResultIterator rootIterator = iterators.get( 0 );
+
+
+        //we've matched to the end
+        if ( !rootIterator.hasNext() ) {
+            return null;
+        }
+
+
+        //purposely check size first, that way we avoid another round trip if we can
+        while ( results.size() < pageSize && rootIterator.hasNext() ) {
+
+            Set<ScanColumn> intersection = rootIterator.next();
+
+            for ( int i = 1; i < iterators.size(); i++ ) {
+
+                ResultIterator joinIterator = iterators.get( i );
+
+                intersection = merge( intersection, joinIterator );
+
+                //nothing left short circuit, there is no point in advancing to further join iterators
+                if ( intersection.size() == 0 ) {
+                    break;
+                }
+            }
+
+            //now add the intermediate results and continue
+            results.addAll( intersection );
+        }
+
+        return results;
+    }
+
+
+    private Set<ScanColumn> merge( Set<ScanColumn> current, ResultIterator child ) {
+
+        Set<ScanColumn> results = new LinkedHashSet<ScanColumn>( pageSize );
+
+        while ( results.size() < pageSize ) {
+            if ( !child.hasNext() ) {
+                // we've iterated to the end, reset for next pass
+                child.reset();
+                return results;
+            }
+
+
+            final Set<ScanColumn> childResults = child.next();
+
+            results.addAll( Sets.intersection( current, childResults ) );
+        }
+
+        return results;
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see
+     * org.apache.usergrid.persistence.query.ir.result.ResultIterator#finalizeCursor(
+     * org.apache.usergrid.persistence.cassandra.CursorCache)
+     */
+    @Override
+    public void finalizeCursor( CursorCache cache, UUID lastLoaded ) {
+        ResultIterator itr = iterators.get( 0 );
+
+        //We can only create a cursor on our root level value in the intersection iterator.
+        if ( itr != null ) {
+            itr.finalizeCursor( cache, lastLoaded );
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/MergeIterator.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/MergeIterator.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/MergeIterator.java
new file mode 100644
index 0000000..a349f44
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/MergeIterator.java
@@ -0,0 +1,137 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.query.ir.result;
+
+
+import java.util.Iterator;
+import java.util.Set;
+
+
+/** @author tnine */
+public abstract class MergeIterator implements ResultIterator {
+
+
+    /** kept private on purpose so advance must return the correct value */
+    private Set<ScanColumn> next;
+
+    /** Pointer to the last set.  Equal to "next" when returned.  Used to retain results after "next" is set to null */
+    private Set<ScanColumn> last;
+    /** The size of the pages */
+    protected int pageSize;
+
+    int loadCount = 0;
+
+
+    /**
+     *
+     */
+    public MergeIterator( int pageSize ) {
+        this.pageSize = pageSize;
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see java.lang.Iterable#iterator()
+     */
+    @Override
+    public Iterator<Set<ScanColumn>> iterator() {
+        return this;
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see java.util.Iterator#hasNext()
+     */
+    @Override
+    public boolean hasNext() {
+        //if next isn't set, try to advance
+        if ( next == null ) {
+            doAdvance();
+        }
+
+        boolean results = next != null && next.size() > 0;
+
+        if ( results ) {
+            last = next;
+            loadCount++;
+        }
+
+        return results;
+    }
+
+
+    /** Advance to the next page */
+    protected void doAdvance() {
+        next = advance();
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see java.util.Iterator#next()
+     */
+    @Override
+    public Set<ScanColumn> next() {
+        if ( next == null ) {
+            doAdvance();
+        }
+
+        Set<ScanColumn> returnVal = next;
+
+        next = null;
+
+        return returnVal;
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see java.util.Iterator#remove()
+     */
+    @Override
+    public void remove() {
+        throw new UnsupportedOperationException( "You can't remove from a union iterator" );
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.usergrid.persistence.query.ir.result.ResultIterator#reset()
+     */
+    @Override
+    public void reset() {
+        if ( loadCount == 1 && last != null ) {
+            next = last;
+            return;
+        }
+        //clean up the last pointer
+        last = null;
+        //reset in the child iterators
+        doReset();
+    }
+
+
+    /** Advance the iterator to the next value.  Can return an empty set with signals no values */
+    protected abstract Set<ScanColumn> advance();
+
+    /** Perform the reset if required */
+    protected abstract void doReset();
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/MultiIterator.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/MultiIterator.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/MultiIterator.java
new file mode 100644
index 0000000..213725e
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/MultiIterator.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.query.ir.result;
+
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+/** @author tnine */
+public abstract class MultiIterator extends MergeIterator {
+
+    protected List<ResultIterator> iterators = new ArrayList<ResultIterator>();
+
+
+    /**
+     * @param pageSize
+     */
+    public MultiIterator( int pageSize ) {
+        super( pageSize );
+    }
+
+
+    /** Add an iterator for our sub results */
+    public void addIterator( ResultIterator iterator ) {
+        iterators.add( iterator );
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.apache.usergrid.persistence.query.ir.result.ResultIterator#reset()
+     */
+    @Override
+    public void doReset() {
+        for ( ResultIterator itr : iterators ) {
+            itr.reset();
+        }
+    }
+}


[14/96] [abbrv] [partial] Change package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/cassandra/ConnectionRefImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/cassandra/ConnectionRefImpl.java b/stack/core/src/main/java/org/usergrid/persistence/cassandra/ConnectionRefImpl.java
deleted file mode 100644
index e16d780..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/cassandra/ConnectionRefImpl.java
+++ /dev/null
@@ -1,628 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.cassandra;
-
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-import java.util.UUID;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.usergrid.persistence.ConnectedEntityRef;
-import org.usergrid.persistence.ConnectionRef;
-import org.usergrid.persistence.EntityRef;
-import org.usergrid.persistence.SimpleEntityRef;
-
-import org.apache.commons.codec.binary.Hex;
-import org.apache.commons.lang.StringUtils;
-
-import static org.usergrid.persistence.SimpleEntityRef.ref;
-import static org.usergrid.utils.ConversionUtils.ascii;
-import static org.usergrid.utils.ConversionUtils.uuidToBytesNullOk;
-
-
-/** @author edanuff */
-public class ConnectionRefImpl implements ConnectionRef {
-
-    public static final int MAX_LINKS = 1;
-
-    /**
-     *
-     */
-    public static final int ALL = 0;
-    /**
-     *
-     */
-    public static final int BY_CONNECTION_TYPE = 1;
-    /**
-     *
-     */
-    public static final int BY_ENTITY_TYPE = 2;
-    /**
-     *
-     */
-    public static final int BY_CONNECTION_AND_ENTITY_TYPE = 3;
-
-    /**
-     *
-     */
-    public static final String NULL_ENTITY_TYPE = "Null";
-    /**
-     *
-     */
-    public static final UUID NULL_ID = new UUID( 0, 0 );
-
-    private static final Logger logger = LoggerFactory.getLogger( ConnectionRefImpl.class );
-
-
-    public static final String CONNECTION_ENTITY_TYPE = "Connection";
-    public static final String CONNECTION_ENTITY_CONNECTION_TYPE = "connection";
-
-
-    private final EntityRef connectingEntity;
-
-    private final List<ConnectedEntityRef> pairedConnections;
-
-    private final ConnectedEntityRef connectedEntity;
-
-
-    /**
-     *
-     */
-    public ConnectionRefImpl() {
-        connectingEntity = SimpleEntityRef.ref();
-        pairedConnections = Collections.emptyList();
-        connectedEntity = new ConnectedEntityRefImpl();
-    }
-
-
-    /**
-     * @param connectingEntityType
-     * @param connectingEntityId
-     * @param connectionType
-     * @param connectedEntityType
-     * @param connectedEntityId
-     */
-    public ConnectionRefImpl( String connectingEntityType, UUID connectingEntityId, String connectionType,
-                              String connectedEntityType, UUID connectedEntityId ) {
-
-        connectingEntity = ref( connectingEntityType, connectingEntityId );
-
-        pairedConnections = Collections.emptyList();
-
-        connectedEntity = new ConnectedEntityRefImpl( connectionType, connectedEntityType, connectedEntityId );
-    }
-
-
-    /** Create a connection from the source to the target entity */
-    public ConnectionRefImpl( EntityRef source, String connectionType, EntityRef target ) {
-
-        this.connectingEntity = ref( source );
-
-        pairedConnections = Collections.emptyList();
-
-        this.connectedEntity = new ConnectedEntityRefImpl( connectionType, target );
-    }
-
-
-    public ConnectionRefImpl( ConnectionRef connection ) {
-
-        connectingEntity = connection.getConnectingEntity();
-
-        List<ConnectedEntityRef> pc = connection.getPairedConnections();
-        if ( pc == null ) {
-            pc = Collections.emptyList();
-        }
-        pairedConnections = pc;
-
-        connectedEntity = connection.getConnectedEntity();
-    }
-
-
-    public ConnectionRefImpl( EntityRef connectingEntity, ConnectedEntityRef... connections ) {
-
-        this.connectingEntity = ref( connectingEntity );
-
-        ConnectedEntityRef ce = new ConnectedEntityRefImpl();
-        List<ConnectedEntityRef> pc = Collections.emptyList();
-        if ( connections.length > 0 ) {
-
-            ce = connections[connections.length - 1];
-
-            if ( connections.length > 1 ) {
-                pc = Arrays.asList( Arrays.copyOfRange( connections, 0, connections.length - 2 ) );
-            }
-        }
-        pairedConnections = pc;
-        connectedEntity = ce;
-    }
-
-
-    public ConnectionRefImpl( ConnectionRef connection, ConnectedEntityRef... connections ) {
-
-        if ( connection == null ) {
-            throw new NullPointerException( "ConnectionImpl constructor \'connection\' cannot be null" );
-        }
-
-        connectingEntity = connection.getConnectingEntity();
-
-        if ( connections.length > 0 ) {
-
-            pairedConnections = new ArrayList<ConnectedEntityRef>();
-            pairedConnections.addAll( connection.getPairedConnections() );
-            pairedConnections.add( connection.getConnectedEntity() );
-
-            connectedEntity = connections[connections.length - 1];
-
-            if ( connections.length > 1 ) {
-                pairedConnections
-                        .addAll( Arrays.asList( Arrays.copyOfRange( connections, 0, connections.length - 2 ) ) );
-            }
-        }
-        else {
-            pairedConnections = new ArrayList<ConnectedEntityRef>();
-            connectedEntity = new ConnectedEntityRefImpl();
-        }
-    }
-
-
-    public ConnectionRefImpl( EntityRef connectingEntity, List<ConnectedEntityRef> pairedConnections,
-                              ConnectedEntityRef connectedEntity ) {
-        this.connectingEntity = connectingEntity;
-        this.pairedConnections = pairedConnections;
-        this.connectedEntity = connectedEntity;
-    }
-
-
-    public UUID getSearchIndexId() {
-        return null;
-    }
-
-
-    public String getSearchConnectionType() {
-        return null;
-    }
-
-
-    public String getSearchResultType() {
-        return null;
-    }
-
-
-    public String getSearchIndexName() {
-        return null;
-    }
-
-
-    @Override
-    public EntityRef getConnectingEntity() {
-        return connectingEntity;
-    }
-
-
-    /**
-     * @return
-     */
-    public String getConnectingEntityType() {
-        if ( connectingEntity == null ) {
-            return null;
-        }
-        return connectingEntity.getType();
-    }
-
-
-    /**
-     * @return
-     */
-    public UUID getConnectingEntityId() {
-        if ( connectingEntity == null ) {
-            return null;
-        }
-        return connectingEntity.getUuid();
-    }
-
-
-    @Override
-    public List<ConnectedEntityRef> getPairedConnections() {
-        return pairedConnections;
-    }
-
-
-    public ConnectedEntityRef getFirstPairedConnection() {
-        ConnectedEntityRef pairedConnection = null;
-
-        if ( ( pairedConnections != null ) && ( pairedConnections.size() > 0 ) ) {
-            pairedConnection = pairedConnections.get( 0 );
-        }
-
-        return pairedConnection;
-    }
-
-
-    public UUID getFirstPairedConnectedEntityId() {
-        ConnectedEntityRef pairedConnection = getFirstPairedConnection();
-        if ( pairedConnection != null ) {
-            return pairedConnection.getUuid();
-        }
-        return null;
-    }
-
-
-    public String getFirstPairedConnectedEntityType() {
-        ConnectedEntityRef pairedConnection = getFirstPairedConnection();
-        if ( pairedConnection != null ) {
-            return pairedConnection.getType();
-        }
-        return null;
-    }
-
-
-    public String getFirstPairedConnectionType() {
-        ConnectedEntityRef pairedConnection = getFirstPairedConnection();
-        if ( pairedConnection != null ) {
-            return pairedConnection.getConnectionType();
-        }
-        return null;
-    }
-
-
-    @Override
-    public ConnectedEntityRef getConnectedEntity() {
-        return connectedEntity;
-    }
-
-
-    /**
-     * @return
-     */
-    @Override
-    public String getConnectionType() {
-        if ( connectedEntity == null ) {
-            return null;
-        }
-        return connectedEntity.getConnectionType();
-    }
-
-
-    /**
-     * @return
-     */
-    public String getConnectedEntityType() {
-        if ( connectedEntity == null ) {
-            return null;
-        }
-        return connectedEntity.getType();
-    }
-
-
-    /**
-     * @return
-     */
-    public UUID getConnectedEntityId() {
-        return connectedEntity.getUuid();
-    }
-
-
-    private UUID id;
-
-
-    /** @return connection id */
-    @Override
-    public UUID getUuid() {
-        if ( id == null ) {
-            id = getId( getConnectingEntity(), getConnectedEntity(),
-                    getPairedConnections().toArray( new ConnectedEntityRef[0] ) );
-        }
-        return id;
-    }
-
-
-    @Override
-    public String getType() {
-        return CONNECTION_ENTITY_TYPE;
-    }
-
-
-    public UUID getIndexId() {
-        return getIndexId( getConnectingEntity(), getConnectionType(), getConnectedEntityType(),
-                pairedConnections.toArray( new ConnectedEntityRef[0] ) );
-    }
-
-
-    public UUID getConnectingIndexId() {
-        return getIndexId( getConnectingEntity(), getConnectionType(), null,
-                pairedConnections.toArray( new ConnectedEntityRef[0] ) );
-    }
-
-
-    public ConnectionRefImpl getConnectionToConnectionEntity() {
-        return new ConnectionRefImpl( getConnectingEntity(),
-                new ConnectedEntityRefImpl( CONNECTION_ENTITY_CONNECTION_TYPE, CONNECTION_ENTITY_TYPE, getUuid() ) );
-    }
-
-
-    /** @return index ids */
-    public UUID[] getIndexIds() {
-
-        return getIndexIds( getConnectingEntity(), getConnectedEntity().getConnectionType(),
-                getConnectedEntity().getType(), getPairedConnections().toArray( new ConnectedEntityRef[0] ) );
-    }
-
-
-    static String typeOrDefault( String type ) {
-        if ( ( type == null ) || ( type.length() == 0 ) ) {
-            return NULL_ENTITY_TYPE;
-        }
-        return type;
-    }
-
-
-    static UUID idOrDefault( UUID uuid ) {
-        if ( uuid == null ) {
-            return NULL_ID;
-        }
-        return uuid;
-    }
-
-
-    public static boolean connectionsNull( ConnectedEntityRef... pairedConnections ) {
-        if ( ( pairedConnections == null ) || ( pairedConnections.length == 0 ) ) {
-            return true;
-        }
-
-        for ( ConnectedEntityRef pairedConnection : pairedConnections ) {
-            if ( pairedConnection == null || pairedConnection.getUuid() == null || pairedConnection.getUuid().equals(
-                    NULL_ID ) ) {
-                return true;
-            }
-        }
-
-        return false;
-    }
-
-
-    public static ConnectedEntityRef[] getConnections( ConnectedEntityRef... connections ) {
-        return connections;
-    }
-
-
-    public static List<ConnectedEntityRef> getConnectionsList( ConnectedEntityRef... connections ) {
-        return Arrays.asList( connections );
-    }
-
-
-    /** @return connection id */
-    public static UUID getId( UUID connectingEntityId, String connectionType, UUID connectedEntityId ) {
-        return getId( connectingEntityId, null, null, connectionType, connectedEntityId );
-    }
-
-
-    /**
-     * Connection id is constructed from packed structure of properties strings are truncated to 16 ascii bytes.
-     * Connection id is now MD5'd into a UUID via UUID.nameUUIDFromBytes() so, technically string concatenation could be
-     * used prior to MD5
-     *
-     * @return connection id
-     */
-    public static UUID getId( UUID connectingEntityId, String pairedConnectionType, UUID pairedConnectingEntityId,
-                              String connectionType, UUID connectedEntityId ) {
-
-        EntityRef connectingEntity = ref( connectingEntityId );
-
-        ConnectedEntityRef[] pairedConnections =
-                getConnections( new ConnectedEntityRefImpl( pairedConnectionType, null, pairedConnectingEntityId ) );
-
-        ConnectedEntityRef connectedEntity = new ConnectedEntityRefImpl( connectionType, null, connectedEntityId );
-
-        return getId( connectingEntity, connectedEntity, pairedConnections );
-    }
-
-
-    public static UUID getId( EntityRef connectingEntity, ConnectedEntityRef connectedEntity,
-                              ConnectedEntityRef... pairedConnections ) {
-        UUID uuid = null;
-        try {
-
-            if ( connectionsNull( pairedConnections ) && connectionsNull( connectedEntity ) ) {
-                return connectingEntity.getUuid();
-            }
-
-            ByteArrayOutputStream byteStream = new ByteArrayOutputStream( 16 + ( 32 * pairedConnections.length ) );
-
-            byteStream.write( uuidToBytesNullOk( connectingEntity.getUuid() ) );
-
-            for ( ConnectedEntityRef connection : pairedConnections ) {
-                String connectionType = connection.getConnectionType();
-                UUID connectedEntityID = connection.getUuid();
-
-                byteStream.write( ascii( StringUtils.lowerCase( connectionType ) ) );
-                byteStream.write( uuidToBytesNullOk( connectedEntityID ) );
-            }
-
-            String connectionType = connectedEntity.getConnectionType();
-            if ( connectionType == null ) {
-                connectionType = NULL_ENTITY_TYPE;
-            }
-
-            UUID connectedEntityID = connectedEntity.getUuid();
-
-            byteStream.write( ascii( StringUtils.lowerCase( connectionType ) ) );
-            byteStream.write( uuidToBytesNullOk( connectedEntityID ) );
-
-            byte[] raw_id = byteStream.toByteArray();
-
-            // logger.info("raw connection index id: " +
-            // Hex.encodeHexString(raw_id));
-
-            uuid = UUID.nameUUIDFromBytes( raw_id );
-
-            // logger.info("connection index uuid: " + uuid);
-
-        }
-        catch ( IOException e ) {
-            logger.error( "Unable to create connection UUID", e );
-        }
-        return uuid;
-    }
-
-
-    /** @return connection index id */
-    public static UUID getIndexId( UUID connectingEntityId, String connectionType, String connectedEntityType ) {
-        return getIndexId( connectingEntityId, null, null, connectionType, connectedEntityType );
-    }
-
-
-    /** @return connection index id */
-    public static UUID getIndexId( UUID connectingEntityId, String pairedConnectionType, UUID pairedConnectingEntityId,
-                                   String connectionType, String connectedEntityType ) {
-
-        EntityRef connectingEntity = ref( connectingEntityId );
-
-        ConnectedEntityRef[] pairedConnections =
-                getConnections( new ConnectedEntityRefImpl( pairedConnectionType, null, pairedConnectingEntityId ) );
-
-        return getIndexId( connectingEntity, connectionType, connectedEntityType, pairedConnections );
-    }
-
-
-    public static UUID getIndexId( EntityRef connectingEntity, String connectionType, String connectedEntityType,
-                                   ConnectedEntityRef... pairedConnections ) {
-
-        UUID uuid = null;
-        try {
-
-            if ( connectionsNull( pairedConnections ) && ( ( connectionType == null ) && ( connectedEntityType
-                    == null ) ) ) {
-                return connectingEntity.getUuid();
-            }
-
-            ByteArrayOutputStream byteStream = new ByteArrayOutputStream( 16 + ( 32 * pairedConnections.length ) );
-
-            byteStream.write( uuidToBytesNullOk( connectingEntity.getUuid() ) );
-
-            for ( ConnectedEntityRef connection : pairedConnections ) {
-                String type = connection.getConnectionType();
-                UUID id = connection.getUuid();
-
-                byteStream.write( ascii( StringUtils.lowerCase( type ) ) );
-                byteStream.write( uuidToBytesNullOk( id ) );
-            }
-
-            if ( connectionType == null ) {
-                connectionType = NULL_ENTITY_TYPE;
-            }
-            if ( connectedEntityType == null ) {
-                connectedEntityType = NULL_ENTITY_TYPE;
-            }
-
-            byteStream.write( ascii( StringUtils.lowerCase( connectionType ) ) );
-            byteStream.write( ascii( StringUtils.lowerCase( connectedEntityType ) ) );
-
-            byte[] raw_id = byteStream.toByteArray();
-
-            logger.info( "raw connection index id: " + Hex.encodeHexString( raw_id ) );
-
-            uuid = UUID.nameUUIDFromBytes( raw_id );
-
-            logger.info( "connection index uuid: " + uuid );
-        }
-        catch ( IOException e ) {
-            logger.error( "Unable to create connection index UUID", e );
-        }
-        return uuid;
-    }
-
-
-    /** @return connection index id */
-    public static UUID getIndexId( int variant, UUID connectingEntityId, String pairedConnectionType,
-                                   UUID pairedConnectingEntityId, String connectionType, String connectedEntityType ) {
-
-        EntityRef connectingEntity = ref( connectingEntityId );
-
-        ConnectedEntityRef[] pairedConnections =
-                getConnections( new ConnectedEntityRefImpl( pairedConnectionType, null, pairedConnectingEntityId ) );
-
-        return getIndexId( variant, connectingEntity, connectionType, connectedEntityType, pairedConnections );
-    }
-
-
-    public static UUID getIndexId( int variant, EntityRef connectingEntity, String connectionType,
-                                   String connectedEntityType, ConnectedEntityRef... pairedConnections ) {
-
-        switch ( variant ) {
-
-            case ALL:
-                if ( connectionsNull( pairedConnections ) ) {
-                    return connectingEntity.getUuid();
-                }
-                else {
-                    return getIndexId( connectingEntity, null, null, pairedConnections );
-                }
-
-            case BY_ENTITY_TYPE:
-                return getIndexId( connectingEntity, null, connectedEntityType, pairedConnections );
-
-            case BY_CONNECTION_TYPE:
-                return getIndexId( connectingEntity, connectionType, null, pairedConnections );
-
-            case BY_CONNECTION_AND_ENTITY_TYPE:
-                return getIndexId( connectingEntity, connectionType, connectedEntityType, pairedConnections );
-        }
-
-        return connectingEntity.getUuid();
-    }
-
-
-    /** @return index ids */
-    public static UUID[] getIndexIds( UUID connectingEntityId, String connectionType, String connectedEntityType ) {
-        return getIndexIds( connectingEntityId, null, null, connectionType, connectedEntityType );
-    }
-
-
-    /** @return index ids */
-    public static UUID[] getIndexIds( UUID connectingEntityId, String pairedConnectionType,
-                                      UUID pairedConnectingEntityId, String connectionType,
-                                      String connectedEntityType ) {
-
-        UUID[] variants = new UUID[4];
-
-        for ( int i = 0; i < 4; i++ ) {
-            variants[i] =
-                    getIndexId( i, connectingEntityId, pairedConnectionType, pairedConnectingEntityId, connectionType,
-                            connectedEntityType );
-        }
-
-        return variants;
-    }
-
-
-    public static UUID[] getIndexIds( EntityRef connectingEntity, String connectionType, String connectedEntityType,
-                                      ConnectedEntityRef... pairedConnections ) {
-
-        UUID[] variants = new UUID[4];
-
-        for ( int i = 0; i < 4; i++ ) {
-            variants[i] = getIndexId( i, connectingEntity, connectionType, connectedEntityType, pairedConnections );
-        }
-
-        return variants;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/cassandra/CounterUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/cassandra/CounterUtils.java b/stack/core/src/main/java/org/usergrid/persistence/cassandra/CounterUtils.java
deleted file mode 100644
index 4962fb6..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/cassandra/CounterUtils.java
+++ /dev/null
@@ -1,400 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.cassandra;
-
-
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.UUID;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.usergrid.mq.Message;
-import org.usergrid.mq.cassandra.QueuesCF;
-import org.usergrid.persistence.CounterResolution;
-import org.usergrid.persistence.entities.Event;
-
-import org.apache.commons.lang.StringUtils;
-
-import org.usergrid.count.Batcher;
-import org.usergrid.count.common.Count;
-
-import me.prettyprint.cassandra.serializers.ByteBufferSerializer;
-import me.prettyprint.cassandra.serializers.LongSerializer;
-import me.prettyprint.cassandra.serializers.PrefixedSerializer;
-import me.prettyprint.cassandra.serializers.StringSerializer;
-import me.prettyprint.cassandra.serializers.UUIDSerializer;
-import me.prettyprint.hector.api.beans.HCounterColumn;
-import me.prettyprint.hector.api.mutation.Mutator;
-
-import static me.prettyprint.hector.api.factory.HFactory.createColumn;
-import static me.prettyprint.hector.api.factory.HFactory.createCounterColumn;
-import static org.usergrid.persistence.Schema.DICTIONARY_COUNTERS;
-import static org.usergrid.persistence.cassandra.ApplicationCF.APPLICATION_AGGREGATE_COUNTERS;
-import static org.usergrid.persistence.cassandra.ApplicationCF.ENTITY_COUNTERS;
-import static org.usergrid.persistence.cassandra.ApplicationCF.ENTITY_DICTIONARIES;
-import static org.usergrid.persistence.cassandra.CassandraPersistenceUtils.addInsertToMutator;
-import static org.usergrid.persistence.cassandra.CassandraPersistenceUtils.key;
-import static org.usergrid.utils.ConversionUtils.bytebuffer;
-
-
-public class CounterUtils {
-
-    public static final Logger logger = LoggerFactory.getLogger( CounterUtils.class );
-
-    public static final LongSerializer le = new LongSerializer();
-    public static final StringSerializer se = new StringSerializer();
-    public static final ByteBufferSerializer be = new ByteBufferSerializer();
-    public static final UUIDSerializer ue = new UUIDSerializer();
-
-    private String counterType = "o";
-
-    private Batcher batcher;
-
-
-    public void setBatcher( Batcher batcher ) {
-        this.batcher = batcher;
-    }
-
-
-    /** Set the type to 'new' ("n"), 'parallel' ("p"), 'old' ("o" - the default) If not one of the above, do nothing */
-    public void setCounterType( String counterType ) {
-        if ( counterType == null ) {
-            return;
-        }
-        if ( "n".equals( counterType ) || "p".equals( counterType ) || "o".equals( counterType ) ) {
-            this.counterType = counterType;
-        }
-    }
-
-
-    public boolean getIsCounterBatched() {
-        return "n".equals( counterType );
-    }
-
-
-    public static class AggregateCounterSelection {
-        public static final String COLON = ":";
-        public static final String STAR = "*";
-        String name;
-        UUID userId;
-        UUID groupId;
-        UUID queueId;
-        String category;
-
-
-        public AggregateCounterSelection( String name, UUID userId, UUID groupId, UUID queueId, String category ) {
-            this.name = name.toLowerCase();
-            this.userId = userId;
-            this.groupId = groupId;
-            this.queueId = queueId;
-            this.category = category;
-        }
-
-
-        public void apply( String name, UUID userId, UUID groupId, UUID queueId, String category ) {
-            this.name = name.toLowerCase();
-            this.userId = userId;
-            this.groupId = groupId;
-            this.queueId = queueId;
-            this.category = category;
-        }
-
-
-        public String getName() {
-            return name;
-        }
-
-
-        public void setName( String name ) {
-            this.name = name;
-        }
-
-
-        public UUID getUserId() {
-            return userId;
-        }
-
-
-        public void setUserId( UUID userId ) {
-            this.userId = userId;
-        }
-
-
-        public UUID getGroupId() {
-            return groupId;
-        }
-
-
-        public void setGroupId( UUID groupId ) {
-            this.groupId = groupId;
-        }
-
-
-        public UUID getQueueId() {
-            return queueId;
-        }
-
-
-        public void setQueueId( UUID queueId ) {
-            this.queueId = queueId;
-        }
-
-
-        public String getCategory() {
-            return category;
-        }
-
-
-        public void setCategory( String category ) {
-            this.category = category;
-        }
-
-
-        public String getRow( CounterResolution resolution ) {
-            return rowBuilder( name, userId, groupId, queueId, category, resolution );
-        }
-
-
-        public static String rowBuilder( String name, UUID userId, UUID groupId, UUID queueId, String category,
-                                         CounterResolution resolution ) {
-            StringBuilder builder = new StringBuilder( name );
-            builder.append( COLON ).append( ( userId != null ? userId.toString() : STAR ) ).append( COLON )
-                   .append( groupId != null ? groupId.toString() : STAR ).append( COLON )
-                   .append( ( queueId != null ? queueId.toString() : STAR ) ).append( COLON )
-                   .append( ( category != null ? category : STAR ) ).append( COLON ).append( resolution.name() );
-            return builder.toString();
-        }
-    }
-
-
-    public void addEventCounterMutations( Mutator<ByteBuffer> m, UUID applicationId, Event event, long timestamp ) {
-        if ( event.getCounters() != null ) {
-            for ( Entry<String, Integer> value : event.getCounters().entrySet() ) {
-                batchIncrementAggregateCounters( m, applicationId, event.getUser(), event.getGroup(), null,
-                        event.getCategory(), value.getKey().toLowerCase(), value.getValue(), event.getTimestamp(),
-                        timestamp );
-            }
-        }
-    }
-
-
-    public void addMessageCounterMutations( Mutator<ByteBuffer> m, UUID applicationId, UUID queueId, Message msg,
-                                            long timestamp ) {
-        if ( msg.getCounters() != null ) {
-            for ( Entry<String, Integer> value : msg.getCounters().entrySet() ) {
-                batchIncrementAggregateCounters( m, applicationId, null, null, queueId, msg.getCategory(),
-                        value.getKey().toLowerCase(), value.getValue(), msg.getTimestamp(), timestamp );
-            }
-        }
-    }
-
-
-    public void batchIncrementAggregateCounters( Mutator<ByteBuffer> m, UUID applicationId, UUID userId, UUID groupId,
-                                                 UUID queueId, String category, Map<String, Long> counters,
-                                                 long timestamp ) {
-        if ( counters != null ) {
-            for ( Entry<String, Long> value : counters.entrySet() ) {
-                batchIncrementAggregateCounters( m, applicationId, userId, groupId, queueId, category,
-                        value.getKey().toLowerCase(), value.getValue(), timestamp );
-            }
-        }
-    }
-
-
-    public void batchIncrementAggregateCounters( Mutator<ByteBuffer> m, UUID applicationId, UUID userId, UUID groupId,
-                                                 UUID queueId, String category, String name, long value,
-                                                 long cassandraTimestamp ) {
-        batchIncrementAggregateCounters( m, applicationId, userId, groupId, queueId, category, name, value,
-                cassandraTimestamp / 1000, cassandraTimestamp );
-    }
-
-
-    public void batchIncrementAggregateCounters( Mutator<ByteBuffer> m, UUID applicationId, UUID userId, UUID groupId,
-                                                 UUID queueId, String category, String name, long value,
-                                                 long counterTimestamp, long cassandraTimestamp ) {
-        for ( CounterResolution resolution : CounterResolution.values() ) {
-            logger.debug( "BIAC for resolution {}", resolution );
-            batchIncrementAggregateCounters( m, userId, groupId, queueId, category, resolution, name, value,
-                    counterTimestamp, applicationId );
-            logger.debug( "DONE BIAC for resolution {}", resolution );
-        }
-        batchIncrementEntityCounter( m, applicationId, name, value, cassandraTimestamp, applicationId );
-        if ( userId != null ) {
-            batchIncrementEntityCounter( m, userId, name, value, cassandraTimestamp, applicationId );
-        }
-        if ( groupId != null ) {
-            batchIncrementEntityCounter( m, groupId, name, value, cassandraTimestamp, applicationId );
-        }
-    }
-
-
-    private void batchIncrementAggregateCounters( Mutator<ByteBuffer> m, UUID userId, UUID groupId, UUID queueId,
-                                                  String category, CounterResolution resolution, String name,
-                                                  long value, long counterTimestamp, UUID applicationId ) {
-
-        String[] segments = StringUtils.split( name, '.' );
-        for ( int j = 0; j < segments.length; j++ ) {
-            name = StringUtils.join( segments, '.', 0, j + 1 );
-            // skip system counter
-            if ( "system".equals( name ) ) {
-                continue;
-            }
-
-            // *:*:*:*
-            handleAggregateCounterRow( m,
-                    AggregateCounterSelection.rowBuilder( name, null, null, null, null, resolution ),
-                    resolution.round( counterTimestamp ), value, applicationId );
-            String currentRow = null;
-            HashSet<String> rowSet = new HashSet<String>( 16 );
-            for ( int i = 0; i < 16; i++ ) {
-
-                boolean include_user = ( i & 0x01 ) != 0;
-                boolean include_group = ( i & 0x02 ) != 0;
-                boolean include_queue = ( i & 0x04 ) != 0;
-                boolean include_category = ( i & 0x08 ) != 0;
-
-                Object[] parameters = {
-                        include_user ? userId : null, include_group ? groupId : null, include_queue ? queueId : null,
-                        include_category ? category : null
-                };
-                int non_null = 0;
-                for ( Object p : parameters ) {
-                    if ( p != null ) {
-                        non_null++;
-                    }
-                }
-                currentRow = AggregateCounterSelection
-                        .rowBuilder( name, ( UUID ) parameters[0], ( UUID ) parameters[1], ( UUID ) parameters[2],
-                                ( String ) parameters[3], resolution );
-
-                if ( non_null > 0 && !rowSet.contains( currentRow ) ) {
-                    rowSet.add( currentRow );
-                    handleAggregateCounterRow( m, currentRow, resolution.round( counterTimestamp ), value,
-                            applicationId );
-                }
-            }
-        }
-    }
-
-
-    private void handleAggregateCounterRow( Mutator<ByteBuffer> m, String key, long column, long value,
-                                            UUID applicationId ) {
-        if ( logger.isDebugEnabled() ) {
-            logger.info( "HACR: aggregateRow for app {} with key {} column {} and value {}",
-                    new Object[] { applicationId, key, column, value } );
-        }
-        if ( "o".equals( counterType ) || "p".equals( counterType ) ) {
-            if ( m != null ) {
-                HCounterColumn<Long> c = createCounterColumn( column, value, le );
-                m.addCounter( bytebuffer( key ), APPLICATION_AGGREGATE_COUNTERS.toString(), c );
-            }
-        }
-        if ( "n".equals( counterType ) || "p".equals( counterType ) ) {
-            // create and add Count
-            PrefixedSerializer ps =
-                    new PrefixedSerializer( applicationId, UUIDSerializer.get(), StringSerializer.get() );
-            batcher.add(
-                    new Count( APPLICATION_AGGREGATE_COUNTERS.toString(), ps.toByteBuffer( key ), column, value ) );
-        }
-    }
-
-
-    public AggregateCounterSelection getAggregateCounterSelection( String name, UUID userId, UUID groupId, UUID queueId,
-                                                                   String category ) {
-        return new AggregateCounterSelection( name, userId, groupId, queueId, category );
-    }
-
-
-    public String getAggregateCounterRow( String name, UUID userId, UUID groupId, UUID queueId, String category,
-                                          CounterResolution resolution ) {
-        return AggregateCounterSelection.rowBuilder( name, userId, groupId, queueId, category, resolution );
-    }
-
-
-    public List<String> getAggregateCounterRows( List<AggregateCounterSelection> selections,
-                                                 CounterResolution resolution ) {
-        List<String> keys = new ArrayList<String>();
-        for ( AggregateCounterSelection selection : selections ) {
-            keys.add( selection.getRow( resolution ) );
-        }
-        return keys;
-    }
-
-
-    private Mutator<ByteBuffer> batchIncrementEntityCounter( Mutator<ByteBuffer> m, UUID entityId, String name,
-                                                             Long value, long timestamp, UUID applicationId ) {
-        if ( logger.isDebugEnabled() ) {
-            logger.debug( "BIEC: Incrementing property {} of entity {} by value {}",
-                    new Object[] { name, entityId, value } );
-        }
-        addInsertToMutator( m, ENTITY_DICTIONARIES, key( entityId, DICTIONARY_COUNTERS ), name, null, timestamp );
-        if ( "o".equals( counterType ) || "p".equals( counterType ) ) {
-            HCounterColumn<String> c = createCounterColumn( name, value );
-            m.addCounter( bytebuffer( entityId ), ENTITY_COUNTERS.toString(), c );
-        }
-        if ( "n".equals( counterType ) || "p".equals( counterType ) ) {
-            PrefixedSerializer ps = new PrefixedSerializer( applicationId, UUIDSerializer.get(), UUIDSerializer.get() );
-            batcher.add( new Count( ENTITY_COUNTERS.toString(), ps.toByteBuffer( entityId ), name, value ) );
-        }
-        return m;
-    }
-
-
-    public Mutator<ByteBuffer> batchIncrementQueueCounter( Mutator<ByteBuffer> m, UUID queueId, String name, long value,
-                                                           long timestamp, UUID applicationId ) {
-        if ( logger.isDebugEnabled() ) {
-            logger.debug( "BIQC: Incrementing property {} of queue {} by value {}",
-                    new Object[] { name, queueId, value } );
-        }
-        m.addInsertion( bytebuffer( key( queueId, DICTIONARY_COUNTERS ).toString() ),
-                QueuesCF.QUEUE_DICTIONARIES.toString(),
-                createColumn( name, ByteBuffer.allocate( 0 ), timestamp, se, be ) );
-        if ( "o".equals( counterType ) || "p".equals( counterType ) ) {
-            HCounterColumn<String> c = createCounterColumn( name, value );
-            ByteBuffer keybytes = bytebuffer( queueId );
-            m.addCounter( keybytes, QueuesCF.COUNTERS.toString(), c );
-        }
-        if ( "n".equals( counterType ) || "p".equals( counterType ) ) {
-            PrefixedSerializer ps = new PrefixedSerializer( applicationId, UUIDSerializer.get(), UUIDSerializer.get() );
-            batcher.add( new Count( QueuesCF.COUNTERS.toString(), ps.toByteBuffer( queueId ), name, value ) );
-        }
-        return m;
-    }
-
-
-    public Mutator<ByteBuffer> batchIncrementQueueCounters( Mutator<ByteBuffer> m, UUID queueId,
-                                                            Map<String, Long> values, long timestamp,
-                                                            UUID applicationId ) {
-        for ( Entry<String, Long> entry : values.entrySet() ) {
-            batchIncrementQueueCounter( m, queueId, entry.getKey(), entry.getValue(), timestamp, applicationId );
-        }
-        return m;
-    }
-
-
-    public Mutator<ByteBuffer> batchIncrementQueueCounters( Mutator<ByteBuffer> m, Map<UUID, Map<String, Long>> values,
-                                                            long timestamp, UUID applicationId ) {
-        for ( Entry<UUID, Map<String, Long>> entry : values.entrySet() ) {
-            batchIncrementQueueCounters( m, entry.getKey(), entry.getValue(), timestamp, applicationId );
-        }
-        return m;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/cassandra/CursorCache.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/cassandra/CursorCache.java b/stack/core/src/main/java/org/usergrid/persistence/cassandra/CursorCache.java
deleted file mode 100644
index 7b29a2b..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/cassandra/CursorCache.java
+++ /dev/null
@@ -1,121 +0,0 @@
-package org.usergrid.persistence.cassandra;
-
-
-import java.nio.ByteBuffer;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import static java.lang.Integer.parseInt;
-
-import static org.apache.commons.codec.binary.Base64.decodeBase64;
-import static org.apache.commons.codec.binary.Base64.encodeBase64URLSafeString;
-import static org.apache.commons.lang.StringUtils.split;
-import static org.usergrid.utils.ConversionUtils.bytes;
-
-
-/**
- * Internal cursor parsing
- *
- * @author tnine
- */
-public class CursorCache {
-
-    private Map<Integer, ByteBuffer> cursors = new HashMap<Integer, ByteBuffer>();
-
-
-    public CursorCache() {
-
-    }
-
-
-    /** Create a new cursor cache from the string if passed */
-    public CursorCache( String cursorString ) {
-
-        if ( cursorString == null ) {
-            return;
-        }
-
-        String decoded = new String( decodeBase64( cursorString ) );
-
-        // nothing to do
-        if ( decoded.indexOf( ':' ) < 0 ) {
-            return;
-        }
-
-        String[] cursorTokens = split( decoded, '|' );
-
-        for ( String c : cursorTokens ) {
-
-            String[] parts = split( c, ':' );
-
-            if ( parts.length >= 1 ) {
-
-                int hashCode = parseInt( parts[0] );
-
-                ByteBuffer cursorBytes = null;
-
-                if ( parts.length == 2 ) {
-                    cursorBytes = ByteBuffer.wrap( decodeBase64( parts[1] ) );
-                }
-                else {
-                    cursorBytes = ByteBuffer.allocate( 0 );
-                }
-
-                cursors.put( hashCode, cursorBytes );
-            }
-        }
-    }
-
-
-    /** Set the cursor with the given hash and the new byte buffer */
-    public void setNextCursor( int sliceHash, ByteBuffer newCursor ) {
-        cursors.put( sliceHash, newCursor );
-    }
-
-
-    /** Get the cursor by the hashcode of the slice */
-    public ByteBuffer getCursorBytes( int sliceHash ) {
-        return cursors.get( sliceHash );
-    }
-
-
-    /** Turn the cursor cache into a string */
-    public String asString() {
-        /**
-         * No cursors to return
-         */
-        if ( cursors.size() == 0 ) {
-            return null;
-        }
-
-        StringBuffer buff = new StringBuffer();
-
-        int nullCount = 0;
-        ByteBuffer value = null;
-
-        for ( Entry<Integer, ByteBuffer> entry : cursors.entrySet() ) {
-            value = entry.getValue();
-
-            buff.append( entry.getKey() );
-            buff.append( ":" );
-            buff.append( encodeBase64URLSafeString( bytes( value ) ) );
-            buff.append( "|" );
-
-            // this range was empty, mark it as a null
-            if ( value == null || value.remaining() == 0 ) {
-                nullCount++;
-            }
-        }
-
-        // all cursors are complete, return null
-        if ( nullCount == cursors.size() ) {
-            return null;
-        }
-
-        // trim off the last pipe
-        buff.setLength( buff.length() - 1 );
-
-        return encodeBase64URLSafeString( buff.toString().getBytes() );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/cassandra/EntityManagerFactoryImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/cassandra/EntityManagerFactoryImpl.java b/stack/core/src/main/java/org/usergrid/persistence/cassandra/EntityManagerFactoryImpl.java
deleted file mode 100644
index 1868f9a..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/cassandra/EntityManagerFactoryImpl.java
+++ /dev/null
@@ -1,411 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.cassandra;
-
-
-import java.nio.ByteBuffer;
-import java.util.Map;
-import java.util.TreeMap;
-import java.util.UUID;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.BeansException;
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.ApplicationContextAware;
-import org.usergrid.persistence.DynamicEntity;
-import org.usergrid.persistence.EntityManager;
-import org.usergrid.persistence.EntityManagerFactory;
-import org.usergrid.persistence.entities.Application;
-import org.usergrid.persistence.exceptions.ApplicationAlreadyExistsException;
-import org.usergrid.utils.UUIDUtils;
-
-import org.apache.commons.lang.StringUtils;
-
-import com.google.common.cache.CacheBuilder;
-import com.google.common.cache.CacheLoader;
-import com.google.common.cache.LoadingCache;
-import com.yammer.metrics.annotation.Metered;
-
-import me.prettyprint.cassandra.serializers.ByteBufferSerializer;
-import me.prettyprint.cassandra.serializers.BytesArraySerializer;
-import me.prettyprint.cassandra.serializers.DynamicCompositeSerializer;
-import me.prettyprint.cassandra.serializers.LongSerializer;
-import me.prettyprint.cassandra.serializers.StringSerializer;
-import me.prettyprint.cassandra.serializers.UUIDSerializer;
-import me.prettyprint.hector.api.Keyspace;
-import me.prettyprint.hector.api.beans.ColumnSlice;
-import me.prettyprint.hector.api.beans.HColumn;
-import me.prettyprint.hector.api.beans.OrderedRows;
-import me.prettyprint.hector.api.beans.Row;
-import me.prettyprint.hector.api.beans.Rows;
-import me.prettyprint.hector.api.mutation.Mutator;
-import me.prettyprint.hector.api.query.QueryResult;
-import me.prettyprint.hector.api.query.RangeSlicesQuery;
-
-import static java.lang.String.CASE_INSENSITIVE_ORDER;
-
-import static me.prettyprint.hector.api.factory.HFactory.createMutator;
-import static me.prettyprint.hector.api.factory.HFactory.createRangeSlicesQuery;
-import static org.usergrid.persistence.Schema.PROPERTY_NAME;
-import static org.usergrid.persistence.Schema.PROPERTY_UUID;
-import static org.usergrid.persistence.Schema.TYPE_APPLICATION;
-import static org.usergrid.persistence.cassandra.CassandraPersistenceUtils.addInsertToMutator;
-import static org.usergrid.persistence.cassandra.CassandraPersistenceUtils.asMap;
-import static org.usergrid.persistence.cassandra.CassandraPersistenceUtils.batchExecute;
-import static org.usergrid.persistence.cassandra.CassandraService.APPLICATIONS_CF;
-import static org.usergrid.persistence.cassandra.CassandraService.PROPERTIES_CF;
-import static org.usergrid.persistence.cassandra.CassandraService.RETRY_COUNT;
-import static org.usergrid.utils.ConversionUtils.uuid;
-
-
-/**
- * Cassandra-specific implementation of Datastore
- *
- * @author edanuff
- */
-public class EntityManagerFactoryImpl implements EntityManagerFactory, ApplicationContextAware {
-
-    private static final Logger logger = LoggerFactory.getLogger( EntityManagerFactoryImpl.class );
-
-    public static String IMPLEMENTATION_DESCRIPTION = "Cassandra Entity Manager Factory 1.0";
-
-    public static final Class<DynamicEntity> APPLICATION_ENTITY_CLASS = DynamicEntity.class;
-
-    public static final StringSerializer se = new StringSerializer();
-    public static final ByteBufferSerializer be = new ByteBufferSerializer();
-    public static final UUIDSerializer ue = new UUIDSerializer();
-    public static final BytesArraySerializer bae = new BytesArraySerializer();
-    public static final DynamicCompositeSerializer dce = new DynamicCompositeSerializer();
-    public static final LongSerializer le = new LongSerializer();
-
-    ApplicationContext applicationContext;
-
-    CassandraService cass;
-    CounterUtils counterUtils;
-
-    private boolean skipAggregateCounters;
-
-    private LoadingCache<UUID, EntityManager> entityManagers =
-            CacheBuilder.newBuilder().maximumSize( 100 ).build( new CacheLoader<UUID, EntityManager>() {
-                public EntityManager load( UUID appId ) { // no checked exception
-                    return _getEntityManager( appId );
-                }
-            } );
-
-
-    /**
-     * Must be constructed with a CassandraClientPool.
-     *
-     * @param cass the cassandraService instance
-     */
-    public EntityManagerFactoryImpl( CassandraService cass, CounterUtils counterUtils, boolean skipAggregateCounters ) {
-        this.cass = cass;
-        this.counterUtils = counterUtils;
-        this.skipAggregateCounters = skipAggregateCounters;
-        if ( skipAggregateCounters ) {
-            logger.warn( "NOTE: Counters have been disabled by configuration..." );
-        }
-    }
-
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.usergrid.core.Datastore#getImpementationDescription()
-     */
-    @Override
-    public String getImpementationDescription() {
-        return IMPLEMENTATION_DESCRIPTION;
-    }
-
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.usergrid.core.Datastore#getEntityDao(java.util.UUID,
-     * java.util.UUID)
-     */
-    @Override
-    public EntityManager getEntityManager( UUID applicationId ) {
-        try {
-            return entityManagers.get( applicationId );
-        }
-        catch ( Exception ex ) {
-            ex.printStackTrace();
-        }
-        return _getEntityManager( applicationId );
-    }
-
-
-    private EntityManager _getEntityManager( UUID applicationId ) {
-        //EntityManagerImpl em = new EntityManagerImpl();
-        EntityManager em = applicationContext.getBean( "entityManager", EntityManager.class );
-        //em.init(this,cass,counterUtils,applicationId, skipAggregateCounters);
-        em.setApplicationId( applicationId );
-        return em;
-    }
-
-
-    public ApplicationContext getApplicationContext() {
-        return applicationContext;
-    }
-
-
-    /**
-     * Gets the setup.
-     *
-     * @return Setup helper
-     */
-    public Setup getSetup() {
-        return new Setup( this, cass );
-    }
-
-
-    @Override
-    public void setup() throws Exception {
-        Setup setup = getSetup();
-
-        setup.setup();
-
-
-        if ( cass.getPropertiesMap() != null ) {
-            updateServiceProperties( cass.getPropertiesMap() );
-        }
-    }
-
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.usergrid.core.Datastore#createApplication(java.lang.String)
-     */
-    @Override
-    public UUID createApplication( String organization, String name ) throws Exception {
-        return createApplication( organization, name, null );
-    }
-
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.usergrid.core.Datastore#createApplication(java.lang.String,
-     * java.util.Map)
-     */
-    @Override
-    public UUID createApplication( String organizationName, String name, Map<String, Object> properties )
-            throws Exception {
-
-        String appName = buildAppName( organizationName, name );
-
-        HColumn<String, ByteBuffer> column =
-                cass.getColumn( cass.getSystemKeyspace(), APPLICATIONS_CF, appName, PROPERTY_UUID );
-        if ( column != null ) {
-            throw new ApplicationAlreadyExistsException( name );
-            // UUID uuid = uuid(column.getValue());
-            // return uuid;
-        }
-
-        UUID applicationId = UUIDUtils.newTimeUUID();
-        logger.info( "New application id " + applicationId.toString() );
-
-        initializeApplication( organizationName, applicationId, appName, properties );
-
-        return applicationId;
-    }
-
-
-    private String buildAppName( String organizationName, String name ) {
-        return StringUtils.lowerCase( name.contains( "/" ) ? name : organizationName + "/" + name );
-    }
-
-
-    public UUID initializeApplication( String organizationName, UUID applicationId, String name,
-                                       Map<String, Object> properties ) throws Exception {
-
-        String appName = buildAppName( organizationName, name );
-        // check for pre-existing
-        if ( lookupApplication( appName ) != null ) {
-            throw new ApplicationAlreadyExistsException( appName );
-        }
-        if ( properties == null ) {
-            properties = new TreeMap<String, Object>( CASE_INSENSITIVE_ORDER );
-        }
-
-        properties.put( PROPERTY_NAME, appName );
-
-        getSetup().setupApplicationKeyspace( applicationId, appName );
-
-
-        Keyspace ko = cass.getSystemKeyspace();
-        Mutator<ByteBuffer> m = createMutator( ko, be );
-
-        long timestamp = cass.createTimestamp();
-
-        addInsertToMutator( m, APPLICATIONS_CF, appName, PROPERTY_UUID, applicationId, timestamp );
-        addInsertToMutator( m, APPLICATIONS_CF, appName, PROPERTY_NAME, appName, timestamp );
-
-        batchExecute( m, RETRY_COUNT );
-
-        EntityManager em = getEntityManager( applicationId );
-        em.create( TYPE_APPLICATION, APPLICATION_ENTITY_CLASS, properties );
-
-        em.resetRoles();
-
-        return applicationId;
-    }
-
-
-    @Override
-    public UUID importApplication( String organizationName, UUID applicationId, String name,
-                                   Map<String, Object> properties ) throws Exception {
-
-        name = buildAppName( organizationName, name );
-
-        HColumn<String, ByteBuffer> column =
-                cass.getColumn( cass.getSystemKeyspace(), APPLICATIONS_CF, name, PROPERTY_UUID );
-        if ( column != null ) {
-            throw new ApplicationAlreadyExistsException( name );
-            // UUID uuid = uuid(column.getValue());
-            // return uuid;
-        }
-
-        return initializeApplication( organizationName, applicationId, name, properties );
-    }
-
-
-    @Override
-    @Metered(group = "core", name = "EntityManagerFactory_lookupApplication_byName")
-    public UUID lookupApplication( String name ) throws Exception {
-        name = name.toLowerCase();
-        HColumn<String, ByteBuffer> column =
-                cass.getColumn( cass.getSystemKeyspace(), APPLICATIONS_CF, name, PROPERTY_UUID );
-        if ( column != null ) {
-            UUID uuid = uuid( column.getValue() );
-            return uuid;
-        }
-        return null;
-    }
-
-
-    /**
-     * Gets the application.
-     *
-     * @param name the name
-     *
-     * @return application for name
-     *
-     * @throws Exception the exception
-     */
-    @Metered(group = "core", name = "EntityManagerFactory_getApplication")
-    public Application getApplication( String name ) throws Exception {
-        name = name.toLowerCase();
-        HColumn<String, ByteBuffer> column =
-                cass.getColumn( cass.getSystemKeyspace(), APPLICATIONS_CF, name, PROPERTY_UUID );
-        if ( column == null ) {
-            return null;
-        }
-
-        UUID applicationId = uuid( column.getValue() );
-
-        EntityManager em = getEntityManager( applicationId );
-        return ( ( EntityManagerImpl ) em ).getEntity( applicationId, Application.class );
-    }
-
-
-    @Override
-    public Map<String, UUID> getApplications() throws Exception {
-        Map<String, UUID> applications = new TreeMap<String, UUID>( CASE_INSENSITIVE_ORDER );
-        Keyspace ko = cass.getSystemKeyspace();
-        RangeSlicesQuery<String, String, UUID> q = createRangeSlicesQuery( ko, se, se, ue );
-        q.setKeys( "", "\uFFFF" );
-        q.setColumnFamily( APPLICATIONS_CF );
-        q.setColumnNames( PROPERTY_UUID );
-        q.setRowCount( 10000 );
-        QueryResult<OrderedRows<String, String, UUID>> r = q.execute();
-        Rows<String, String, UUID> rows = r.get();
-        for ( Row<String, String, UUID> row : rows ) {
-            ColumnSlice<String, UUID> slice = row.getColumnSlice();
-            HColumn<String, UUID> column = slice.getColumnByName( PROPERTY_UUID );
-            applications.put( row.getKey(), column.getValue() );
-        }
-        return applications;
-    }
-
-
-    @Override
-    public boolean setServiceProperty( String name, String value ) {
-        try {
-            cass.setColumn( cass.getSystemKeyspace(), PROPERTIES_CF, PROPERTIES_CF, name, value );
-            return true;
-        }
-        catch ( Exception e ) {
-            logger.error( "Unable to set property " + name + ": " + e.getMessage() );
-        }
-        return false;
-    }
-
-
-    @Override
-    public boolean deleteServiceProperty( String name ) {
-        try {
-            cass.deleteColumn( cass.getSystemKeyspace(), PROPERTIES_CF, PROPERTIES_CF, name );
-            return true;
-        }
-        catch ( Exception e ) {
-            logger.error( "Unable to delete property " + name + ": " + e.getMessage() );
-        }
-        return false;
-    }
-
-
-    @Override
-    public boolean updateServiceProperties( Map<String, String> properties ) {
-        try {
-            cass.setColumns( cass.getSystemKeyspace(), PROPERTIES_CF, PROPERTIES_CF.getBytes(), properties );
-            return true;
-        }
-        catch ( Exception e ) {
-            logger.error( "Unable to update properties: " + e.getMessage() );
-        }
-        return false;
-    }
-
-
-    @Override
-    public Map<String, String> getServiceProperties() {
-        Map<String, String> properties = null;
-        try {
-            properties = asMap( cass.getAllColumns( cass.getSystemKeyspace(), PROPERTIES_CF, PROPERTIES_CF, se, se ) );
-            return properties;
-        }
-        catch ( Exception e ) {
-            logger.error( "Unable to load properties: " + e.getMessage() );
-        }
-        return null;
-    }
-
-
-    @Override
-    public void setApplicationContext( ApplicationContext applicationContext ) throws BeansException {
-        this.applicationContext = applicationContext;
-    }
-
-
-    public void setCounterUtils( CounterUtils counterUtils ) {
-        this.counterUtils = counterUtils;
-    }
-}


[79/96] [abbrv] USERGRID-2 package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/utils/UrlUtils.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/utils/UrlUtils.html b/sdks/android/doc/org/usergrid/android/client/utils/UrlUtils.html
index 8ad714d..5291a91 100644
--- a/sdks/android/doc/org/usergrid/android/client/utils/UrlUtils.html
+++ b/sdks/android/doc/org/usergrid/android/client/utils/UrlUtils.html
@@ -55,7 +55,7 @@ function windowTitle()
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.usergrid.android.client.utils"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.apache.usergrid.android.client.utils"><B>PREV CLASS</B></A>&nbsp;
 &nbsp;NEXT CLASS</FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/utils/UrlUtils.html" target="_top"><B>FRAMES</B></A>  &nbsp;
@@ -88,12 +88,12 @@ DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&n
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client.utils</FONT>
+org.apache.usergrid.android.client.utils</FONT>
 <BR>
 Class UrlUtils</H2>
 <PRE>
 java.lang.Object
-  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.usergrid.android.client.utils.UrlUtils</B>
+  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.usergrid.android.client.utils.UrlUtils</B>
 </PRE>
 <HR>
 <DL>
@@ -297,7 +297,7 @@ public static java.lang.String <B>addQueryParams</B>(java.lang.String&nbsp;url,
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.usergrid.android.client.utils"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.apache.usergrid.android.client.utils"><B>PREV CLASS</B></A>&nbsp;
 &nbsp;NEXT CLASS</FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/utils/UrlUtils.html" target="_top"><B>FRAMES</B></A>  &nbsp;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/utils/class-use/DeviceUuidFactory.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/utils/class-use/DeviceUuidFactory.html b/sdks/android/doc/org/usergrid/android/client/utils/class-use/DeviceUuidFactory.html
index 5f85463..3e92925 100644
--- a/sdks/android/doc/org/usergrid/android/client/utils/class-use/DeviceUuidFactory.html
+++ b/sdks/android/doc/org/usergrid/android/client/utils/class-use/DeviceUuidFactory.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Class org.usergrid.android.client.utils.DeviceUuidFactory
+Uses of Class org.apache.usergrid.android.client.utils.DeviceUuidFactory
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Class org.usergrid.android.client.utils.DeviceUuidFactory
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Class org.usergrid.android.client.utils.DeviceUuidFactory";
+        parent.document.title="Uses of Class org.apache.usergrid.android.client.utils.DeviceUuidFactory";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/utils/DeviceUuidFactory.html" title="class in org.usergrid.android.client.utils"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/utils/DeviceUuidFactory.html" title="class in org.apache.usergrid.android.client.utils"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,9 +81,9 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Class<br>org.usergrid.android.client.utils.DeviceUuidFactory</B></H2>
+<B>Uses of Class<br>org.apache.usergrid.android.client.utils.DeviceUuidFactory</B></H2>
 </CENTER>
-No usage of org.usergrid.android.client.utils.DeviceUuidFactory
+No usage of org.apache.usergrid.android.client.utils.DeviceUuidFactory
 <P>
 <HR>
 
@@ -99,7 +99,7 @@ No usage of org.usergrid.android.client.utils.DeviceUuidFactory
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/utils/DeviceUuidFactory.html" title="class in org.usergrid.android.client.utils"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/utils/DeviceUuidFactory.html" title="class in org.apache.usergrid.android.client.utils"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/utils/class-use/JsonUtils.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/utils/class-use/JsonUtils.html b/sdks/android/doc/org/usergrid/android/client/utils/class-use/JsonUtils.html
index fe4cbf8..d3d1c0a 100644
--- a/sdks/android/doc/org/usergrid/android/client/utils/class-use/JsonUtils.html
+++ b/sdks/android/doc/org/usergrid/android/client/utils/class-use/JsonUtils.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Class org.usergrid.android.client.utils.JsonUtils
+Uses of Class org.apache.usergrid.android.client.utils.JsonUtils
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Class org.usergrid.android.client.utils.JsonUtils
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Class org.usergrid.android.client.utils.JsonUtils";
+        parent.document.title="Uses of Class org.apache.usergrid.android.client.utils.JsonUtils";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.usergrid.android.client.utils"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.apache.usergrid.android.client.utils"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,9 +81,9 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Class<br>org.usergrid.android.client.utils.JsonUtils</B></H2>
+<B>Uses of Class<br>org.apache.usergrid.android.client.utils.JsonUtils</B></H2>
 </CENTER>
-No usage of org.usergrid.android.client.utils.JsonUtils
+No usage of org.apache.usergrid.android.client.utils.JsonUtils
 <P>
 <HR>
 
@@ -99,7 +99,7 @@ No usage of org.usergrid.android.client.utils.JsonUtils
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.usergrid.android.client.utils"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.apache.usergrid.android.client.utils"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/utils/class-use/MapUtils.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/utils/class-use/MapUtils.html b/sdks/android/doc/org/usergrid/android/client/utils/class-use/MapUtils.html
index 8fe5aec..b5a94a0 100644
--- a/sdks/android/doc/org/usergrid/android/client/utils/class-use/MapUtils.html
+++ b/sdks/android/doc/org/usergrid/android/client/utils/class-use/MapUtils.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Class org.usergrid.android.client.utils.MapUtils
+Uses of Class org.apache.usergrid.android.client.utils.MapUtils
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Class org.usergrid.android.client.utils.MapUtils
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Class org.usergrid.android.client.utils.MapUtils";
+        parent.document.title="Uses of Class org.apache.usergrid.android.client.utils.MapUtils";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/utils/MapUtils.html" title="class in org.usergrid.android.client.utils"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/utils/MapUtils.html" title="class in org.apache.usergrid.android.client.utils"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,9 +81,9 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Class<br>org.usergrid.android.client.utils.MapUtils</B></H2>
+<B>Uses of Class<br>org.apache.usergrid.android.client.utils.MapUtils</B></H2>
 </CENTER>
-No usage of org.usergrid.android.client.utils.MapUtils
+No usage of org.apache.usergrid.android.client.utils.MapUtils
 <P>
 <HR>
 
@@ -99,7 +99,7 @@ No usage of org.usergrid.android.client.utils.MapUtils
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/utils/MapUtils.html" title="class in org.usergrid.android.client.utils"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/utils/MapUtils.html" title="class in org.apache.usergrid.android.client.utils"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/utils/class-use/ObjectUtils.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/utils/class-use/ObjectUtils.html b/sdks/android/doc/org/usergrid/android/client/utils/class-use/ObjectUtils.html
index 161fca8..2d19ee4 100644
--- a/sdks/android/doc/org/usergrid/android/client/utils/class-use/ObjectUtils.html
+++ b/sdks/android/doc/org/usergrid/android/client/utils/class-use/ObjectUtils.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Class org.usergrid.android.client.utils.ObjectUtils
+Uses of Class org.apache.usergrid.android.client.utils.ObjectUtils
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Class org.usergrid.android.client.utils.ObjectUtils
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Class org.usergrid.android.client.utils.ObjectUtils";
+        parent.document.title="Uses of Class org.apache.usergrid.android.client.utils.ObjectUtils";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.usergrid.android.client.utils"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.apache.usergrid.android.client.utils"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,9 +81,9 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Class<br>org.usergrid.android.client.utils.ObjectUtils</B></H2>
+<B>Uses of Class<br>org.apache.usergrid.android.client.utils.ObjectUtils</B></H2>
 </CENTER>
-No usage of org.usergrid.android.client.utils.ObjectUtils
+No usage of org.apache.usergrid.android.client.utils.ObjectUtils
 <P>
 <HR>
 
@@ -99,7 +99,7 @@ No usage of org.usergrid.android.client.utils.ObjectUtils
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.usergrid.android.client.utils"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.apache.usergrid.android.client.utils"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/utils/class-use/UrlUtils.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/utils/class-use/UrlUtils.html b/sdks/android/doc/org/usergrid/android/client/utils/class-use/UrlUtils.html
index eed0b13..302784e 100644
--- a/sdks/android/doc/org/usergrid/android/client/utils/class-use/UrlUtils.html
+++ b/sdks/android/doc/org/usergrid/android/client/utils/class-use/UrlUtils.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Class org.usergrid.android.client.utils.UrlUtils
+Uses of Class org.apache.usergrid.android.client.utils.UrlUtils
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Class org.usergrid.android.client.utils.UrlUtils
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Class org.usergrid.android.client.utils.UrlUtils";
+        parent.document.title="Uses of Class org.apache.usergrid.android.client.utils.UrlUtils";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/utils/UrlUtils.html" title="class in org.usergrid.android.client.utils"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/utils/UrlUtils.html" title="class in org.apache.usergrid.android.client.utils"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,9 +81,9 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Class<br>org.usergrid.android.client.utils.UrlUtils</B></H2>
+<B>Uses of Class<br>org.apache.usergrid.android.client.utils.UrlUtils</B></H2>
 </CENTER>
-No usage of org.usergrid.android.client.utils.UrlUtils
+No usage of org.apache.usergrid.android.client.utils.UrlUtils
 <P>
 <HR>
 
@@ -99,7 +99,7 @@ No usage of org.usergrid.android.client.utils.UrlUtils
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/utils/UrlUtils.html" title="class in org.usergrid.android.client.utils"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/utils/UrlUtils.html" title="class in org.apache.usergrid.android.client.utils"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/utils/package-frame.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/utils/package-frame.html b/sdks/android/doc/org/usergrid/android/client/utils/package-frame.html
index 2924edf..bbffdf3 100644
--- a/sdks/android/doc/org/usergrid/android/client/utils/package-frame.html
+++ b/sdks/android/doc/org/usergrid/android/client/utils/package-frame.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-org.usergrid.android.client.utils
+org.apache.usergrid.android.client.utils
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -16,22 +16,22 @@ org.usergrid.android.client.utils
 
 <BODY BGCOLOR="white">
 <FONT size="+1" CLASS="FrameTitleFont">
-<A HREF="../../../../../org/usergrid/android/client/utils/package-summary.html" target="classFrame">org.usergrid.android.client.utils</A></FONT>
+<A HREF="../../../../../org/usergrid/android/client/utils/package-summary.html" target="classFrame">org.apache.usergrid.android.client.utils</A></FONT>
 <TABLE BORDER="0" WIDTH="100%" SUMMARY="">
 <TR>
 <TD NOWRAP><FONT size="+1" CLASS="FrameHeadingFont">
 Classes</FONT>&nbsp;
 <FONT CLASS="FrameItemFont">
 <BR>
-<A HREF="DeviceUuidFactory.html" title="class in org.usergrid.android.client.utils" target="classFrame">DeviceUuidFactory</A>
+<A HREF="DeviceUuidFactory.html" title="class in org.apache.usergrid.android.client.utils" target="classFrame">DeviceUuidFactory</A>
 <BR>
-<A HREF="JsonUtils.html" title="class in org.usergrid.android.client.utils" target="classFrame">JsonUtils</A>
+<A HREF="JsonUtils.html" title="class in org.apache.usergrid.android.client.utils" target="classFrame">JsonUtils</A>
 <BR>
-<A HREF="MapUtils.html" title="class in org.usergrid.android.client.utils" target="classFrame">MapUtils</A>
+<A HREF="MapUtils.html" title="class in org.apache.usergrid.android.client.utils" target="classFrame">MapUtils</A>
 <BR>
-<A HREF="ObjectUtils.html" title="class in org.usergrid.android.client.utils" target="classFrame">ObjectUtils</A>
+<A HREF="ObjectUtils.html" title="class in org.apache.usergrid.android.client.utils" target="classFrame">ObjectUtils</A>
 <BR>
-<A HREF="UrlUtils.html" title="class in org.usergrid.android.client.utils" target="classFrame">UrlUtils</A></FONT></TD>
+<A HREF="UrlUtils.html" title="class in org.apache.usergrid.android.client.utils" target="classFrame">UrlUtils</A></FONT></TD>
 </TR>
 </TABLE>
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/utils/package-summary.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/utils/package-summary.html b/sdks/android/doc/org/usergrid/android/client/utils/package-summary.html
index 9954aa1..d9e1fec 100644
--- a/sdks/android/doc/org/usergrid/android/client/utils/package-summary.html
+++ b/sdks/android/doc/org/usergrid/android/client/utils/package-summary.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-org.usergrid.android.client.utils
+org.apache.usergrid.android.client.utils
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ org.usergrid.android.client.utils
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="org.usergrid.android.client.utils";
+        parent.document.title="org.apache.usergrid.android.client.utils";
     }
 }
 </SCRIPT>
@@ -80,7 +80,7 @@ function windowTitle()
 
 <HR>
 <H2>
-Package org.usergrid.android.client.utils
+Package org.apache.usergrid.android.client.utils
 </H2>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
@@ -89,24 +89,24 @@ Package org.usergrid.android.client.utils
 <B>Class Summary</B></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/utils/DeviceUuidFactory.html" title="class in org.usergrid.android.client.utils">DeviceUuidFactory</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/utils/DeviceUuidFactory.html" title="class in org.apache.usergrid.android.client.utils">DeviceUuidFactory</A></B></TD>
 <TD>Tries to get the device ID as a UUID and fallsback to a generated UUID value
  if it doesn't work.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.usergrid.android.client.utils">JsonUtils</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.apache.usergrid.android.client.utils">JsonUtils</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/utils/MapUtils.html" title="class in org.usergrid.android.client.utils">MapUtils</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/utils/MapUtils.html" title="class in org.apache.usergrid.android.client.utils">MapUtils</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.usergrid.android.client.utils">ObjectUtils</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.apache.usergrid.android.client.utils">ObjectUtils</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/utils/UrlUtils.html" title="class in org.usergrid.android.client.utils">UrlUtils</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/utils/UrlUtils.html" title="class in org.apache.usergrid.android.client.utils">UrlUtils</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 </TABLE>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/utils/package-tree.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/utils/package-tree.html b/sdks/android/doc/org/usergrid/android/client/utils/package-tree.html
index 487313a..cbb1863 100644
--- a/sdks/android/doc/org/usergrid/android/client/utils/package-tree.html
+++ b/sdks/android/doc/org/usergrid/android/client/utils/package-tree.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-org.usergrid.android.client.utils Class Hierarchy
+org.apache.usergrid.android.client.utils Class Hierarchy
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ org.usergrid.android.client.utils Class Hierarchy
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="org.usergrid.android.client.utils Class Hierarchy";
+        parent.document.title="org.apache.usergrid.android.client.utils Class Hierarchy";
     }
 }
 </SCRIPT>
@@ -81,7 +81,7 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-Hierarchy For Package org.usergrid.android.client.utils
+Hierarchy For Package org.apache.usergrid.android.client.utils
 </H2>
 </CENTER>
 <DL>
@@ -92,7 +92,7 @@ Class Hierarchy
 </H2>
 <UL>
 <LI TYPE="circle">java.lang.Object<UL>
-<LI TYPE="circle">org.usergrid.android.client.utils.<A HREF="../../../../../org/usergrid/android/client/utils/DeviceUuidFactory.html" title="class in org.usergrid.android.client.utils"><B>DeviceUuidFactory</B></A><LI TYPE="circle">org.usergrid.android.client.utils.<A HREF="../../../../../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.usergrid.android.client.utils"><B>JsonUtils</B></A><LI TYPE="circle">org.usergrid.android.client.utils.<A HREF="../../../../../org/usergrid/android/client/utils/MapUtils.html" title="class in org.usergrid.android.client.utils"><B>MapUtils</B></A><LI TYPE="circle">org.usergrid.android.client.utils.<A HREF="../../../../../org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.usergrid.android.client.utils"><B>ObjectUtils</B></A><LI TYPE="circle">org.usergrid.android.client.utils.<A HREF="../../../../../org/usergrid/android/client/utils/UrlUtils.html" title="class in org.usergrid.android.client.utils"><B>UrlUtils</B>
 </A></UL>
+<LI TYPE="circle">org.apache.usergrid.android.client.utils.<A HREF="../../../../../org/usergrid/android/client/utils/DeviceUuidFactory.html" title="class in org.apache.usergrid.android.client.utils"><B>DeviceUuidFactory</B></A><LI TYPE="circle">org.apache.usergrid.android.client.utils.<A HREF="../../../../../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.apache.usergrid.android.client.utils"><B>JsonUtils</B></A><LI TYPE="circle">org.apache.usergrid.android.client.utils.<A HREF="../../../../../org/usergrid/android/client/utils/MapUtils.html" title="class in org.apache.usergrid.android.client.utils"><B>MapUtils</B></A><LI TYPE="circle">org.apache.usergrid.android.client.utils.<A HREF="../../../../../org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.apache.usergrid.android.client.utils"><B>ObjectUtils</B></A><LI TYPE="circle">org.apache.usergrid.android.client.utils.<A HREF="../../../../../org/usergrid/android/client/utils/UrlUtils.html" tit
 le="class in org.apache.usergrid.android.client.utils"><B>UrlUtils</B></A></UL>
 </UL>
 <HR>
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/utils/package-use.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/utils/package-use.html b/sdks/android/doc/org/usergrid/android/client/utils/package-use.html
index bb730c9..4627ccb 100644
--- a/sdks/android/doc/org/usergrid/android/client/utils/package-use.html
+++ b/sdks/android/doc/org/usergrid/android/client/utils/package-use.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Package org.usergrid.android.client.utils
+Uses of Package org.apache.usergrid.android.client.utils
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Package org.usergrid.android.client.utils
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Package org.usergrid.android.client.utils";
+        parent.document.title="Uses of Package org.apache.usergrid.android.client.utils";
     }
 }
 </SCRIPT>
@@ -81,9 +81,9 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Package<br>org.usergrid.android.client.utils</B></H2>
+<B>Uses of Package<br>org.apache.usergrid.android.client.utils</B></H2>
 </CENTER>
-No usage of org.usergrid.android.client.utils
+No usage of org.apache.usergrid.android.client.utils
 <P>
 <HR>
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/overview-frame.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/overview-frame.html b/sdks/android/doc/overview-frame.html
index 6d87b2d..95171aa 100644
--- a/sdks/android/doc/overview-frame.html
+++ b/sdks/android/doc/overview-frame.html
@@ -30,15 +30,15 @@ Overview List
 <FONT size="+1" CLASS="FrameHeadingFont">
 Packages</FONT>
 <BR>
-<FONT CLASS="FrameItemFont"><A HREF="org/usergrid/android/client/package-frame.html" target="packageFrame">org.usergrid.android.client</A></FONT>
+<FONT CLASS="FrameItemFont"><A HREF="org/usergrid/android/client/package-frame.html" target="packageFrame">org.apache.usergrid.android.client</A></FONT>
 <BR>
-<FONT CLASS="FrameItemFont"><A HREF="org/usergrid/android/client/callbacks/package-frame.html" target="packageFrame">org.usergrid.android.client.callbacks</A></FONT>
+<FONT CLASS="FrameItemFont"><A HREF="org/usergrid/android/client/callbacks/package-frame.html" target="packageFrame">org.apache.usergrid.android.client.callbacks</A></FONT>
 <BR>
-<FONT CLASS="FrameItemFont"><A HREF="org/usergrid/android/client/entities/package-frame.html" target="packageFrame">org.usergrid.android.client.entities</A></FONT>
+<FONT CLASS="FrameItemFont"><A HREF="org/usergrid/android/client/entities/package-frame.html" target="packageFrame">org.apache.usergrid.android.client.entities</A></FONT>
 <BR>
-<FONT CLASS="FrameItemFont"><A HREF="org/usergrid/android/client/response/package-frame.html" target="packageFrame">org.usergrid.android.client.response</A></FONT>
+<FONT CLASS="FrameItemFont"><A HREF="org/usergrid/android/client/response/package-frame.html" target="packageFrame">org.apache.usergrid.android.client.response</A></FONT>
 <BR>
-<FONT CLASS="FrameItemFont"><A HREF="org/usergrid/android/client/utils/package-frame.html" target="packageFrame">org.usergrid.android.client.utils</A></FONT>
+<FONT CLASS="FrameItemFont"><A HREF="org/usergrid/android/client/utils/package-frame.html" target="packageFrame">org.apache.usergrid.android.client.utils</A></FONT>
 <BR>
 </TD>
 </TR>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/overview-summary.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/overview-summary.html b/sdks/android/doc/overview-summary.html
index f45beca..fea6208 100644
--- a/sdks/android/doc/overview-summary.html
+++ b/sdks/android/doc/overview-summary.html
@@ -86,23 +86,23 @@ function windowTitle()
 <B>Packages</B></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="20%"><B><A HREF="org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A></B></TD>
+<TD WIDTH="20%"><B><A HREF="org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="20%"><B><A HREF="org/usergrid/android/client/callbacks/package-summary.html">org.usergrid.android.client.callbacks</A></B></TD>
+<TD WIDTH="20%"><B><A HREF="org/usergrid/android/client/callbacks/package-summary.html">org.apache.usergrid.android.client.callbacks</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="20%"><B><A HREF="org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A></B></TD>
+<TD WIDTH="20%"><B><A HREF="org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="20%"><B><A HREF="org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A></B></TD>
+<TD WIDTH="20%"><B><A HREF="org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="20%"><B><A HREF="org/usergrid/android/client/utils/package-summary.html">org.usergrid.android.client.utils</A></B></TD>
+<TD WIDTH="20%"><B><A HREF="org/usergrid/android/client/utils/package-summary.html">org.apache.usergrid.android.client.utils</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 </TABLE>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/overview-tree.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/overview-tree.html b/sdks/android/doc/overview-tree.html
index ca637d6..2df8305 100644
--- a/sdks/android/doc/overview-tree.html
+++ b/sdks/android/doc/overview-tree.html
@@ -84,25 +84,25 @@ function windowTitle()
 Hierarchy For All Packages</H2>
 </CENTER>
 <DL>
-<DT><B>Package Hierarchies:</B><DD><A HREF="org/usergrid/android/client/package-tree.html">org.usergrid.android.client</A>, <A HREF="org/usergrid/android/client/callbacks/package-tree.html">org.usergrid.android.client.callbacks</A>, <A HREF="org/usergrid/android/client/entities/package-tree.html">org.usergrid.android.client.entities</A>, <A HREF="org/usergrid/android/client/response/package-tree.html">org.usergrid.android.client.response</A>, <A HREF="org/usergrid/android/client/utils/package-tree.html">org.usergrid.android.client.utils</A></DL>
+<DT><B>Package Hierarchies:</B><DD><A HREF="org/usergrid/android/client/package-tree.html">org.apache.usergrid.android.client</A>, <A HREF="org/usergrid/android/client/callbacks/package-tree.html">org.apache.usergrid.android.client.callbacks</A>, <A HREF="org/usergrid/android/client/entities/package-tree.html">org.apache.usergrid.android.client.entities</A>, <A HREF="org/usergrid/android/client/response/package-tree.html">org.apache.usergrid.android.client.response</A>, <A HREF="org/usergrid/android/client/utils/package-tree.html">org.apache.usergrid.android.client.utils</A></DL>
 <HR>
 <H2>
 Class Hierarchy
 </H2>
 <UL>
 <LI TYPE="circle">java.lang.Object<UL>
-<LI TYPE="circle">org.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.usergrid.android.client.entities"><B>Activity.ActivityCollection</B></A><LI TYPE="circle">org.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities"><B>Activity.ActivityObject</B></A><LI TYPE="circle">org.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities"><B>Activity.MediaLink</B></A><LI TYPE="circle">org.usergrid.android.client.response.<A HREF="org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response"><B>AggregateCounter</B></A><LI TYPE="circle">org.usergrid.android.client.response.<A HREF="org/usergrid/android/client/response/AggregateCounterSet.html" title="cla
 ss in org.usergrid.android.client.response"><B>AggregateCounterSet</B></A><LI TYPE="circle">org.usergrid.android.client.response.<A HREF="org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response"><B>ApiResponse</B></A><LI TYPE="circle">android.os.AsyncTask&lt;Params,Progress,Result&gt;<UL>
-<LI TYPE="circle">org.usergrid.android.client.callbacks.<A HREF="org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.usergrid.android.client.callbacks"><B>ClientAsyncTask</B></A>&lt;T&gt;</UL>
-<LI TYPE="circle">org.usergrid.android.client.<A HREF="org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client"><B>Client</B></A><LI TYPE="circle">org.usergrid.android.client.response.<A HREF="org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response"><B>ClientCredentialsInfo</B></A><LI TYPE="circle">org.usergrid.android.client.utils.<A HREF="org/usergrid/android/client/utils/DeviceUuidFactory.html" title="class in org.usergrid.android.client.utils"><B>DeviceUuidFactory</B></A><LI TYPE="circle">org.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities"><B>Entity</B></A><UL>
-<LI TYPE="circle">org.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities"><B>Activity</B></A><LI TYPE="circle">org.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities"><B>Device</B></A><LI TYPE="circle">org.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities"><B>Group</B></A><LI TYPE="circle">org.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities"><B>Message</B></A><LI TYPE="circle">org.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities"><B>User</B></A></UL>
-<LI TYPE="circle">org.usergrid.android.client.utils.<A HREF="org/usergrid/android/client/utils/JsonUtils.html" title="class in org.usergrid.android.client.utils"><B>JsonUtils</B></A><LI TYPE="circle">org.usergrid.android.client.utils.<A HREF="org/usergrid/android/client/utils/MapUtils.html" title="class in org.usergrid.android.client.utils"><B>MapUtils</B></A><LI TYPE="circle">org.usergrid.android.client.utils.<A HREF="org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.usergrid.android.client.utils"><B>ObjectUtils</B></A><LI TYPE="circle">org.usergrid.android.client.response.<A HREF="org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response"><B>QueueInfo</B></A><LI TYPE="circle">org.usergrid.android.client.utils.<A HREF="org/usergrid/android/client/utils/UrlUtils.html" title="class in org.usergrid.android.client.utils"><B>UrlUtils</B></A></UL>
+<LI TYPE="circle">org.apache.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.apache.usergrid.android.client.entities"><B>Activity.ActivityCollection</B></A><LI TYPE="circle">org.apache.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities"><B>Activity.ActivityObject</B></A><LI TYPE="circle">org.apache.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities"><B>Activity.MediaLink</B></A><LI TYPE="circle">org.apache.usergrid.android.client.response.<A HREF="org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response"><B>AggregateCounter</B></A><LI TYPE="circle">org.apache.usergrid.android.client.response.<A HREF="org/usergr
 id/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response"><B>AggregateCounterSet</B></A><LI TYPE="circle">org.apache.usergrid.android.client.response.<A HREF="org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response"><B>ApiResponse</B></A><LI TYPE="circle">android.os.AsyncTask&lt;Params,Progress,Result&gt;<UL>
+<LI TYPE="circle">org.apache.usergrid.android.client.callbacks.<A HREF="org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.apache.usergrid.android.client.callbacks"><B>ClientAsyncTask</B></A>&lt;T&gt;</UL>
+<LI TYPE="circle">org.apache.usergrid.android.client.<A HREF="org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client"><B>Client</B></A><LI TYPE="circle">org.apache.usergrid.android.client.response.<A HREF="org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response"><B>ClientCredentialsInfo</B></A><LI TYPE="circle">org.apache.usergrid.android.client.utils.<A HREF="org/usergrid/android/client/utils/DeviceUuidFactory.html" title="class in org.apache.usergrid.android.client.utils"><B>DeviceUuidFactory</B></A><LI TYPE="circle">org.apache.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities"><B>Entity</B></A><UL>
+<LI TYPE="circle">org.apache.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities"><B>Activity</B></A><LI TYPE="circle">org.apache.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities"><B>Device</B></A><LI TYPE="circle">org.apache.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities"><B>Group</B></A><LI TYPE="circle">org.apache.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities"><B>Message</B></A><LI TYPE="circle">org.apache.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities"><B>User</B></A></
 UL>
+<LI TYPE="circle">org.apache.usergrid.android.client.utils.<A HREF="org/usergrid/android/client/utils/JsonUtils.html" title="class in org.apache.usergrid.android.client.utils"><B>JsonUtils</B></A><LI TYPE="circle">org.apache.usergrid.android.client.utils.<A HREF="org/usergrid/android/client/utils/MapUtils.html" title="class in org.apache.usergrid.android.client.utils"><B>MapUtils</B></A><LI TYPE="circle">org.apache.usergrid.android.client.utils.<A HREF="org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.apache.usergrid.android.client.utils"><B>ObjectUtils</B></A><LI TYPE="circle">org.apache.usergrid.android.client.response.<A HREF="org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response"><B>QueueInfo</B></A><LI TYPE="circle">org.apache.usergrid.android.client.utils.<A HREF="org/usergrid/android/client/utils/UrlUtils.html" title="class in org.apache.usergrid.android.client.utils"><B>UrlUtils</B></A></UL>
 </UL>
 <H2>
 Interface Hierarchy
 </H2>
 <UL>
-<LI TYPE="circle">org.usergrid.android.client.<A HREF="org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client"><B>Client.Query</B></A><LI TYPE="circle">org.usergrid.android.client.callbacks.<A HREF="org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>ClientCallback</B></A>&lt;T&gt;<UL>
-<LI TYPE="circle">org.usergrid.android.client.callbacks.<A HREF="org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>ApiResponseCallback</B></A><LI TYPE="circle">org.usergrid.android.client.callbacks.<A HREF="org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>DeviceRegistrationCallback</B></A><LI TYPE="circle">org.usergrid.android.client.callbacks.<A HREF="org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>GroupsRetrievedCallback</B></A><LI TYPE="circle">org.usergrid.android.client.callbacks.<A HREF="org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>QueryResultsCallback</B></A></UL>
+<LI TYPE="circle">org.apache.usergrid.android.client.<A HREF="org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client"><B>Client.Query</B></A><LI TYPE="circle">org.apache.usergrid.android.client.callbacks.<A HREF="org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>ClientCallback</B></A>&lt;T&gt;<UL>
+<LI TYPE="circle">org.apache.usergrid.android.client.callbacks.<A HREF="org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>ApiResponseCallback</B></A><LI TYPE="circle">org.apache.usergrid.android.client.callbacks.<A HREF="org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>DeviceRegistrationCallback</B></A><LI TYPE="circle">org.apache.usergrid.android.client.callbacks.<A HREF="org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>GroupsRetrievedCallback</B></A><LI TYPE="circle">org.apache.usergrid.android.client.callbacks.<A HREF="org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>QueryResultsCallback</B></A></UL>
 </UL>
 <H2>
 Enum Hierarchy
@@ -111,7 +111,7 @@ Enum Hierarchy
 <LI TYPE="circle">java.lang.Object<UL>
 <LI TYPE="circle">java.lang.Enum&lt;E&gt; (implements java.lang.Comparable&lt;T&gt;, java.io.Serializable)
 <UL>
-<LI TYPE="circle">org.usergrid.android.client.<A HREF="org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client"><B>Client.QueuePosition</B></A></UL>
+<LI TYPE="circle">org.apache.usergrid.android.client.<A HREF="org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client"><B>Client.QueuePosition</B></A></UL>
 </UL>
 </UL>
 <HR>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/package-list
----------------------------------------------------------------------
diff --git a/sdks/android/doc/package-list b/sdks/android/doc/package-list
index eb07ee9..0860ea0 100644
--- a/sdks/android/doc/package-list
+++ b/sdks/android/doc/package-list
@@ -1,5 +1,5 @@
-org.usergrid.android.client
-org.usergrid.android.client.callbacks
-org.usergrid.android.client.entities
-org.usergrid.android.client.response
-org.usergrid.android.client.utils
+org.apache.usergrid.android.client
+org.apache.usergrid.android.client.callbacks
+org.apache.usergrid.android.client.entities
+org.apache.usergrid.android.client.response
+org.apache.usergrid.android.client.utils

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/pom.xml
----------------------------------------------------------------------
diff --git a/sdks/android/pom.xml b/sdks/android/pom.xml
index fd23c10..9cfb996 100644
--- a/sdks/android/pom.xml
+++ b/sdks/android/pom.xml
@@ -12,13 +12,13 @@
 	</parent>
 	
 	<modelVersion>4.0.0</modelVersion>
-	<groupId>org.usergrid</groupId>
+	<groupId>org.apache.usergrid</groupId>
 	<artifactId>usergrid-android-client</artifactId>
 	<version>0.0.7-SNAPSHOT</version>
 	
 	<packaging>jar</packaging>
-	<description>A simple java client for usergrid</description>
-	<url>https://github.com/apigee/usergrid-stack-internal</url>
+	<description>A simple android client for Apache Usergrid</description>
+	<url>https://github.com/usergrid/usergrid</url>
 	
 	<licenses>
 		<license>
@@ -42,11 +42,6 @@
 			<name>Scott Ganyo</name>
 		</developer>
 	</developers>
-	<scm>
-		<connection>scm:git:git@github.com:apigee/usergrid-android-sdk.git</connection>
-		<developerConnection>scm:git:git@github.com:apigee/usergrid-android-sdk.git</developerConnection>
-		<url>git@github.com:apigee/usergrid-android-sdk.git</url>
-	</scm>
 	
 	<dependencies>
 		<dependency>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/src/main/java/org/apache/usergrid/android/client/Client.java
----------------------------------------------------------------------
diff --git a/sdks/android/src/main/java/org/apache/usergrid/android/client/Client.java b/sdks/android/src/main/java/org/apache/usergrid/android/client/Client.java
new file mode 100644
index 0000000..fb30277
--- /dev/null
+++ b/sdks/android/src/main/java/org/apache/usergrid/android/client/Client.java
@@ -0,0 +1,591 @@
+package org.apache.usergrid.android.client;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.apache.usergrid.android.client.callbacks.ApiResponseCallback;
+import org.apache.usergrid.android.client.callbacks.ClientAsyncTask;
+import org.apache.usergrid.android.client.callbacks.DeviceRegistrationCallback;
+import org.apache.usergrid.android.client.callbacks.GroupsRetrievedCallback;
+import org.apache.usergrid.android.client.callbacks.QueryResultsCallback;
+import org.apache.usergrid.android.client.utils.DeviceUuidFactory;
+import org.springframework.http.HttpMethod;
+import org.springframework.web.client.RestTemplate;
+import org.usergrid.java.client.entities.Device;
+import org.usergrid.java.client.entities.Entity;
+import org.usergrid.java.client.entities.Group;
+import org.usergrid.java.client.entities.User;
+import org.usergrid.java.client.response.ApiResponse;
+
+import android.content.Context;
+import android.location.Location;
+
+/**
+ * The Client class for accessing the Usergrid API. Start by instantiating this
+ * class though the appropriate constructor.
+ * 
+ */
+public class Client extends org.usergrid.java.client.Client {
+
+	private static final String TAG = "UsergridClient";
+
+	public static boolean FORCE_PUBLIC_API = false;
+
+	// Public API
+	public static String PUBLIC_API_URL = "http://api.usergrid.com";
+
+	// Local API of standalone server
+	public static String LOCAL_STANDALONE_API_URL = "http://localhost:8080";
+
+	// Local API of Tomcat server in Eclipse
+	public static String LOCAL_TOMCAT_API_URL = "http://localhost:8080/ROOT";
+
+	// Local API
+	public static String LOCAL_API_URL = LOCAL_STANDALONE_API_URL;
+
+	
+	static RestTemplate restTemplate = new RestTemplate(true);
+
+	/**
+	 * Default constructor for instantiating a client.
+	 */
+	public Client() {
+		init();
+	}
+
+	/**
+	 * Instantiate client for a specific app
+	 * 
+	 * @param applicationId
+	 *            the application id or name
+	 */
+	public Client(String organizationId, String applicationId) {
+		super(organizationId, applicationId);
+	}
+
+
+	/**
+	 * Log the user in and get a valid access token. Executes asynchronously in
+	 * background and the callbacks are called in the UI thread.
+	 * 
+	 * @param email
+	 * @param password
+	 * @param callback
+	 */
+	public void authorizeAppUserAsync(final String email,
+			final String password, final ApiResponseCallback callback) {
+		(new ClientAsyncTask<ApiResponse>(callback) {
+			@Override
+			public ApiResponse doTask() {
+				return authorizeAppUser(email, password);
+			}
+		}).execute();
+	}
+
+	
+
+	/**
+	 * Log the user in with their numeric pin-code and get a valid access token.
+	 * Executes asynchronously in background and the callbacks are called in the
+	 * UI thread.
+	 * 
+	 * @param email
+	 * @param pin
+	 * @param callback
+	 */
+	public void authorizeAppUserViaPinAsync(final String email,
+			final String pin, final ApiResponseCallback callback) {
+		(new ClientAsyncTask<ApiResponse>(callback) {
+			@Override
+			public ApiResponse doTask() {
+				return authorizeAppUserViaPin(email, pin);
+			}
+		}).execute();
+	}
+
+
+	/**
+	 * Log the user in with their numeric pin-code and get a valid access token.
+	 * Executes asynchronously in background and the callbacks are called in the
+	 * UI thread.
+	 * 
+	 * @param email
+	 * @param pin
+	 * @param callback
+	 */
+	public void authorizeAppUserViaFacebookAsync(final String fb_access_token,
+			final ApiResponseCallback callback) {
+		(new ClientAsyncTask<ApiResponse>(callback) {
+			@Override
+			public ApiResponse doTask() {
+				return authorizeAppUserViaFacebook(fb_access_token);
+			}
+		}).execute();
+	}
+
+	
+
+	/**
+	 * Log the app in with it's client id and client secret key. Not recommended
+	 * for production apps. Executes asynchronously in background and the
+	 * callbacks are called in the UI thread.
+	 * 
+	 * @param clientId
+	 * @param clientSecret
+	 * @param callback
+	 */
+	public void authorizeAppClientAsync(final String clientId,
+			final String clientSecret, final ApiResponseCallback callback) {
+		(new ClientAsyncTask<ApiResponse>(callback) {
+
+			@Override
+			public ApiResponse doTask() {
+				return authorizeAppClient(clientId, clientSecret);
+			}
+		}).execute();
+	}
+
+	
+	/**
+	 * Registers a device using the device's unique device ID. Executes
+	 * asynchronously in background and the callbacks are called in the UI
+	 * thread.
+	 * 
+	 * @param context
+	 * @param properties
+	 * @param callback
+	 */
+	public void registerDeviceAsync(final Context context,
+			final Map<String, Object> properties,
+			final DeviceRegistrationCallback callback) {
+		(new ClientAsyncTask<Device>(callback) {
+			@Override
+			public Device doTask() {
+			    UUID deviceId = new DeviceUuidFactory(context).getDeviceUuid();
+		        
+				return registerDevice(deviceId, properties);
+			}
+		}).execute();
+	}
+
+
+  /**
+   * Registers a device using the device's unique device ID. Executes
+   * asynchronously in background and the callbacks are called in the UI
+   * thread.
+   *
+   * @param context
+   * @param properties
+   * @param callback
+   */
+  public void registerDeviceForPushAsync(final Context context,
+                                         final String notifier,
+                                         final String token,
+                                         final Map<String, Object> properties,
+                                         final DeviceRegistrationCallback callback) {
+    (new ClientAsyncTask<Device>(callback) {
+      @Override
+      public Device doTask() {
+        UUID deviceId = new DeviceUuidFactory(context).getDeviceUuid();
+
+        return registerDeviceForPush(deviceId, notifier, token, properties);
+      }
+    }).execute();
+  }
+
+
+  /**
+	 * Create a new entity on the server. Executes asynchronously in background
+	 * and the callbacks are called in the UI thread.
+	 * 
+	 * @param entity
+	 * @param callback
+	 */
+	public void createEntityAsync(final Entity entity,
+			final ApiResponseCallback callback) {
+		(new ClientAsyncTask<ApiResponse>(callback) {
+			@Override
+			public ApiResponse doTask() {
+				return createEntity(entity);
+			}
+		}).execute();
+	}
+
+	
+	/**
+	 * Create a new entity on the server from a set of properties. Properties
+	 * must include a "type" property. Executes asynchronously in background and
+	 * the callbacks are called in the UI thread.
+	 * 
+	 * @param properties
+	 * @param callback
+	 */
+	public void createEntityAsync(final Map<String, Object> properties,
+			final ApiResponseCallback callback) {
+		(new ClientAsyncTask<ApiResponse>(callback) {
+			@Override
+			public ApiResponse doTask() {
+				return createEntity(properties);
+			}
+		}).execute();
+	}
+
+
+	/**
+	 * Creates a user. Executes asynchronously in background and the callbacks
+	 * are called in the UI thread.
+	 * 
+	 * @param username
+	 * @param name
+	 * @param email
+	 * @param password
+	 * @param callback
+	 */
+	public void createUserAsync(final String username, final String name,
+			final String email, final String password,
+			final ApiResponseCallback callback) {
+		(new ClientAsyncTask<ApiResponse>(callback) {
+			@Override
+			public ApiResponse doTask() {
+				return createUser(username, name, email, password);
+			}
+		}).execute();
+	}
+
+
+
+	/**
+	 * Get the groups for the user. Executes asynchronously in background and
+	 * the callbacks are called in the UI thread.
+	 * 
+	 * @param userId
+	 * @param callback
+	 */
+	public void getGroupsForUserAsync(final String userId,
+			final GroupsRetrievedCallback callback) {
+		(new ClientAsyncTask<Map<String, Group>>(callback) {
+			@Override
+			public Map<String, Group> doTask() {
+				return getGroupsForUser(userId);
+			}
+		}).execute();
+	}
+
+	/**
+	 * Get a user's activity feed. Returned as a query to ease paging. Executes
+	 * asynchronously in background and the callbacks are called in the UI
+	 * thread.
+	 * 
+	 * 
+	 * @param userId
+	 * @param callback
+	 */
+	public void queryActivityFeedForUserAsync(final String userId, final QueryResultsCallback callback) {
+		(new ClientAsyncTask<Query>(callback) {
+			@Override
+			public Query doTask() {
+				return queryActivityFeedForUser(userId);
+			}
+		}).execute();
+	}
+
+	
+	/**
+	 * Creates and posts an activity to a user. Executes asynchronously in
+	 * background and the callbacks are called in the UI thread.
+	 * 
+	 * @param verb
+	 * @param title
+	 * @param content
+	 * @param category
+	 * @param user
+	 * @param object
+	 * @param objectType
+	 * @param objectName
+	 * @param objectContent
+	 * @param callback
+	 */
+	public void postUserActivityAsync(final String verb, final String title,
+			final String content, final String category, final User user,
+			final Entity object, final String objectType,
+			final String objectName, final String objectContent,
+			final ApiResponseCallback callback) {
+		(new ClientAsyncTask<ApiResponse>(callback) {
+			@Override
+			public ApiResponse doTask() {
+				return postUserActivity(verb, title, content, category, user,
+						object, objectType, objectName, objectContent);
+			}
+		}).execute();
+	}
+
+	
+	/**
+	 * Creates and posts an activity to a group. Executes asynchronously in
+	 * background and the callbacks are called in the UI thread.
+	 * 
+	 * @param groupId
+	 * @param verb
+	 * @param title
+	 * @param content
+	 * @param category
+	 * @param user
+	 * @param object
+	 * @param objectType
+	 * @param objectName
+	 * @param objectContent
+	 * @param callback
+	 */
+	public void postGroupActivityAsync(final String groupId, final String verb, final String title,
+			final String content, final String category, final User user,
+			final Entity object, final String objectType,
+			final String objectName, final String objectContent,
+			final ApiResponseCallback callback) {
+		(new ClientAsyncTask<ApiResponse>(callback) {
+			@Override
+			public ApiResponse doTask() {
+				return postGroupActivity(groupId, verb, title, content, category, user,
+						object, objectType, objectName, objectContent);
+			}
+		}).execute();
+	}
+
+
+	/**
+	 * Get a group's activity feed. Returned as a query to ease paging. Executes
+	 * asynchronously in background and the callbacks are called in the UI
+	 * thread.
+	 * 
+	 * 
+	 * @param userId
+	 * @param callback
+	 */
+	public void queryActivityFeedForGroupAsync(final String groupId,
+			final QueryResultsCallback callback) {
+		(new ClientAsyncTask<Query>(callback) {
+			@Override
+			public Query doTask() {
+				return queryActivityFeedForGroup(groupId);
+			}
+		}).execute();
+	}
+
+
+	/**
+	 * Perform a query request and return a query object. The Query object
+	 * provides a simple way of dealing with result sets that need to be
+	 * iterated or paged through. Executes asynchronously in background and the
+	 * callbacks are called in the UI thread.
+	 * 
+	 * @param callback
+	 * @param method
+	 * @param params
+	 * @param data
+	 * @param segments
+	 */
+	public void queryEntitiesRequestAsync(final QueryResultsCallback callback,
+			final HttpMethod method, final Map<String, Object> params,
+			final Object data, final String... segments) {
+		(new ClientAsyncTask<Query>(callback) {
+			@Override
+			public Query doTask() {
+				return queryEntitiesRequest(method, params, data, segments);
+			}
+		}).execute();
+	}
+
+
+	/**
+	 * Perform a query of the users collection. Executes asynchronously in
+	 * background and the callbacks are called in the UI thread.
+	 * 
+	 * @param callback
+	 */
+	public void queryUsersAsync(QueryResultsCallback callback) {
+		queryEntitiesRequestAsync(callback, HttpMethod.GET, null, null,
+				getApplicationId(), "users");
+	}
+
+	/**
+	 * Perform a query of the users collection using the provided query command.
+	 * For example: "name contains 'ed'". Executes asynchronously in background
+	 * and the callbacks are called in the UI thread.
+	 * 
+	 * @param ql
+	 * @param callback
+	 */
+	public void queryUsersAsync(String ql, QueryResultsCallback callback) {
+		Map<String, Object> params = new HashMap<String, Object>();
+		params.put("ql", ql);
+		queryEntitiesRequestAsync(callback, HttpMethod.GET, params, null,
+				getApplicationId(), "users");
+	}
+
+	
+	/**
+	 * Queries the users for the specified group. Executes asynchronously in
+	 * background and the callbacks are called in the UI thread.
+	 * 
+	 * @param groupId
+	 * @param callback
+	 */
+	public void queryUsersForGroupAsync(String groupId,
+			QueryResultsCallback callback) {
+		queryEntitiesRequestAsync(callback, HttpMethod.GET, null, null,
+				getApplicationId(), "groups", groupId, "users");
+	}
+
+	/**
+	 * Adds a user to the specified groups. Executes asynchronously in
+	 * background and the callbacks are called in the UI thread.
+	 * 
+	 * @param userId
+	 * @param groupId
+	 * @param callback
+	 */
+	public void addUserToGroupAsync(final String userId, final String groupId,
+			final ApiResponseCallback callback) {
+		(new ClientAsyncTask<ApiResponse>(callback) {
+			@Override
+			public ApiResponse doTask() {
+				return addUserToGroup(userId, groupId);
+			}
+		}).execute();
+	}
+
+
+	/**
+	 * Creates a group with the specified group path. Group paths can be slash
+	 * ("/") delimited like file paths for hierarchical group relationships.
+	 * Executes asynchronously in background and the callbacks are called in the
+	 * UI thread.
+	 * 
+	 * @param groupPath
+	 * @param callback
+	 */
+	public void createGroupAsync(String groupPath,
+			final ApiResponseCallback callback) {
+		createGroupAsync(groupPath, null);
+	}
+
+	
+
+	/**
+	 * Creates a group with the specified group path and group title. Group
+	 * paths can be slash ("/") deliminted like file paths for hierarchical
+	 * group relationships. Executes asynchronously in background and the
+	 * callbacks are called in the UI thread.
+	 * 
+	 * @param groupPath
+	 * @param groupTitle
+	 * @param callback
+	 */
+	public void createGroupAsync(final String groupPath,
+			final String groupTitle, final ApiResponseCallback callback) {
+		(new ClientAsyncTask<ApiResponse>(callback) {
+			@Override
+			public ApiResponse doTask() {
+				return createGroup(groupPath, groupTitle);
+			}
+		}).execute();
+	}
+
+	
+	/**
+	 * Connect two entities together. Executes asynchronously in background and
+	 * the callbacks are called in the UI thread.
+	 * 
+	 * @param connectingEntityType
+	 * @param connectingEntityId
+	 * @param connectionType
+	 * @param connectedEntityId
+	 * @param callback
+	 */
+	public void connectEntitiesAsync(final String connectingEntityType,
+			final String connectingEntityId, final String connectionType,
+			final String connectedEntityId, final ApiResponseCallback callback) {
+		(new ClientAsyncTask<ApiResponse>(callback) {
+			@Override
+			public ApiResponse doTask() {
+				return connectEntities(connectingEntityType,
+						connectingEntityId, connectionType, connectedEntityId);
+			}
+		}).execute();
+	}
+
+
+
+	/**
+	 * Disconnect two entities. Executes asynchronously in background and the
+	 * callbacks are called in the UI thread.
+	 * 
+	 * @param connectingEntityType
+	 * @param connectingEntityId
+	 * @param connectionType
+	 * @param connectedEntityId
+	 * @param callback
+	 */
+	public void disconnectEntitiesAsync(final String connectingEntityType,
+			final String connectingEntityId, final String connectionType,
+			final String connectedEntityId, final ApiResponseCallback callback) {
+		(new ClientAsyncTask<ApiResponse>(callback) {
+			@Override
+			public ApiResponse doTask() {
+				return connectEntities(connectingEntityType,
+						connectingEntityId, connectionType, connectedEntityId);
+			}
+		}).execute();
+	}
+
+
+
+	/**
+	 * Query the connected entities. Executes asynchronously in background and
+	 * the callbacks are called in the UI thread.
+	 * 
+	 * @param connectingEntityType
+	 * @param connectingEntityId
+	 * @param connectionType
+	 * @param ql
+	 * @param callback
+	 */
+	public void queryEntityConnectionsAsync(String connectingEntityType,
+			String connectingEntityId, String connectionType, String ql,
+			QueryResultsCallback callback) {
+		Map<String, Object> params = new HashMap<String, Object>();
+		params.put("ql", ql);
+		queryEntitiesRequestAsync(callback, HttpMethod.GET, params, null,
+				getApplicationId(), connectingEntityType, connectingEntityId,
+				connectionType);
+	}
+
+
+	/**
+	 * Query the connected entities within distance of a specific point. .
+	 * Executes asynchronously in background and the callbacks are called in the
+	 * UI thread.
+	 * 
+	 * @param connectingEntityType
+	 * @param connectingEntityId
+	 * @param connectionType
+	 * @param distance
+	 * @param latitude
+	 * @param longitude
+	 * @param callback
+	 */
+	public void queryEntityConnectionsWithinLocationAsync(
+			String connectingEntityType, String connectingEntityId,
+			String connectionType, float distance, Location location,
+			String ql, QueryResultsCallback callback) {
+		Map<String, Object> params = new HashMap<String, Object>();
+		params.put("ql", makeLocationQL(distance, location.getLatitude(), location.getLongitude(), ql));
+		params.put("ql", ql);
+		queryEntitiesRequestAsync(callback, HttpMethod.GET, params, null,
+				getApplicationId(), connectingEntityType, connectingEntityId,
+				connectionType);
+	}
+
+	
+	
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/src/main/java/org/apache/usergrid/android/client/callbacks/ApiResponseCallback.java
----------------------------------------------------------------------
diff --git a/sdks/android/src/main/java/org/apache/usergrid/android/client/callbacks/ApiResponseCallback.java b/sdks/android/src/main/java/org/apache/usergrid/android/client/callbacks/ApiResponseCallback.java
new file mode 100644
index 0000000..59d58b6
--- /dev/null
+++ b/sdks/android/src/main/java/org/apache/usergrid/android/client/callbacks/ApiResponseCallback.java
@@ -0,0 +1,10 @@
+package org.apache.usergrid.android.client.callbacks;
+
+import org.usergrid.java.client.response.ApiResponse;
+
+
+public interface ApiResponseCallback extends ClientCallback<ApiResponse> {
+
+	public void onResponse(ApiResponse response);
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/src/main/java/org/apache/usergrid/android/client/callbacks/ClientAsyncTask.java
----------------------------------------------------------------------
diff --git a/sdks/android/src/main/java/org/apache/usergrid/android/client/callbacks/ClientAsyncTask.java b/sdks/android/src/main/java/org/apache/usergrid/android/client/callbacks/ClientAsyncTask.java
new file mode 100644
index 0000000..e4d4d82
--- /dev/null
+++ b/sdks/android/src/main/java/org/apache/usergrid/android/client/callbacks/ClientAsyncTask.java
@@ -0,0 +1,38 @@
+package org.apache.usergrid.android.client.callbacks;
+
+import android.os.AsyncTask;
+
+public abstract class ClientAsyncTask<T> extends AsyncTask<Void, Exception, T> {
+
+	ClientCallback<T> callback;
+
+	public ClientAsyncTask(ClientCallback<T> callback) {
+		this.callback = callback;
+	}
+
+	@Override
+	protected T doInBackground(Void... v) {
+		try {
+			return doTask();
+		} catch (Exception e) {
+			this.publishProgress(e);
+		}
+		return null;
+	}
+
+	public abstract T doTask();
+
+	@Override
+	protected void onPostExecute(T response) {
+		if (callback != null) {
+			callback.onResponse(response);
+		}
+	}
+
+	@Override
+	protected void onProgressUpdate(Exception... e) {
+		if ((callback != null) && (e != null) && (e.length > 0)) {
+			callback.onException(e[0]);
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/src/main/java/org/apache/usergrid/android/client/callbacks/ClientCallback.java
----------------------------------------------------------------------
diff --git a/sdks/android/src/main/java/org/apache/usergrid/android/client/callbacks/ClientCallback.java b/sdks/android/src/main/java/org/apache/usergrid/android/client/callbacks/ClientCallback.java
new file mode 100644
index 0000000..559b3b9
--- /dev/null
+++ b/sdks/android/src/main/java/org/apache/usergrid/android/client/callbacks/ClientCallback.java
@@ -0,0 +1,9 @@
+package org.apache.usergrid.android.client.callbacks;
+
+public interface ClientCallback<T> {
+
+	public void onResponse(T response);
+
+	public void onException(Exception e);
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/src/main/java/org/apache/usergrid/android/client/callbacks/DeviceRegistrationCallback.java
----------------------------------------------------------------------
diff --git a/sdks/android/src/main/java/org/apache/usergrid/android/client/callbacks/DeviceRegistrationCallback.java b/sdks/android/src/main/java/org/apache/usergrid/android/client/callbacks/DeviceRegistrationCallback.java
new file mode 100644
index 0000000..66ded57
--- /dev/null
+++ b/sdks/android/src/main/java/org/apache/usergrid/android/client/callbacks/DeviceRegistrationCallback.java
@@ -0,0 +1,9 @@
+package org.apache.usergrid.android.client.callbacks;
+
+import org.usergrid.java.client.entities.Device;
+
+public interface DeviceRegistrationCallback extends ClientCallback<Device> {
+
+	public void onDeviceRegistration(Device device);
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/src/main/java/org/apache/usergrid/android/client/callbacks/GroupsRetrievedCallback.java
----------------------------------------------------------------------
diff --git a/sdks/android/src/main/java/org/apache/usergrid/android/client/callbacks/GroupsRetrievedCallback.java b/sdks/android/src/main/java/org/apache/usergrid/android/client/callbacks/GroupsRetrievedCallback.java
new file mode 100644
index 0000000..4558cf6
--- /dev/null
+++ b/sdks/android/src/main/java/org/apache/usergrid/android/client/callbacks/GroupsRetrievedCallback.java
@@ -0,0 +1,13 @@
+package org.apache.usergrid.android.client.callbacks;
+
+import java.util.Map;
+
+import org.usergrid.java.client.entities.Group;
+
+
+public interface GroupsRetrievedCallback extends
+		ClientCallback<Map<String, Group>> {
+
+	public void onGroupsRetrieved(Map<String, Group> groups);
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/src/main/java/org/apache/usergrid/android/client/callbacks/QueryResultsCallback.java
----------------------------------------------------------------------
diff --git a/sdks/android/src/main/java/org/apache/usergrid/android/client/callbacks/QueryResultsCallback.java b/sdks/android/src/main/java/org/apache/usergrid/android/client/callbacks/QueryResultsCallback.java
new file mode 100644
index 0000000..13f325e
--- /dev/null
+++ b/sdks/android/src/main/java/org/apache/usergrid/android/client/callbacks/QueryResultsCallback.java
@@ -0,0 +1,9 @@
+package org.apache.usergrid.android.client.callbacks;
+
+import org.usergrid.java.client.Client.Query;
+
+public interface QueryResultsCallback extends ClientCallback<Query> {
+
+	public void onQueryResults(Query query);
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/src/main/java/org/apache/usergrid/android/client/utils/DeviceUuidFactory.java
----------------------------------------------------------------------
diff --git a/sdks/android/src/main/java/org/apache/usergrid/android/client/utils/DeviceUuidFactory.java b/sdks/android/src/main/java/org/apache/usergrid/android/client/utils/DeviceUuidFactory.java
new file mode 100644
index 0000000..1eec3c3
--- /dev/null
+++ b/sdks/android/src/main/java/org/apache/usergrid/android/client/utils/DeviceUuidFactory.java
@@ -0,0 +1,154 @@
+package org.apache.usergrid.android.client.utils;
+
+import static org.apache.usergrid.android.client.utils.ObjectUtils.isEmpty;
+
+import java.io.UnsupportedEncodingException;
+import java.util.UUID;
+
+import android.content.Context;
+import android.content.SharedPreferences;
+import android.net.wifi.WifiManager;
+import android.os.Build;
+import android.provider.Settings.Secure;
+import android.telephony.TelephonyManager;
+
+/**
+ * Tries to get the device ID as a UUID and fallsback to a generated UUID value
+ * if it doesn't work.
+ * 
+ * @see http 
+ *      ://stackoverflow.com/questions/2785485/is-there-a-unique-android-device
+ *      -id
+ * 
+ */
+public class DeviceUuidFactory {
+	protected static final String PREFS_FILE = "device_id.xml";
+	protected static final String PREFS_DEVICE_ID = "device_id";
+
+	protected static UUID uuid;
+
+	public DeviceUuidFactory(Context context) {
+
+		if (uuid == null) {
+			synchronized (DeviceUuidFactory.class) {
+				if (uuid == null) {
+					final SharedPreferences prefs = context
+							.getSharedPreferences(PREFS_FILE, 0);
+					final String id = prefs.getString(PREFS_DEVICE_ID, null);
+
+					if (id != null) {
+						// Use the ids previously computed and stored in the
+						// prefs file
+						uuid = UUID.fromString(id);
+
+					} else {
+
+						final String androidId = Secure
+								.getString(context.getContentResolver(),
+										Secure.ANDROID_ID);
+
+						// Use the Android ID unless it's broken, in which case
+						// fallback on deviceId,
+						// unless it's not available, then fallback on a random
+						// number which we store
+						// to a prefs file
+						try {
+							if (!"9774d56d682e549c".equals(androidId)) {
+								uuid = UUID.nameUUIDFromBytes(androidId
+										.getBytes("utf8"));
+							} else {
+								final String deviceId = ((TelephonyManager) context
+										.getSystemService(Context.TELEPHONY_SERVICE))
+										.getDeviceId();
+								uuid = deviceId != null ? UUID
+										.nameUUIDFromBytes(deviceId
+												.getBytes("utf8"))
+										: generateDeviceUuid(context);
+							}
+						} catch (UnsupportedEncodingException e) {
+							throw new RuntimeException(e);
+						}
+
+						// Write the value out to the prefs file
+						prefs.edit()
+								.putString(PREFS_DEVICE_ID, uuid.toString())
+								.commit();
+
+					}
+
+				}
+			}
+		}
+
+	}
+
+	private UUID generateDeviceUuid(Context context) {
+
+		// Get some of the hardware information
+		String buildParams = Build.BOARD + Build.BRAND + Build.CPU_ABI
+				+ Build.DEVICE + Build.DISPLAY + Build.FINGERPRINT + Build.HOST
+				+ Build.ID + Build.MANUFACTURER + Build.MODEL + Build.PRODUCT
+				+ Build.TAGS + Build.TYPE + Build.USER;
+
+		// Requires READ_PHONE_STATE
+		TelephonyManager tm = (TelephonyManager) context
+				.getSystemService(Context.TELEPHONY_SERVICE);
+
+		// gets the imei (GSM) or MEID/ESN (CDMA)
+		String imei = tm.getDeviceId();
+
+		// gets the android-assigned id
+		String androidId = Secure.getString(context.getContentResolver(),
+				Secure.ANDROID_ID);
+
+		// requires ACCESS_WIFI_STATE
+		WifiManager wm = (WifiManager) context
+				.getSystemService(Context.WIFI_SERVICE);
+
+		// gets the MAC address
+		String mac = wm.getConnectionInfo().getMacAddress();
+
+		// if we've got nothing, return a random UUID
+		if (isEmpty(imei) && isEmpty(androidId) && isEmpty(mac)) {
+			return UUID.randomUUID();
+		}
+
+		// concatenate the string
+		String fullHash = buildParams.toString() + imei + androidId + mac;
+
+		return UUID.nameUUIDFromBytes(fullHash.getBytes());
+	}
+
+	/**
+	 * Returns a unique UUID for the current android device. As with all UUIDs,
+	 * this unique ID is "very highly likely" to be unique across all Android
+	 * devices. Much more so than ANDROID_ID is.
+	 * 
+	 * The UUID is generated by using ANDROID_ID as the base key if appropriate,
+	 * falling back on TelephonyManager.getDeviceID() if ANDROID_ID is known to
+	 * be incorrect, and finally falling back on a random UUID that's persisted
+	 * to SharedPreferences if getDeviceID() does not return a usable value.
+	 * 
+	 * In some rare circumstances, this ID may change. In particular, if the
+	 * device is factory reset a new device ID may be generated. In addition, if
+	 * a user upgrades their phone from certain buggy implementations of Android
+	 * 2.2 to a newer, non-buggy version of Android, the device ID may change.
+	 * Or, if a user uninstalls your app on a device that has neither a proper
+	 * Android ID nor a Device ID, this ID may change on reinstallation.
+	 * 
+	 * Note that if the code falls back on using TelephonyManager.getDeviceId(),
+	 * the resulting ID will NOT change after a factory reset. Something to be
+	 * aware of.
+	 * 
+	 * Works around a bug in Android 2.2 for many devices when using ANDROID_ID
+	 * directly.
+	 * 
+	 * @see http://code.google.com/p/android/issues/detail?id=10603
+	 * 
+	 * @return a UUID that may be used to uniquely identify your device for most
+	 *         purposes.
+	 */
+	public UUID getDeviceUuid() {
+		return uuid;
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/src/main/java/org/apache/usergrid/android/client/utils/ObjectUtils.java
----------------------------------------------------------------------
diff --git a/sdks/android/src/main/java/org/apache/usergrid/android/client/utils/ObjectUtils.java b/sdks/android/src/main/java/org/apache/usergrid/android/client/utils/ObjectUtils.java
new file mode 100644
index 0000000..964dd9d
--- /dev/null
+++ b/sdks/android/src/main/java/org/apache/usergrid/android/client/utils/ObjectUtils.java
@@ -0,0 +1,20 @@
+package org.apache.usergrid.android.client.utils;
+
+import java.util.Map;
+
+public class ObjectUtils {
+
+	public static boolean isEmpty(Object s) {
+		if (s == null) {
+			return true;
+		}
+		if ((s instanceof String) && (((String) s).trim().length() == 0)) {
+			return true;
+		}
+		if (s instanceof Map) {
+			return ((Map<?, ?>) s).isEmpty();
+		}
+		return false;
+	}
+
+}
\ No newline at end of file


[57/96] [abbrv] USERGRID-2 package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/src/main/java/org/usergrid/android/client/Client.java
----------------------------------------------------------------------
diff --git a/sdks/android/src/main/java/org/usergrid/android/client/Client.java b/sdks/android/src/main/java/org/usergrid/android/client/Client.java
deleted file mode 100644
index 3effe73..0000000
--- a/sdks/android/src/main/java/org/usergrid/android/client/Client.java
+++ /dev/null
@@ -1,590 +0,0 @@
-package org.usergrid.android.client;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.UUID;
-import org.springframework.http.HttpMethod;
-import org.springframework.web.client.RestTemplate;
-import org.usergrid.android.client.callbacks.ApiResponseCallback;
-import org.usergrid.android.client.callbacks.ClientAsyncTask;
-import org.usergrid.android.client.callbacks.DeviceRegistrationCallback;
-import org.usergrid.android.client.callbacks.GroupsRetrievedCallback;
-import org.usergrid.android.client.callbacks.QueryResultsCallback;
-import org.usergrid.java.client.entities.Device;
-import org.usergrid.java.client.entities.Entity;
-import org.usergrid.java.client.entities.Group;
-import org.usergrid.java.client.entities.User;
-import org.usergrid.java.client.response.ApiResponse;
-import org.usergrid.android.client.utils.DeviceUuidFactory;
-
-import android.content.Context;
-import android.location.Location;
-
-/**
- * The Client class for accessing the Usergrid API. Start by instantiating this
- * class though the appropriate constructor.
- * 
- */
-public class Client extends org.usergrid.java.client.Client {
-
-	private static final String TAG = "UsergridClient";
-
-	public static boolean FORCE_PUBLIC_API = false;
-
-	// Public API
-	public static String PUBLIC_API_URL = "http://api.usergrid.com";
-
-	// Local API of standalone server
-	public static String LOCAL_STANDALONE_API_URL = "http://localhost:8080";
-
-	// Local API of Tomcat server in Eclipse
-	public static String LOCAL_TOMCAT_API_URL = "http://localhost:8080/ROOT";
-
-	// Local API
-	public static String LOCAL_API_URL = LOCAL_STANDALONE_API_URL;
-
-	
-	static RestTemplate restTemplate = new RestTemplate(true);
-
-	/**
-	 * Default constructor for instantiating a client.
-	 */
-	public Client() {
-		init();
-	}
-
-	/**
-	 * Instantiate client for a specific app
-	 * 
-	 * @param applicationId
-	 *            the application id or name
-	 */
-	public Client(String organizationId, String applicationId) {
-		super(organizationId, applicationId);
-	}
-
-
-	/**
-	 * Log the user in and get a valid access token. Executes asynchronously in
-	 * background and the callbacks are called in the UI thread.
-	 * 
-	 * @param email
-	 * @param password
-	 * @param callback
-	 */
-	public void authorizeAppUserAsync(final String email,
-			final String password, final ApiResponseCallback callback) {
-		(new ClientAsyncTask<ApiResponse>(callback) {
-			@Override
-			public ApiResponse doTask() {
-				return authorizeAppUser(email, password);
-			}
-		}).execute();
-	}
-
-	
-
-	/**
-	 * Log the user in with their numeric pin-code and get a valid access token.
-	 * Executes asynchronously in background and the callbacks are called in the
-	 * UI thread.
-	 * 
-	 * @param email
-	 * @param pin
-	 * @param callback
-	 */
-	public void authorizeAppUserViaPinAsync(final String email,
-			final String pin, final ApiResponseCallback callback) {
-		(new ClientAsyncTask<ApiResponse>(callback) {
-			@Override
-			public ApiResponse doTask() {
-				return authorizeAppUserViaPin(email, pin);
-			}
-		}).execute();
-	}
-
-
-	/**
-	 * Log the user in with their numeric pin-code and get a valid access token.
-	 * Executes asynchronously in background and the callbacks are called in the
-	 * UI thread.
-	 * 
-	 * @param email
-	 * @param pin
-	 * @param callback
-	 */
-	public void authorizeAppUserViaFacebookAsync(final String fb_access_token,
-			final ApiResponseCallback callback) {
-		(new ClientAsyncTask<ApiResponse>(callback) {
-			@Override
-			public ApiResponse doTask() {
-				return authorizeAppUserViaFacebook(fb_access_token);
-			}
-		}).execute();
-	}
-
-	
-
-	/**
-	 * Log the app in with it's client id and client secret key. Not recommended
-	 * for production apps. Executes asynchronously in background and the
-	 * callbacks are called in the UI thread.
-	 * 
-	 * @param clientId
-	 * @param clientSecret
-	 * @param callback
-	 */
-	public void authorizeAppClientAsync(final String clientId,
-			final String clientSecret, final ApiResponseCallback callback) {
-		(new ClientAsyncTask<ApiResponse>(callback) {
-
-			@Override
-			public ApiResponse doTask() {
-				return authorizeAppClient(clientId, clientSecret);
-			}
-		}).execute();
-	}
-
-	
-	/**
-	 * Registers a device using the device's unique device ID. Executes
-	 * asynchronously in background and the callbacks are called in the UI
-	 * thread.
-	 * 
-	 * @param context
-	 * @param properties
-	 * @param callback
-	 */
-	public void registerDeviceAsync(final Context context,
-			final Map<String, Object> properties,
-			final DeviceRegistrationCallback callback) {
-		(new ClientAsyncTask<Device>(callback) {
-			@Override
-			public Device doTask() {
-			    UUID deviceId = new DeviceUuidFactory(context).getDeviceUuid();
-		        
-				return registerDevice(deviceId, properties);
-			}
-		}).execute();
-	}
-
-
-  /**
-   * Registers a device using the device's unique device ID. Executes
-   * asynchronously in background and the callbacks are called in the UI
-   * thread.
-   *
-   * @param context
-   * @param properties
-   * @param callback
-   */
-  public void registerDeviceForPushAsync(final Context context,
-                                         final String notifier,
-                                         final String token,
-                                         final Map<String, Object> properties,
-                                         final DeviceRegistrationCallback callback) {
-    (new ClientAsyncTask<Device>(callback) {
-      @Override
-      public Device doTask() {
-        UUID deviceId = new DeviceUuidFactory(context).getDeviceUuid();
-
-        return registerDeviceForPush(deviceId, notifier, token, properties);
-      }
-    }).execute();
-  }
-
-
-  /**
-	 * Create a new entity on the server. Executes asynchronously in background
-	 * and the callbacks are called in the UI thread.
-	 * 
-	 * @param entity
-	 * @param callback
-	 */
-	public void createEntityAsync(final Entity entity,
-			final ApiResponseCallback callback) {
-		(new ClientAsyncTask<ApiResponse>(callback) {
-			@Override
-			public ApiResponse doTask() {
-				return createEntity(entity);
-			}
-		}).execute();
-	}
-
-	
-	/**
-	 * Create a new entity on the server from a set of properties. Properties
-	 * must include a "type" property. Executes asynchronously in background and
-	 * the callbacks are called in the UI thread.
-	 * 
-	 * @param properties
-	 * @param callback
-	 */
-	public void createEntityAsync(final Map<String, Object> properties,
-			final ApiResponseCallback callback) {
-		(new ClientAsyncTask<ApiResponse>(callback) {
-			@Override
-			public ApiResponse doTask() {
-				return createEntity(properties);
-			}
-		}).execute();
-	}
-
-
-	/**
-	 * Creates a user. Executes asynchronously in background and the callbacks
-	 * are called in the UI thread.
-	 * 
-	 * @param username
-	 * @param name
-	 * @param email
-	 * @param password
-	 * @param callback
-	 */
-	public void createUserAsync(final String username, final String name,
-			final String email, final String password,
-			final ApiResponseCallback callback) {
-		(new ClientAsyncTask<ApiResponse>(callback) {
-			@Override
-			public ApiResponse doTask() {
-				return createUser(username, name, email, password);
-			}
-		}).execute();
-	}
-
-
-
-	/**
-	 * Get the groups for the user. Executes asynchronously in background and
-	 * the callbacks are called in the UI thread.
-	 * 
-	 * @param userId
-	 * @param callback
-	 */
-	public void getGroupsForUserAsync(final String userId,
-			final GroupsRetrievedCallback callback) {
-		(new ClientAsyncTask<Map<String, Group>>(callback) {
-			@Override
-			public Map<String, Group> doTask() {
-				return getGroupsForUser(userId);
-			}
-		}).execute();
-	}
-
-	/**
-	 * Get a user's activity feed. Returned as a query to ease paging. Executes
-	 * asynchronously in background and the callbacks are called in the UI
-	 * thread.
-	 * 
-	 * 
-	 * @param userId
-	 * @param callback
-	 */
-	public void queryActivityFeedForUserAsync(final String userId, final QueryResultsCallback callback) {
-		(new ClientAsyncTask<Query>(callback) {
-			@Override
-			public Query doTask() {
-				return queryActivityFeedForUser(userId);
-			}
-		}).execute();
-	}
-
-	
-	/**
-	 * Creates and posts an activity to a user. Executes asynchronously in
-	 * background and the callbacks are called in the UI thread.
-	 * 
-	 * @param verb
-	 * @param title
-	 * @param content
-	 * @param category
-	 * @param user
-	 * @param object
-	 * @param objectType
-	 * @param objectName
-	 * @param objectContent
-	 * @param callback
-	 */
-	public void postUserActivityAsync(final String verb, final String title,
-			final String content, final String category, final User user,
-			final Entity object, final String objectType,
-			final String objectName, final String objectContent,
-			final ApiResponseCallback callback) {
-		(new ClientAsyncTask<ApiResponse>(callback) {
-			@Override
-			public ApiResponse doTask() {
-				return postUserActivity(verb, title, content, category, user,
-						object, objectType, objectName, objectContent);
-			}
-		}).execute();
-	}
-
-	
-	/**
-	 * Creates and posts an activity to a group. Executes asynchronously in
-	 * background and the callbacks are called in the UI thread.
-	 * 
-	 * @param groupId
-	 * @param verb
-	 * @param title
-	 * @param content
-	 * @param category
-	 * @param user
-	 * @param object
-	 * @param objectType
-	 * @param objectName
-	 * @param objectContent
-	 * @param callback
-	 */
-	public void postGroupActivityAsync(final String groupId, final String verb, final String title,
-			final String content, final String category, final User user,
-			final Entity object, final String objectType,
-			final String objectName, final String objectContent,
-			final ApiResponseCallback callback) {
-		(new ClientAsyncTask<ApiResponse>(callback) {
-			@Override
-			public ApiResponse doTask() {
-				return postGroupActivity(groupId, verb, title, content, category, user,
-						object, objectType, objectName, objectContent);
-			}
-		}).execute();
-	}
-
-
-	/**
-	 * Get a group's activity feed. Returned as a query to ease paging. Executes
-	 * asynchronously in background and the callbacks are called in the UI
-	 * thread.
-	 * 
-	 * 
-	 * @param userId
-	 * @param callback
-	 */
-	public void queryActivityFeedForGroupAsync(final String groupId,
-			final QueryResultsCallback callback) {
-		(new ClientAsyncTask<Query>(callback) {
-			@Override
-			public Query doTask() {
-				return queryActivityFeedForGroup(groupId);
-			}
-		}).execute();
-	}
-
-
-	/**
-	 * Perform a query request and return a query object. The Query object
-	 * provides a simple way of dealing with result sets that need to be
-	 * iterated or paged through. Executes asynchronously in background and the
-	 * callbacks are called in the UI thread.
-	 * 
-	 * @param callback
-	 * @param method
-	 * @param params
-	 * @param data
-	 * @param segments
-	 */
-	public void queryEntitiesRequestAsync(final QueryResultsCallback callback,
-			final HttpMethod method, final Map<String, Object> params,
-			final Object data, final String... segments) {
-		(new ClientAsyncTask<Query>(callback) {
-			@Override
-			public Query doTask() {
-				return queryEntitiesRequest(method, params, data, segments);
-			}
-		}).execute();
-	}
-
-
-	/**
-	 * Perform a query of the users collection. Executes asynchronously in
-	 * background and the callbacks are called in the UI thread.
-	 * 
-	 * @param callback
-	 */
-	public void queryUsersAsync(QueryResultsCallback callback) {
-		queryEntitiesRequestAsync(callback, HttpMethod.GET, null, null,
-				getApplicationId(), "users");
-	}
-
-	/**
-	 * Perform a query of the users collection using the provided query command.
-	 * For example: "name contains 'ed'". Executes asynchronously in background
-	 * and the callbacks are called in the UI thread.
-	 * 
-	 * @param ql
-	 * @param callback
-	 */
-	public void queryUsersAsync(String ql, QueryResultsCallback callback) {
-		Map<String, Object> params = new HashMap<String, Object>();
-		params.put("ql", ql);
-		queryEntitiesRequestAsync(callback, HttpMethod.GET, params, null,
-				getApplicationId(), "users");
-	}
-
-	
-	/**
-	 * Queries the users for the specified group. Executes asynchronously in
-	 * background and the callbacks are called in the UI thread.
-	 * 
-	 * @param groupId
-	 * @param callback
-	 */
-	public void queryUsersForGroupAsync(String groupId,
-			QueryResultsCallback callback) {
-		queryEntitiesRequestAsync(callback, HttpMethod.GET, null, null,
-				getApplicationId(), "groups", groupId, "users");
-	}
-
-	/**
-	 * Adds a user to the specified groups. Executes asynchronously in
-	 * background and the callbacks are called in the UI thread.
-	 * 
-	 * @param userId
-	 * @param groupId
-	 * @param callback
-	 */
-	public void addUserToGroupAsync(final String userId, final String groupId,
-			final ApiResponseCallback callback) {
-		(new ClientAsyncTask<ApiResponse>(callback) {
-			@Override
-			public ApiResponse doTask() {
-				return addUserToGroup(userId, groupId);
-			}
-		}).execute();
-	}
-
-
-	/**
-	 * Creates a group with the specified group path. Group paths can be slash
-	 * ("/") delimited like file paths for hierarchical group relationships.
-	 * Executes asynchronously in background and the callbacks are called in the
-	 * UI thread.
-	 * 
-	 * @param groupPath
-	 * @param callback
-	 */
-	public void createGroupAsync(String groupPath,
-			final ApiResponseCallback callback) {
-		createGroupAsync(groupPath, null);
-	}
-
-	
-
-	/**
-	 * Creates a group with the specified group path and group title. Group
-	 * paths can be slash ("/") deliminted like file paths for hierarchical
-	 * group relationships. Executes asynchronously in background and the
-	 * callbacks are called in the UI thread.
-	 * 
-	 * @param groupPath
-	 * @param groupTitle
-	 * @param callback
-	 */
-	public void createGroupAsync(final String groupPath,
-			final String groupTitle, final ApiResponseCallback callback) {
-		(new ClientAsyncTask<ApiResponse>(callback) {
-			@Override
-			public ApiResponse doTask() {
-				return createGroup(groupPath, groupTitle);
-			}
-		}).execute();
-	}
-
-	
-	/**
-	 * Connect two entities together. Executes asynchronously in background and
-	 * the callbacks are called in the UI thread.
-	 * 
-	 * @param connectingEntityType
-	 * @param connectingEntityId
-	 * @param connectionType
-	 * @param connectedEntityId
-	 * @param callback
-	 */
-	public void connectEntitiesAsync(final String connectingEntityType,
-			final String connectingEntityId, final String connectionType,
-			final String connectedEntityId, final ApiResponseCallback callback) {
-		(new ClientAsyncTask<ApiResponse>(callback) {
-			@Override
-			public ApiResponse doTask() {
-				return connectEntities(connectingEntityType,
-						connectingEntityId, connectionType, connectedEntityId);
-			}
-		}).execute();
-	}
-
-
-
-	/**
-	 * Disconnect two entities. Executes asynchronously in background and the
-	 * callbacks are called in the UI thread.
-	 * 
-	 * @param connectingEntityType
-	 * @param connectingEntityId
-	 * @param connectionType
-	 * @param connectedEntityId
-	 * @param callback
-	 */
-	public void disconnectEntitiesAsync(final String connectingEntityType,
-			final String connectingEntityId, final String connectionType,
-			final String connectedEntityId, final ApiResponseCallback callback) {
-		(new ClientAsyncTask<ApiResponse>(callback) {
-			@Override
-			public ApiResponse doTask() {
-				return connectEntities(connectingEntityType,
-						connectingEntityId, connectionType, connectedEntityId);
-			}
-		}).execute();
-	}
-
-
-
-	/**
-	 * Query the connected entities. Executes asynchronously in background and
-	 * the callbacks are called in the UI thread.
-	 * 
-	 * @param connectingEntityType
-	 * @param connectingEntityId
-	 * @param connectionType
-	 * @param ql
-	 * @param callback
-	 */
-	public void queryEntityConnectionsAsync(String connectingEntityType,
-			String connectingEntityId, String connectionType, String ql,
-			QueryResultsCallback callback) {
-		Map<String, Object> params = new HashMap<String, Object>();
-		params.put("ql", ql);
-		queryEntitiesRequestAsync(callback, HttpMethod.GET, params, null,
-				getApplicationId(), connectingEntityType, connectingEntityId,
-				connectionType);
-	}
-
-
-	/**
-	 * Query the connected entities within distance of a specific point. .
-	 * Executes asynchronously in background and the callbacks are called in the
-	 * UI thread.
-	 * 
-	 * @param connectingEntityType
-	 * @param connectingEntityId
-	 * @param connectionType
-	 * @param distance
-	 * @param latitude
-	 * @param longitude
-	 * @param callback
-	 */
-	public void queryEntityConnectionsWithinLocationAsync(
-			String connectingEntityType, String connectingEntityId,
-			String connectionType, float distance, Location location,
-			String ql, QueryResultsCallback callback) {
-		Map<String, Object> params = new HashMap<String, Object>();
-		params.put("ql", makeLocationQL(distance, location.getLatitude(), location.getLongitude(), ql));
-		params.put("ql", ql);
-		queryEntitiesRequestAsync(callback, HttpMethod.GET, params, null,
-				getApplicationId(), connectingEntityType, connectingEntityId,
-				connectionType);
-	}
-
-	
-	
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/src/main/java/org/usergrid/android/client/callbacks/ApiResponseCallback.java
----------------------------------------------------------------------
diff --git a/sdks/android/src/main/java/org/usergrid/android/client/callbacks/ApiResponseCallback.java b/sdks/android/src/main/java/org/usergrid/android/client/callbacks/ApiResponseCallback.java
deleted file mode 100644
index 6da5040..0000000
--- a/sdks/android/src/main/java/org/usergrid/android/client/callbacks/ApiResponseCallback.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package org.usergrid.android.client.callbacks;
-
-import org.usergrid.java.client.response.ApiResponse;
-
-
-public interface ApiResponseCallback extends ClientCallback<ApiResponse> {
-
-	public void onResponse(ApiResponse response);
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/src/main/java/org/usergrid/android/client/callbacks/ClientAsyncTask.java
----------------------------------------------------------------------
diff --git a/sdks/android/src/main/java/org/usergrid/android/client/callbacks/ClientAsyncTask.java b/sdks/android/src/main/java/org/usergrid/android/client/callbacks/ClientAsyncTask.java
deleted file mode 100644
index da2dcaa..0000000
--- a/sdks/android/src/main/java/org/usergrid/android/client/callbacks/ClientAsyncTask.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package org.usergrid.android.client.callbacks;
-
-import android.os.AsyncTask;
-
-public abstract class ClientAsyncTask<T> extends AsyncTask<Void, Exception, T> {
-
-	ClientCallback<T> callback;
-
-	public ClientAsyncTask(ClientCallback<T> callback) {
-		this.callback = callback;
-	}
-
-	@Override
-	protected T doInBackground(Void... v) {
-		try {
-			return doTask();
-		} catch (Exception e) {
-			this.publishProgress(e);
-		}
-		return null;
-	}
-
-	public abstract T doTask();
-
-	@Override
-	protected void onPostExecute(T response) {
-		if (callback != null) {
-			callback.onResponse(response);
-		}
-	}
-
-	@Override
-	protected void onProgressUpdate(Exception... e) {
-		if ((callback != null) && (e != null) && (e.length > 0)) {
-			callback.onException(e[0]);
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/src/main/java/org/usergrid/android/client/callbacks/ClientCallback.java
----------------------------------------------------------------------
diff --git a/sdks/android/src/main/java/org/usergrid/android/client/callbacks/ClientCallback.java b/sdks/android/src/main/java/org/usergrid/android/client/callbacks/ClientCallback.java
deleted file mode 100644
index d84d17b..0000000
--- a/sdks/android/src/main/java/org/usergrid/android/client/callbacks/ClientCallback.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package org.usergrid.android.client.callbacks;
-
-public interface ClientCallback<T> {
-
-	public void onResponse(T response);
-
-	public void onException(Exception e);
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/src/main/java/org/usergrid/android/client/callbacks/DeviceRegistrationCallback.java
----------------------------------------------------------------------
diff --git a/sdks/android/src/main/java/org/usergrid/android/client/callbacks/DeviceRegistrationCallback.java b/sdks/android/src/main/java/org/usergrid/android/client/callbacks/DeviceRegistrationCallback.java
deleted file mode 100644
index 2ed0ce8..0000000
--- a/sdks/android/src/main/java/org/usergrid/android/client/callbacks/DeviceRegistrationCallback.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package org.usergrid.android.client.callbacks;
-
-import org.usergrid.java.client.entities.Device;
-
-public interface DeviceRegistrationCallback extends ClientCallback<Device> {
-
-	public void onDeviceRegistration(Device device);
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/src/main/java/org/usergrid/android/client/callbacks/GroupsRetrievedCallback.java
----------------------------------------------------------------------
diff --git a/sdks/android/src/main/java/org/usergrid/android/client/callbacks/GroupsRetrievedCallback.java b/sdks/android/src/main/java/org/usergrid/android/client/callbacks/GroupsRetrievedCallback.java
deleted file mode 100644
index 4586f60..0000000
--- a/sdks/android/src/main/java/org/usergrid/android/client/callbacks/GroupsRetrievedCallback.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package org.usergrid.android.client.callbacks;
-
-import java.util.Map;
-
-import org.usergrid.java.client.entities.Group;
-
-
-public interface GroupsRetrievedCallback extends
-		ClientCallback<Map<String, Group>> {
-
-	public void onGroupsRetrieved(Map<String, Group> groups);
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/src/main/java/org/usergrid/android/client/callbacks/QueryResultsCallback.java
----------------------------------------------------------------------
diff --git a/sdks/android/src/main/java/org/usergrid/android/client/callbacks/QueryResultsCallback.java b/sdks/android/src/main/java/org/usergrid/android/client/callbacks/QueryResultsCallback.java
deleted file mode 100644
index 9aac648..0000000
--- a/sdks/android/src/main/java/org/usergrid/android/client/callbacks/QueryResultsCallback.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package org.usergrid.android.client.callbacks;
-
-import org.usergrid.java.client.Client.Query;
-
-public interface QueryResultsCallback extends ClientCallback<Query> {
-
-	public void onQueryResults(Query query);
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/src/main/java/org/usergrid/android/client/utils/DeviceUuidFactory.java
----------------------------------------------------------------------
diff --git a/sdks/android/src/main/java/org/usergrid/android/client/utils/DeviceUuidFactory.java b/sdks/android/src/main/java/org/usergrid/android/client/utils/DeviceUuidFactory.java
deleted file mode 100644
index d3ac84a..0000000
--- a/sdks/android/src/main/java/org/usergrid/android/client/utils/DeviceUuidFactory.java
+++ /dev/null
@@ -1,154 +0,0 @@
-package org.usergrid.android.client.utils;
-
-import static org.usergrid.android.client.utils.ObjectUtils.isEmpty;
-
-import java.io.UnsupportedEncodingException;
-import java.util.UUID;
-
-import android.content.Context;
-import android.content.SharedPreferences;
-import android.net.wifi.WifiManager;
-import android.os.Build;
-import android.provider.Settings.Secure;
-import android.telephony.TelephonyManager;
-
-/**
- * Tries to get the device ID as a UUID and fallsback to a generated UUID value
- * if it doesn't work.
- * 
- * @see http 
- *      ://stackoverflow.com/questions/2785485/is-there-a-unique-android-device
- *      -id
- * 
- */
-public class DeviceUuidFactory {
-	protected static final String PREFS_FILE = "device_id.xml";
-	protected static final String PREFS_DEVICE_ID = "device_id";
-
-	protected static UUID uuid;
-
-	public DeviceUuidFactory(Context context) {
-
-		if (uuid == null) {
-			synchronized (DeviceUuidFactory.class) {
-				if (uuid == null) {
-					final SharedPreferences prefs = context
-							.getSharedPreferences(PREFS_FILE, 0);
-					final String id = prefs.getString(PREFS_DEVICE_ID, null);
-
-					if (id != null) {
-						// Use the ids previously computed and stored in the
-						// prefs file
-						uuid = UUID.fromString(id);
-
-					} else {
-
-						final String androidId = Secure
-								.getString(context.getContentResolver(),
-										Secure.ANDROID_ID);
-
-						// Use the Android ID unless it's broken, in which case
-						// fallback on deviceId,
-						// unless it's not available, then fallback on a random
-						// number which we store
-						// to a prefs file
-						try {
-							if (!"9774d56d682e549c".equals(androidId)) {
-								uuid = UUID.nameUUIDFromBytes(androidId
-										.getBytes("utf8"));
-							} else {
-								final String deviceId = ((TelephonyManager) context
-										.getSystemService(Context.TELEPHONY_SERVICE))
-										.getDeviceId();
-								uuid = deviceId != null ? UUID
-										.nameUUIDFromBytes(deviceId
-												.getBytes("utf8"))
-										: generateDeviceUuid(context);
-							}
-						} catch (UnsupportedEncodingException e) {
-							throw new RuntimeException(e);
-						}
-
-						// Write the value out to the prefs file
-						prefs.edit()
-								.putString(PREFS_DEVICE_ID, uuid.toString())
-								.commit();
-
-					}
-
-				}
-			}
-		}
-
-	}
-
-	private UUID generateDeviceUuid(Context context) {
-
-		// Get some of the hardware information
-		String buildParams = Build.BOARD + Build.BRAND + Build.CPU_ABI
-				+ Build.DEVICE + Build.DISPLAY + Build.FINGERPRINT + Build.HOST
-				+ Build.ID + Build.MANUFACTURER + Build.MODEL + Build.PRODUCT
-				+ Build.TAGS + Build.TYPE + Build.USER;
-
-		// Requires READ_PHONE_STATE
-		TelephonyManager tm = (TelephonyManager) context
-				.getSystemService(Context.TELEPHONY_SERVICE);
-
-		// gets the imei (GSM) or MEID/ESN (CDMA)
-		String imei = tm.getDeviceId();
-
-		// gets the android-assigned id
-		String androidId = Secure.getString(context.getContentResolver(),
-				Secure.ANDROID_ID);
-
-		// requires ACCESS_WIFI_STATE
-		WifiManager wm = (WifiManager) context
-				.getSystemService(Context.WIFI_SERVICE);
-
-		// gets the MAC address
-		String mac = wm.getConnectionInfo().getMacAddress();
-
-		// if we've got nothing, return a random UUID
-		if (isEmpty(imei) && isEmpty(androidId) && isEmpty(mac)) {
-			return UUID.randomUUID();
-		}
-
-		// concatenate the string
-		String fullHash = buildParams.toString() + imei + androidId + mac;
-
-		return UUID.nameUUIDFromBytes(fullHash.getBytes());
-	}
-
-	/**
-	 * Returns a unique UUID for the current android device. As with all UUIDs,
-	 * this unique ID is "very highly likely" to be unique across all Android
-	 * devices. Much more so than ANDROID_ID is.
-	 * 
-	 * The UUID is generated by using ANDROID_ID as the base key if appropriate,
-	 * falling back on TelephonyManager.getDeviceID() if ANDROID_ID is known to
-	 * be incorrect, and finally falling back on a random UUID that's persisted
-	 * to SharedPreferences if getDeviceID() does not return a usable value.
-	 * 
-	 * In some rare circumstances, this ID may change. In particular, if the
-	 * device is factory reset a new device ID may be generated. In addition, if
-	 * a user upgrades their phone from certain buggy implementations of Android
-	 * 2.2 to a newer, non-buggy version of Android, the device ID may change.
-	 * Or, if a user uninstalls your app on a device that has neither a proper
-	 * Android ID nor a Device ID, this ID may change on reinstallation.
-	 * 
-	 * Note that if the code falls back on using TelephonyManager.getDeviceId(),
-	 * the resulting ID will NOT change after a factory reset. Something to be
-	 * aware of.
-	 * 
-	 * Works around a bug in Android 2.2 for many devices when using ANDROID_ID
-	 * directly.
-	 * 
-	 * @see http://code.google.com/p/android/issues/detail?id=10603
-	 * 
-	 * @return a UUID that may be used to uniquely identify your device for most
-	 *         purposes.
-	 */
-	public UUID getDeviceUuid() {
-		return uuid;
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/src/main/java/org/usergrid/android/client/utils/ObjectUtils.java
----------------------------------------------------------------------
diff --git a/sdks/android/src/main/java/org/usergrid/android/client/utils/ObjectUtils.java b/sdks/android/src/main/java/org/usergrid/android/client/utils/ObjectUtils.java
deleted file mode 100644
index a9d5a16..0000000
--- a/sdks/android/src/main/java/org/usergrid/android/client/utils/ObjectUtils.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package org.usergrid.android.client.utils;
-
-import java.util.Map;
-
-public class ObjectUtils {
-
-	public static boolean isEmpty(Object s) {
-		if (s == null) {
-			return true;
-		}
-		if ((s instanceof String) && (((String) s).trim().length() == 0)) {
-			return true;
-		}
-		if (s instanceof Map) {
-			return ((Map<?, ?>) s).isEmpty();
-		}
-		return false;
-	}
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/README.txt
----------------------------------------------------------------------
diff --git a/sdks/java/README.txt b/sdks/java/README.txt
index 5540ba4..ce11b55 100644
--- a/sdks/java/README.txt
+++ b/sdks/java/README.txt
@@ -1,8 +1,7 @@
 
-Usergrid Android Client
+Apache Usergrid Java Client
 
-Experimental Android client for Usergrid. Basically uses Spring Android and
-Jackson to wrap calls to Usergrid REST API. Loosely based on the Usergrid
+Experimental Java client for Apache Usergrid. Loosely based on the Usergrid
 Javascript client.
 
 Requires the following permissions:

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/pom.xml
----------------------------------------------------------------------
diff --git a/sdks/java/pom.xml b/sdks/java/pom.xml
index 6913cf9..ebeb2bf 100644
--- a/sdks/java/pom.xml
+++ b/sdks/java/pom.xml
@@ -14,12 +14,12 @@
 	</parent>
 	
 	<modelVersion>4.0.0</modelVersion>
-	<groupId>org.usergrid</groupId>
+	<groupId>org.apache.usergrid</groupId>
 	<artifactId>usergrid-java-client</artifactId>
 	<version>0.0.8-SNAPSHOT</version>
 	<packaging>jar</packaging>
 	<description>A simple java client for usergrid</description>
-	<url>https://github.com/apigee/usergrid-stack-internal</url>
+	<url>https://github.com/usergrid/usergrid</url>
 	
 	<licenses>
 		<license>
@@ -82,9 +82,4 @@
 			<url>http://maven.springframework.org/milestone</url>
 		</repository>
 	</repositories>
-	<scm>
-		<connection>scm:git:git@github.com:apigee/usergrid-java-sdk.git</connection>
-		<developerConnection>scm:git:git@github.com:apigee/usergrid-java-sdk.git</developerConnection>
-		<url>git@github.com:apigee/usergrid-java-sdk.git</url>
-	</scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/apache/usergrid/java/client/Client.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/apache/usergrid/java/client/Client.java b/sdks/java/src/main/java/org/apache/usergrid/java/client/Client.java
new file mode 100644
index 0000000..c3e9d69
--- /dev/null
+++ b/sdks/java/src/main/java/org/apache/usergrid/java/client/Client.java
@@ -0,0 +1,1277 @@
+package org.apache.usergrid.java.client;
+
+import static org.apache.usergrid.java.client.utils.JsonUtils.parse;
+import static org.apache.usergrid.java.client.utils.ObjectUtils.isEmpty;
+import static org.apache.usergrid.java.client.utils.UrlUtils.addQueryParams;
+import static org.apache.usergrid.java.client.utils.UrlUtils.encodeParams;
+import static org.apache.usergrid.java.client.utils.UrlUtils.path;
+import static org.springframework.util.StringUtils.arrayToDelimitedString;
+import static org.springframework.util.StringUtils.tokenizeToStringArray;
+
+import java.util.Collections;
+import java.util.EnumSet;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+import java.util.concurrent.ConcurrentHashMap;
+
+import com.fasterxml.jackson.databind.node.JsonNodeFactory;
+
+import org.apache.usergrid.java.client.entities.Activity;
+import org.apache.usergrid.java.client.entities.Device;
+import org.apache.usergrid.java.client.entities.Entity;
+import org.apache.usergrid.java.client.entities.Group;
+import org.apache.usergrid.java.client.entities.User;
+import org.apache.usergrid.java.client.response.ApiResponse;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.client.HttpClientErrorException;
+import org.springframework.web.client.RestTemplate;
+
+/**
+ * The Client class for accessing the Usergrid API. Start by instantiating this
+ * class though the appropriate constructor.
+ * 
+ */
+public class Client {
+
+    private static final Logger log = LoggerFactory.getLogger(Client.class);
+
+    public static boolean FORCE_PUBLIC_API = false;
+
+    // Public API
+    public static String PUBLIC_API_URL = "http://api.usergrid.com";
+
+    // Local API of standalone server
+    public static String LOCAL_STANDALONE_API_URL = "http://localhost:8080";
+
+    // Local API of Tomcat server in Eclipse
+    public static String LOCAL_TOMCAT_API_URL = "http://localhost:8080/ROOT";
+
+    // Local API
+    public static String LOCAL_API_URL = LOCAL_STANDALONE_API_URL;
+
+    private String apiUrl = PUBLIC_API_URL;
+
+    private String organizationId;
+    private String applicationId;
+    private String clientId;
+    private String clientSecret;
+
+    private User loggedInUser = null;
+
+    private String accessToken = null;
+
+    private String currentOrganization = null;
+
+    static RestTemplate restTemplate = new RestTemplate();
+
+    /**
+     * Default constructor for instantiating a client.
+     */
+    public Client() {
+        init();
+    }
+
+    /**
+     * Instantiate client for a specific app
+     * 
+     * @param applicationId
+     *            the application id or name
+     */
+    public Client(String organizationId, String applicationId) {
+        init();
+        this.organizationId = organizationId;
+        this.applicationId = applicationId;
+    }
+
+    public void init() {
+
+    }
+
+    /**
+     * @return the Usergrid API url (default: http://api.usergrid.com)
+     */
+    public String getApiUrl() {
+        return apiUrl;
+    }
+
+    /**
+     * @param apiUrl
+     *            the Usergrid API url (default: http://api.usergrid.com)
+     */
+    public void setApiUrl(String apiUrl) {
+        this.apiUrl = apiUrl;
+    }
+
+    /**
+     * @param apiUrl
+     *            the Usergrid API url (default: http://api.usergrid.com)
+     * @return Client object for method call chaining
+     */
+    public Client withApiUrl(String apiUrl) {
+        this.apiUrl = apiUrl;
+        return this;
+    }
+    
+    
+    /**
+     * the organizationId to set
+     * @param organizationId
+     * @return
+     */
+    public Client withOrganizationId(String organizationId){
+        this.organizationId = organizationId;
+        return this;
+    }
+    
+    
+
+    /**
+     * @return the organizationId
+     */
+    public String getOrganizationId() {
+        return organizationId;
+    }
+
+    /**
+     * @param organizationId the organizationId to set
+     */
+    public void setOrganizationId(String organizationId) {
+        this.organizationId = organizationId;
+    }
+
+    /**
+     * @return the application id or name
+     */
+    public String getApplicationId() {
+        return applicationId;
+    }
+
+    /**
+     * @param applicationId
+     *            the application id or name
+     */
+    public void setApplicationId(String applicationId) {
+        this.applicationId = applicationId;
+    }
+   
+
+    /**
+     * @param applicationId
+     *            the application id or name
+     * @return Client object for method call chaining
+     */
+    public Client withApplicationId(String applicationId) {
+        this.applicationId = applicationId;
+        return this;
+    }
+
+    /**
+     * @return the client key id for making calls as the application-owner. Not
+     *         safe for most mobile use.
+     */
+    public String getClientId() {
+        return clientId;
+    }
+
+    /**
+     * @param clientId
+     *            the client key id for making calls as the application-owner.
+     *            Not safe for most mobile use.
+     */
+    public void setClientId(String clientId) {
+        this.clientId = clientId;
+    }
+
+    /**
+     * @param clientId
+     *            the client key id for making calls as the application-owner.
+     *            Not safe for most mobile use.
+     * @return Client object for method call chaining
+     */
+    public Client withClientId(String clientId) {
+        this.clientId = clientId;
+        return this;
+    }
+
+    /**
+     * @return the client key id for making calls as the application-owner. Not
+     *         safe for most mobile use.
+     */
+    public String getClientSecret() {
+        return clientSecret;
+    }
+
+    /**
+     * @param clientSecret
+     *            the client key id for making calls as the application-owner.
+     *            Not safe for most mobile use.
+     */
+    public void setClientSecret(String clientSecret) {
+        this.clientSecret = clientSecret;
+    }
+
+    /**
+     * @param clientSecret
+     *            the client key id for making calls as the application-owner.
+     *            Not safe for most mobile use.
+     * @return Client object for method call chaining
+     */
+    public Client withClientSecret(String clientSecret) {
+        this.clientSecret = clientSecret;
+        return this;
+    }
+
+    /**
+     * @return the logged-in user after a successful authorizeAppUser request
+     */
+    public User getLoggedInUser() {
+        return loggedInUser;
+    }
+
+    /**
+     * @param loggedInUser
+     *            the logged-in user, usually not set by host application
+     */
+    public void setLoggedInUser(User loggedInUser) {
+        this.loggedInUser = loggedInUser;
+    }
+
+    /**
+     * @return the OAuth2 access token after a successful authorize request
+     */
+    public String getAccessToken() {
+        return accessToken;
+    }
+
+    /**
+     * @param accessToken
+     *            an OAuth2 access token. Usually not set by host application
+     */
+    public void setAccessToken(String accessToken) {
+        this.accessToken = accessToken;
+    }
+
+    /**
+     * @return the currentOrganization
+     */
+    public String getCurrentOrganization() {
+        return currentOrganization;
+    }
+
+    /**
+     * @param currentOrganization
+     */
+    public void setCurrentOrganization(String currentOrganization) {
+        this.currentOrganization = currentOrganization;
+    }
+
+    /**
+     * Low-level HTTP request method. Synchronous, blocks till response or
+     * timeout.
+     * 
+     * @param method
+     *            HttpMethod method
+     * @param cls
+     *            class for the return type
+     * @param params
+     *            parameters to encode as querystring or body parameters
+     * @param data
+     *            JSON data to put in body
+     * @param segments
+     *            REST url path segments (i.e. /segment1/segment2/segment3)
+     * @return results marshalled into class specified in cls parameter
+     */
+    public <T> T httpRequest(HttpMethod method, Class<T> cls,
+            Map<String, Object> params, Object data, String... segments) {
+        HttpHeaders requestHeaders = new HttpHeaders();
+        requestHeaders.setAccept(Collections
+                .singletonList(MediaType.APPLICATION_JSON));
+        if (accessToken != null) {
+            String auth = "Bearer " + accessToken;
+            requestHeaders.set("Authorization", auth);
+            log.info("Authorization: " + auth);
+        }
+        String url = path(apiUrl, segments);
+
+        MediaType contentType = MediaType.APPLICATION_JSON;
+        if (method.equals(HttpMethod.POST) && isEmpty(data) && !isEmpty(params)) {
+            data = encodeParams(params);
+            contentType = MediaType.APPLICATION_FORM_URLENCODED;
+        } else {
+            url = addQueryParams(url, params);
+        }
+        requestHeaders.setContentType(contentType);
+        HttpEntity<?> requestEntity = null;
+
+        if (method.equals(HttpMethod.POST) || method.equals(HttpMethod.PUT)) {
+            if (isEmpty(data)) {
+                data = JsonNodeFactory.instance.objectNode();
+            }
+            requestEntity = new HttpEntity<Object>(data, requestHeaders);
+        } else {
+            requestEntity = new HttpEntity<Object>(requestHeaders);
+        }
+        log.info("Client.httpRequest(): url: " + url);
+        ResponseEntity<T> responseEntity = restTemplate.exchange(url, method,
+                requestEntity, cls);
+        log.info("Client.httpRequest(): reponse body: "
+                + responseEntity.getBody().toString());
+        return responseEntity.getBody();
+    }
+
+    /**
+     * High-level Usergrid API request.
+     * 
+     * @param method
+     * @param params
+     * @param data
+     * @param segments
+     * @return
+     */
+    public ApiResponse apiRequest(HttpMethod method,
+            Map<String, Object> params, Object data, String... segments) {
+        ApiResponse response = null;
+        try {
+            response = httpRequest(method, ApiResponse.class, params, data,
+                    segments);
+            log.info("Client.apiRequest(): Response: " + response);
+        } catch (HttpClientErrorException e) {
+            log.error("Client.apiRequest(): HTTP error: "
+                    + e.getLocalizedMessage());
+            response = parse(e.getResponseBodyAsString(), ApiResponse.class);
+            if ((response != null) && !isEmpty(response.getError())) {
+                log.error("Client.apiRequest(): Response error: "
+                        + response.getError());
+                if (!isEmpty(response.getException())) {
+                    log.error("Client.apiRequest(): Response exception: "
+                            + response.getException());
+                }
+            }
+        }
+        return response;
+    }
+
+    protected void assertValidApplicationId() {
+        if (isEmpty(applicationId)) {
+            throw new IllegalArgumentException("No application id specified");
+        }
+    }
+
+    /**
+     * Log the user in and get a valid access token.
+     * 
+     * @param email
+     * @param password
+     * @return non-null ApiResponse if request succeeds, check getError() for
+     *         "invalid_grant" to see if access is denied.
+     */
+    public ApiResponse authorizeAppUser(String email, String password) {
+        validateNonEmptyParam(email, "email");
+        validateNonEmptyParam(password,"password");
+        assertValidApplicationId();
+        loggedInUser = null;
+        accessToken = null;
+        currentOrganization = null;
+        Map<String, Object> formData = new HashMap<String, Object>();
+        formData.put("grant_type", "password");
+        formData.put("username", email);
+        formData.put("password", password);
+        ApiResponse response = apiRequest(HttpMethod.POST, formData, null,
+                organizationId, applicationId, "token");
+        if (response == null) {
+            return response;
+        }
+        if (!isEmpty(response.getAccessToken()) && (response.getUser() != null)) {
+            loggedInUser = response.getUser();
+            accessToken = response.getAccessToken();
+            currentOrganization = null;
+            log.info("Client.authorizeAppUser(): Access token: " + accessToken);
+        } else {
+            log.info("Client.authorizeAppUser(): Response: " + response);
+        }
+        return response;
+    }
+
+    /**
+     * Change the password for the currently logged in user. You must supply the
+     * old password and the new password.
+     * 
+     * @param username
+     * @param oldPassword
+     * @param newPassword
+     * @return
+     */
+    public ApiResponse changePassword(String username, String oldPassword,
+            String newPassword) {
+
+        Map<String, Object> data = new HashMap<String, Object>();
+        data.put("newpassword", newPassword);
+        data.put("oldpassword", oldPassword);
+
+        return apiRequest(HttpMethod.POST, null, data, organizationId,  applicationId, "users",
+                username, "password");
+
+    }
+
+    /**
+     * Log the user in with their numeric pin-code and get a valid access token.
+     * 
+     * @param email
+     * @param pin
+     * @return non-null ApiResponse if request succeeds, check getError() for
+     *         "invalid_grant" to see if access is denied.
+     */
+    public ApiResponse authorizeAppUserViaPin(String email, String pin) {
+        validateNonEmptyParam(email, "email");
+        validateNonEmptyParam(pin, "pin");
+        assertValidApplicationId();
+        loggedInUser = null;
+        accessToken = null;
+        currentOrganization = null;
+        Map<String, Object> formData = new HashMap<String, Object>();
+        formData.put("grant_type", "pin");
+        formData.put("username", email);
+        formData.put("pin", pin);
+        ApiResponse response = apiRequest(HttpMethod.POST, formData, null,
+                organizationId,  applicationId, "token");
+        if (response == null) {
+            return response;
+        }
+        if (!isEmpty(response.getAccessToken()) && (response.getUser() != null)) {
+            loggedInUser = response.getUser();
+            accessToken = response.getAccessToken();
+            currentOrganization = null;
+            log.info("Client.authorizeAppUser(): Access token: " + accessToken);
+        } else {
+            log.info("Client.authorizeAppUser(): Response: " + response);
+        }
+        return response;
+    }
+
+    /**
+     * Log the user in with their Facebook access token retrived via Facebook
+     * OAuth.
+     * 
+     * @param email
+     * @param pin
+     * @return non-null ApiResponse if request succeeds, check getError() for
+     *         "invalid_grant" to see if access is denied.
+     */
+    public ApiResponse authorizeAppUserViaFacebook(String fb_access_token) {
+        validateNonEmptyParam(fb_access_token, "Facebook token");
+        assertValidApplicationId();
+        loggedInUser = null;
+        accessToken = null;
+        currentOrganization = null;
+        Map<String, Object> formData = new HashMap<String, Object>();
+        formData.put("fb_access_token", fb_access_token);
+        ApiResponse response = apiRequest(HttpMethod.POST, formData, null,
+                organizationId,  applicationId, "auth", "facebook");
+        if (response == null) {
+            return response;
+        }
+        if (!isEmpty(response.getAccessToken()) && (response.getUser() != null)) {
+            loggedInUser = response.getUser();
+            accessToken = response.getAccessToken();
+            currentOrganization = null;
+            log.info("Client.authorizeAppUserViaFacebook(): Access token: "
+                    + accessToken);
+        } else {
+            log.info("Client.authorizeAppUserViaFacebook(): Response: "
+                    + response);
+        }
+        return response;
+    }
+
+    /**
+     * Log the app in with it's client id and client secret key. Not recommended
+     * for production apps.
+     * 
+     * @param email
+     * @param pin
+     * @return non-null ApiResponse if request succeeds, check getError() for
+     *         "invalid_grant" to see if access is denied.
+     */
+    public ApiResponse authorizeAppClient(String clientId, String clientSecret) {
+        validateNonEmptyParam(clientId, "client identifier");
+        validateNonEmptyParam(clientSecret, "client secret");
+        assertValidApplicationId();
+        loggedInUser = null;
+        accessToken = null;
+        currentOrganization = null;
+        Map<String, Object> formData = new HashMap<String, Object>();
+        formData.put("grant_type", "client_credentials");
+        formData.put("client_id", clientId);
+        formData.put("client_secret", clientSecret);
+        ApiResponse response = apiRequest(HttpMethod.POST, formData, null,
+                organizationId, applicationId, "token");
+        if (response == null) {
+            return response;
+        }
+        if (!isEmpty(response.getAccessToken())) {
+            loggedInUser = null;
+            accessToken = response.getAccessToken();
+            currentOrganization = null;
+            log.info("Client.authorizeAppClient(): Access token: "
+                    + accessToken);
+        } else {
+            log.info("Client.authorizeAppClient(): Response: " + response);
+        }
+        return response;
+    }
+
+    private void validateNonEmptyParam(Object param, String paramName) {
+        if ( isEmpty(param) ) {
+            throw new IllegalArgumentException(paramName + " cannot be null or empty");
+        }
+    }
+
+    /**
+     * Registers a device using the device's unique device ID.
+     * 
+     * @param context
+     * @param properties
+     * @return a Device object if success
+     */
+    public Device registerDevice(UUID deviceId, Map<String, Object> properties) {
+        assertValidApplicationId();
+        if (properties == null) {
+            properties = new HashMap<String, Object>();
+        }
+        properties.put("refreshed", System.currentTimeMillis());
+        ApiResponse response = apiRequest(HttpMethod.PUT, null, properties,
+                organizationId, applicationId, "devices", deviceId.toString());
+        return response.getFirstEntity(Device.class);
+    }
+
+    /**
+     * Registers a device using the device's unique device ID.
+     *
+     * @param context
+     * @param properties
+     * @return a Device object if success
+     */
+    public Device registerDeviceForPush(UUID deviceId,
+                                        String notifier,
+                                        String token,
+                                        Map<String, Object> properties) {
+      if (properties == null) {
+          properties = new HashMap<String, Object>();
+      }
+      String notifierKey = notifier + ".notifier.id";
+      properties.put(notifierKey, token);
+      return registerDevice(deviceId, properties);
+    }
+
+    /**
+     * Create a new entity on the server.
+     * 
+     * @param entity
+     * @return an ApiResponse with the new entity in it.
+     */
+    public ApiResponse createEntity(Entity entity) {
+        assertValidApplicationId();
+        if (isEmpty(entity.getType())) {
+            throw new IllegalArgumentException("Missing entity type");
+        }
+        ApiResponse response = apiRequest(HttpMethod.POST, null, entity,
+                organizationId, applicationId, entity.getType());
+        return response;
+    }
+
+    /**
+     * Create a new entity on the server from a set of properties. Properties
+     * must include a "type" property.
+     * 
+     * @param properties
+     * @return an ApiResponse with the new entity in it.
+     */
+    public ApiResponse createEntity(Map<String, Object> properties) {
+        assertValidApplicationId();
+        if (isEmpty(properties.get("type"))) {
+            throw new IllegalArgumentException("Missing entity type");
+        }
+        ApiResponse response = apiRequest(HttpMethod.POST, null, properties,
+                organizationId, applicationId, properties.get("type").toString());
+        return response;
+    }
+
+    /**
+     * Creates a user.
+     * 
+     * @param username
+     *            required
+     * @param name
+     * @param email
+     * @param password
+     * @return
+     */
+    public ApiResponse createUser(String username, String name, String email,
+            String password) {
+        Map<String, Object> properties = new HashMap<String, Object>();
+        properties.put("type", "user");
+        if (username != null) {
+            properties.put("username", username);
+        }
+        if (name != null) {
+            properties.put("name", name);
+        }
+        if (email != null) {
+            properties.put("email", email);
+        }
+        if (password != null) {
+            properties.put("password", password);
+        }
+        return createEntity(properties);
+    }
+
+    /**
+     * Get the groups for the user.
+     * 
+     * @param userId
+     * @return a map with the group path as the key and the Group entity as the
+     *         value
+     */
+    public Map<String, Group> getGroupsForUser(String userId) {
+        ApiResponse response = apiRequest(HttpMethod.GET, null, null,
+                organizationId, applicationId, "users", userId, "groups");
+        Map<String, Group> groupMap = new HashMap<String, Group>();
+        if (response != null) {
+            List<Group> groups = response.getEntities(Group.class);
+            for (Group group : groups) {
+                groupMap.put(group.getPath(), group);
+            }
+        }
+        return groupMap;
+    }
+
+    /**
+     * Get a user's activity feed. Returned as a query to ease paging.
+     * 
+     * @param userId
+     * @return
+     */
+    public Query queryActivityFeedForUser(String userId) {
+        Query q = queryEntitiesRequest(HttpMethod.GET, null, null,
+                organizationId, applicationId, "users", userId, "feed");
+        return q;
+    }
+
+    /**
+     * Posts an activity to a user. Activity must already be created.
+     * 
+     * @param userId
+     * @param activity
+     * @return
+     */
+    public ApiResponse postUserActivity(String userId, Activity activity) {
+        return apiRequest(HttpMethod.POST, null, activity,  organizationId, applicationId, "users",
+                userId, "activities");
+    }
+
+    /**
+     * Creates and posts an activity to a user.
+     * 
+     * @param verb
+     * @param title
+     * @param content
+     * @param category
+     * @param user
+     * @param object
+     * @param objectType
+     * @param objectName
+     * @param objectContent
+     * @return
+     */
+    public ApiResponse postUserActivity(String verb, String title,
+            String content, String category, User user, Entity object,
+            String objectType, String objectName, String objectContent) {
+        Activity activity = Activity.newActivity(verb, title, content,
+                category, user, object, objectType, objectName, objectContent);
+        return postUserActivity(user.getUuid().toString(), activity);
+    }
+
+    /**
+     * Posts an activity to a group. Activity must already be created.
+     * 
+     * @param userId
+     * @param activity
+     * @return
+     */
+    public ApiResponse postGroupActivity(String groupId, Activity activity) {
+        return apiRequest(HttpMethod.POST, null, activity, organizationId, applicationId, "groups",
+                groupId, "activities");
+    }
+
+    /**
+     * Creates and posts an activity to a group.
+     * 
+     * @param groupId
+     * @param verb
+     * @param title
+     * @param content
+     * @param category
+     * @param user
+     * @param object
+     * @param objectType
+     * @param objectName
+     * @param objectContent
+     * @return
+     */
+    public ApiResponse postGroupActivity(String groupId, String verb, String title,
+            String content, String category, User user, Entity object,
+            String objectType, String objectName, String objectContent) {
+        Activity activity = Activity.newActivity(verb, title, content,
+                category, user, object, objectType, objectName, objectContent);
+        return postGroupActivity(groupId, activity);
+    }
+
+    /**
+     * Post an activity to the stream.
+     * 
+     * @param activity
+     * @return
+     */
+    public ApiResponse postActivity(Activity activity) {
+        return createEntity(activity);
+    }
+
+    /**
+     * Creates and posts an activity to a group.
+     * 
+     * @param verb
+     * @param title
+     * @param content
+     * @param category
+     * @param user
+     * @param object
+     * @param objectType
+     * @param objectName
+     * @param objectContent
+     * @return
+     */
+    public ApiResponse postActivity(String verb, String title,
+            String content, String category, User user, Entity object,
+            String objectType, String objectName, String objectContent) {
+        Activity activity = Activity.newActivity(verb, title, content,
+                category, user, object, objectType, objectName, objectContent);
+        return createEntity(activity);
+    }
+    
+    /**
+     * Get a group's activity feed. Returned as a query to ease paging.
+     * 
+     * @param userId
+     * @return
+     */
+    public Query queryActivity() {
+        Query q = queryEntitiesRequest(HttpMethod.GET, null, null,
+               organizationId, applicationId, "activities");
+        return q;
+    }
+
+    
+
+    /**
+     * Get a group's activity feed. Returned as a query to ease paging.
+     * 
+     * @param userId
+     * @return
+     */
+    public Query queryActivityFeedForGroup(String groupId) {
+        Query q = queryEntitiesRequest(HttpMethod.GET, null, null,
+                organizationId,  applicationId, "groups", groupId, "feed");
+        return q;
+    }
+
+    /**
+     * Perform a query request and return a query object. The Query object
+     * provides a simple way of dealing with result sets that need to be
+     * iterated or paged through.
+     * 
+     * @param method
+     * @param params
+     * @param data
+     * @param segments
+     * @return
+     */
+    public Query queryEntitiesRequest(HttpMethod method,
+            Map<String, Object> params, Object data, String... segments) {
+        ApiResponse response = apiRequest(method, params, data, segments);
+        return new EntityQuery(response, method, params, data, segments);
+    }
+
+    /**
+     * Perform a query of the users collection.
+     * 
+     * @return
+     */
+    public Query queryUsers() {
+        Query q = queryEntitiesRequest(HttpMethod.GET, null, null,
+                organizationId,  applicationId, "users");
+        return q;
+    }
+
+    /**
+     * Perform a query of the users collection using the provided query command.
+     * For example: "name contains 'ed'".
+     * 
+     * @param ql
+     * @return
+     */
+    public Query queryUsers(String ql) {
+        Map<String, Object> params = new HashMap<String, Object>();
+        params.put("ql", ql);
+        Query q = queryEntitiesRequest(HttpMethod.GET, params, null,organizationId,
+                applicationId, "users");
+        return q;
+    }
+
+    /**
+     * Perform a query of the users collection within the specified distance of
+     * the specified location and optionally using the provided query command.
+     * For example: "name contains 'ed'".
+     * 
+     * @param distance
+     * @param location
+     * @param ql
+     * @return
+     */
+    public Query queryUsersWithinLocation(float distance, float lattitude,
+            float longitude, String ql) {
+        Map<String, Object> params = new HashMap<String, Object>();
+        params.put("ql",
+                this.makeLocationQL(distance, lattitude, longitude, ql));
+        Query q = queryEntitiesRequest(HttpMethod.GET, params, null, organizationId,
+                applicationId, "users");
+        return q;
+    }
+
+    /**
+     * Queries the users for the specified group.
+     * 
+     * @param groupId
+     * @return
+     */
+    public Query queryUsersForGroup(String groupId) {
+        Query q = queryEntitiesRequest(HttpMethod.GET, null, null, organizationId,
+                applicationId, "groups", groupId, "users");
+        return q;
+    }
+
+    /**
+     * Adds a user to the specified groups.
+     * 
+     * @param userId
+     * @param groupId
+     * @return
+     */
+    public ApiResponse addUserToGroup(String userId, String groupId) {
+        return apiRequest(HttpMethod.POST, null, null, organizationId,  applicationId, "groups",
+                groupId, "users", userId);
+    }
+
+    /**
+     * Creates a group with the specified group path. Group paths can be slash
+     * ("/") delimited like file paths for hierarchical group relationships.
+     * 
+     * @param groupPath
+     * @return
+     */
+    public ApiResponse createGroup(String groupPath) {
+        return createGroup(groupPath, null);
+    }
+
+    /**
+     * Creates a group with the specified group path and group title. Group
+     * paths can be slash ("/") delimited like file paths for hierarchical group
+     * relationships.
+     * 
+     * @param groupPath
+     * @param groupTitle
+     * @return
+     */
+    public ApiResponse createGroup(String groupPath, String groupTitle) {
+     return createGroup(groupPath, groupTitle, null);  
+    }
+    
+    /**
+     * Create a group with a path, title and name
+     * @param groupPath
+     * @param groupTitle
+     * @param groupName
+     * @return
+     */
+    public ApiResponse createGroup(String groupPath, String groupTitle, String groupName){
+        Map<String, Object> data = new HashMap<String, Object>();
+        data.put("type", "group");
+        data.put("path", groupPath);
+        
+        if (groupTitle != null) {
+            data.put("title", groupTitle);
+        }
+        
+        if(groupName != null){
+            data.put("name", groupName);
+        }
+        
+        return apiRequest(HttpMethod.POST, null, data,  organizationId, applicationId, "groups");
+    }
+    
+    /**
+     * Perform a query of the users collection using the provided query command.
+     * For example: "name contains 'ed'".
+     * 
+     * @param ql
+     * @return
+     */
+    public Query queryGroups(String ql) {
+        Map<String, Object> params = new HashMap<String, Object>();
+        params.put("ql", ql);
+        Query q = queryEntitiesRequest(HttpMethod.GET, params, null, organizationId,
+                applicationId, "groups");
+        return q;
+    }
+
+    
+
+    /**
+     * Connect two entities together.
+     * 
+     * @param connectingEntityType
+     * @param connectingEntityId
+     * @param connectionType
+     * @param connectedEntityId
+     * @return
+     */
+    public ApiResponse connectEntities(String connectingEntityType,
+            String connectingEntityId, String connectionType,
+            String connectedEntityId) {
+        return apiRequest(HttpMethod.POST, null, null,  organizationId, applicationId,
+                connectingEntityType, connectingEntityId, connectionType,
+                connectedEntityId);
+    }
+
+    /**
+     * Disconnect two entities.
+     * 
+     * @param connectingEntityType
+     * @param connectingEntityId
+     * @param connectionType
+     * @param connectedEntityId
+     * @return
+     */
+    public ApiResponse disconnectEntities(String connectingEntityType,
+            String connectingEntityId, String connectionType,
+            String connectedEntityId) {
+        return apiRequest(HttpMethod.DELETE, null, null,  organizationId, applicationId,
+                connectingEntityType, connectingEntityId, connectionType,
+                connectedEntityId);
+    }
+
+    /**
+     * Query the connected entities.
+     * 
+     * @param connectingEntityType
+     * @param connectingEntityId
+     * @param connectionType
+     * @param ql
+     * @return
+     */
+    public Query queryEntityConnections(String connectingEntityType,
+            String connectingEntityId, String connectionType, String ql) {
+        Map<String, Object> params = new HashMap<String, Object>();
+        params.put("ql", ql);
+        Query q = queryEntitiesRequest(HttpMethod.GET, params, null,
+                organizationId, applicationId, connectingEntityType, connectingEntityId,
+                connectionType);
+        return q;
+    }
+
+    protected String makeLocationQL(float distance, double lattitude,
+            double longitude, String ql) {
+        String within = String.format("within %d of %d , %d", distance,
+                lattitude, longitude);
+        ql = ql == null ? within : within + " and " + ql;
+        return ql;
+    }
+
+    /**
+     * Query the connected entities within distance of a specific point.
+     * 
+     * @param connectingEntityType
+     * @param connectingEntityId
+     * @param connectionType
+     * @param distance
+     * @param latitude
+     * @param longitude
+     * @return
+     */
+    public Query queryEntityConnectionsWithinLocation(
+            String connectingEntityType, String connectingEntityId,
+            String connectionType, float distance, float lattitude,
+            float longitude, String ql) {
+        Map<String, Object> params = new HashMap<String, Object>();
+        params.put("ql", makeLocationQL(distance, lattitude, longitude, ql));
+        Query q = queryEntitiesRequest(HttpMethod.GET, params, null, organizationId,
+                applicationId, connectingEntityType, connectingEntityId,
+                connectionType);
+        return q;
+    }
+
+    public interface Query {
+
+        public ApiResponse getResponse();
+
+        public boolean more();
+
+        public Query next();
+
+    }
+
+    /**
+     * Query object
+     * 
+     */
+    private class EntityQuery implements Query {
+        final HttpMethod method;
+        final Map<String, Object> params;
+        final Object data;
+        final String[] segments;
+        final ApiResponse response;
+
+        private EntityQuery(ApiResponse response, HttpMethod method,
+                Map<String, Object> params, Object data, String[] segments) {
+            this.response = response;
+            this.method = method;
+            this.params = params;
+            this.data = data;
+            this.segments = segments;
+        }
+
+        private EntityQuery(ApiResponse response, EntityQuery q) {
+            this.response = response;
+            method = q.method;
+            params = q.params;
+            data = q.data;
+            segments = q.segments;
+        }
+
+        /**
+         * @return the api response of the last request
+         */
+        public ApiResponse getResponse() {
+            return response;
+        }
+
+        /**
+         * @return true if the server indicates more results are available
+         */
+        public boolean more() {
+            if ((response != null) && (response.getCursor() != null)
+                    && (response.getCursor().length() > 0)) {
+                return true;
+            }
+            return false;
+        }
+
+        /**
+         * Performs a request for the next set of results
+         * 
+         * @return query that contains results and where to get more from.
+         */
+        public Query next() {
+            if (more()) {
+                Map<String, Object> nextParams = null;
+                if (params != null) {
+                    nextParams = new HashMap<String, Object>(params);
+                } else {
+                    nextParams = new HashMap<String, Object>();
+                }
+                nextParams.put("cursor", response.getCursor());
+                ApiResponse nextResponse = apiRequest(method, nextParams, data,
+                        segments);
+                return new EntityQuery(nextResponse, this);
+            }
+            return null;
+        }
+
+    }
+
+    private String normalizeQueuePath(String path) {
+        return arrayToDelimitedString(
+                tokenizeToStringArray(path, "/", true, true), "/");
+    }
+
+    public ApiResponse postMessage(String path, Map<String, Object> message) {
+        return apiRequest(HttpMethod.POST, null, message, organizationId,  applicationId,
+                "queues", normalizeQueuePath(path));
+    }
+
+    public ApiResponse postMessage(String path,
+            List<Map<String, Object>> messages) {
+        return apiRequest(HttpMethod.POST, null, messages,  organizationId, applicationId,
+                "queues", normalizeQueuePath(path));
+    }
+
+    public enum QueuePosition {
+        START("start"), END("end"), LAST("last"), CONSUMER("consumer");
+
+        private final String shortName;
+
+        QueuePosition(String shortName) {
+            this.shortName = shortName;
+        }
+
+        static Map<String, QueuePosition> nameMap = new ConcurrentHashMap<String, QueuePosition>();
+
+        static {
+            for (QueuePosition op : EnumSet.allOf(QueuePosition.class)) {
+                if (op.shortName != null) {
+                    nameMap.put(op.shortName, op);
+                }
+            }
+        }
+
+        public static QueuePosition find(String s) {
+            if (s == null) {
+                return null;
+            }
+            return nameMap.get(s);
+        }
+
+        @Override
+        public String toString() {
+            return shortName;
+        }
+    }
+
+    public ApiResponse getMessages(String path, String consumer, UUID last,
+            Long time, Integer prev, Integer next, Integer limit,
+            QueuePosition pos, Boolean update, Boolean sync) {
+        Map<String, Object> params = new HashMap<String, Object>();
+        if (consumer != null) {
+            params.put("consumer", consumer);
+        }
+        if (last != null) {
+            params.put("last", last);
+        }
+        if (time != null) {
+            params.put("time", time);
+        }
+        if (prev != null) {
+            params.put("prev", prev);
+        }
+        if (next != null) {
+            params.put("next", next);
+        }
+        if (limit != null) {
+            params.put("limit", limit);
+        }
+        if (pos != null) {
+            params.put("pos", pos.toString());
+        }
+        if (update != null) {
+            params.put("update", update);
+        }
+        if (sync != null) {
+            params.put("synchronized", sync);
+        }
+        return apiRequest(HttpMethod.GET, params, null,  organizationId, applicationId,
+                "queues", normalizeQueuePath(path));
+    }
+
+    public ApiResponse addSubscriber(String publisherQueue,
+            String subscriberQueue) {
+        return apiRequest(HttpMethod.POST, null, null, organizationId,  applicationId, "queues",
+                normalizeQueuePath(publisherQueue), "subscribers",
+                normalizeQueuePath(subscriberQueue));
+    }
+
+    public ApiResponse removeSubscriber(String publisherQueue,
+            String subscriberQueue) {
+        return apiRequest(HttpMethod.DELETE, null, null, organizationId,  applicationId,
+                "queues", normalizeQueuePath(publisherQueue), "subscribers",
+                normalizeQueuePath(subscriberQueue));
+    }
+
+    private class QueueQuery implements Query {
+        final HttpMethod method;
+        final Map<String, Object> params;
+        final Object data;
+        final String queuePath;
+        final ApiResponse response;
+
+        private QueueQuery(ApiResponse response, HttpMethod method,
+                Map<String, Object> params, Object data, String queuePath) {
+            this.response = response;
+            this.method = method;
+            this.params = params;
+            this.data = data;
+            this.queuePath = normalizeQueuePath(queuePath);
+        }
+
+        private QueueQuery(ApiResponse response, QueueQuery q) {
+            this.response = response;
+            method = q.method;
+            params = q.params;
+            data = q.data;
+            queuePath = q.queuePath;
+        }
+
+        /**
+         * @return the api response of the last request
+         */
+        public ApiResponse getResponse() {
+            return response;
+        }
+
+        /**
+         * @return true if the server indicates more results are available
+         */
+        public boolean more() {
+            if ((response != null) && (response.getCursor() != null)
+                    && (response.getCursor().length() > 0)) {
+                return true;
+            }
+            return false;
+        }
+
+        /**
+         * Performs a request for the next set of results
+         * 
+         * @return query that contains results and where to get more from.
+         */
+        public Query next() {
+            if (more()) {
+                Map<String, Object> nextParams = null;
+                if (params != null) {
+                    nextParams = new HashMap<String, Object>(params);
+                } else {
+                    nextParams = new HashMap<String, Object>();
+                }
+                nextParams.put("start", response.getCursor());
+                ApiResponse nextResponse = apiRequest(method, nextParams, data,
+                        queuePath);
+                return new QueueQuery(nextResponse, this);
+            }
+            return null;
+        }
+
+    }
+
+    public Query queryQueuesRequest(HttpMethod method,
+            Map<String, Object> params, Object data, String queuePath) {
+        ApiResponse response = apiRequest(method, params, data, queuePath);
+        return new QueueQuery(response, method, params, data, queuePath);
+    }
+
+}


[44/96] [abbrv] [partial] Change package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/QueueManagerImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/QueueManagerImpl.java b/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/QueueManagerImpl.java
new file mode 100644
index 0000000..0de6946
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/QueueManagerImpl.java
@@ -0,0 +1,1390 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.mq.cassandra;
+
+
+import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeSet;
+import java.util.UUID;
+
+import org.apache.usergrid.locking.LockManager;
+import org.apache.usergrid.mq.CounterQuery;
+import org.apache.usergrid.mq.Message;
+import org.apache.usergrid.mq.Query;
+import org.apache.usergrid.mq.QueryProcessor;
+import org.apache.usergrid.mq.Queue;
+import org.apache.usergrid.mq.QueueManager;
+import org.apache.usergrid.mq.QueueQuery;
+import org.apache.usergrid.mq.QueueResults;
+import org.apache.usergrid.mq.QueueSet;
+import org.apache.usergrid.mq.Query.CounterFilterPredicate;
+import org.apache.usergrid.mq.QueryProcessor.QuerySlice;
+import org.apache.usergrid.mq.QueueSet.QueueInfo;
+import org.apache.usergrid.mq.cassandra.QueueIndexUpdate.QueueIndexEntry;
+import org.apache.usergrid.mq.cassandra.io.ConsumerTransaction;
+import org.apache.usergrid.mq.cassandra.io.EndSearch;
+import org.apache.usergrid.mq.cassandra.io.FilterSearch;
+import org.apache.usergrid.mq.cassandra.io.NoTransactionSearch;
+import org.apache.usergrid.mq.cassandra.io.QueueBounds;
+import org.apache.usergrid.mq.cassandra.io.QueueSearch;
+import org.apache.usergrid.mq.cassandra.io.StartSearch;
+import org.apache.usergrid.persistence.AggregateCounter;
+import org.apache.usergrid.persistence.AggregateCounterSet;
+import org.apache.usergrid.persistence.CounterResolution;
+import org.apache.usergrid.persistence.Results;
+import org.apache.usergrid.persistence.cassandra.CassandraPersistenceUtils;
+import org.apache.usergrid.persistence.cassandra.CassandraService;
+import org.apache.usergrid.persistence.cassandra.CounterUtils;
+import org.apache.usergrid.persistence.cassandra.CounterUtils.AggregateCounterSelection;
+import org.apache.usergrid.persistence.exceptions.TransactionNotFoundException;
+import org.apache.usergrid.utils.UUIDUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.fasterxml.uuid.UUIDComparator;
+
+import me.prettyprint.cassandra.serializers.ByteBufferSerializer;
+import me.prettyprint.cassandra.serializers.BytesArraySerializer;
+import me.prettyprint.cassandra.serializers.DynamicCompositeSerializer;
+import me.prettyprint.cassandra.serializers.LongSerializer;
+import me.prettyprint.cassandra.serializers.StringSerializer;
+import me.prettyprint.cassandra.serializers.UUIDSerializer;
+import me.prettyprint.hector.api.Keyspace;
+import me.prettyprint.hector.api.beans.AbstractComposite.ComponentEquality;
+import me.prettyprint.hector.api.beans.ColumnSlice;
+import me.prettyprint.hector.api.beans.CounterRow;
+import me.prettyprint.hector.api.beans.CounterRows;
+import me.prettyprint.hector.api.beans.CounterSlice;
+import me.prettyprint.hector.api.beans.DynamicComposite;
+import me.prettyprint.hector.api.beans.HColumn;
+import me.prettyprint.hector.api.beans.HCounterColumn;
+import me.prettyprint.hector.api.factory.HFactory;
+import me.prettyprint.hector.api.mutation.Mutator;
+import me.prettyprint.hector.api.query.MultigetSliceCounterQuery;
+import me.prettyprint.hector.api.query.QueryResult;
+import me.prettyprint.hector.api.query.SliceCounterQuery;
+import me.prettyprint.hector.api.query.SliceQuery;
+import static me.prettyprint.hector.api.factory.HFactory.createColumn;
+import static me.prettyprint.hector.api.factory.HFactory.createCounterSliceQuery;
+import static me.prettyprint.hector.api.factory.HFactory.createMutator;
+import static me.prettyprint.hector.api.factory.HFactory.createSliceQuery;
+import static org.apache.usergrid.mq.Queue.QUEUE_CREATED;
+import static org.apache.usergrid.mq.Queue.QUEUE_MODIFIED;
+import static org.apache.usergrid.mq.Queue.QUEUE_NEWEST;
+import static org.apache.usergrid.mq.Queue.QUEUE_OLDEST;
+import static org.apache.usergrid.mq.Queue.getQueueId;
+import static org.apache.usergrid.mq.Queue.normalizeQueuePath;
+import static org.apache.usergrid.mq.QueuePosition.CONSUMER;
+import static org.apache.usergrid.mq.QueuePosition.END;
+import static org.apache.usergrid.mq.QueuePosition.LAST;
+import static org.apache.usergrid.mq.QueuePosition.START;
+import static org.apache.usergrid.mq.cassandra.CassandraMQUtils.addMessageToMutator;
+import static org.apache.usergrid.mq.cassandra.CassandraMQUtils.addQueueToMutator;
+import static org.apache.usergrid.mq.cassandra.CassandraMQUtils.deserializeMessage;
+import static org.apache.usergrid.mq.cassandra.CassandraMQUtils.deserializeQueue;
+import static org.apache.usergrid.mq.cassandra.CassandraMQUtils.getQueueShardRowKey;
+import static org.apache.usergrid.mq.cassandra.QueueIndexUpdate.indexValueCode;
+import static org.apache.usergrid.mq.cassandra.QueueIndexUpdate.toIndexableValue;
+import static org.apache.usergrid.mq.cassandra.QueueIndexUpdate.validIndexableValue;
+import static org.apache.usergrid.mq.cassandra.QueueIndexUpdate.validIndexableValueOrJson;
+import static org.apache.usergrid.mq.cassandra.QueuesCF.COUNTERS;
+import static org.apache.usergrid.mq.cassandra.QueuesCF.MESSAGE_PROPERTIES;
+import static org.apache.usergrid.mq.cassandra.QueuesCF.PROPERTY_INDEX;
+import static org.apache.usergrid.mq.cassandra.QueuesCF.PROPERTY_INDEX_ENTRIES;
+import static org.apache.usergrid.mq.cassandra.QueuesCF.QUEUE_DICTIONARIES;
+import static org.apache.usergrid.mq.cassandra.QueuesCF.QUEUE_INBOX;
+import static org.apache.usergrid.mq.cassandra.QueuesCF.QUEUE_PROPERTIES;
+import static org.apache.usergrid.mq.cassandra.QueuesCF.QUEUE_SUBSCRIBERS;
+import static org.apache.usergrid.mq.cassandra.QueuesCF.QUEUE_SUBSCRIPTIONS;
+import static org.apache.usergrid.persistence.Schema.DICTIONARY_COUNTERS;
+import static org.apache.usergrid.persistence.cassandra.ApplicationCF.APPLICATION_AGGREGATE_COUNTERS;
+import static org.apache.usergrid.persistence.cassandra.CassandraPersistenceUtils.batchExecute;
+import static org.apache.usergrid.persistence.cassandra.CassandraPersistenceUtils.key;
+import static org.apache.usergrid.persistence.cassandra.CassandraService.RETRY_COUNT;
+import static org.apache.usergrid.utils.CompositeUtils.setEqualityFlag;
+import static org.apache.usergrid.utils.CompositeUtils.setGreaterThanEqualityFlag;
+import static org.apache.usergrid.utils.ConversionUtils.bytebuffer;
+import static org.apache.usergrid.utils.IndexUtils.getKeyValueList;
+import static org.apache.usergrid.utils.MapUtils.emptyMapWithKeys;
+import static org.apache.usergrid.utils.NumberUtils.roundLong;
+import static org.apache.usergrid.utils.UUIDUtils.getTimestampInMicros;
+import static org.apache.usergrid.utils.UUIDUtils.newTimeUUID;
+
+
+public class QueueManagerImpl implements QueueManager {
+
+    public static final Logger logger = LoggerFactory.getLogger( QueueManagerImpl.class );
+
+    public static final String DICTIONARY_SUBSCRIBER_INDEXES = "subscriber_indexes";
+    public static final String DICTIONARY_MESSAGE_INDEXES = "message_indexes";
+
+    public static final int QUEUE_SHARD_INTERVAL = 1000 * 60 * 60 * 24;
+    public static final int INDEX_ENTRY_LIST_COUNT = 1000;
+
+    public static final int DEFAULT_SEARCH_COUNT = 10000;
+    public static final int ALL_COUNT = 100000000;
+
+    private UUID applicationId;
+    private CassandraService cass;
+    private CounterUtils counterUtils;
+    private LockManager lockManager;
+    private int lockTimeout;
+
+    public static final StringSerializer se = new StringSerializer();
+    public static final ByteBufferSerializer be = new ByteBufferSerializer();
+    public static final UUIDSerializer ue = new UUIDSerializer();
+    public static final BytesArraySerializer bae = new BytesArraySerializer();
+    public static final DynamicCompositeSerializer dce = new DynamicCompositeSerializer();
+    public static final LongSerializer le = new LongSerializer();
+
+
+    public QueueManagerImpl() {
+    }
+
+
+    public QueueManagerImpl init( CassandraService cass, CounterUtils counterUtils, LockManager lockManager,
+                                  UUID applicationId, int lockTimeout ) {
+        this.cass = cass;
+        this.counterUtils = counterUtils;
+        this.applicationId = applicationId;
+        this.lockManager = lockManager;
+        this.lockTimeout = lockTimeout;
+        return this;
+    }
+
+
+    @Override
+    public Message getMessage( UUID messageId ) {
+        SliceQuery<UUID, String, ByteBuffer> q =
+                createSliceQuery( cass.getApplicationKeyspace( applicationId ), ue, se, be );
+        q.setColumnFamily( MESSAGE_PROPERTIES.getColumnFamily() );
+        q.setKey( messageId );
+        q.setRange( null, null, false, ALL_COUNT );
+        QueryResult<ColumnSlice<String, ByteBuffer>> r = q.execute();
+        ColumnSlice<String, ByteBuffer> slice = r.get();
+        List<HColumn<String, ByteBuffer>> results = slice.getColumns();
+        return deserializeMessage( results );
+    }
+
+
+    public Message batchPostToQueue( Mutator<ByteBuffer> batch, String queuePath, Message message,
+                                     MessageIndexUpdate indexUpdate, long timestamp ) {
+
+        queuePath = normalizeQueuePath( queuePath );
+        UUID queueId = getQueueId( queuePath );
+
+        message.sync();
+
+        addMessageToMutator( batch, message, timestamp );
+
+        long shard_ts = roundLong( message.getTimestamp(), QUEUE_SHARD_INTERVAL );
+
+        logger.debug( "Adding message with id '{}' to queue '{}'", message.getUuid(), queueId );
+
+        batch.addInsertion( getQueueShardRowKey( queueId, shard_ts ), QUEUE_INBOX.getColumnFamily(),
+                createColumn( message.getUuid(), ByteBuffer.allocate( 0 ), timestamp, ue, be ) );
+
+        long oldest_ts = Long.MAX_VALUE - getTimestampInMicros( message.getUuid() );
+        batch.addInsertion( bytebuffer( queueId ), QUEUE_PROPERTIES.getColumnFamily(),
+                createColumn( QUEUE_OLDEST, message.getUuid(), oldest_ts, se, ue ) );
+
+        long newest_ts = getTimestampInMicros( message.getUuid() );
+        batch.addInsertion( bytebuffer( queueId ), QUEUE_PROPERTIES.getColumnFamily(),
+                createColumn( QUEUE_NEWEST, message.getUuid(), newest_ts, se, ue ) );
+
+        batch.addInsertion( bytebuffer( getQueueId( "/" ) ), QUEUE_SUBSCRIBERS.getColumnFamily(),
+                createColumn( queuePath, queueId, timestamp, se, ue ) );
+
+        counterUtils.batchIncrementQueueCounter( batch, getQueueId( "/" ), queuePath, 1L, timestamp, applicationId );
+
+        if ( indexUpdate == null ) {
+            indexUpdate = new MessageIndexUpdate( message );
+        }
+        indexUpdate.addToMutation( batch, queueId, shard_ts, timestamp );
+
+        counterUtils.addMessageCounterMutations( batch, applicationId, queueId, message, timestamp );
+
+        batch.addInsertion( bytebuffer( queueId ), QUEUE_PROPERTIES.getColumnFamily(),
+                createColumn( QUEUE_CREATED, timestamp / 1000, Long.MAX_VALUE - timestamp, se, le ) );
+
+        batch.addInsertion( bytebuffer( queueId ), QUEUE_PROPERTIES.getColumnFamily(),
+                createColumn( QUEUE_MODIFIED, timestamp / 1000, timestamp, se, le ) );
+
+        return message;
+    }
+
+
+    @Override
+    public Message postToQueue( String queuePath, Message message ) {
+        long timestamp = cass.createTimestamp();
+        Mutator<ByteBuffer> batch = createMutator( cass.getApplicationKeyspace( applicationId ), be );
+
+        queuePath = normalizeQueuePath( queuePath );
+
+        MessageIndexUpdate indexUpdate = new MessageIndexUpdate( message );
+
+        batchPostToQueue( batch, queuePath, message, indexUpdate, timestamp );
+
+        batchExecute( batch, RETRY_COUNT );
+
+        String firstSubscriberQueuePath = null;
+        while ( true ) {
+
+            QueueSet subscribers = getSubscribers( queuePath, firstSubscriberQueuePath, 1000 );
+
+            if ( subscribers.getQueues().isEmpty() ) {
+                break;
+            }
+
+            batch = createMutator( cass.getApplicationKeyspace( applicationId ), be );
+            for ( QueueInfo q : subscribers.getQueues() ) {
+                batchPostToQueue( batch, q.getPath(), message, indexUpdate, timestamp );
+
+                firstSubscriberQueuePath = q.getPath();
+            }
+            batchExecute( batch, RETRY_COUNT );
+
+            if ( !subscribers.hasMore() ) {
+                break;
+            }
+        }
+
+        return message;
+    }
+
+
+    @Override
+    public List<Message> postToQueue( String queuePath, List<Message> messages ) {
+
+        // Can't do this as one big batch operation because it will
+        // time out
+
+        for ( Message message : messages ) {
+            postToQueue( queuePath, message );
+        }
+
+        return messages;
+    }
+
+
+    static TreeSet<UUID> add( TreeSet<UUID> a, UUID uuid, boolean reversed, int limit ) {
+
+        if ( a == null ) {
+            a = new TreeSet<UUID>( new UUIDComparator() );
+        }
+
+        if ( uuid == null ) {
+            return a;
+        }
+
+        // if we have less than the limit, just add it
+        if ( a.size() < limit ) {
+            a.add( uuid );
+        }
+        else if ( reversed ) {
+            // if reversed, we want to add more recent messages
+            // and eject the oldest
+            if ( UUIDComparator.staticCompare( uuid, a.first() ) > 0 ) {
+                a.pollFirst();
+                a.add( uuid );
+            }
+        }
+        else {
+            // add older messages and eject the newset
+            if ( UUIDComparator.staticCompare( uuid, a.last() ) < 0 ) {
+                a.pollLast();
+                a.add( uuid );
+            }
+        }
+
+        return a;
+    }
+
+
+    static TreeSet<UUID> add( TreeSet<UUID> a, TreeSet<UUID> b, boolean reversed, int limit ) {
+
+        if ( b == null ) {
+            return a;
+        }
+
+        for ( UUID uuid : b ) {
+            a = add( a, uuid, reversed, limit );
+        }
+
+        return a;
+    }
+
+
+    static TreeSet<UUID> mergeOr( TreeSet<UUID> a, TreeSet<UUID> b, boolean reversed, int limit ) {
+        TreeSet<UUID> mergeSet = new TreeSet<UUID>( new UUIDComparator() );
+
+        if ( ( a == null ) && ( b == null ) ) {
+            return mergeSet;
+        }
+        else if ( a == null ) {
+            return b;
+        }
+        else if ( b == null ) {
+            return a;
+        }
+
+        add( mergeSet, a, reversed, limit );
+        add( mergeSet, b, reversed, limit );
+
+        return mergeSet;
+    }
+
+
+    static TreeSet<UUID> mergeAnd( TreeSet<UUID> a, TreeSet<UUID> b, boolean reversed, int limit ) {
+        TreeSet<UUID> mergeSet = new TreeSet<UUID>( new UUIDComparator() );
+
+        if ( a == null ) {
+            return mergeSet;
+        }
+        if ( b == null ) {
+            return mergeSet;
+        }
+
+        for ( UUID uuid : b ) {
+            if ( a.contains( b ) ) {
+                add( mergeSet, uuid, reversed, limit );
+            }
+        }
+
+        return mergeSet;
+    }
+
+
+    @Override
+    public QueueResults getFromQueue( String queuePath, QueueQuery query ) {
+
+        if ( query == null ) {
+            query = new QueueQuery();
+        }
+
+        Keyspace ko = cass.getApplicationKeyspace( applicationId );
+
+        QueueSearch search = null;
+
+        if ( query.hasFilterPredicates() ) {
+            search = new FilterSearch( ko );
+        }
+
+        else if ( query.getPosition() == LAST || query.getPosition() == CONSUMER ) {
+            if ( query.getTimeout() > 0 ) {
+                search = new ConsumerTransaction( applicationId, ko, lockManager, cass, lockTimeout );
+            }
+            else {
+                search = new NoTransactionSearch( ko );
+            }
+        }
+        else if ( query.getPosition() == START ) {
+
+            search = new StartSearch( ko );
+        }
+        else if ( query.getPosition() == END ) {
+            search = new EndSearch( ko );
+        }
+        else {
+            throw new IllegalArgumentException( "You must specify a valid position or query" );
+        }
+
+        return search.getResults( queuePath, query );
+    }
+
+
+    public void batchSubscribeToQueue( Mutator<ByteBuffer> batch, String publisherQueuePath, UUID publisherQueueId,
+                                       String subscriberQueuePath, UUID subscriberQueueId, long timestamp ) {
+
+        batch.addInsertion( bytebuffer( publisherQueueId ), QUEUE_SUBSCRIBERS.getColumnFamily(),
+                createColumn( subscriberQueuePath, subscriberQueueId, timestamp, se, ue ) );
+
+        batch.addInsertion( bytebuffer( subscriberQueueId ), QUEUE_SUBSCRIPTIONS.getColumnFamily(),
+                createColumn( publisherQueuePath, publisherQueueId, timestamp, se, ue ) );
+    }
+
+
+    @Override
+    public QueueSet subscribeToQueue( String publisherQueuePath, String subscriberQueuePath ) {
+
+        publisherQueuePath = normalizeQueuePath( publisherQueuePath );
+        UUID publisherQueueId = getQueueId( publisherQueuePath );
+
+        subscriberQueuePath = normalizeQueuePath( subscriberQueuePath );
+        UUID subscriberQueueId = getQueueId( subscriberQueuePath );
+
+        UUID timestampUuid = newTimeUUID();
+        long timestamp = getTimestampInMicros( timestampUuid );
+
+        Mutator<ByteBuffer> batch = createMutator( cass.getApplicationKeyspace( applicationId ), be );
+
+        batchSubscribeToQueue( batch, publisherQueuePath, publisherQueueId, subscriberQueuePath, subscriberQueueId,
+                timestamp );
+
+        try {
+            Queue queue = getQueue( subscriberQueuePath, subscriberQueueId );
+            if ( queue != null ) {
+                batchUpdateQueuePropertiesIndexes( batch, publisherQueueId, subscriberQueuePath, subscriberQueueId,
+                        queue.getProperties(), timestampUuid );
+            }
+        }
+        catch ( Exception e ) {
+            logger.error( "Unable to update index", e );
+        }
+
+        batchExecute( batch, RETRY_COUNT );
+
+        return new QueueSet().addQueue( subscriberQueuePath, subscriberQueueId );
+    }
+
+
+    public void batchUnsubscribeFromQueue( Mutator<ByteBuffer> batch, String publisherQueuePath, UUID publisherQueueId,
+                                           String subscriberQueuePath, UUID subscriberQueueId, long timestamp ) {
+
+        batch.addDeletion( bytebuffer( publisherQueueId ), QUEUE_SUBSCRIBERS.getColumnFamily(), subscriberQueuePath, se,
+                timestamp );
+
+        batch.addDeletion( bytebuffer( subscriberQueueId ), QUEUE_SUBSCRIPTIONS.getColumnFamily(), publisherQueuePath,
+                se, timestamp );
+    }
+
+
+    @Override
+    public QueueSet unsubscribeFromQueue( String publisherQueuePath, String subscriberQueuePath ) {
+
+        publisherQueuePath = normalizeQueuePath( publisherQueuePath );
+        UUID publisherQueueId = getQueueId( publisherQueuePath );
+
+        subscriberQueuePath = normalizeQueuePath( subscriberQueuePath );
+        UUID subscriberQueueId = getQueueId( subscriberQueuePath );
+
+        UUID timestampUuid = newTimeUUID();
+        long timestamp = getTimestampInMicros( timestampUuid );
+
+        Mutator<ByteBuffer> batch = createMutator( cass.getApplicationKeyspace( applicationId ), be );
+
+        batchUnsubscribeFromQueue( batch, publisherQueuePath, publisherQueueId, subscriberQueuePath, subscriberQueueId,
+                timestamp );
+
+        try {
+            Queue queue = getQueue( subscriberQueuePath, subscriberQueueId );
+
+            batchUpdateQueuePropertiesIndexes( batch, publisherQueueId, subscriberQueuePath, subscriberQueueId,
+                    emptyMapWithKeys( queue.getProperties() ), timestampUuid );
+        }
+        catch ( Exception e ) {
+            logger.error( "Unable to update index", e );
+        }
+
+        batchExecute( batch, RETRY_COUNT );
+
+        return new QueueSet().addQueue( subscriberQueuePath, subscriberQueueId );
+    }
+
+
+    @Override
+    public QueueSet getSubscribers( String publisherQueuePath, String firstSubscriberQueuePath, int limit ) {
+
+        UUID publisherQueueId = getQueueId( publisherQueuePath );
+
+        Keyspace ko = cass.getApplicationKeyspace( applicationId );
+
+        if ( firstSubscriberQueuePath != null ) {
+            limit += 1;
+        }
+
+        List<HColumn<String, UUID>> columns = createSliceQuery( ko, ue, se, ue ).setKey( publisherQueueId )
+                .setColumnFamily( QUEUE_SUBSCRIBERS.getColumnFamily() )
+                .setRange( normalizeQueuePath( firstSubscriberQueuePath ), null, false, limit + 1 ).execute().get()
+                .getColumns();
+
+        QueueSet queues = new QueueSet();
+
+        int count = Math.min( limit, columns.size() );
+        if ( columns != null ) {
+            for ( int i = firstSubscriberQueuePath != null ? 1 : 0; i < count; i++ ) {
+                HColumn<String, UUID> column = columns.get( i );
+                queues.addQueue( column.getName(), column.getValue() );
+            }
+        }
+        if ( columns.size() > limit ) {
+            queues.setMore( true );
+        }
+        return queues;
+    }
+
+
+    @Override
+    public QueueSet getSubscriptions( String subscriberQueuePath, String firstSubscriptionQueuePath, int limit ) {
+
+        UUID subscriberQueueId = getQueueId( subscriberQueuePath );
+
+        Keyspace ko = cass.getApplicationKeyspace( applicationId );
+
+        if ( firstSubscriptionQueuePath != null ) {
+            limit += 1;
+        }
+
+        List<HColumn<String, UUID>> columns = createSliceQuery( ko, ue, se, ue ).setKey( subscriberQueueId )
+                .setColumnFamily( QUEUE_SUBSCRIPTIONS.getColumnFamily() )
+                .setRange( normalizeQueuePath( firstSubscriptionQueuePath ), null, false, limit + 1 ).execute().get()
+                .getColumns();
+
+        QueueSet queues = new QueueSet();
+
+        int count = Math.min( limit, columns.size() );
+        if ( columns != null ) {
+            for ( int i = firstSubscriptionQueuePath != null ? 1 : 0; i < count; i++ ) {
+                HColumn<String, UUID> column = columns.get( i );
+                queues.addQueue( column.getName(), column.getValue() );
+            }
+        }
+        if ( columns.size() > limit ) {
+            queues.setMore( true );
+        }
+        return queues;
+    }
+
+
+    @Override
+    public QueueSet addSubscribersToQueue( String publisherQueuePath, List<String> subscriberQueuePaths ) {
+
+        publisherQueuePath = normalizeQueuePath( publisherQueuePath );
+        UUID publisherQueueId = getQueueId( publisherQueuePath );
+
+        UUID timestampUuid = newTimeUUID();
+        long timestamp = getTimestampInMicros( timestampUuid );
+
+        Mutator<ByteBuffer> batch = createMutator( cass.getApplicationKeyspace( applicationId ), be );
+
+        QueueSet queues = new QueueSet();
+
+        for ( String subscriberQueuePath : subscriberQueuePaths ) {
+
+            subscriberQueuePath = normalizeQueuePath( subscriberQueuePath );
+            UUID subscriberQueueId = getQueueId( subscriberQueuePath );
+
+            batchSubscribeToQueue( batch, publisherQueuePath, publisherQueueId, subscriberQueuePath, subscriberQueueId,
+                    timestamp );
+
+            try {
+                Queue queue = getQueue( subscriberQueuePath, subscriberQueueId );
+
+                batchUpdateQueuePropertiesIndexes( batch, publisherQueueId, subscriberQueuePath, subscriberQueueId,
+                        queue.getProperties(), timestampUuid );
+            }
+            catch ( Exception e ) {
+                logger.error( "Unable to update index", e );
+            }
+
+            queues.addQueue( subscriberQueuePath, subscriberQueueId );
+        }
+
+        batchExecute( batch, RETRY_COUNT );
+
+        return queues;
+    }
+
+
+    @Override
+    public QueueSet removeSubscribersFromQueue( String publisherQueuePath, List<String> subscriberQueuePaths ) {
+
+        publisherQueuePath = normalizeQueuePath( publisherQueuePath );
+        UUID publisherQueueId = getQueueId( publisherQueuePath );
+
+        UUID timestampUuid = newTimeUUID();
+        long timestamp = getTimestampInMicros( timestampUuid );
+
+        Mutator<ByteBuffer> batch = createMutator( cass.getApplicationKeyspace( applicationId ), be );
+
+        QueueSet queues = new QueueSet();
+
+        for ( String subscriberQueuePath : subscriberQueuePaths ) {
+
+            subscriberQueuePath = normalizeQueuePath( subscriberQueuePath );
+            UUID subscriberQueueId = getQueueId( subscriberQueuePath );
+
+            batchUnsubscribeFromQueue( batch, publisherQueuePath, publisherQueueId, subscriberQueuePath,
+                    subscriberQueueId, timestamp );
+
+            try {
+                Queue queue = getQueue( subscriberQueuePath, subscriberQueueId );
+
+                batchUpdateQueuePropertiesIndexes( batch, publisherQueueId, subscriberQueuePath, subscriberQueueId,
+                        emptyMapWithKeys( queue.getProperties() ), timestampUuid );
+            }
+            catch ( Exception e ) {
+                logger.error( "Unable to update index", e );
+            }
+
+            queues.addQueue( subscriberQueuePath, subscriberQueueId );
+        }
+
+        batchExecute( batch, RETRY_COUNT );
+
+        return queues;
+    }
+
+
+    @Override
+    public QueueSet subscribeToQueues( String subscriberQueuePath, List<String> publisherQueuePaths ) {
+
+        subscriberQueuePath = normalizeQueuePath( subscriberQueuePath );
+        UUID subscriberQueueId = getQueueId( subscriberQueuePath );
+
+        UUID timestampUuid = newTimeUUID();
+        long timestamp = getTimestampInMicros( timestampUuid );
+
+        Mutator<ByteBuffer> batch = createMutator( cass.getApplicationKeyspace( applicationId ), be );
+
+        QueueSet queues = new QueueSet();
+
+        for ( String publisherQueuePath : publisherQueuePaths ) {
+
+            publisherQueuePath = normalizeQueuePath( publisherQueuePath );
+            UUID publisherQueueId = getQueueId( publisherQueuePath );
+
+            batchSubscribeToQueue( batch, publisherQueuePath, publisherQueueId, subscriberQueuePath, subscriberQueueId,
+                    timestamp );
+
+            try {
+                Queue queue = getQueue( subscriberQueuePath, subscriberQueueId );
+
+                batchUpdateQueuePropertiesIndexes( batch, publisherQueueId, subscriberQueuePath, subscriberQueueId,
+                        queue.getProperties(), timestampUuid );
+            }
+            catch ( Exception e ) {
+                logger.error( "Unable to update index", e );
+            }
+
+            queues.addQueue( publisherQueuePath, publisherQueueId );
+        }
+
+        batchExecute( batch, RETRY_COUNT );
+
+        return queues;
+    }
+
+
+    @Override
+    public QueueSet unsubscribeFromQueues( String subscriberQueuePath, List<String> publisherQueuePaths ) {
+
+        subscriberQueuePath = normalizeQueuePath( subscriberQueuePath );
+        UUID subscriberQueueId = getQueueId( subscriberQueuePath );
+
+        UUID timestampUuid = newTimeUUID();
+        long timestamp = getTimestampInMicros( timestampUuid );
+
+        Mutator<ByteBuffer> batch = createMutator( cass.getApplicationKeyspace( applicationId ), be );
+
+        QueueSet queues = new QueueSet();
+
+        for ( String publisherQueuePath : publisherQueuePaths ) {
+
+            publisherQueuePath = normalizeQueuePath( publisherQueuePath );
+            UUID publisherQueueId = getQueueId( publisherQueuePath );
+
+            batchUnsubscribeFromQueue( batch, publisherQueuePath, publisherQueueId, subscriberQueuePath,
+                    subscriberQueueId, timestamp );
+
+            try {
+                Queue queue = getQueue( subscriberQueuePath, subscriberQueueId );
+
+                batchUpdateQueuePropertiesIndexes( batch, publisherQueueId, subscriberQueuePath, subscriberQueueId,
+                        emptyMapWithKeys( queue.getProperties() ), timestampUuid );
+            }
+            catch ( Exception e ) {
+                logger.error( "Unable to update index", e );
+            }
+
+            queues.addQueue( publisherQueuePath, publisherQueueId );
+        }
+
+        batchExecute( batch, RETRY_COUNT );
+
+        return queues;
+    }
+
+
+    @Override
+    public void incrementAggregateQueueCounters( String queuePath, String category, String counterName, long value ) {
+        long timestamp = cass.createTimestamp();
+        Mutator<ByteBuffer> m = createMutator( cass.getApplicationKeyspace( applicationId ), be );
+        counterUtils.batchIncrementAggregateCounters( m, applicationId, null, null, getQueueId( queuePath ), category,
+                counterName, value, timestamp );
+        batchExecute( m, CassandraService.RETRY_COUNT );
+    }
+
+
+    public AggregateCounterSet getAggregateCounters( UUID queueId, String category, String counterName,
+                                                     CounterResolution resolution, long start, long finish,
+                                                     boolean pad ) {
+
+        start = resolution.round( start );
+        finish = resolution.round( finish );
+        long expected_time = start;
+        Keyspace ko = cass.getApplicationKeyspace( applicationId );
+        SliceCounterQuery<String, Long> q = createCounterSliceQuery( ko, se, le );
+        q.setColumnFamily( APPLICATION_AGGREGATE_COUNTERS.getColumnFamily() );
+        q.setRange( start, finish, false, ALL_COUNT );
+        QueryResult<CounterSlice<Long>> r = q.setKey(
+                counterUtils.getAggregateCounterRow( counterName, null, null, queueId, category, resolution ) )
+                                             .execute();
+        List<AggregateCounter> counters = new ArrayList<AggregateCounter>();
+        for ( HCounterColumn<Long> column : r.get().getColumns() ) {
+            AggregateCounter count = new AggregateCounter( column.getName(), column.getValue() );
+            if ( pad && !( resolution == CounterResolution.ALL ) ) {
+                while ( count.getTimestamp() != expected_time ) {
+                    counters.add( new AggregateCounter( expected_time, 0 ) );
+                    expected_time = resolution.next( expected_time );
+                }
+                expected_time = resolution.next( expected_time );
+            }
+            counters.add( count );
+        }
+        if ( pad && !( resolution == CounterResolution.ALL ) ) {
+            while ( expected_time <= finish ) {
+                counters.add( new AggregateCounter( expected_time, 0 ) );
+                expected_time = resolution.next( expected_time );
+            }
+        }
+        return new AggregateCounterSet( counterName, queueId, category, counters );
+    }
+
+
+    public List<AggregateCounterSet> getAggregateCounters( UUID queueId, CounterQuery query ) throws Exception {
+
+        CounterResolution resolution = query.getResolution();
+        if ( resolution == null ) {
+            resolution = CounterResolution.ALL;
+        }
+        long start = query.getStartTime() != null ? query.getStartTime() : 0;
+        long finish = query.getFinishTime() != null ? query.getFinishTime() : 0;
+        boolean pad = query.isPad();
+        if ( start <= 0 ) {
+            start = 0;
+        }
+        if ( ( finish <= 0 ) || ( finish < start ) ) {
+            finish = System.currentTimeMillis();
+        }
+        start = resolution.round( start );
+        finish = resolution.round( finish );
+        long expected_time = start;
+
+        if ( pad && ( resolution != CounterResolution.ALL ) ) {
+            long max_counters = ( finish - start ) / resolution.interval();
+            if ( max_counters > 1000 ) {
+                finish = resolution.round( start + ( resolution.interval() * 1000 ) );
+            }
+        }
+
+        List<CounterFilterPredicate> filters = query.getCounterFilters();
+        if ( filters == null ) {
+            return null;
+        }
+        Map<String, org.apache.usergrid.persistence.cassandra.CounterUtils.AggregateCounterSelection> selections =
+                new HashMap<String, AggregateCounterSelection>();
+        Keyspace ko = cass.getApplicationKeyspace( applicationId );
+
+        for ( CounterFilterPredicate filter : filters ) {
+            AggregateCounterSelection selection =
+                    new AggregateCounterSelection( filter.getName(), null, null, queueId, filter.getCategory() );
+            selections.put( selection.getRow( resolution ), selection );
+        }
+
+        MultigetSliceCounterQuery<String, Long> q = HFactory.createMultigetSliceCounterQuery( ko, se, le );
+        q.setColumnFamily( APPLICATION_AGGREGATE_COUNTERS.getColumnFamily() );
+        q.setRange( start, finish, false, ALL_COUNT );
+        QueryResult<CounterRows<String, Long>> rows = q.setKeys( selections.keySet() ).execute();
+
+        List<AggregateCounterSet> countSets = new ArrayList<AggregateCounterSet>();
+        for ( CounterRow<String, Long> r : rows.get() ) {
+            expected_time = start;
+            List<AggregateCounter> counters = new ArrayList<AggregateCounter>();
+            for ( HCounterColumn<Long> column : r.getColumnSlice().getColumns() ) {
+                AggregateCounter count = new AggregateCounter( column.getName(), column.getValue() );
+                if ( pad && ( resolution != CounterResolution.ALL ) ) {
+                    while ( count.getTimestamp() != expected_time ) {
+                        counters.add( new AggregateCounter( expected_time, 0 ) );
+                        expected_time = resolution.next( expected_time );
+                    }
+                    expected_time = resolution.next( expected_time );
+                }
+                counters.add( count );
+            }
+            if ( pad && ( resolution != CounterResolution.ALL ) ) {
+                while ( expected_time <= finish ) {
+                    counters.add( new AggregateCounter( expected_time, 0 ) );
+                    expected_time = resolution.next( expected_time );
+                }
+            }
+            AggregateCounterSelection selection = selections.get( r.getKey() );
+            countSets.add( new AggregateCounterSet( selection.getName(), queueId, selection.getCategory(), counters ) );
+        }
+
+        Collections.sort( countSets, new Comparator<AggregateCounterSet>() {
+            @Override
+            public int compare( AggregateCounterSet o1, AggregateCounterSet o2 ) {
+                String s1 = o1.getName();
+                String s2 = o2.getName();
+                return s1.compareTo( s2 );
+            }
+        } );
+        return countSets;
+    }
+
+
+    @Override
+    public Results getAggregateQueueCounters( String queuePath, String category, String counterName,
+                                              CounterResolution resolution, long start, long finish, boolean pad ) {
+        return Results.fromCounters(
+                getAggregateCounters( getQueueId( queuePath ), category, counterName, resolution, start, finish,
+                        pad ) );
+    }
+
+
+    @Override
+    public Results getAggregateQueueCounters( String queuePath, CounterQuery query ) throws Exception {
+        return Results.fromCounters( getAggregateCounters( getQueueId( queuePath ), query ) );
+    }
+
+
+    @Override
+    public void incrementQueueCounters( String queuePath, Map<String, Long> counts ) {
+        long timestamp = cass.createTimestamp();
+        Mutator<ByteBuffer> m = createMutator( cass.getApplicationKeyspace( applicationId ), be );
+        counterUtils.batchIncrementQueueCounters( m, getQueueId( queuePath ), counts, timestamp, applicationId );
+        batchExecute( m, CassandraService.RETRY_COUNT );
+    }
+
+
+    @Override
+    public void incrementQueueCounter( String queuePath, String name, long value ) {
+        long timestamp = cass.createTimestamp();
+        Mutator<ByteBuffer> m = createMutator( cass.getApplicationKeyspace( applicationId ), be );
+        counterUtils.batchIncrementQueueCounter( m, getQueueId( queuePath ), name, value, timestamp, applicationId );
+        batchExecute( m, CassandraService.RETRY_COUNT );
+    }
+
+
+    public Map<String, Long> getQueueCounters( UUID queueId ) throws Exception {
+
+        Map<String, Long> counters = new HashMap<String, Long>();
+        Keyspace ko = cass.getApplicationKeyspace( applicationId );
+        SliceCounterQuery<UUID, String> q = createCounterSliceQuery( ko, ue, se );
+        q.setColumnFamily( COUNTERS.getColumnFamily() );
+        q.setRange( null, null, false, ALL_COUNT );
+        QueryResult<CounterSlice<String>> r = q.setKey( queueId ).execute();
+        for ( HCounterColumn<String> column : r.get().getColumns() ) {
+            counters.put( column.getName(), column.getValue() );
+        }
+        return counters;
+    }
+
+
+    @Override
+    public Map<String, Long> getQueueCounters( String queuePath ) throws Exception {
+        return getQueueCounters( getQueueId( queuePath ) );
+    }
+
+
+    @Override
+    public Set<String> getQueueCounterNames( String queuePath ) throws Exception {
+        Set<String> names = new HashSet<String>();
+        Keyspace ko = cass.getApplicationKeyspace( applicationId );
+        SliceQuery<String, String, ByteBuffer> q = createSliceQuery( ko, se, se, be );
+        q.setColumnFamily( QueuesCF.QUEUE_DICTIONARIES.toString() );
+        q.setKey( CassandraPersistenceUtils.key( getQueueId( queuePath ), DICTIONARY_COUNTERS ).toString() );
+        q.setRange( null, null, false, ALL_COUNT );
+
+        List<HColumn<String, ByteBuffer>> columns = q.execute().get().getColumns();
+        for ( HColumn<String, ByteBuffer> column : columns ) {
+            names.add( column.getName() );
+        }
+        return names;
+    }
+
+
+    public Queue getQueue( String queuePath, UUID queueId ) {
+        SliceQuery<UUID, String, ByteBuffer> q =
+                createSliceQuery( cass.getApplicationKeyspace( applicationId ), ue, se, be );
+        q.setColumnFamily( QUEUE_PROPERTIES.getColumnFamily() );
+        q.setKey( queueId );
+        q.setRange( null, null, false, ALL_COUNT );
+        QueryResult<ColumnSlice<String, ByteBuffer>> r = q.execute();
+        ColumnSlice<String, ByteBuffer> slice = r.get();
+        List<HColumn<String, ByteBuffer>> results = slice.getColumns();
+        return deserializeQueue( results );
+    }
+
+
+    @Override
+    public Queue getQueue( String queuePath ) {
+        return getQueue( queuePath, getQueueId( queuePath ) );
+    }
+
+
+    @Override
+    public Queue updateQueue( String queuePath, Queue queue ) {
+        queue.setPath( queuePath );
+
+        UUID timestampUuid = newTimeUUID();
+        long timestamp = getTimestampInMicros( timestampUuid );
+
+        Mutator<ByteBuffer> batch = createMutator( cass.getApplicationKeyspace( applicationId ), be );
+
+        addQueueToMutator( batch, queue, timestamp );
+
+        try {
+            batchUpdateQueuePropertiesIndexes( batch, queuePath, queue.getUuid(), queue.getProperties(),
+                    timestampUuid );
+        }
+        catch ( Exception e ) {
+            logger.error( "Unable to update queue", e );
+        }
+
+        batch.addInsertion( bytebuffer( queue.getUuid() ), QUEUE_PROPERTIES.getColumnFamily(),
+                createColumn( QUEUE_CREATED, timestamp / 1000, Long.MAX_VALUE - timestamp, se, le ) );
+
+        batch.addInsertion( bytebuffer( queue.getUuid() ), QUEUE_PROPERTIES.getColumnFamily(),
+                createColumn( QUEUE_MODIFIED, timestamp / 1000, timestamp, se, le ) );
+
+        batchExecute( batch, RETRY_COUNT );
+
+        return queue;
+    }
+
+
+    @Override
+    public Queue updateQueue( String queuePath, Map<String, Object> properties ) {
+        return updateQueue( queuePath, new Queue( properties ) );
+    }
+
+
+    public void batchUpdateQueuePropertiesIndexes( Mutator<ByteBuffer> batch, String subscriberQueuePath,
+                                                   UUID subscriberQueueId, Map<String, Object> properties,
+                                                   UUID timestampUuid ) throws Exception {
+
+        QueueSet subscriptions = getSubscriptions( subscriberQueuePath, null, ALL_COUNT );
+
+        if ( subscriptions != null ) {
+
+            for ( Map.Entry<String, Object> property : properties.entrySet() ) {
+
+                if ( !Queue.QUEUE_PROPERTIES.containsKey( property.getKey() ) ) {
+
+                    QueueIndexUpdate indexUpdate =
+                            batchStartQueueIndexUpdate( batch, subscriberQueuePath, subscriberQueueId,
+                                    property.getKey(), property.getValue(), timestampUuid );
+
+                    for ( QueueInfo subscription : subscriptions.getQueues() ) {
+                        batchUpdateQueueIndex( indexUpdate, subscription.getUuid() );
+                    }
+                }
+            }
+        }
+    }
+
+
+    public void batchUpdateQueuePropertiesIndexes( Mutator<ByteBuffer> batch, UUID publisherQueueId,
+                                                   String subscriberQueuePath, UUID subscriberQueueId,
+                                                   Map<String, Object> properties, UUID timestampUuid )
+            throws Exception {
+
+        for ( Map.Entry<String, Object> property : properties.entrySet() ) {
+
+            if ( !Queue.QUEUE_PROPERTIES.containsKey( property.getKey() ) ) {
+
+                QueueIndexUpdate indexUpdate =
+                        batchStartQueueIndexUpdate( batch, subscriberQueuePath, subscriberQueueId, property.getKey(),
+                                property.getValue(), timestampUuid );
+
+                batchUpdateQueueIndex( indexUpdate, publisherQueueId );
+            }
+        }
+    }
+
+
+    public QueueIndexUpdate batchUpdateQueueIndex( QueueIndexUpdate indexUpdate, UUID subcriptionQueueId )
+            throws Exception {
+
+        logger.info( "batchUpdateQueueIndex" );
+
+        Mutator<ByteBuffer> batch = indexUpdate.getBatch();
+
+        // queue_id,prop_name
+        Object index_key = key( subcriptionQueueId, indexUpdate.getEntryName() );
+
+        // subscription_queue_id,subscriber_queue_id,prop_name
+
+        for ( QueueIndexEntry entry : indexUpdate.getPrevEntries() ) {
+
+            if ( entry.getValue() != null ) {
+
+                index_key = key( subcriptionQueueId, entry.getPath() );
+
+                batch.addDeletion( bytebuffer( index_key ), PROPERTY_INDEX.getColumnFamily(), entry.getIndexComposite(),
+                        dce, indexUpdate.getTimestamp() );
+            }
+            else {
+                logger.error( "Unexpected condition - deserialized property value is null" );
+            }
+        }
+
+        if ( indexUpdate.getNewEntries().size() > 0 ) {
+
+            for ( QueueIndexEntry indexEntry : indexUpdate.getNewEntries() ) {
+
+                index_key = key( subcriptionQueueId, indexEntry.getPath() );
+
+                batch.addInsertion( bytebuffer( index_key ), PROPERTY_INDEX.getColumnFamily(),
+                        createColumn( indexEntry.getIndexComposite(), ByteBuffer.allocate( 0 ),
+                                indexUpdate.getTimestamp(), dce, be ) );
+            }
+        }
+
+        for ( String index : indexUpdate.getIndexesSet() ) {
+            batch.addInsertion( bytebuffer( key( subcriptionQueueId, DICTIONARY_SUBSCRIBER_INDEXES ) ),
+                    QUEUE_DICTIONARIES.getColumnFamily(),
+                    createColumn( index, ByteBuffer.allocate( 0 ), indexUpdate.getTimestamp(), se, be ) );
+        }
+
+        return indexUpdate;
+    }
+
+
+    public QueueIndexUpdate batchStartQueueIndexUpdate( Mutator<ByteBuffer> batch, String queuePath, UUID queueId,
+                                                        String entryName, Object entryValue, UUID timestampUuid )
+            throws Exception {
+
+        long timestamp = getTimestampInMicros( timestampUuid );
+
+        QueueIndexUpdate indexUpdate =
+                new QueueIndexUpdate( batch, queuePath, queueId, entryName, entryValue, timestampUuid );
+
+        List<HColumn<ByteBuffer, ByteBuffer>> entries = null;
+
+        entries = createSliceQuery( cass.getApplicationKeyspace( applicationId ), ue, be, be )
+                .setColumnFamily( PROPERTY_INDEX_ENTRIES.getColumnFamily() ).setKey( queueId )
+                .setRange( DynamicComposite.toByteBuffer( entryName ),
+                        setGreaterThanEqualityFlag( new DynamicComposite( entryName ) ).serialize(), false,
+                        INDEX_ENTRY_LIST_COUNT ).execute().get().getColumns();
+
+        if ( logger.isInfoEnabled() ) {
+            logger.info( "Found {} previous index entries for {} of entity {}", new Object[] {
+                    entries.size(), entryName, queueId
+            } );
+        }
+
+        // Delete all matching entries from entry list
+        for ( HColumn<ByteBuffer, ByteBuffer> entry : entries ) {
+            UUID prev_timestamp = null;
+            Object prev_value = null;
+            String prev_obj_path = null;
+
+            // new format:
+            // composite(entryName,
+            // value_code,prev_value,prev_timestamp,prev_obj_path) = null
+            DynamicComposite composite = DynamicComposite.fromByteBuffer( entry.getName().duplicate() );
+            prev_value = composite.get( 2 );
+            prev_timestamp = ( UUID ) composite.get( 3 );
+            if ( composite.size() > 4 ) {
+                prev_obj_path = ( String ) composite.get( 4 );
+            }
+
+            if ( prev_value != null ) {
+
+                String entryPath = entryName;
+                if ( ( prev_obj_path != null ) && ( prev_obj_path.length() > 0 ) ) {
+                    entryPath = entryName + "." + prev_obj_path;
+                }
+
+                indexUpdate.addPrevEntry( entryPath, prev_value, prev_timestamp );
+
+                // composite(property_value,subscriber_id,entry_timestamp)
+                batch.addDeletion( bytebuffer( queueId ), PROPERTY_INDEX_ENTRIES.getColumnFamily(),
+                        entry.getName().duplicate(), be, timestamp );
+            }
+            else {
+                logger.error( "Unexpected condition - deserialized property value is null" );
+            }
+        }
+
+        if ( validIndexableValueOrJson( entryValue ) ) {
+
+            List<Map.Entry<String, Object>> list = getKeyValueList( entryName, entryValue, false );
+
+            for ( Map.Entry<String, Object> indexEntry : list ) {
+
+                if ( validIndexableValue( indexEntry.getValue() ) ) {
+                    indexUpdate.addNewEntry( indexEntry.getKey(), toIndexableValue( indexEntry.getValue() ) );
+                }
+            }
+
+            for ( Map.Entry<String, Object> indexEntry : list ) {
+
+                String name = indexEntry.getKey();
+                if ( name.startsWith( entryName + "." ) ) {
+                    name = name.substring( entryName.length() + 1 );
+                }
+                else if ( name.startsWith( entryName ) ) {
+                    name = name.substring( entryName.length() );
+                }
+
+                batch.addInsertion( bytebuffer( queueId ), PROPERTY_INDEX_ENTRIES.getColumnFamily(), createColumn(
+                        DynamicComposite
+                                .toByteBuffer( entryName, indexValueCode( entryValue ), toIndexableValue( entryValue ),
+                                        indexUpdate.getTimestampUuid(), name ), ByteBuffer.allocate( 0 ), timestamp, be,
+                        be ) );
+
+                indexUpdate.addIndex( indexEntry.getKey() );
+            }
+
+            indexUpdate.addIndex( entryName );
+        }
+
+        return indexUpdate;
+    }
+
+
+    public QueueSet searchQueueIndex( UUID publisherQueueId, QuerySlice slice, int count ) throws Exception {
+
+        ByteBuffer start = null;
+        if ( slice.getCursor() != null ) {
+            start = slice.getCursor();
+        }
+        else if ( slice.getStart() != null ) {
+            DynamicComposite s = new DynamicComposite( slice.getStart().getCode(), slice.getStart().getValue() );
+            if ( !slice.getStart().isInclusive() ) {
+                setEqualityFlag( s, ComponentEquality.GREATER_THAN_EQUAL );
+            }
+            start = s.serialize();
+        }
+
+        ByteBuffer finish = null;
+        if ( slice.getFinish() != null ) {
+            DynamicComposite f = new DynamicComposite( slice.getFinish().getCode(), slice.getFinish().getValue() );
+            if ( slice.getFinish().isInclusive() ) {
+                setEqualityFlag( f, ComponentEquality.GREATER_THAN_EQUAL );
+            }
+            finish = f.serialize();
+        }
+
+        if ( slice.isReversed() && ( start != null ) && ( finish != null ) ) {
+            ByteBuffer temp = start;
+            start = finish;
+            finish = temp;
+        }
+
+        List<HColumn<ByteBuffer, ByteBuffer>> results =
+                createSliceQuery( cass.getApplicationKeyspace( applicationId ), be, be, be )
+                        .setColumnFamily( PROPERTY_INDEX.getColumnFamily() )
+                        .setKey( bytebuffer( key( publisherQueueId, slice.getPropertyName() ) ) )
+                        .setRange( start, finish, slice.isReversed(), count ).execute().get().getColumns();
+
+        QueueSet queues = new QueueSet();
+        for ( HColumn<ByteBuffer, ByteBuffer> column : results ) {
+            DynamicComposite c = DynamicComposite.fromByteBuffer( column.getName() );
+            queues.addQueue( c.get( 3, se ), c.get( 2, ue ) );
+        }
+        return queues;
+    }
+
+
+    @Override
+    public QueueSet searchSubscribers( String publisherQueuePath, Query query ) {
+
+        if ( query == null ) {
+            query = new Query();
+        }
+
+        publisherQueuePath = normalizeQueuePath( publisherQueuePath );
+        UUID publisherQueueId = getQueueId( publisherQueuePath );
+
+        if ( !query.hasFilterPredicates() && !query.hasSortPredicates() ) {
+
+            return getSubscribers( publisherQueuePath, null, query.getLimit() );
+        }
+
+        QueueSet results = null;
+        String composite_cursor = null;
+
+        QueryProcessor qp = new QueryProcessor( query );
+        List<QuerySlice> slices = qp.getSlices();
+        int search_count = query.getLimit() + 1;
+        if ( slices.size() > 1 ) {
+            search_count = DEFAULT_SEARCH_COUNT;
+        }
+        for ( QuerySlice slice : slices ) {
+
+            QueueSet r = null;
+            try {
+                r = searchQueueIndex( publisherQueueId, slice, search_count );
+            }
+            catch ( Exception e ) {
+                logger.error( "Error during search", e );
+            }
+
+            if ( r == null ) {
+                continue;
+            }
+
+            if ( r.size() > query.getLimit() ) {
+                r.setCursorToLastResult();
+            }
+
+            if ( r.getCursor() != null ) {
+                if ( composite_cursor != null ) {
+                    composite_cursor += "|";
+                }
+                else {
+                    composite_cursor = "";
+                }
+                int hashCode = slice.hashCode();
+                logger.info( "Cursor hash code: {} ", hashCode );
+                composite_cursor += hashCode + ":" + r.getCursor();
+            }
+
+            if ( results != null ) {
+                results.and( r );
+            }
+            else {
+                results = r;
+            }
+        }
+
+        return results;
+    }
+
+
+    @Override
+    public QueueSet getQueues( String firstQueuePath, int limit ) {
+        return getSubscribers( "/", firstQueuePath, limit );
+    }
+
+
+    @Override
+    public QueueSet getChildQueues( String publisherQueuePath, String firstQueuePath, int count ) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+
+    @Override
+    public UUID getNewConsumerId() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.apache.usergrid.mq.QueueManager#renewTransaction(java.lang.String,
+     * java.lang.String, org.apache.usergrid.mq.QueueQuery)
+     */
+    @Override
+    public UUID renewTransaction( String queuePath, UUID transactionId, QueueQuery query )
+            throws TransactionNotFoundException {
+        Keyspace ko = cass.getApplicationKeyspace( applicationId );
+        return new ConsumerTransaction( applicationId, ko, lockManager, cass, lockTimeout )
+                .renewTransaction( queuePath, transactionId, query );
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.apache.usergrid.mq.QueueManager#deleteTransaction(java.lang.String,
+     * java.lang.String, org.apache.usergrid.mq.QueueQuery)
+     */
+    @Override
+    public void deleteTransaction( String queuePath, UUID transactionId, QueueQuery query ) {
+        this.commitTransaction( queuePath, transactionId, query );
+    }
+
+
+    @Override
+    public void commitTransaction( String queuePath, UUID transactionId, QueueQuery query ) {
+        Keyspace ko = cass.getApplicationKeyspace( applicationId );
+        new ConsumerTransaction( applicationId, ko, lockManager, cass, lockTimeout )
+                .deleteTransaction( queuePath, transactionId, query );
+    }
+
+
+    @Override
+    public boolean hasOutstandingTransactions( String queuePath, UUID consumerId ) {
+        UUID queueId = CassandraMQUtils.getQueueId( queuePath );
+
+        //no consumer id set, use the same one as the overall queue
+        if ( consumerId == null ) {
+            consumerId = queueId;
+        }
+
+        Keyspace ko = cass.getApplicationKeyspace( applicationId );
+
+        return new ConsumerTransaction( applicationId, ko, lockManager, cass , lockTimeout)
+                .hasOutstandingTransactions( queueId, consumerId );
+    }
+
+
+    @Override
+    public boolean hasMessagesInQueue( String queuePath, UUID consumerId ) {
+
+        Keyspace ko = cass.getApplicationKeyspace( applicationId );
+        UUID queueId = CassandraMQUtils.getQueueId( queuePath );
+
+        if ( consumerId == null ) {
+            consumerId = queueId;
+        }
+
+        NoTransactionSearch search = new NoTransactionSearch( ko );
+
+        QueueBounds bounds = search.getQueueBounds( queueId );
+
+        //Queue doesn't exist
+        if ( bounds == null ) {
+            return false;
+        }
+
+        UUID consumerPosition = search.getConsumerQueuePosition( queueId, consumerId );
+
+        //queue exists, but the consumer does not, meaning it's never read from the Q
+        if ( consumerPosition == null ) {
+            return true;
+        }
+
+        //check our consumer position against the newest message.  If it's equal or larger,
+        // we're read to the end of the queue
+        //note that this does not take transactions into consideration, just the client pointer relative to the largest
+        //message in the queue
+        return UUIDUtils.compare( consumerPosition, bounds.getNewest() ) < 0;
+    }
+
+
+    @Override
+    public boolean hasPendingReads( String queuePath, UUID consumerId ) {
+        return hasOutstandingTransactions( queuePath, consumerId ) || hasMessagesInQueue( queuePath, consumerId );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/QueuesCF.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/QueuesCF.java b/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/QueuesCF.java
new file mode 100644
index 0000000..f93264f
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/QueuesCF.java
@@ -0,0 +1,155 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.mq.cassandra;
+
+
+import java.util.List;
+
+import org.apache.usergrid.persistence.cassandra.CFEnum;
+
+import me.prettyprint.hector.api.ddl.ColumnDefinition;
+import static me.prettyprint.hector.api.ddl.ComparatorType.COUNTERTYPE;
+import static org.apache.usergrid.persistence.cassandra.CassandraPersistenceUtils.getIndexMetadata;
+
+// Auto-generated by ApplicationCFGenerator
+
+
+public enum QueuesCF implements CFEnum {
+
+    MESSAGE_PROPERTIES( "Entity_Properties", "BytesType", false ),
+
+    QUEUE_PROPERTIES( "Queue_Properties", "BytesType" ),
+
+    QUEUE_INBOX( "Queue_Inbox", "UUIDType" ),
+
+    QUEUE_DICTIONARIES( "Queue_Dictionaries", "BytesType" ),
+
+    QUEUE_SUBSCRIBERS( "Queue_Subscribers", "BytesType" ),
+
+    QUEUE_SUBSCRIPTIONS( "Queue_Subscriptions", "BytesType" ),
+
+    /**
+     * Time based UUID list of future timeouts for messages. The UUID value is a pointer to the original message in the
+     * topic
+     */
+    CONSUMER_QUEUE_TIMEOUTS( "MQ_Consumers_Timeout", "UUIDType" ),
+
+    CONSUMERS( "MQ_Consumers", "BytesType" ),
+
+    CONSUMER_QUEUE_MESSAGES_PROPERTIES( "Consumer_Queue_Messages_Properties", "BytesType" ),
+
+    COUNTERS( "MQ_Counters", "BytesType", COUNTERTYPE.getClassName() ),
+
+    PROPERTY_INDEX( "MQ_Property_Index",
+            "DynamicCompositeType(a=>AsciiType,b=>BytesType,i=>IntegerType,x=>LexicalUUIDType,l=>LongType," +
+                    "t=>TimeUUIDType,s=>UTF8Type,u=>UUIDType,A=>AsciiType(reversed=true),B=>BytesType(reversed=true)," +
+                    "I=>IntegerType(reversed=true),X=>LexicalUUIDType(reversed=true),L=>LongType(reversed=true)," +
+                    "T=>TimeUUIDType(reversed=true),S=>UTF8Type(reversed=true),U=>UUIDType(reversed=true))" ),
+
+    PROPERTY_INDEX_ENTRIES( "MQ_Property_Index_Entries",
+            "DynamicCompositeType(a=>AsciiType,b=>BytesType,i=>IntegerType,x=>LexicalUUIDType,l=>LongType," +
+                    "t=>TimeUUIDType,s=>UTF8Type,u=>UUIDType,A=>AsciiType(reversed=true),B=>BytesType(reversed=true)," +
+                    "I=>IntegerType(reversed=true),X=>LexicalUUIDType(reversed=true),L=>LongType(reversed=true)," +
+                    "T=>TimeUUIDType(reversed=true),S=>UTF8Type(reversed=true),U=>UUIDType(reversed=true))" ),;
+
+    public final static String STATIC_MESSAGES_KEYSPACE = "Usergrid_Messages";
+    public final static String APPLICATION_MESSAGES_KEYSPACE_SUFFIX = "_messages";
+
+    private final String cf;
+    private final String comparator;
+    private final String validator;
+    private final String indexes;
+    private final boolean create;
+
+
+    QueuesCF( String cf, String comparator ) {
+        this.cf = cf;
+        this.comparator = comparator;
+        validator = null;
+        indexes = null;
+        create = true;
+    }
+
+
+    QueuesCF( String cf, String comparator, boolean create ) {
+        this.cf = cf;
+        this.comparator = comparator;
+        validator = null;
+        indexes = null;
+        this.create = create;
+    }
+
+
+    QueuesCF( String cf, String comparator, String validator ) {
+        this.cf = cf;
+        this.comparator = comparator;
+        this.validator = validator;
+        indexes = null;
+        create = true;
+    }
+
+
+    QueuesCF( String cf, String comparator, String validator, String indexes ) {
+        this.cf = cf;
+        this.comparator = comparator;
+        this.validator = validator;
+        this.indexes = indexes;
+        create = true;
+    }
+
+
+    @Override
+    public String toString() {
+        return cf;
+    }
+
+
+    @Override
+    public String getColumnFamily() {
+        return cf;
+    }
+
+
+    @Override
+    public String getComparator() {
+        return comparator;
+    }
+
+
+    @Override
+    public String getValidator() {
+        return validator;
+    }
+
+
+    @Override
+    public boolean isComposite() {
+        return comparator.startsWith( "DynamicCompositeType" );
+    }
+
+
+    @Override
+    public List<ColumnDefinition> getMetadata() {
+        return getIndexMetadata( indexes );
+    }
+
+
+    @Override
+    public boolean create() {
+        return create;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/io/AbstractSearch.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/io/AbstractSearch.java b/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/io/AbstractSearch.java
new file mode 100644
index 0000000..0a301bc
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/io/AbstractSearch.java
@@ -0,0 +1,357 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.mq.cassandra.io;
+
+
+import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
+import org.apache.usergrid.mq.Message;
+import org.apache.usergrid.mq.QueueResults;
+import org.apache.usergrid.mq.cassandra.io.NoTransactionSearch.SearchParam;
+import org.apache.usergrid.persistence.exceptions.QueueException;
+import org.apache.usergrid.utils.UUIDUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import me.prettyprint.cassandra.serializers.ByteBufferSerializer;
+import me.prettyprint.cassandra.serializers.UUIDSerializer;
+import me.prettyprint.hector.api.Keyspace;
+import me.prettyprint.hector.api.beans.ColumnSlice;
+import me.prettyprint.hector.api.beans.HColumn;
+import me.prettyprint.hector.api.beans.Row;
+import me.prettyprint.hector.api.beans.Rows;
+import me.prettyprint.hector.api.factory.HFactory;
+import me.prettyprint.hector.api.mutation.Mutator;
+import me.prettyprint.hector.api.query.SliceQuery;
+import static me.prettyprint.hector.api.factory.HFactory.createColumn;
+import static me.prettyprint.hector.api.factory.HFactory.createMultigetSliceQuery;
+import static me.prettyprint.hector.api.factory.HFactory.createMutator;
+import static me.prettyprint.hector.api.factory.HFactory.createSliceQuery;
+import static org.apache.usergrid.mq.Queue.QUEUE_NEWEST;
+import static org.apache.usergrid.mq.Queue.QUEUE_OLDEST;
+import static org.apache.usergrid.mq.cassandra.CassandraMQUtils.deserializeMessage;
+import static org.apache.usergrid.mq.cassandra.CassandraMQUtils.getQueueShardRowKey;
+import static org.apache.usergrid.mq.cassandra.QueueManagerImpl.ALL_COUNT;
+import static org.apache.usergrid.mq.cassandra.QueueManagerImpl.QUEUE_SHARD_INTERVAL;
+import static org.apache.usergrid.mq.cassandra.QueueManagerImpl.se;
+import static org.apache.usergrid.mq.cassandra.QueuesCF.CONSUMERS;
+import static org.apache.usergrid.mq.cassandra.QueuesCF.MESSAGE_PROPERTIES;
+import static org.apache.usergrid.mq.cassandra.QueuesCF.QUEUE_INBOX;
+import static org.apache.usergrid.mq.cassandra.QueuesCF.QUEUE_PROPERTIES;
+import static org.apache.usergrid.utils.NumberUtils.roundLong;
+import static org.apache.usergrid.utils.UUIDUtils.MAX_TIME_UUID;
+import static org.apache.usergrid.utils.UUIDUtils.MIN_TIME_UUID;
+import static org.apache.usergrid.utils.UUIDUtils.getTimestampInMillis;
+
+
+/** @author tnine */
+public abstract class AbstractSearch implements QueueSearch
+{
+
+    private static final Logger logger = LoggerFactory.getLogger( AbstractSearch.class );
+
+    protected static final UUIDSerializer ue = new UUIDSerializer();
+
+    protected static final ByteBufferSerializer be = new ByteBufferSerializer();
+
+    protected Keyspace ko;
+
+
+    /**
+     *
+     */
+    public AbstractSearch( Keyspace ko )
+    {
+        this.ko = ko;
+    }
+
+
+    /**
+     * Get the position in the queue for the given appId, consumer and queu
+     *
+     * @param queueId The queueId
+     * @param consumerId The consumerId
+     */
+    public UUID getConsumerQueuePosition( UUID queueId, UUID consumerId )
+    {
+        HColumn<UUID, UUID> result =
+                HFactory.createColumnQuery( ko, ue, ue, ue ).setKey( consumerId ).setName( queueId )
+                        .setColumnFamily( CONSUMERS.getColumnFamily() ).execute().get();
+        if ( result != null )
+        {
+            return result.getValue();
+        }
+
+        return null;
+    }
+
+
+    /** Load the messages into an array list */
+    protected List<Message> loadMessages( Collection<UUID> messageIds, boolean reversed )
+    {
+
+        Rows<UUID, String, ByteBuffer> messageResults =
+                createMultigetSliceQuery( ko, ue, se, be ).setColumnFamily( MESSAGE_PROPERTIES.getColumnFamily() )
+                        .setKeys( messageIds ).setRange( null, null, false, ALL_COUNT ).execute().get();
+
+        List<Message> messages = new ArrayList<Message>( messageIds.size() );
+
+        for ( Row<UUID, String, ByteBuffer> row : messageResults )
+        {
+            Message message = deserializeMessage( row.getColumnSlice().getColumns() );
+
+            if ( message != null )
+            {
+                messages.add( message );
+            }
+        }
+
+        Collections.sort( messages, new RequestedOrderComparator( messageIds ) );
+
+        return messages;
+    }
+
+
+    /** Create the results to return from the given messages */
+    protected QueueResults createResults( List<Message> messages, String queuePath, UUID queueId, UUID consumerId )
+    {
+
+        UUID lastId = null;
+
+        if ( messages != null && messages.size() > 0 )
+        {
+            lastId = messages.get( messages.size() - 1 ).getUuid();
+        }
+
+        return new QueueResults( queuePath, queueId, messages, lastId, consumerId );
+    }
+
+
+    /**
+     * Get a list of UUIDs that can be read for the client. This comes directly from the queue inbox, and DOES NOT take
+     * into account client messages
+     *
+     * @param queueId The queue id to read
+     * @param bounds The bounds to use when reading
+     */
+    protected List<UUID> getQueueRange( UUID queueId, QueueBounds bounds, SearchParam params )
+    {
+
+        if ( bounds == null )
+        {
+            logger.error( "Necessary queue bounds not found" );
+            throw new QueueException( "Neccessary queue bounds not found" );
+        }
+
+        UUID finish_uuid = params.reversed ? bounds.getOldest() : bounds.getNewest();
+
+        List<UUID> results = new ArrayList<UUID>( params.limit );
+
+        UUID start = params.startId;
+
+        if ( start == null )
+        {
+            start = params.reversed ? bounds.getNewest() : bounds.getOldest();
+        }
+
+        if ( start == null )
+        {
+            logger.error( "No first message in queue" );
+            return results;
+        }
+
+        if ( finish_uuid == null )
+        {
+            logger.error( "No last message in queue" );
+            return results;
+        }
+
+        long start_ts_shard = roundLong( getTimestampInMillis( start ), QUEUE_SHARD_INTERVAL );
+
+        long finish_ts_shard = roundLong( getTimestampInMillis( finish_uuid ), QUEUE_SHARD_INTERVAL );
+
+        long current_ts_shard = start_ts_shard;
+        if ( params.reversed )
+        {
+            current_ts_shard = finish_ts_shard;
+        }
+
+        while ( ( current_ts_shard >= start_ts_shard ) && ( current_ts_shard <= finish_ts_shard ) )
+        {
+
+            UUID slice_start = MIN_TIME_UUID;
+            UUID slice_end = MAX_TIME_UUID;
+
+            if ( current_ts_shard == start_ts_shard )
+            {
+                slice_start = start;
+            }
+
+            if ( current_ts_shard == finish_ts_shard )
+            {
+                slice_end = finish_uuid;
+            }
+
+            SliceQuery<ByteBuffer, UUID, ByteBuffer> q = createSliceQuery( ko, be, ue, be );
+            q.setColumnFamily( QUEUE_INBOX.getColumnFamily() );
+            q.setKey( getQueueShardRowKey( queueId, current_ts_shard ) );
+            q.setRange( slice_start, slice_end, params.reversed, params.limit + 1 );
+
+            List<HColumn<UUID, ByteBuffer>> cassResults = q.execute().get().getColumns();
+
+            for ( int i = 0; i < cassResults.size(); i++ )
+            {
+                HColumn<UUID, ByteBuffer> column = cassResults.get( i );
+
+                // skip the first one, we've already read it
+                if ( i == 0 && params.skipFirst && params.startId.equals( column.getName() ) )
+                {
+                    continue;
+                }
+
+                UUID id = column.getName();
+
+                results.add( id );
+
+                logger.debug( "Added id '{}' to result set for queue id '{}'", id, queueId );
+
+                if ( results.size() >= params.limit )
+                {
+                    return results;
+                }
+            }
+
+            if ( params.reversed )
+            {
+                current_ts_shard -= QUEUE_SHARD_INTERVAL;
+            }
+            else
+            {
+                current_ts_shard += QUEUE_SHARD_INTERVAL;
+            }
+        }
+
+        return results;
+    }
+
+
+    /**
+     * Get the bounds for the queue
+     *
+     * @return The bounds for the queue
+     */
+    public QueueBounds getQueueBounds( UUID queueId )
+    {
+        try
+        {
+            ColumnSlice<String, UUID> result = HFactory.createSliceQuery( ko, ue, se, ue ).setKey( queueId )
+                                                       .setColumnNames( QUEUE_NEWEST, QUEUE_OLDEST )
+                                                       .setColumnFamily( QUEUE_PROPERTIES.getColumnFamily() ).execute()
+                                                       .get();
+            if ( result != null && result.getColumnByName( QUEUE_OLDEST ) != null
+                    && result.getColumnByName( QUEUE_NEWEST ) != null )
+            {
+                return new QueueBounds( result.getColumnByName( QUEUE_OLDEST ).getValue(),
+                        result.getColumnByName( QUEUE_NEWEST ).getValue() );
+            }
+        }
+        catch ( Exception e )
+        {
+            logger.error( "Error getting oldest queue message ID", e );
+        }
+        return null;
+    }
+
+
+    /**
+     * Write the updated client pointer
+     *
+     * @param lastReturnedId This is a null safe parameter. If it's null, this won't be written since it means we didn't
+     * read any messages
+     */
+    protected void writeClientPointer( UUID queueId, UUID consumerId, UUID lastReturnedId )
+    {
+        // nothing to do
+        if ( lastReturnedId == null )
+        {
+            return;
+        }
+
+        // we want to set the timestamp to the value from the time uuid. If this is
+        // not the max time uuid to ever be written
+        // for this consumer, we want this to be discarded to avoid internode race
+        // conditions with clock drift.
+        long colTimestamp = UUIDUtils.getTimestampInMicros( lastReturnedId );
+
+        Mutator<UUID> mutator = createMutator( ko, ue );
+
+        if ( logger.isDebugEnabled() )
+        {
+            logger.debug( "Writing last client id pointer of '{}' for queue '{}' and consumer '{}' with timestamp '{}",
+                    new Object[] {
+                            lastReturnedId, queueId, consumerId, colTimestamp
+                    } );
+        }
+
+        mutator.addInsertion( consumerId, CONSUMERS.getColumnFamily(),
+                createColumn( queueId, lastReturnedId, colTimestamp, ue, ue ) );
+
+        mutator.execute();
+    }
+
+
+    private class RequestedOrderComparator implements Comparator<Message>
+    {
+
+        private Map<UUID, Integer> indexCache = new HashMap<UUID, Integer>();
+
+
+        private RequestedOrderComparator( Collection<UUID> ids )
+        {
+            int i = 0;
+
+            for ( UUID id : ids )
+            {
+                indexCache.put( id, i );
+                i++;
+            }
+        }
+
+
+        /*
+         * (non-Javadoc)
+         *
+         * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
+         */
+        @Override
+        public int compare( Message o1, Message o2 )
+        {
+            int o1Idx = indexCache.get( o1.getUuid() );
+
+            int o2Idx = indexCache.get( o2.getUuid() );
+
+            return o1Idx - o2Idx;
+        }
+    }
+}


[39/96] [abbrv] [partial] Change package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/ApplicationCF.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/ApplicationCF.java b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/ApplicationCF.java
new file mode 100644
index 0000000..817f47f
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/ApplicationCF.java
@@ -0,0 +1,159 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.cassandra;
+
+
+import java.util.List;
+
+import me.prettyprint.hector.api.ddl.ColumnDefinition;
+import static me.prettyprint.hector.api.ddl.ComparatorType.COUNTERTYPE;
+import static org.apache.usergrid.persistence.cassandra.CassandraPersistenceUtils.getIndexMetadata;
+
+
+public enum ApplicationCF implements CFEnum {
+
+    /** This is where the entity objects are stored */
+    ENTITY_PROPERTIES( "Entity_Properties", "BytesType" ),
+
+    /** each row models name:value pairs. {@see org.apache.usergrid.persistence.Schema} for the list of dictionary types */
+    ENTITY_DICTIONARIES( "Entity_Dictionaries", "BytesType" ),
+
+    /**
+     * Rows that are full of UUIDs. Used when we want to have a row full of references to other entities. Mainly, this
+     * is for collections. Collections are represented by this CF.
+     */
+    ENTITY_ID_SETS( "Entity_Id_Sets", "UUIDType" ),
+
+    /**
+     * Typed vs. untyped dictionary. Dynamic entity dictionaries end up here. {@link
+     * EntityManagerImpl#getDictionaryAsMap(org.apache.usergrid.persistence.EntityRef, String)}
+     */
+    ENTITY_COMPOSITE_DICTIONARIES( "Entity_Composite_Dictionaries",
+            "DynamicCompositeType(a=>AsciiType,b=>BytesType,i=>IntegerType,x=>LexicalUUIDType,l=>LongType," +
+                    "t=>TimeUUIDType,s=>UTF8Type,u=>UUIDType,A=>AsciiType(reversed=true),B=>BytesType(reversed=true)," +
+                    "I=>IntegerType(reversed=true),X=>LexicalUUIDType(reversed=true),L=>LongType(reversed=true)," +
+                    "T=>TimeUUIDType(reversed=true),S=>UTF8Type(reversed=true),U=>UUIDType(reversed=true))" ),
+
+    /** No longer used? */
+    ENTITY_METADATA( "Entity_Metadata", "BytesType" ),
+
+    /** Contains all secondary indexes for entities */
+    ENTITY_INDEX( "Entity_Index",
+            "DynamicCompositeType(a=>AsciiType,b=>BytesType,i=>IntegerType,x=>LexicalUUIDType,l=>LongType," +
+                    "t=>TimeUUIDType,s=>UTF8Type,u=>UUIDType,A=>AsciiType(reversed=true),B=>BytesType(reversed=true)," +
+                    "I=>IntegerType(reversed=true),X=>LexicalUUIDType(reversed=true),L=>LongType(reversed=true)," +
+                    "T=>TimeUUIDType(reversed=true),S=>UTF8Type(reversed=true),U=>UUIDType(reversed=true))" ),
+
+    /** Unique index for properties that must remain the same */
+    ENTITY_UNIQUE( "Entity_Unique", "UUIDType" ),
+
+    /** Contains all properties that have ever been indexed for an entity */
+    ENTITY_INDEX_ENTRIES( "Entity_Index_Entries",
+            "DynamicCompositeType(a=>AsciiType,b=>BytesType,i=>IntegerType,x=>LexicalUUIDType,l=>LongType," +
+                    "t=>TimeUUIDType,s=>UTF8Type,u=>UUIDType,A=>AsciiType(reversed=true),B=>BytesType(reversed=true)," +
+                    "I=>IntegerType(reversed=true),X=>LexicalUUIDType(reversed=true),L=>LongType(reversed=true)," +
+                    "T=>TimeUUIDType(reversed=true),S=>UTF8Type(reversed=true),U=>UUIDType(reversed=true))" ),
+
+    /** All roles that exist within an application */
+    APPLICATION_ROLES( "Application_Roles", "BytesType" ),
+
+    /** Application counters */
+    APPLICATION_AGGREGATE_COUNTERS( "Application_Aggregate_Counters", "LongType", COUNTERTYPE.getClassName() ),
+
+    /** Entity counters */
+    ENTITY_COUNTERS( "Entity_Counters", "BytesType", COUNTERTYPE.getClassName() ),;
+    public final static String DEFAULT_DYNAMIC_COMPOSITE_ALIASES =
+            "(a=>AsciiType,b=>BytesType,i=>IntegerType,x=>LexicalUUIDType,l=>LongType,t=>TimeUUIDType,s=>UTF8Type," +
+                    "u=>UUIDType,A=>AsciiType(reversed=true),B=>BytesType(reversed=true)," +
+                    "I=>IntegerType(reversed=true),X=>LexicalUUIDType(reversed=true),L=>LongType(reversed=true)," +
+                    "T=>TimeUUIDType(reversed=true),S=>UTF8Type(reversed=true),U=>UUIDType(reversed=true))";
+
+    private final String cf;
+    private final String comparator;
+    private final String validator;
+    private final String indexes;
+    private final boolean create;
+
+
+    ApplicationCF( String cf, String comparator ) {
+        this.cf = cf;
+        this.comparator = comparator;
+        validator = null;
+        indexes = null;
+        create = true;
+    }
+
+
+    ApplicationCF( String cf, String comparator, String validator ) {
+        this.cf = cf;
+        this.comparator = comparator;
+        this.validator = validator;
+        indexes = null;
+        create = true;
+    }
+
+
+    ApplicationCF( String cf, String comparator, String validator, String indexes ) {
+        this.cf = cf;
+        this.comparator = comparator;
+        this.validator = validator;
+        this.indexes = indexes;
+        create = true;
+    }
+
+
+    @Override
+    public String toString() {
+        return cf;
+    }
+
+
+    @Override
+    public String getColumnFamily() {
+        return cf;
+    }
+
+
+    @Override
+    public String getComparator() {
+        return comparator;
+    }
+
+
+    @Override
+    public String getValidator() {
+        return validator;
+    }
+
+
+    @Override
+    public boolean isComposite() {
+        return comparator.startsWith( "DynamicCompositeType" );
+    }
+
+
+    @Override
+    public List<ColumnDefinition> getMetadata() {
+        return getIndexMetadata( indexes );
+    }
+
+
+    @Override
+    public boolean create() {
+        return create;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/CFEnum.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/CFEnum.java b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/CFEnum.java
new file mode 100644
index 0000000..6457406
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/CFEnum.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.cassandra;
+
+
+import java.util.List;
+
+import me.prettyprint.hector.api.ddl.ColumnDefinition;
+
+
+public interface CFEnum {
+
+    public String getColumnFamily();
+
+    public String getComparator();
+
+    public String getValidator();
+
+    public boolean isComposite();
+
+    public List<ColumnDefinition> getMetadata();
+
+    public boolean create();
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/CassandraPersistenceUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/CassandraPersistenceUtils.java b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/CassandraPersistenceUtils.java
new file mode 100644
index 0000000..9637845
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/CassandraPersistenceUtils.java
@@ -0,0 +1,483 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.cassandra;
+
+
+import java.io.IOException;
+import java.math.BigInteger;
+import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.TreeMap;
+import java.util.UUID;
+
+import org.codehaus.jackson.JsonNode;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.apache.cassandra.thrift.ColumnDef;
+import org.apache.cassandra.thrift.IndexType;
+import org.apache.commons.lang.StringUtils;
+import org.apache.usergrid.utils.JsonUtils;
+
+import me.prettyprint.cassandra.serializers.ByteBufferSerializer;
+import me.prettyprint.cassandra.serializers.StringSerializer;
+import me.prettyprint.cassandra.serializers.UUIDSerializer;
+import me.prettyprint.cassandra.service.ThriftColumnDef;
+import me.prettyprint.hector.api.ClockResolution;
+import me.prettyprint.hector.api.beans.DynamicComposite;
+import me.prettyprint.hector.api.beans.HColumn;
+import me.prettyprint.hector.api.ddl.ColumnDefinition;
+import me.prettyprint.hector.api.ddl.ColumnFamilyDefinition;
+import me.prettyprint.hector.api.ddl.ComparatorType;
+import me.prettyprint.hector.api.ddl.KeyspaceDefinition;
+import me.prettyprint.hector.api.factory.HFactory;
+import me.prettyprint.hector.api.mutation.MutationResult;
+import me.prettyprint.hector.api.mutation.Mutator;
+import static java.nio.ByteBuffer.wrap;
+import static me.prettyprint.hector.api.factory.HFactory.createClockResolution;
+import static me.prettyprint.hector.api.factory.HFactory.createColumn;
+import static org.apache.commons.beanutils.MethodUtils.invokeStaticMethod;
+import static org.apache.commons.lang.StringUtils.removeEnd;
+import static org.apache.commons.lang.StringUtils.removeStart;
+import static org.apache.commons.lang.StringUtils.split;
+import static org.apache.commons.lang.StringUtils.substringAfterLast;
+import static org.apache.usergrid.persistence.Schema.PROPERTY_TYPE;
+import static org.apache.usergrid.persistence.Schema.PROPERTY_UUID;
+import static org.apache.usergrid.persistence.Schema.serializeEntityProperty;
+import static org.apache.usergrid.utils.ClassUtils.isBasicType;
+import static org.apache.usergrid.utils.ConversionUtils.bytebuffer;
+import static org.apache.usergrid.utils.JsonUtils.toJsonNode;
+import static org.apache.usergrid.utils.StringUtils.replaceAll;
+import static org.apache.usergrid.utils.StringUtils.stringOrSubstringBeforeFirst;
+
+
+/** @author edanuff */
+public class CassandraPersistenceUtils {
+
+    private static final Logger logger = LoggerFactory.getLogger( CassandraPersistenceUtils.class );
+
+    /** Logger for batch operations */
+    private static final Logger batch_logger =
+            LoggerFactory.getLogger( CassandraPersistenceUtils.class.getPackage().getName() + ".BATCH" );
+
+    /**
+     *
+     */
+    public static final ByteBuffer PROPERTY_TYPE_AS_BYTES = bytebuffer( PROPERTY_TYPE );
+
+    /**
+     *
+     */
+    public static final ByteBuffer PROPERTY_ID_AS_BYTES = bytebuffer( PROPERTY_UUID );
+
+    /**
+     *
+     */
+    public static final char KEY_DELIM = ':';
+
+    /**
+     *
+     */
+    public static final UUID NULL_ID = new UUID( 0, 0 );
+
+    public static final StringSerializer se = new StringSerializer();
+    public static final UUIDSerializer ue = new UUIDSerializer();
+    public static final ByteBufferSerializer be = new ByteBufferSerializer();
+
+
+    /**
+     * @param operation
+     * @param columnFamily
+     * @param key
+     * @param columnName
+     * @param columnValue
+     * @param timestamp
+     */
+    public static void logBatchOperation( String operation, Object columnFamily, Object key, Object columnName,
+                                          Object columnValue, long timestamp ) {
+
+        if ( batch_logger.isDebugEnabled() ) {
+            batch_logger.debug( "{} cf={} key={} name={} value={}",
+                    new Object[] { operation, columnFamily, key, columnName, columnValue } );
+        }
+    }
+
+
+    public static void addInsertToMutator( Mutator<ByteBuffer> m, Object columnFamily, Object key, Object columnName,
+                                           Object columnValue, long timestamp ) {
+
+        logBatchOperation( "Insert", columnFamily, key, columnName, columnValue, timestamp );
+
+        if ( columnName instanceof List<?> ) {
+            columnName = DynamicComposite.toByteBuffer( ( List<?> ) columnName );
+        }
+        if ( columnValue instanceof List<?> ) {
+            columnValue = DynamicComposite.toByteBuffer( ( List<?> ) columnValue );
+        }
+
+        HColumn<ByteBuffer, ByteBuffer> column =
+                createColumn( bytebuffer( columnName ), bytebuffer( columnValue ), timestamp, be, be );
+        m.addInsertion( bytebuffer( key ), columnFamily.toString(), column );
+    }
+
+
+    public static void addInsertToMutator( Mutator<ByteBuffer> m, Object columnFamily, Object key, Map<?, ?> columns,
+                                           long timestamp ) throws Exception {
+
+        for ( Entry<?, ?> entry : columns.entrySet() ) {
+            addInsertToMutator( m, columnFamily, key, entry.getKey(), entry.getValue(), timestamp );
+        }
+    }
+
+
+    public static void addPropertyToMutator( Mutator<ByteBuffer> m, Object key, String entityType, String propertyName,
+                                             Object propertyValue, long timestamp ) {
+
+        logBatchOperation( "Insert", ApplicationCF.ENTITY_PROPERTIES, key, propertyName, propertyValue, timestamp );
+
+        HColumn<ByteBuffer, ByteBuffer> column = createColumn( bytebuffer( propertyName ),
+                serializeEntityProperty( entityType, propertyName, propertyValue ), timestamp, be, be );
+        m.addInsertion( bytebuffer( key ), ApplicationCF.ENTITY_PROPERTIES.toString(), column );
+    }
+
+
+    public static void addPropertyToMutator( Mutator<ByteBuffer> m, Object key, String entityType,
+                                             Map<String, ?> columns, long timestamp ) throws Exception {
+
+        for ( Entry<String, ?> entry : columns.entrySet() ) {
+            addPropertyToMutator( m, key, entityType, entry.getKey(), entry.getValue(), timestamp );
+        }
+    }
+
+
+    /** Delete the row */
+    public static void addDeleteToMutator( Mutator<ByteBuffer> m, Object columnFamily, Object key, long timestamp )
+            throws Exception {
+
+        logBatchOperation( "Delete", columnFamily, key, null, null, timestamp );
+
+        m.addDeletion( bytebuffer( key ), columnFamily.toString(), timestamp );
+    }
+
+
+    public static void addDeleteToMutator( Mutator<ByteBuffer> m, Object columnFamily, Object key, Object columnName,
+                                           long timestamp ) throws Exception {
+
+        logBatchOperation( "Delete", columnFamily, key, columnName, null, timestamp );
+
+        if ( columnName instanceof List<?> ) {
+            columnName = DynamicComposite.toByteBuffer( ( List<?> ) columnName );
+        }
+
+        m.addDeletion( bytebuffer( key ), columnFamily.toString(), bytebuffer( columnName ), be, timestamp );
+    }
+
+
+    public static void addDeleteToMutator( Mutator<ByteBuffer> m, Object columnFamily, Object key, long timestamp,
+                                           Object... columnNames ) throws Exception {
+
+        for ( Object columnName : columnNames ) {
+            logBatchOperation( "Delete", columnFamily, key, columnName, null, timestamp );
+
+            if ( columnName instanceof List<?> ) {
+                columnName = DynamicComposite.toByteBuffer( ( List<?> ) columnName );
+            }
+
+            m.addDeletion( bytebuffer( key ), columnFamily.toString(), bytebuffer( columnName ), be, timestamp );
+        }
+    }
+
+
+    public static Map<String, ByteBuffer> getColumnMap( List<HColumn<String, ByteBuffer>> columns ) {
+        Map<String, ByteBuffer> column_map = new TreeMap<String, ByteBuffer>( String.CASE_INSENSITIVE_ORDER );
+        if ( columns != null ) {
+            for ( HColumn<String, ByteBuffer> column : columns ) {
+                String column_name = column.getName();
+                column_map.put( column_name, column.getValue() );
+            }
+        }
+        return column_map;
+    }
+
+
+    public static <K, V> Map<K, V> asMap( List<HColumn<K, V>> columns ) {
+        if ( columns == null ) {
+            return null;
+        }
+        Map<K, V> column_map = new LinkedHashMap<K, V>();
+        for ( HColumn<K, V> column : columns ) {
+            K column_name = column.getName();
+            column_map.put( column_name, column.getValue() );
+        }
+        return column_map;
+    }
+
+
+    public static List<ByteBuffer> getAsByteKeys( List<UUID> ids ) {
+        List<ByteBuffer> keys = new ArrayList<ByteBuffer>();
+        for ( UUID id : ids ) {
+            keys.add( bytebuffer( key( id ) ) );
+        }
+        return keys;
+    }
+
+
+    /** @return timestamp value for current time */
+    public static long createTimestamp() {
+        return createClockResolution( ClockResolution.MICROSECONDS ).createClock();
+    }
+
+
+    /** @return normalized group path */
+    public static String normalizeGroupPath( String path ) {
+        path = replaceAll( path.toLowerCase().trim(), "//", "/" );
+        path = removeStart( path, "/" );
+        path = removeEnd( path, "/" );
+        return path;
+    }
+
+
+    /** @return a composite key */
+    public static Object key( Object... objects ) {
+        if ( objects.length == 1 ) {
+            Object obj = objects[0];
+            if ( ( obj instanceof UUID ) || ( obj instanceof ByteBuffer ) ) {
+                return obj;
+            }
+        }
+        StringBuilder s = new StringBuilder();
+        for ( Object obj : objects ) {
+            if ( obj instanceof String ) {
+                s.append( ( ( String ) obj ).toLowerCase() );
+            }
+            else if ( obj instanceof List<?> ) {
+                s.append( key( ( ( List<?> ) obj ).toArray() ) );
+            }
+            else if ( obj instanceof Object[] ) {
+                s.append( key( ( Object[] ) obj ) );
+            }
+            else if ( obj != null ) {
+                s.append( obj );
+            }
+            else {
+                s.append( "*" );
+            }
+
+            s.append( KEY_DELIM );
+        }
+
+        s.deleteCharAt( s.length() - 1 );
+
+        return s.toString();
+    }
+
+
+    /** @return UUID for composite key */
+    public static UUID keyID( Object... objects ) {
+        if ( objects.length == 1 ) {
+            Object obj = objects[0];
+            if ( obj instanceof UUID ) {
+                return ( UUID ) obj;
+            }
+        }
+        String keyStr = key( objects ).toString();
+        if ( keyStr.length() == 0 ) {
+            return NULL_ID;
+        }
+        UUID uuid = UUID.nameUUIDFromBytes( keyStr.getBytes() );
+        logger.debug( "Key {} equals UUID {}", keyStr, uuid );
+        return uuid;
+    }
+
+
+    /** @return UUID for entity alias */
+    public static UUID aliasID( UUID ownerId, String aliasType, String alias ) {
+        return keyID( ownerId, aliasType, alias );
+    }
+
+
+    public static Mutator<ByteBuffer> buildSetIdListMutator( Mutator<ByteBuffer> batch, UUID targetId,
+                                                             String columnFamily, String keyPrefix, String keySuffix,
+                                                             List<UUID> keyIds, long timestamp ) throws Exception {
+        for ( UUID keyId : keyIds ) {
+            ByteBuffer key = null;
+            if ( ( StringUtils.isNotEmpty( keyPrefix ) ) || ( StringUtils.isNotEmpty( keySuffix ) ) ) {
+                key = bytebuffer( keyPrefix + keyId.toString() + keySuffix );
+            }
+            else {
+                key = bytebuffer( keyId );
+            }
+            addInsertToMutator( batch, columnFamily, key, targetId, ByteBuffer.allocate( 0 ), timestamp );
+        }
+        return batch;
+    }
+
+
+    public static MutationResult batchExecute( Mutator<?> m, int retries ) {
+        for ( int i = 0; i < retries; i++ ) {
+            try {
+                return m.execute();
+            }
+            catch ( Exception e ) {
+                logger.error( "Unable to execute mutation, retrying...", e );
+            }
+        }
+        return m.execute();
+    }
+
+
+    public static Object toStorableValue( Object obj ) {
+        if ( obj == null ) {
+            return null;
+        }
+
+        if ( isBasicType( obj.getClass() ) ) {
+            return obj;
+        }
+
+        if ( obj instanceof ByteBuffer ) {
+            return obj;
+        }
+
+        JsonNode json = toJsonNode( obj );
+        if ( ( json != null ) && json.isValueNode() ) {
+            if ( json.isBigInteger() ) {
+                return json.getBigIntegerValue();
+            }
+            else if ( json.isNumber() || json.isBoolean() ) {
+                return BigInteger.valueOf( json.getValueAsLong() );
+            }
+            else if ( json.isTextual() ) {
+                return json.getTextValue();
+            }
+            else if ( json.isBinary() ) {
+                try {
+                    return wrap( json.getBinaryValue() );
+                }
+                catch ( IOException e ) {
+                }
+            }
+        }
+
+        return json;
+    }
+
+
+    public static ByteBuffer toStorableBinaryValue( Object obj ) {
+        obj = toStorableValue( obj );
+        if ( obj instanceof JsonNode ) {
+            return JsonUtils.toByteBuffer( obj );
+        }
+        else {
+            return bytebuffer( obj );
+        }
+    }
+
+
+    public static ByteBuffer toStorableBinaryValue( Object obj, boolean forceJson ) {
+        obj = toStorableValue( obj );
+        if ( ( obj instanceof JsonNode ) || ( forceJson && ( obj != null ) && !( obj instanceof ByteBuffer ) ) ) {
+            return JsonUtils.toByteBuffer( obj );
+        }
+        else {
+            return bytebuffer( obj );
+        }
+    }
+
+
+    public static List<ColumnDefinition> getIndexMetadata( String indexes ) {
+        if ( indexes == null ) {
+            return null;
+        }
+        String[] index_entries = split( indexes, ',' );
+        List<ColumnDef> columns = new ArrayList<ColumnDef>();
+        for ( String index_entry : index_entries ) {
+            String column_name = stringOrSubstringBeforeFirst( index_entry, ':' ).trim();
+            String comparer = substringAfterLast( index_entry, ":" ).trim();
+            if ( StringUtils.isBlank( comparer ) ) {
+                comparer = "UUIDType";
+            }
+            if ( StringUtils.isNotBlank( column_name ) ) {
+                ColumnDef cd = new ColumnDef( bytebuffer( column_name ), comparer );
+                cd.setIndex_name( column_name );
+                cd.setIndex_type( IndexType.KEYS );
+                columns.add( cd );
+            }
+        }
+        return ThriftColumnDef.fromThriftList( columns );
+    }
+
+
+    public static List<ColumnFamilyDefinition> getCfDefs( Class<? extends CFEnum> cfEnum, String keyspace ) {
+        return getCfDefs( cfEnum, null, keyspace );
+    }
+
+
+    public static List<ColumnFamilyDefinition> getCfDefs( Class<? extends CFEnum> cfEnum,
+                                                          List<ColumnFamilyDefinition> cf_defs, String keyspace ) {
+
+        if ( cf_defs == null ) {
+            cf_defs = new ArrayList<ColumnFamilyDefinition>();
+        }
+
+        CFEnum[] values = null;
+        try {
+            values = ( CFEnum[] ) invokeStaticMethod( cfEnum, "values", ( Object[] ) null );
+        }
+        catch ( Exception e ) {
+            logger.error( "Couldn't get CFEnum values", e );
+        }
+        if ( values == null ) {
+            return null;
+        }
+
+        for ( CFEnum cf : values ) {
+            if ( !cf.create() ) {
+                continue;
+            }
+            String defaultValidationClass = cf.getValidator();
+            List<ColumnDefinition> metadata = cf.getMetadata();
+
+            ColumnFamilyDefinition cf_def = HFactory.createColumnFamilyDefinition( keyspace, cf.getColumnFamily(),
+                    ComparatorType.getByClassName( cf.getComparator() ), metadata );
+
+            if ( defaultValidationClass != null ) {
+                cf_def.setDefaultValidationClass( defaultValidationClass );
+            }
+
+            cf_defs.add( cf_def );
+        }
+
+        return cf_defs;
+    }
+
+
+    public static void validateKeyspace( CFEnum[] cf_enums, KeyspaceDefinition ksDef ) {
+        Map<String, ColumnFamilyDefinition> cfs = new HashMap<String, ColumnFamilyDefinition>();
+        for ( ColumnFamilyDefinition cf : ksDef.getCfDefs() ) {
+            cfs.put( cf.getName(), cf );
+        }
+        for ( CFEnum c : cf_enums ) {
+            if ( !cfs.keySet().contains( c.getColumnFamily() ) ) {
+
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/CassandraService.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/CassandraService.java b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/CassandraService.java
new file mode 100644
index 0000000..1b2b9e3
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/CassandraService.java
@@ -0,0 +1,1134 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.cassandra;
+
+
+import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+import java.util.UUID;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.usergrid.locking.LockManager;
+import org.apache.usergrid.persistence.IndexBucketLocator;
+import org.apache.usergrid.persistence.IndexBucketLocator.IndexType;
+import org.apache.usergrid.persistence.cassandra.index.IndexBucketScanner;
+import org.apache.usergrid.persistence.cassandra.index.IndexScanner;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import me.prettyprint.cassandra.connection.HConnectionManager;
+import me.prettyprint.cassandra.model.ConfigurableConsistencyLevel;
+import me.prettyprint.cassandra.serializers.ByteBufferSerializer;
+import me.prettyprint.cassandra.serializers.BytesArraySerializer;
+import me.prettyprint.cassandra.serializers.DynamicCompositeSerializer;
+import me.prettyprint.cassandra.serializers.LongSerializer;
+import me.prettyprint.cassandra.serializers.StringSerializer;
+import me.prettyprint.cassandra.serializers.UUIDSerializer;
+import me.prettyprint.cassandra.service.CassandraHostConfigurator;
+import me.prettyprint.cassandra.service.ThriftKsDef;
+import me.prettyprint.hector.api.Cluster;
+import me.prettyprint.hector.api.ConsistencyLevelPolicy;
+import me.prettyprint.hector.api.HConsistencyLevel;
+import me.prettyprint.hector.api.Keyspace;
+import me.prettyprint.hector.api.Serializer;
+import me.prettyprint.hector.api.beans.ColumnSlice;
+import me.prettyprint.hector.api.beans.DynamicComposite;
+import me.prettyprint.hector.api.beans.HColumn;
+import me.prettyprint.hector.api.beans.OrderedRows;
+import me.prettyprint.hector.api.beans.Row;
+import me.prettyprint.hector.api.beans.Rows;
+import me.prettyprint.hector.api.ddl.ColumnFamilyDefinition;
+import me.prettyprint.hector.api.ddl.KeyspaceDefinition;
+import me.prettyprint.hector.api.factory.HFactory;
+import me.prettyprint.hector.api.mutation.Mutator;
+import me.prettyprint.hector.api.query.ColumnQuery;
+import me.prettyprint.hector.api.query.CountQuery;
+import me.prettyprint.hector.api.query.MultigetSliceQuery;
+import me.prettyprint.hector.api.query.QueryResult;
+import me.prettyprint.hector.api.query.RangeSlicesQuery;
+import me.prettyprint.hector.api.query.SliceQuery;
+import static me.prettyprint.cassandra.service.FailoverPolicy.ON_FAIL_TRY_ALL_AVAILABLE;
+import static me.prettyprint.hector.api.factory.HFactory.createColumn;
+import static me.prettyprint.hector.api.factory.HFactory.createMultigetSliceQuery;
+import static me.prettyprint.hector.api.factory.HFactory.createMutator;
+import static me.prettyprint.hector.api.factory.HFactory.createRangeSlicesQuery;
+import static me.prettyprint.hector.api.factory.HFactory.createSliceQuery;
+import static me.prettyprint.hector.api.factory.HFactory.createVirtualKeyspace;
+import static org.apache.commons.collections.MapUtils.getIntValue;
+import static org.apache.commons.collections.MapUtils.getString;
+import static org.apache.usergrid.persistence.cassandra.ApplicationCF.ENTITY_ID_SETS;
+import static org.apache.usergrid.persistence.cassandra.CassandraPersistenceUtils.batchExecute;
+import static org.apache.usergrid.persistence.cassandra.CassandraPersistenceUtils.buildSetIdListMutator;
+import static org.apache.usergrid.utils.ConversionUtils.bytebuffer;
+import static org.apache.usergrid.utils.ConversionUtils.bytebuffers;
+import static org.apache.usergrid.utils.JsonUtils.mapToFormattedJsonString;
+import static org.apache.usergrid.utils.MapUtils.asMap;
+import static org.apache.usergrid.utils.MapUtils.filter;
+
+
+public class CassandraService {
+
+    public static String SYSTEM_KEYSPACE = "Usergrid";
+
+    public static String STATIC_APPLICATION_KEYSPACE = "Usergrid_Applications";
+
+    public static final boolean USE_VIRTUAL_KEYSPACES = true;
+
+    public static final String APPLICATIONS_CF = "Applications";
+    public static final String PROPERTIES_CF = "Properties";
+    public static final String TOKENS_CF = "Tokens";
+    public static final String PRINCIPAL_TOKEN_CF = "PrincipalTokens";
+
+    public static final int DEFAULT_COUNT = 1000;
+    public static final int ALL_COUNT = 100000;
+    public static final int INDEX_ENTRY_LIST_COUNT = 1000;
+    public static final int DEFAULT_SEARCH_COUNT = 10000;
+
+    public static final int RETRY_COUNT = 5;
+
+    public static final String DEFAULT_APPLICATION = "default-app";
+    public static final String DEFAULT_ORGANIZATION = "usergrid";
+    public static final String MANAGEMENT_APPLICATION = "management";
+
+    public static final UUID MANAGEMENT_APPLICATION_ID = new UUID( 0, 1 );
+    public static final UUID DEFAULT_APPLICATION_ID = new UUID( 0, 16 );
+
+    private static final Logger logger = LoggerFactory.getLogger( CassandraService.class );
+
+    private static final Logger db_logger =
+            LoggerFactory.getLogger( CassandraService.class.getPackage().getName() + ".DB" );
+
+    Cluster cluster;
+    CassandraHostConfigurator chc;
+    Properties properties;
+    LockManager lockManager;
+
+    ConsistencyLevelPolicy consistencyLevelPolicy;
+
+    private Keyspace systemKeyspace;
+
+    private Map<String, String> accessMap;
+
+    public static final StringSerializer se = new StringSerializer();
+    public static final ByteBufferSerializer be = new ByteBufferSerializer();
+    public static final UUIDSerializer ue = new UUIDSerializer();
+    public static final BytesArraySerializer bae = new BytesArraySerializer();
+    public static final DynamicCompositeSerializer dce = new DynamicCompositeSerializer();
+    public static final LongSerializer le = new LongSerializer();
+
+    public static final UUID NULL_ID = new UUID( 0, 0 );
+
+
+    public CassandraService( Properties properties, Cluster cluster,
+                             CassandraHostConfigurator cassandraHostConfigurator, LockManager lockManager ) {
+        this.properties = properties;
+        this.cluster = cluster;
+        chc = cassandraHostConfigurator;
+        this.lockManager = lockManager;
+        db_logger.info( "" + cluster.getKnownPoolHosts( false ) );
+    }
+
+
+    public void init() throws Exception {
+        if ( consistencyLevelPolicy == null ) {
+            consistencyLevelPolicy = new ConfigurableConsistencyLevel();
+            ( ( ConfigurableConsistencyLevel ) consistencyLevelPolicy )
+                    .setDefaultReadConsistencyLevel( HConsistencyLevel.ONE );
+        }
+        accessMap = new HashMap<String, String>( 2 );
+        accessMap.put( "username", properties.getProperty( "cassandra.username" ) );
+        accessMap.put( "password", properties.getProperty( "cassandra.password" ) );
+        systemKeyspace =
+                HFactory.createKeyspace( SYSTEM_KEYSPACE, cluster, consistencyLevelPolicy, ON_FAIL_TRY_ALL_AVAILABLE,
+                        accessMap );
+    }
+
+
+    public Cluster getCluster() {
+        return cluster;
+    }
+
+
+    public void setCluster( Cluster cluster ) {
+        this.cluster = cluster;
+    }
+
+
+    public CassandraHostConfigurator getCassandraHostConfigurator() {
+        return chc;
+    }
+
+
+    public void setCassandraHostConfigurator( CassandraHostConfigurator chc ) {
+        this.chc = chc;
+    }
+
+
+    public Properties getProperties() {
+        return properties;
+    }
+
+
+    public void setProperties( Properties properties ) {
+        this.properties = properties;
+    }
+
+
+    public Map<String, String> getPropertiesMap() {
+        if ( properties != null ) {
+            return asMap( properties );
+        }
+        return null;
+    }
+
+
+    public LockManager getLockManager() {
+        return lockManager;
+    }
+
+
+    public void setLockManager( LockManager lockManager ) {
+        this.lockManager = lockManager;
+    }
+
+
+    public ConsistencyLevelPolicy getConsistencyLevelPolicy() {
+        return consistencyLevelPolicy;
+    }
+
+
+    public void setConsistencyLevelPolicy( ConsistencyLevelPolicy consistencyLevelPolicy ) {
+        this.consistencyLevelPolicy = consistencyLevelPolicy;
+    }
+
+
+    /** @return keyspace for application UUID */
+    public static String keyspaceForApplication( UUID applicationId ) {
+        if ( USE_VIRTUAL_KEYSPACES ) {
+            return STATIC_APPLICATION_KEYSPACE;
+        }
+        else {
+            return "Application_" + applicationId.toString().replace( '-', '_' );
+        }
+    }
+
+
+    public static UUID prefixForApplication( UUID applicationId ) {
+        if ( USE_VIRTUAL_KEYSPACES ) {
+            return applicationId;
+        }
+        else {
+            return null;
+        }
+    }
+
+
+    public Keyspace getKeyspace( String keyspace, UUID prefix ) {
+        Keyspace ko = null;
+        if ( USE_VIRTUAL_KEYSPACES && ( prefix != null ) ) {
+            ko = createVirtualKeyspace( keyspace, prefix, ue, cluster, consistencyLevelPolicy,
+                    ON_FAIL_TRY_ALL_AVAILABLE, accessMap );
+        }
+        else {
+            ko = HFactory.createKeyspace( keyspace, cluster, consistencyLevelPolicy, ON_FAIL_TRY_ALL_AVAILABLE,
+                    accessMap );
+        }
+        return ko;
+    }
+
+
+    public Keyspace getApplicationKeyspace( UUID applicationId ) {
+        assert applicationId != null;
+        Keyspace ko = getKeyspace( keyspaceForApplication( applicationId ), prefixForApplication( applicationId ) );
+        return ko;
+    }
+
+
+    /** The Usergrid_Applications keyspace directly */
+    public Keyspace getUsergridApplicationKeyspace() {
+        return getKeyspace( STATIC_APPLICATION_KEYSPACE, null );
+    }
+
+
+    public Keyspace getSystemKeyspace() {
+        return systemKeyspace;
+    }
+
+
+    public boolean checkKeyspacesExist() {
+        boolean exists = false;
+        try {
+            exists = cluster.describeKeyspace( SYSTEM_KEYSPACE ) != null
+                    && cluster.describeKeyspace( STATIC_APPLICATION_KEYSPACE ) != null;
+        }
+        catch ( Exception ex ) {
+            logger.error( "could not describe keyspaces", ex );
+        }
+        return exists;
+    }
+
+
+    /**
+     * Lazy creates a column family in the keyspace. If it doesn't exist, it will be created, then the call will sleep
+     * until all nodes have acknowledged the schema change
+     */
+    public void createColumnFamily( String keyspace, ColumnFamilyDefinition cfDef ) {
+
+        if ( !keySpaceExists( keyspace ) ) {
+            createKeySpace( keyspace );
+        }
+
+
+        //add the cf
+
+        if ( !cfExists( keyspace, cfDef.getName() ) ) {
+
+            //default read repair chance to 0.1
+            cfDef.setReadRepairChance( 0.1d );
+
+            cluster.addColumnFamily( cfDef, true );
+            logger.info( "Created column family {} in keyspace {}", cfDef.getName(), keyspace );
+        }
+    }
+
+
+    /** Create the column families in the list */
+    public void createColumnFamilies( String keyspace, List<ColumnFamilyDefinition> cfDefs ) {
+        for ( ColumnFamilyDefinition cfDef : cfDefs ) {
+            createColumnFamily( keyspace, cfDef );
+        }
+    }
+
+
+    /** Check if the keyspace exsts */
+    public boolean keySpaceExists( String keyspace ) {
+        KeyspaceDefinition ksDef = cluster.describeKeyspace( keyspace );
+
+        return ksDef != null;
+    }
+
+
+    /** Create the keyspace */
+    private void createKeySpace( String keyspace ) {
+        logger.info( "Creating keyspace: {}", keyspace );
+
+        String strategy_class =
+                getString( properties, "cassandra.keyspace.strategy", "org.apache.cassandra.locator.SimpleStrategy" );
+        logger.info( "Using strategy: {}", strategy_class );
+
+        int replication_factor = getIntValue( properties, "cassandra.keyspace.replication", 1 );
+        logger.info( "Using replication (may be overriden by strategy options): {}", replication_factor );
+
+        // try {
+        ThriftKsDef ks_def = ( ThriftKsDef ) HFactory
+                .createKeyspaceDefinition( keyspace, strategy_class, replication_factor,
+                        new ArrayList<ColumnFamilyDefinition>() );
+
+        @SuppressWarnings({ "unchecked", "rawtypes" }) Map<String, String> strategy_options =
+                filter( ( Map ) properties, "cassandra.keyspace.strategy.options.", true );
+        if ( strategy_options.size() > 0 ) {
+            logger.info( "Strategy options: {}", mapToFormattedJsonString( strategy_options ) );
+            ks_def.setStrategyOptions( strategy_options );
+        }
+
+        cluster.addKeyspace( ks_def );
+
+        waitForCreation( keyspace );
+
+        logger.info( "Created keyspace {}", keyspace );
+    }
+
+
+    /** Wait until all nodes agree on the same schema version */
+    private void waitForCreation( String keyspace ) {
+
+        while ( true ) {
+            Map<String, List<String>> versions = cluster.describeSchemaVersions();
+            // only 1 version, return
+            if ( versions != null && versions.size() == 1 ) {
+                return;
+            }
+            // sleep and try again
+            try {
+                Thread.sleep( 100 );
+            }
+            catch ( InterruptedException e ) {
+            }
+        }
+    }
+
+
+    /** Return true if the column family exists */
+    public boolean cfExists( String keyspace, String cfName ) {
+        KeyspaceDefinition ksDef = cluster.describeKeyspace( keyspace );
+
+        if ( ksDef == null ) {
+            return false;
+        }
+
+        for ( ColumnFamilyDefinition cf : ksDef.getCfDefs() ) {
+            if ( cfName.equals( cf.getName() ) ) {
+                return true;
+            }
+        }
+
+        return false;
+    }
+
+
+    /**
+     * Gets the columns.
+     *
+     * @param keyspace the keyspace
+     * @param columnFamily the column family
+     * @param key the key
+     *
+     * @return columns
+     *
+     * @throws Exception the exception
+     */
+    public <N, V> List<HColumn<N, V>> getAllColumns( Keyspace ko, Object columnFamily, Object key,
+                                                     Serializer<N> nameSerializer, Serializer<V> valueSerializer )
+            throws Exception {
+
+        if ( db_logger.isInfoEnabled() ) {
+            db_logger.info( "getColumns cf={} key={}", columnFamily, key );
+        }
+
+        SliceQuery<ByteBuffer, N, V> q = createSliceQuery( ko, be, nameSerializer, valueSerializer );
+        q.setColumnFamily( columnFamily.toString() );
+        q.setKey( bytebuffer( key ) );
+        q.setRange( null, null, false, ALL_COUNT );
+        QueryResult<ColumnSlice<N, V>> r = q.execute();
+        ColumnSlice<N, V> slice = r.get();
+        List<HColumn<N, V>> results = slice.getColumns();
+
+        if ( db_logger.isInfoEnabled() ) {
+            if ( results == null ) {
+                db_logger.info( "getColumns returned null" );
+            }
+            else {
+                db_logger.info( "getColumns returned {} columns", results.size() );
+            }
+        }
+
+        return results;
+    }
+
+
+    public List<HColumn<String, ByteBuffer>> getAllColumns( Keyspace ko, Object columnFamily, Object key )
+            throws Exception {
+        return getAllColumns( ko, columnFamily, key, se, be );
+    }
+
+
+    public Set<String> getAllColumnNames( Keyspace ko, Object columnFamily, Object key ) throws Exception {
+        List<HColumn<String, ByteBuffer>> columns = getAllColumns( ko, columnFamily, key );
+        Set<String> set = new LinkedHashSet<String>();
+        for ( HColumn<String, ByteBuffer> column : columns ) {
+            set.add( column.getName() );
+        }
+        return set;
+    }
+
+
+    /**
+     * Gets the columns.
+     *
+     * @param keyspace the keyspace
+     * @param columnFamily the column family
+     * @param key the key
+     * @param start the start
+     * @param finish the finish
+     * @param count the count
+     * @param reversed the reversed
+     *
+     * @return columns
+     *
+     * @throws Exception the exception
+     */
+    public List<HColumn<ByteBuffer, ByteBuffer>> getColumns( Keyspace ko, Object columnFamily, Object key, Object start,
+                                                             Object finish, int count, boolean reversed )
+            throws Exception {
+
+        if ( db_logger.isDebugEnabled() ) {
+            db_logger.debug( "getColumns cf=" + columnFamily + " key=" + key + " start=" + start + " finish=" + finish
+                    + " count=" + count + " reversed=" + reversed );
+        }
+
+        SliceQuery<ByteBuffer, ByteBuffer, ByteBuffer> q = createSliceQuery( ko, be, be, be );
+        q.setColumnFamily( columnFamily.toString() );
+        q.setKey( bytebuffer( key ) );
+
+        ByteBuffer start_bytes = null;
+        if ( start instanceof DynamicComposite ) {
+            start_bytes = ( ( DynamicComposite ) start ).serialize();
+        }
+        else if ( start instanceof List ) {
+            start_bytes = DynamicComposite.toByteBuffer( ( List<?> ) start );
+        }
+        else {
+            start_bytes = bytebuffer( start );
+        }
+
+        ByteBuffer finish_bytes = null;
+        if ( finish instanceof DynamicComposite ) {
+            finish_bytes = ( ( DynamicComposite ) finish ).serialize();
+        }
+        else if ( finish instanceof List ) {
+            finish_bytes = DynamicComposite.toByteBuffer( ( List<?> ) finish );
+        }
+        else {
+            finish_bytes = bytebuffer( finish );
+        }
+
+    /*
+     * if (reversed) { q.setRange(finish_bytes, start_bytes, reversed, count); }
+     * else { q.setRange(start_bytes, finish_bytes, reversed, count); }
+     */
+        q.setRange( start_bytes, finish_bytes, reversed, count );
+        QueryResult<ColumnSlice<ByteBuffer, ByteBuffer>> r = q.execute();
+        ColumnSlice<ByteBuffer, ByteBuffer> slice = r.get();
+        List<HColumn<ByteBuffer, ByteBuffer>> results = slice.getColumns();
+
+        if ( db_logger.isDebugEnabled() ) {
+            if ( results == null ) {
+                db_logger.debug( "getColumns returned null" );
+            }
+            else {
+                db_logger.debug( "getColumns returned " + results.size() + " columns" );
+            }
+        }
+
+        return results;
+    }
+
+
+    public Map<ByteBuffer, List<HColumn<ByteBuffer, ByteBuffer>>> multiGetColumns( Keyspace ko, Object columnFamily,
+                                                                                   List<?> keys, Object start,
+                                                                                   Object finish, int count,
+                                                                                   boolean reversed ) throws Exception {
+
+        if ( db_logger.isDebugEnabled() ) {
+            db_logger.debug( "multiGetColumns cf=" + columnFamily + " keys=" + keys + " start=" + start + " finish="
+                    + finish + " count=" + count + " reversed=" + reversed );
+        }
+
+        MultigetSliceQuery<ByteBuffer, ByteBuffer, ByteBuffer> q = createMultigetSliceQuery( ko, be, be, be );
+        q.setColumnFamily( columnFamily.toString() );
+        q.setKeys( bytebuffers( keys ) );
+
+        ByteBuffer start_bytes = null;
+        if ( start instanceof DynamicComposite ) {
+            start_bytes = ( ( DynamicComposite ) start ).serialize();
+        }
+        else if ( start instanceof List ) {
+            start_bytes = DynamicComposite.toByteBuffer( ( List<?> ) start );
+        }
+        else {
+            start_bytes = bytebuffer( start );
+        }
+
+        ByteBuffer finish_bytes = null;
+        if ( finish instanceof DynamicComposite ) {
+            finish_bytes = ( ( DynamicComposite ) finish ).serialize();
+        }
+        else if ( finish instanceof List ) {
+            finish_bytes = DynamicComposite.toByteBuffer( ( List<?> ) finish );
+        }
+        else {
+            finish_bytes = bytebuffer( finish );
+        }
+
+        q.setRange( start_bytes, finish_bytes, reversed, count );
+        QueryResult<Rows<ByteBuffer, ByteBuffer, ByteBuffer>> r = q.execute();
+        Rows<ByteBuffer, ByteBuffer, ByteBuffer> rows = r.get();
+
+        Map<ByteBuffer, List<HColumn<ByteBuffer, ByteBuffer>>> results =
+                new LinkedHashMap<ByteBuffer, List<HColumn<ByteBuffer, ByteBuffer>>>();
+        for ( Row<ByteBuffer, ByteBuffer, ByteBuffer> row : rows ) {
+            results.put( row.getKey(), row.getColumnSlice().getColumns() );
+        }
+
+        return results;
+    }
+
+
+    /**
+     * Gets the columns.
+     *
+     * @param keyspace the keyspace
+     * @param columnFamily the column family
+     * @param keys the keys
+     *
+     * @return map of keys to columns
+     *
+     * @throws Exception the exception
+     */
+    public <K, N, V> Rows<K, N, V> getRows( Keyspace ko, Object columnFamily, Collection<K> keys,
+                                            Serializer<K> keySerializer, Serializer<N> nameSerializer,
+                                            Serializer<V> valueSerializer ) throws Exception {
+
+        if ( db_logger.isDebugEnabled() ) {
+            db_logger.debug( "getColumns cf=" + columnFamily + " keys=" + keys );
+        }
+
+        MultigetSliceQuery<K, N, V> q = createMultigetSliceQuery( ko, keySerializer, nameSerializer, valueSerializer );
+        q.setColumnFamily( columnFamily.toString() );
+        q.setKeys( keys );
+        q.setRange( null, null, false, ALL_COUNT );
+        QueryResult<Rows<K, N, V>> r = q.execute();
+        Rows<K, N, V> results = r.get();
+
+        if ( db_logger.isInfoEnabled() ) {
+            if ( results == null ) {
+                db_logger.info( "getColumns returned null" );
+            }
+            else {
+                db_logger.info( "getColumns returned " + results.getCount() + " columns" );
+            }
+        }
+
+        return results;
+    }
+
+
+    /**
+     * Gets the columns.
+     *
+     * @param keyspace the keyspace
+     * @param columnFamily the column family
+     * @param key the key
+     * @param columnNames the column names
+     *
+     * @return columns
+     *
+     * @throws Exception the exception
+     */
+    @SuppressWarnings("unchecked")
+    public <N, V> List<HColumn<N, V>> getColumns( Keyspace ko, Object columnFamily, Object key, Set<String> columnNames,
+                                                  Serializer<N> nameSerializer, Serializer<V> valueSerializer )
+            throws Exception {
+
+        if ( db_logger.isDebugEnabled() ) {
+            db_logger.debug( "getColumns cf=" + columnFamily + " key=" + key + " names=" + columnNames );
+        }
+
+        SliceQuery<ByteBuffer, N, V> q = createSliceQuery( ko, be, nameSerializer, valueSerializer );
+        q.setColumnFamily( columnFamily.toString() );
+        q.setKey( bytebuffer( key ) );
+        // q.setColumnNames(columnNames.toArray(new String[0]));
+        q.setColumnNames( ( N[] ) nameSerializer.fromBytesSet( se.toBytesSet( new ArrayList<String>( columnNames ) ) )
+                                                .toArray() );
+
+        QueryResult<ColumnSlice<N, V>> r = q.execute();
+        ColumnSlice<N, V> slice = r.get();
+        List<HColumn<N, V>> results = slice.getColumns();
+
+        if ( db_logger.isInfoEnabled() ) {
+            if ( results == null ) {
+                db_logger.info( "getColumns returned null" );
+            }
+            else {
+                db_logger.info( "getColumns returned " + results.size() + " columns" );
+            }
+        }
+
+        return results;
+    }
+
+
+    /**
+     * Gets the columns.
+     *
+     * @param keyspace the keyspace
+     * @param columnFamily the column family
+     * @param keys the keys
+     * @param columnNames the column names
+     *
+     * @return map of keys to columns
+     *
+     * @throws Exception the exception
+     */
+    @SuppressWarnings("unchecked")
+    public <K, N, V> Rows<K, N, V> getRows( Keyspace ko, Object columnFamily, Collection<K> keys,
+                                            Collection<String> columnNames, Serializer<K> keySerializer,
+                                            Serializer<N> nameSerializer, Serializer<V> valueSerializer )
+            throws Exception {
+
+        if ( db_logger.isDebugEnabled() ) {
+            db_logger.debug( "getColumns cf=" + columnFamily + " keys=" + keys + " names=" + columnNames );
+        }
+
+        MultigetSliceQuery<K, N, V> q = createMultigetSliceQuery( ko, keySerializer, nameSerializer, valueSerializer );
+        q.setColumnFamily( columnFamily.toString() );
+        q.setKeys( keys );
+        q.setColumnNames( ( N[] ) nameSerializer.fromBytesSet( se.toBytesSet( new ArrayList<String>( columnNames ) ) )
+                                                .toArray() );
+        QueryResult<Rows<K, N, V>> r = q.execute();
+        Rows<K, N, V> results = r.get();
+
+        if ( db_logger.isInfoEnabled() ) {
+            if ( results == null ) {
+                db_logger.info( "getColumns returned null" );
+            }
+            else {
+                db_logger.info( "getColumns returned " + results.getCount() + " columns" );
+            }
+        }
+
+        return results;
+    }
+
+
+    /**
+     * Gets the column.
+     *
+     * @param keyspace the keyspace
+     * @param columnFamily the column family
+     * @param key the key
+     * @param column the column
+     *
+     * @return column
+     *
+     * @throws Exception the exception
+     */
+    public <N, V> HColumn<N, V> getColumn( Keyspace ko, Object columnFamily, Object key, N column,
+                                           Serializer<N> nameSerializer, Serializer<V> valueSerializer )
+            throws Exception {
+
+        if ( db_logger.isDebugEnabled() ) {
+            db_logger.debug( "getColumn cf=" + columnFamily + " key=" + key + " column=" + column );
+        }
+
+    /*
+     * ByteBuffer column_bytes = null; if (column instanceof List) {
+     * column_bytes = Composite.serializeToByteBuffer((List<?>) column); } else
+     * { column_bytes = bytebuffer(column); }
+     */
+
+        ColumnQuery<ByteBuffer, N, V> q = HFactory.createColumnQuery( ko, be, nameSerializer, valueSerializer );
+        QueryResult<HColumn<N, V>> r =
+                q.setKey( bytebuffer( key ) ).setName( column ).setColumnFamily( columnFamily.toString() ).execute();
+        HColumn<N, V> result = r.get();
+
+        if ( db_logger.isInfoEnabled() ) {
+            if ( result == null ) {
+                db_logger.info( "getColumn returned null" );
+            }
+        }
+
+        return result;
+    }
+
+
+    public <N, V> ColumnSlice<N, V> getColumns( Keyspace ko, Object columnFamily, Object key, N[] columns,
+                                                Serializer<N> nameSerializer, Serializer<V> valueSerializer )
+            throws Exception {
+
+        if ( db_logger.isDebugEnabled() ) {
+            db_logger.debug( "getColumn cf=" + columnFamily + " key=" + key + " column=" + columns );
+        }
+
+    /*
+     * ByteBuffer column_bytes = null; if (column instanceof List) {
+     * column_bytes = Composite.serializeToByteBuffer((List<?>) column); } else
+     * { column_bytes = bytebuffer(column); }
+     */
+
+        SliceQuery<ByteBuffer, N, V> q = HFactory.createSliceQuery( ko, be, nameSerializer, valueSerializer );
+        QueryResult<ColumnSlice<N, V>> r =
+                q.setKey( bytebuffer( key ) ).setColumnNames( columns ).setColumnFamily( columnFamily.toString() )
+                 .execute();
+        ColumnSlice<N, V> result = r.get();
+
+        if ( db_logger.isDebugEnabled() ) {
+            if ( result == null ) {
+                db_logger.debug( "getColumn returned null" );
+            }
+        }
+
+        return result;
+    }
+
+
+    public HColumn<String, ByteBuffer> getColumn( Keyspace ko, Object columnFamily, Object key, String column )
+            throws Exception {
+        return getColumn( ko, columnFamily, key, column, se, be );
+    }
+
+
+    public void setColumn( Keyspace ko, Object columnFamily, Object key, Object columnName, Object columnValue )
+            throws Exception {
+        this.setColumn( ko, columnFamily, key, columnName, columnValue, 0 );
+    }
+
+
+    public void setColumn( Keyspace ko, Object columnFamily, Object key, Object columnName, Object columnValue,
+                           int ttl ) throws Exception {
+
+        if ( db_logger.isDebugEnabled() ) {
+            db_logger.debug( "setColumn cf=" + columnFamily + " key=" + key + " name=" + columnName + " value="
+                    + columnValue );
+        }
+
+        ByteBuffer name_bytes = null;
+        if ( columnName instanceof List ) {
+            name_bytes = DynamicComposite.toByteBuffer( ( List<?> ) columnName );
+        }
+        else {
+            name_bytes = bytebuffer( columnName );
+        }
+
+        ByteBuffer value_bytes = null;
+        if ( columnValue instanceof List ) {
+            value_bytes = DynamicComposite.toByteBuffer( ( List<?> ) columnValue );
+        }
+        else {
+            value_bytes = bytebuffer( columnValue );
+        }
+
+        HColumn<ByteBuffer, ByteBuffer> col = createColumn( name_bytes, value_bytes, be, be );
+        if ( ttl != 0 ) {
+            col.setTtl( ttl );
+        }
+        Mutator<ByteBuffer> m = createMutator( ko, be );
+        m.insert( bytebuffer( key ), columnFamily.toString(), col );
+    }
+
+
+    /**
+     * Sets the columns.
+     *
+     * @param keyspace the keyspace
+     * @param columnFamily the column family
+     * @param key the key
+     * @param map the map
+     *
+     * @throws Exception the exception
+     */
+    public void setColumns( Keyspace ko, Object columnFamily, byte[] key, Map<?, ?> map ) throws Exception {
+        this.setColumns( ko, columnFamily, key, map, 0 );
+    }
+
+
+    public void setColumns( Keyspace ko, Object columnFamily, byte[] key, Map<?, ?> map, int ttl ) throws Exception {
+
+        if ( db_logger.isDebugEnabled() ) {
+            db_logger.debug( "setColumns cf=" + columnFamily + " key=" + key + " map=" + map + ( ttl != 0 ?
+                                                                                                 " ttl=" + ttl : "" ) );
+        }
+
+        Mutator<ByteBuffer> m = createMutator( ko, be );
+        long timestamp = createTimestamp();
+
+        for ( Object name : map.keySet() ) {
+            Object value = map.get( name );
+            if ( value != null ) {
+
+                ByteBuffer name_bytes = null;
+                if ( name instanceof List ) {
+                    name_bytes = DynamicComposite.toByteBuffer( ( List<?> ) name );
+                }
+                else {
+                    name_bytes = bytebuffer( name );
+                }
+
+                ByteBuffer value_bytes = null;
+                if ( value instanceof List ) {
+                    value_bytes = DynamicComposite.toByteBuffer( ( List<?> ) value );
+                }
+                else {
+                    value_bytes = bytebuffer( value );
+                }
+
+                HColumn<ByteBuffer, ByteBuffer> col = createColumn( name_bytes, value_bytes, timestamp, be, be );
+                if ( ttl != 0 ) {
+                    col.setTtl( ttl );
+                }
+                m.addInsertion( bytebuffer( key ), columnFamily.toString(),
+                        createColumn( name_bytes, value_bytes, timestamp, be, be ) );
+            }
+        }
+        batchExecute( m, CassandraService.RETRY_COUNT );
+    }
+
+
+    /**
+     * Create a timestamp based on the TimeResolution set to the cluster.
+     *
+     * @return a timestamp
+     */
+    public long createTimestamp() {
+        return chc.getClockResolution().createClock();
+    }
+
+
+    /**
+     * Delete column.
+     *
+     * @param keyspace the keyspace
+     * @param columnFamily the column family
+     * @param key the key
+     * @param column the column
+     *
+     * @throws Exception the exception
+     */
+    public void deleteColumn( Keyspace ko, Object columnFamily, Object key, Object column ) throws Exception {
+
+        if ( db_logger.isDebugEnabled() ) {
+            db_logger.debug( "deleteColumn cf=" + columnFamily + " key=" + key + " name=" + column );
+        }
+
+        Mutator<ByteBuffer> m = createMutator( ko, be );
+        m.delete( bytebuffer( key ), columnFamily.toString(), bytebuffer( column ), be );
+    }
+
+
+    /**
+     * Gets the row keys.
+     *
+     * @param keyspace the keyspace
+     * @param columnFamily the column family
+     *
+     * @return set of keys
+     *
+     * @throws Exception the exception
+     */
+    public <K> Set<K> getRowKeySet( Keyspace ko, Object columnFamily, Serializer<K> keySerializer ) throws Exception {
+
+        if ( db_logger.isDebugEnabled() ) {
+            db_logger.debug( "getRowKeys cf=" + columnFamily );
+        }
+
+        RangeSlicesQuery<K, ByteBuffer, ByteBuffer> q = createRangeSlicesQuery( ko, keySerializer, be, be );
+        q.setColumnFamily( columnFamily.toString() );
+        q.setKeys( null, null );
+        q.setColumnNames( new ByteBuffer[0] );
+        QueryResult<OrderedRows<K, ByteBuffer, ByteBuffer>> r = q.execute();
+        OrderedRows<K, ByteBuffer, ByteBuffer> rows = r.get();
+
+        Set<K> results = new LinkedHashSet<K>();
+        for ( Row<K, ByteBuffer, ByteBuffer> row : rows ) {
+            results.add( row.getKey() );
+        }
+
+        if ( db_logger.isDebugEnabled() ) {
+            {
+                db_logger.debug( "getRowKeys returned " + results.size() + " rows" );
+            }
+        }
+
+        return results;
+    }
+
+
+    /**
+     * Gets the row keys as uui ds.
+     *
+     * @param keyspace the keyspace
+     * @param columnFamily the column family
+     *
+     * @return list of row key UUIDs
+     *
+     * @throws Exception the exception
+     */
+    public <K> List<K> getRowKeyList( Keyspace ko, Object columnFamily, Serializer<K> keySerializer ) throws Exception {
+
+        RangeSlicesQuery<K, ByteBuffer, ByteBuffer> q = createRangeSlicesQuery( ko, keySerializer, be, be );
+        q.setColumnFamily( columnFamily.toString() );
+        q.setKeys( null, null );
+        q.setColumnNames( new ByteBuffer[0] );
+        QueryResult<OrderedRows<K, ByteBuffer, ByteBuffer>> r = q.execute();
+        OrderedRows<K, ByteBuffer, ByteBuffer> rows = r.get();
+
+        List<K> list = new ArrayList<K>();
+        for ( Row<K, ByteBuffer, ByteBuffer> row : rows ) {
+            list.add( row.getKey() );
+            // K uuid = row.getKey();
+            // if (uuid != UUIDUtils.ZERO_UUID) {
+            // list.add(uuid);
+            // }
+        }
+
+        return list;
+    }
+
+
+    /**
+     * Delete row.
+     *
+     * @param keyspace the keyspace
+     * @param columnFamily the column family
+     * @param key the key
+     *
+     * @throws Exception the exception
+     */
+    public void deleteRow( Keyspace ko, final Object columnFamily, final Object key ) throws Exception {
+
+        if ( db_logger.isDebugEnabled() ) {
+            db_logger.debug( "deleteRow cf=" + columnFamily + " key=" + key );
+        }
+
+        createMutator( ko, be ).addDeletion( bytebuffer( key ), columnFamily.toString() ).execute();
+    }
+
+
+    public void deleteRow( Keyspace ko, final Object columnFamily, final String key ) throws Exception {
+
+        if ( db_logger.isDebugEnabled() ) {
+            db_logger.debug( "deleteRow cf=" + columnFamily + " key=" + key );
+        }
+
+        createMutator( ko, se ).addDeletion( key, columnFamily.toString() ).execute();
+    }
+
+
+    /**
+     * Delete row.
+     *
+     * @param keyspace the keyspace
+     * @param columnFamily the column family
+     * @param key the key
+     * @param timestamp the timestamp
+     *
+     * @throws Exception the exception
+     */
+    public void deleteRow( Keyspace ko, final Object columnFamily, final Object key, final long timestamp )
+            throws Exception {
+
+        if ( db_logger.isDebugEnabled() ) {
+            db_logger.debug( "deleteRow cf=" + columnFamily + " key=" + key + " timestamp=" + timestamp );
+        }
+
+        createMutator( ko, be ).addDeletion( bytebuffer( key ), columnFamily.toString(), timestamp ).execute();
+    }
+
+
+    /**
+     * Gets the id list.
+     *
+     * @param ko the keyspace
+     * @param key the key
+     * @param start the start
+     * @param finish the finish
+     * @param count the count
+     * @param reversed True if the scan should be reversed
+     * @param locator The index locator instance
+     * @param applicationId The applicationId
+     * @param collectionName The name of the collection to get the Ids for
+     *
+     * @return list of columns as UUIDs
+     *
+     * @throws Exception the exception
+     */
+    public IndexScanner getIdList( Keyspace ko, Object key, UUID start, UUID finish, int count, boolean reversed,
+                                   IndexBucketLocator locator, UUID applicationId, String collectionName )
+            throws Exception {
+
+        if ( count <= 0 ) {
+            count = DEFAULT_COUNT;
+        }
+
+        if ( NULL_ID.equals( start ) ) {
+            start = null;
+        }
+
+        IndexScanner scanner =
+                new IndexBucketScanner( this, locator, ENTITY_ID_SETS, applicationId, IndexType.COLLECTION, key, start,
+                        finish, reversed, count, collectionName );
+
+        return scanner;
+    }
+
+
+    public int countColumns( Keyspace ko, Object columnFamily, Object key ) throws Exception {
+
+
+        CountQuery<ByteBuffer, ByteBuffer> cq = HFactory.createCountQuery( ko, be, be );
+        cq.setColumnFamily( columnFamily.toString() );
+        cq.setKey( bytebuffer( key ) );
+        cq.setRange( ByteBuffer.allocate( 0 ), ByteBuffer.allocate( 0 ), 100000000 );
+        QueryResult<Integer> r = cq.execute();
+        if ( r == null ) {
+            return 0;
+        }
+        return r.get();
+    }
+
+
+    /**
+     * Sets the id list.
+     *
+     * @param keyspace the keyspace
+     * @param targetId the target id
+     * @param columnFamily the column family
+     * @param keyPrefix the key prefix
+     * @param keySuffix the key suffix
+     * @param keyIds the key ids
+     * @param setColumnValue the set column value
+     *
+     * @throws Exception the exception
+     */
+    public void setIdList( Keyspace ko, UUID targetId, String keyPrefix, String keySuffix, List<UUID> keyIds )
+            throws Exception {
+        long timestamp = createTimestamp();
+        Mutator<ByteBuffer> batch = createMutator( ko, be );
+        batch = buildSetIdListMutator( batch, targetId, ENTITY_ID_SETS.toString(), keyPrefix, keySuffix, keyIds,
+                timestamp );
+        batchExecute( batch, CassandraService.RETRY_COUNT );
+    }
+
+
+    boolean clusterUp = false;
+
+
+    public void startClusterHealthCheck() {
+
+        ScheduledExecutorService executorService = Executors.newSingleThreadScheduledExecutor();
+        executorService.scheduleWithFixedDelay( new Runnable() {
+            @Override
+            public void run() {
+                if ( cluster != null ) {
+                    HConnectionManager connectionManager = cluster.getConnectionManager();
+                    if ( connectionManager != null ) {
+                        clusterUp = !connectionManager.getHosts().isEmpty();
+                    }
+                }
+            }
+        }, 1, 5, TimeUnit.SECONDS );
+    }
+    
+    public void destroy() throws Exception {
+    	if (cluster != null) {
+    		HConnectionManager connectionManager = cluster.getConnectionManager();
+    		if (connectionManager != null) {
+    			connectionManager.shutdown();
+    		}
+    	}
+    	cluster = null;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/ConnectedEntityRefImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/ConnectedEntityRefImpl.java b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/ConnectedEntityRefImpl.java
new file mode 100644
index 0000000..2ebc199
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/ConnectedEntityRefImpl.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.cassandra;
+
+
+import java.util.UUID;
+
+import org.apache.usergrid.persistence.ConnectedEntityRef;
+import org.apache.usergrid.persistence.EntityRef;
+import org.apache.usergrid.persistence.SimpleEntityRef;
+
+
+public class ConnectedEntityRefImpl extends SimpleEntityRef implements ConnectedEntityRef {
+
+    final String connectionType;
+
+
+    public ConnectedEntityRefImpl() {
+        super( null, null );
+        connectionType = null;
+    }
+
+
+    public ConnectedEntityRefImpl( String connectionType, EntityRef connectedEntity ) {
+        super( connectedEntity.getType(), connectedEntity.getUuid() );
+        this.connectionType = connectionType;
+    }
+
+
+    public ConnectedEntityRefImpl( String connectionType, String entityType, UUID entityId ) {
+        super( entityType, entityId );
+        this.connectionType = connectionType;
+    }
+
+
+    @Override
+    public String getConnectionType() {
+        return connectionType;
+    }
+
+
+    public static String getConnectionType( ConnectedEntityRef connection ) {
+        if ( connection == null ) {
+            return null;
+        }
+        return connection.getConnectionType();
+    }
+}


[47/96] [abbrv] [partial] Change package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/mq/QueryFilterLexer.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/mq/QueryFilterLexer.java b/stack/core/src/main/java/org/apache/usergrid/mq/QueryFilterLexer.java
new file mode 100644
index 0000000..fffd519
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/mq/QueryFilterLexer.java
@@ -0,0 +1,1842 @@
+// $ANTLR 3.1.3 Mar 17, 2009 19:23:44 org.apache.usergrid/persistence/query/QueryFilter.g 2012-03-07 22:54:28
+
+package org.apache.usergrid.mq;
+
+
+import org.antlr.runtime.BaseRecognizer;
+import org.antlr.runtime.CharStream;
+import org.antlr.runtime.DFA;
+import org.antlr.runtime.EarlyExitException;
+import org.antlr.runtime.Lexer;
+import org.antlr.runtime.MismatchedSetException;
+import org.antlr.runtime.NoViableAltException;
+import org.antlr.runtime.RecognitionException;
+import org.antlr.runtime.RecognizerSharedState;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+public class QueryFilterLexer extends Lexer {
+    public static final int T__40 = 40;
+    public static final int EXPONENT = 6;
+    public static final int T__29 = 29;
+    public static final int T__28 = 28;
+    public static final int T__27 = 27;
+    public static final int T__26 = 26;
+    public static final int UUID = 12;
+    public static final int T__25 = 25;
+    public static final int T__24 = 24;
+    public static final int T__23 = 23;
+    public static final int T__22 = 22;
+    public static final int T__21 = 21;
+    public static final int UNICODE_ESC = 13;
+    public static final int T__20 = 20;
+    public static final int OCTAL_ESC = 14;
+    public static final int HEX_DIGIT = 11;
+    public static final int INT = 5;
+    public static final int FLOAT = 7;
+    public static final int ID = 4;
+    public static final int EOF = -1;
+    public static final int T__30 = 30;
+    public static final int T__19 = 19;
+    public static final int T__31 = 31;
+    public static final int T__32 = 32;
+    public static final int T__16 = 16;
+    public static final int T__33 = 33;
+    public static final int ESC_SEQ = 8;
+    public static final int BOOLEAN = 10;
+    public static final int WS = 15;
+    public static final int T__34 = 34;
+    public static final int T__18 = 18;
+    public static final int T__35 = 35;
+    public static final int T__17 = 17;
+    public static final int T__36 = 36;
+    public static final int T__37 = 37;
+    public static final int T__38 = 38;
+    public static final int T__39 = 39;
+    public static final int STRING = 9;
+
+
+    private static final Logger logger = LoggerFactory.getLogger( QueryFilterLexer.class );
+
+
+    @Override
+    public void emitErrorMessage( String msg ) {
+        logger.info( msg );
+    }
+
+
+    // delegates
+    // delegators
+
+
+    public QueryFilterLexer() {;}
+
+
+    public QueryFilterLexer( CharStream input ) {
+        this( input, new RecognizerSharedState() );
+    }
+
+
+    public QueryFilterLexer( CharStream input, RecognizerSharedState state ) {
+        super( input, state );
+    }
+
+
+    public String getGrammarFileName() { return "org.apache.usergrid/persistence/query/QueryFilter.g"; }
+
+
+    // $ANTLR start "T__16"
+    public final void mT__16() throws RecognitionException {
+        try {
+            int _type = T__16;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // org.apache.usergrid/persistence/query/QueryFilter.g:21:7: ( '<' )
+            // org.apache.usergrid/persistence/query/QueryFilter.g:21:9: '<'
+            {
+                match( '<' );
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        }
+    }
+    // $ANTLR end "T__16"
+
+
+    // $ANTLR start "T__17"
+    public final void mT__17() throws RecognitionException {
+        try {
+            int _type = T__17;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // org.apache.usergrid/persistence/query/QueryFilter.g:22:7: ( '<=' )
+            // org.apache.usergrid/persistence/query/QueryFilter.g:22:9: '<='
+            {
+                match( "<=" );
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        }
+    }
+    // $ANTLR end "T__17"
+
+
+    // $ANTLR start "T__18"
+    public final void mT__18() throws RecognitionException {
+        try {
+            int _type = T__18;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // org.apache.usergrid/persistence/query/QueryFilter.g:23:7: ( '=' )
+            // org.apache.usergrid/persistence/query/QueryFilter.g:23:9: '='
+            {
+                match( '=' );
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        }
+    }
+    // $ANTLR end "T__18"
+
+
+    // $ANTLR start "T__19"
+    public final void mT__19() throws RecognitionException {
+        try {
+            int _type = T__19;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // org.apache.usergrid/persistence/query/QueryFilter.g:24:7: ( '>' )
+            // org.apache.usergrid/persistence/query/QueryFilter.g:24:9: '>'
+            {
+                match( '>' );
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        }
+    }
+    // $ANTLR end "T__19"
+
+
+    // $ANTLR start "T__20"
+    public final void mT__20() throws RecognitionException {
+        try {
+            int _type = T__20;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // org.apache.usergrid/persistence/query/QueryFilter.g:25:7: ( '>=' )
+            // org.apache.usergrid/persistence/query/QueryFilter.g:25:9: '>='
+            {
+                match( ">=" );
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        }
+    }
+    // $ANTLR end "T__20"
+
+
+    // $ANTLR start "T__21"
+    public final void mT__21() throws RecognitionException {
+        try {
+            int _type = T__21;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // org.apache.usergrid/persistence/query/QueryFilter.g:26:7: ( 'in' )
+            // org.apache.usergrid/persistence/query/QueryFilter.g:26:9: 'in'
+            {
+                match( "in" );
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        }
+    }
+    // $ANTLR end "T__21"
+
+
+    // $ANTLR start "T__22"
+    public final void mT__22() throws RecognitionException {
+        try {
+            int _type = T__22;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // org.apache.usergrid/persistence/query/QueryFilter.g:27:7: ( 'eq' )
+            // org.apache.usergrid/persistence/query/QueryFilter.g:27:9: 'eq'
+            {
+                match( "eq" );
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        }
+    }
+    // $ANTLR end "T__22"
+
+
+    // $ANTLR start "T__23"
+    public final void mT__23() throws RecognitionException {
+        try {
+            int _type = T__23;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // org.apache.usergrid/persistence/query/QueryFilter.g:28:7: ( 'lt' )
+            // org.apache.usergrid/persistence/query/QueryFilter.g:28:9: 'lt'
+            {
+                match( "lt" );
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        }
+    }
+    // $ANTLR end "T__23"
+
+
+    // $ANTLR start "T__24"
+    public final void mT__24() throws RecognitionException {
+        try {
+            int _type = T__24;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // org.apache.usergrid/persistence/query/QueryFilter.g:29:7: ( 'gt' )
+            // org.apache.usergrid/persistence/query/QueryFilter.g:29:9: 'gt'
+            {
+                match( "gt" );
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        }
+    }
+    // $ANTLR end "T__24"
+
+
+    // $ANTLR start "T__25"
+    public final void mT__25() throws RecognitionException {
+        try {
+            int _type = T__25;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // org.apache.usergrid/persistence/query/QueryFilter.g:30:7: ( 'lte' )
+            // org.apache.usergrid/persistence/query/QueryFilter.g:30:9: 'lte'
+            {
+                match( "lte" );
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        }
+    }
+    // $ANTLR end "T__25"
+
+
+    // $ANTLR start "T__26"
+    public final void mT__26() throws RecognitionException {
+        try {
+            int _type = T__26;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // org.apache.usergrid/persistence/query/QueryFilter.g:31:7: ( 'gte' )
+            // org.apache.usergrid/persistence/query/QueryFilter.g:31:9: 'gte'
+            {
+                match( "gte" );
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        }
+    }
+    // $ANTLR end "T__26"
+
+
+    // $ANTLR start "T__27"
+    public final void mT__27() throws RecognitionException {
+        try {
+            int _type = T__27;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // org.apache.usergrid/persistence/query/QueryFilter.g:32:7: ( 'contains' )
+            // org.apache.usergrid/persistence/query/QueryFilter.g:32:9: 'contains'
+            {
+                match( "contains" );
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        }
+    }
+    // $ANTLR end "T__27"
+
+
+    // $ANTLR start "T__28"
+    public final void mT__28() throws RecognitionException {
+        try {
+            int _type = T__28;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // org.apache.usergrid/persistence/query/QueryFilter.g:33:7: ( 'within' )
+            // org.apache.usergrid/persistence/query/QueryFilter.g:33:9: 'within'
+            {
+                match( "within" );
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        }
+    }
+    // $ANTLR end "T__28"
+
+
+    // $ANTLR start "T__29"
+    public final void mT__29() throws RecognitionException {
+        try {
+            int _type = T__29;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // org.apache.usergrid/persistence/query/QueryFilter.g:34:7: ( ',' )
+            // org.apache.usergrid/persistence/query/QueryFilter.g:34:9: ','
+            {
+                match( ',' );
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        }
+    }
+    // $ANTLR end "T__29"
+
+
+    // $ANTLR start "T__30"
+    public final void mT__30() throws RecognitionException {
+        try {
+            int _type = T__30;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // org.apache.usergrid/persistence/query/QueryFilter.g:35:7: ( 'of' )
+            // org.apache.usergrid/persistence/query/QueryFilter.g:35:9: 'of'
+            {
+                match( "of" );
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        }
+    }
+    // $ANTLR end "T__30"
+
+
+    // $ANTLR start "T__31"
+    public final void mT__31() throws RecognitionException {
+        try {
+            int _type = T__31;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // org.apache.usergrid/persistence/query/QueryFilter.g:36:7: ( ':' )
+            // org.apache.usergrid/persistence/query/QueryFilter.g:36:9: ':'
+            {
+                match( ':' );
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        }
+    }
+    // $ANTLR end "T__31"
+
+
+    // $ANTLR start "T__32"
+    public final void mT__32() throws RecognitionException {
+        try {
+            int _type = T__32;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // org.apache.usergrid/persistence/query/QueryFilter.g:37:7: ( 'asc' )
+            // org.apache.usergrid/persistence/query/QueryFilter.g:37:9: 'asc'
+            {
+                match( "asc" );
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        }
+    }
+    // $ANTLR end "T__32"
+
+
+    // $ANTLR start "T__33"
+    public final void mT__33() throws RecognitionException {
+        try {
+            int _type = T__33;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // org.apache.usergrid/persistence/query/QueryFilter.g:38:7: ( 'desc' )
+            // org.apache.usergrid/persistence/query/QueryFilter.g:38:9: 'desc'
+            {
+                match( "desc" );
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        }
+    }
+    // $ANTLR end "T__33"
+
+
+    // $ANTLR start "T__34"
+    public final void mT__34() throws RecognitionException {
+        try {
+            int _type = T__34;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // org.apache.usergrid/persistence/query/QueryFilter.g:39:7: ( '*' )
+            // org.apache.usergrid/persistence/query/QueryFilter.g:39:9: '*'
+            {
+                match( '*' );
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        }
+    }
+    // $ANTLR end "T__34"
+
+
+    // $ANTLR start "T__35"
+    public final void mT__35() throws RecognitionException {
+        try {
+            int _type = T__35;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // org.apache.usergrid/persistence/query/QueryFilter.g:40:7: ( '{' )
+            // org.apache.usergrid/persistence/query/QueryFilter.g:40:9: '{'
+            {
+                match( '{' );
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        }
+    }
+    // $ANTLR end "T__35"
+
+
+    // $ANTLR start "T__36"
+    public final void mT__36() throws RecognitionException {
+        try {
+            int _type = T__36;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // org.apache.usergrid/persistence/query/QueryFilter.g:41:7: ( '}' )
+            // org.apache.usergrid/persistence/query/QueryFilter.g:41:9: '}'
+            {
+                match( '}' );
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        }
+    }
+    // $ANTLR end "T__36"
+
+
+    // $ANTLR start "T__37"
+    public final void mT__37() throws RecognitionException {
+        try {
+            int _type = T__37;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // org.apache.usergrid/persistence/query/QueryFilter.g:42:7: ( 'select' )
+            // org.apache.usergrid/persistence/query/QueryFilter.g:42:9: 'select'
+            {
+                match( "select" );
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        }
+    }
+    // $ANTLR end "T__37"
+
+
+    // $ANTLR start "T__38"
+    public final void mT__38() throws RecognitionException {
+        try {
+            int _type = T__38;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // org.apache.usergrid/persistence/query/QueryFilter.g:43:7: ( 'where' )
+            // org.apache.usergrid/persistence/query/QueryFilter.g:43:9: 'where'
+            {
+                match( "where" );
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        }
+    }
+    // $ANTLR end "T__38"
+
+
+    // $ANTLR start "T__39"
+    public final void mT__39() throws RecognitionException {
+        try {
+            int _type = T__39;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // org.apache.usergrid/persistence/query/QueryFilter.g:44:7: ( 'and' )
+            // org.apache.usergrid/persistence/query/QueryFilter.g:44:9: 'and'
+            {
+                match( "and" );
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        }
+    }
+    // $ANTLR end "T__39"
+
+
+    // $ANTLR start "T__40"
+    public final void mT__40() throws RecognitionException {
+        try {
+            int _type = T__40;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // org.apache.usergrid/persistence/query/QueryFilter.g:45:7: ( 'order by' )
+            // org.apache.usergrid/persistence/query/QueryFilter.g:45:9: 'order by'
+            {
+                match( "order by" );
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        }
+    }
+    // $ANTLR end "T__40"
+
+
+    // $ANTLR start "ID"
+    public final void mID() throws RecognitionException {
+        try {
+            int _type = ID;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // org.apache.usergrid/persistence/query/QueryFilter.g:45:5: ( ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' |
+            // 'A' .. 'Z' | '0' .. '9' | '_' | '.' )* )
+            // org.apache.usergrid/persistence/query/QueryFilter.g:45:7: ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' |
+            // 'A' .. 'Z' | '0' .. '9' | '_' | '.' )*
+            {
+                if ( ( input.LA( 1 ) >= 'A' && input.LA( 1 ) <= 'Z' ) || input.LA( 1 ) == '_' || ( input.LA( 1 ) >= 'a'
+                        && input.LA( 1 ) <= 'z' ) ) {
+                    input.consume();
+                }
+                else {
+                    MismatchedSetException mse = new MismatchedSetException( null, input );
+                    recover( mse );
+                    throw mse;
+                }
+
+                // org.apache.usergrid/persistence/query/QueryFilter.g:45:31: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' |
+                // '.' )*
+                loop1:
+                do {
+                    int alt1 = 2;
+                    int LA1_0 = input.LA( 1 );
+
+                    if ( ( LA1_0 == '.' || ( LA1_0 >= '0' && LA1_0 <= '9' ) || ( LA1_0 >= 'A' && LA1_0 <= 'Z' )
+                            || LA1_0 == '_' || ( LA1_0 >= 'a' && LA1_0 <= 'z' ) ) ) {
+                        alt1 = 1;
+                    }
+
+
+                    switch ( alt1 ) {
+                        case 1:
+                            // org.apache.usergrid/persistence/query/QueryFilter.g:
+                        {
+                            if ( input.LA( 1 ) == '.' || ( input.LA( 1 ) >= '0' && input.LA( 1 ) <= '9' ) || (
+                                    input.LA( 1 ) >= 'A' && input.LA( 1 ) <= 'Z' ) || input.LA( 1 ) == '_' || (
+                                    input.LA( 1 ) >= 'a' && input.LA( 1 ) <= 'z' ) ) {
+                                input.consume();
+                            }
+                            else {
+                                MismatchedSetException mse = new MismatchedSetException( null, input );
+                                recover( mse );
+                                throw mse;
+                            }
+                        }
+                        break;
+
+                        default:
+                            break loop1;
+                    }
+                }
+                while ( true );
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        }
+    }
+    // $ANTLR end "ID"
+
+
+    // $ANTLR start "INT"
+    public final void mINT() throws RecognitionException {
+        try {
+            int _type = INT;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // org.apache.usergrid/persistence/query/QueryFilter.g:48:5: ( ( '-' )? ( '0' .. '9' )+ )
+            // org.apache.usergrid/persistence/query/QueryFilter.g:48:7: ( '-' )? ( '0' .. '9' )+
+            {
+                // org.apache.usergrid/persistence/query/QueryFilter.g:48:7: ( '-' )?
+                int alt2 = 2;
+                int LA2_0 = input.LA( 1 );
+
+                if ( ( LA2_0 == '-' ) ) {
+                    alt2 = 1;
+                }
+                switch ( alt2 ) {
+                    case 1:
+                        // org.apache.usergrid/persistence/query/QueryFilter.g:48:8: '-'
+                    {
+                        match( '-' );
+                    }
+                    break;
+                }
+
+                // org.apache.usergrid/persistence/query/QueryFilter.g:48:14: ( '0' .. '9' )+
+                int cnt3 = 0;
+                loop3:
+                do {
+                    int alt3 = 2;
+                    int LA3_0 = input.LA( 1 );
+
+                    if ( ( ( LA3_0 >= '0' && LA3_0 <= '9' ) ) ) {
+                        alt3 = 1;
+                    }
+
+
+                    switch ( alt3 ) {
+                        case 1:
+                            // org.apache.usergrid/persistence/query/QueryFilter.g:48:14: '0' .. '9'
+                        {
+                            matchRange( '0', '9' );
+                        }
+                        break;
+
+                        default:
+                            if ( cnt3 >= 1 ) {
+                                break loop3;
+                            }
+                            EarlyExitException eee = new EarlyExitException( 3, input );
+                            throw eee;
+                    }
+                    cnt3++;
+                }
+                while ( true );
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        }
+    }
+    // $ANTLR end "INT"
+
+
+    // $ANTLR start "FLOAT"
+    public final void mFLOAT() throws RecognitionException {
+        try {
+            int _type = FLOAT;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // org.apache.usergrid/persistence/query/QueryFilter.g:52:5: ( ( '-' )? ( ( '0' .. '9' )+ '.' ( '0' .. '9' )* (
+            // EXPONENT )? | '.' ( '0' .. '9' )+ ( EXPONENT )? | ( '0' .. '9' )+ EXPONENT ) )
+            // org.apache.usergrid/persistence/query/QueryFilter.g:52:8: ( '-' )? ( ( '0' .. '9' )+ '.' ( '0' .. '9' )* (
+            // EXPONENT )? | '.' ( '0' .. '9' )+ ( EXPONENT )? | ( '0' .. '9' )+ EXPONENT )
+            {
+                // org.apache.usergrid/persistence/query/QueryFilter.g:52:8: ( '-' )?
+                int alt4 = 2;
+                int LA4_0 = input.LA( 1 );
+
+                if ( ( LA4_0 == '-' ) ) {
+                    alt4 = 1;
+                }
+                switch ( alt4 ) {
+                    case 1:
+                        // org.apache.usergrid/persistence/query/QueryFilter.g:52:9: '-'
+                    {
+                        match( '-' );
+                    }
+                    break;
+                }
+
+                // org.apache.usergrid/persistence/query/QueryFilter.g:52:15: ( ( '0' .. '9' )+ '.' ( '0' .. '9' )* (
+                // EXPONENT )? | '.' ( '0' .. '9' )+ ( EXPONENT )? | ( '0' .. '9' )+ EXPONENT )
+                int alt11 = 3;
+                alt11 = dfa11.predict( input );
+                switch ( alt11 ) {
+                    case 1:
+                        // org.apache.usergrid/persistence/query/QueryFilter.g:52:17: ( '0' .. '9' )+ '.' ( '0' .. '9' )* (
+                        // EXPONENT )?
+                    {
+                        // org.apache.usergrid/persistence/query/QueryFilter.g:52:17: ( '0' .. '9' )+
+                        int cnt5 = 0;
+                        loop5:
+                        do {
+                            int alt5 = 2;
+                            int LA5_0 = input.LA( 1 );
+
+                            if ( ( ( LA5_0 >= '0' && LA5_0 <= '9' ) ) ) {
+                                alt5 = 1;
+                            }
+
+
+                            switch ( alt5 ) {
+                                case 1:
+                                    // org.apache.usergrid/persistence/query/QueryFilter.g:52:18: '0' .. '9'
+                                {
+                                    matchRange( '0', '9' );
+                                }
+                                break;
+
+                                default:
+                                    if ( cnt5 >= 1 ) {
+                                        break loop5;
+                                    }
+                                    EarlyExitException eee = new EarlyExitException( 5, input );
+                                    throw eee;
+                            }
+                            cnt5++;
+                        }
+                        while ( true );
+
+                        match( '.' );
+                        // org.apache.usergrid/persistence/query/QueryFilter.g:52:33: ( '0' .. '9' )*
+                        loop6:
+                        do {
+                            int alt6 = 2;
+                            int LA6_0 = input.LA( 1 );
+
+                            if ( ( ( LA6_0 >= '0' && LA6_0 <= '9' ) ) ) {
+                                alt6 = 1;
+                            }
+
+
+                            switch ( alt6 ) {
+                                case 1:
+                                    // org.apache.usergrid/persistence/query/QueryFilter.g:52:34: '0' .. '9'
+                                {
+                                    matchRange( '0', '9' );
+                                }
+                                break;
+
+                                default:
+                                    break loop6;
+                            }
+                        }
+                        while ( true );
+
+                        // org.apache.usergrid/persistence/query/QueryFilter.g:52:45: ( EXPONENT )?
+                        int alt7 = 2;
+                        int LA7_0 = input.LA( 1 );
+
+                        if ( ( LA7_0 == 'E' || LA7_0 == 'e' ) ) {
+                            alt7 = 1;
+                        }
+                        switch ( alt7 ) {
+                            case 1:
+                                // org.apache.usergrid/persistence/query/QueryFilter.g:52:45: EXPONENT
+                            {
+                                mEXPONENT();
+                            }
+                            break;
+                        }
+                    }
+                    break;
+                    case 2:
+                        // org.apache.usergrid/persistence/query/QueryFilter.g:53:9: '.' ( '0' .. '9' )+ ( EXPONENT )?
+                    {
+                        match( '.' );
+                        // org.apache.usergrid/persistence/query/QueryFilter.g:53:13: ( '0' .. '9' )+
+                        int cnt8 = 0;
+                        loop8:
+                        do {
+                            int alt8 = 2;
+                            int LA8_0 = input.LA( 1 );
+
+                            if ( ( ( LA8_0 >= '0' && LA8_0 <= '9' ) ) ) {
+                                alt8 = 1;
+                            }
+
+
+                            switch ( alt8 ) {
+                                case 1:
+                                    // org.apache.usergrid/persistence/query/QueryFilter.g:53:14: '0' .. '9'
+                                {
+                                    matchRange( '0', '9' );
+                                }
+                                break;
+
+                                default:
+                                    if ( cnt8 >= 1 ) {
+                                        break loop8;
+                                    }
+                                    EarlyExitException eee = new EarlyExitException( 8, input );
+                                    throw eee;
+                            }
+                            cnt8++;
+                        }
+                        while ( true );
+
+                        // org.apache.usergrid/persistence/query/QueryFilter.g:53:25: ( EXPONENT )?
+                        int alt9 = 2;
+                        int LA9_0 = input.LA( 1 );
+
+                        if ( ( LA9_0 == 'E' || LA9_0 == 'e' ) ) {
+                            alt9 = 1;
+                        }
+                        switch ( alt9 ) {
+                            case 1:
+                                // org.apache.usergrid/persistence/query/QueryFilter.g:53:25: EXPONENT
+                            {
+                                mEXPONENT();
+                            }
+                            break;
+                        }
+                    }
+                    break;
+                    case 3:
+                        // org.apache.usergrid/persistence/query/QueryFilter.g:54:9: ( '0' .. '9' )+ EXPONENT
+                    {
+                        // org.apache.usergrid/persistence/query/QueryFilter.g:54:9: ( '0' .. '9' )+
+                        int cnt10 = 0;
+                        loop10:
+                        do {
+                            int alt10 = 2;
+                            int LA10_0 = input.LA( 1 );
+
+                            if ( ( ( LA10_0 >= '0' && LA10_0 <= '9' ) ) ) {
+                                alt10 = 1;
+                            }
+
+
+                            switch ( alt10 ) {
+                                case 1:
+                                    // org.apache.usergrid/persistence/query/QueryFilter.g:54:10: '0' .. '9'
+                                {
+                                    matchRange( '0', '9' );
+                                }
+                                break;
+
+                                default:
+                                    if ( cnt10 >= 1 ) {
+                                        break loop10;
+                                    }
+                                    EarlyExitException eee = new EarlyExitException( 10, input );
+                                    throw eee;
+                            }
+                            cnt10++;
+                        }
+                        while ( true );
+
+                        mEXPONENT();
+                    }
+                    break;
+                }
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        }
+    }
+    // $ANTLR end "FLOAT"
+
+
+    // $ANTLR start "STRING"
+    public final void mSTRING() throws RecognitionException {
+        try {
+            int _type = STRING;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // org.apache.usergrid/persistence/query/QueryFilter.g:58:5: ( '\\'' ( ESC_SEQ | ~ ( '\\\\' | '\\'' ) )* '\\'' )
+            // org.apache.usergrid/persistence/query/QueryFilter.g:58:8: '\\'' ( ESC_SEQ | ~ ( '\\\\' | '\\'' ) )* '\\''
+            {
+                match( '\'' );
+                // org.apache.usergrid/persistence/query/QueryFilter.g:58:13: ( ESC_SEQ | ~ ( '\\\\' | '\\'' ) )*
+                loop12:
+                do {
+                    int alt12 = 3;
+                    int LA12_0 = input.LA( 1 );
+
+                    if ( ( LA12_0 == '\\' ) ) {
+                        alt12 = 1;
+                    }
+                    else if ( ( ( LA12_0 >= '\u0000' && LA12_0 <= '&' ) || ( LA12_0 >= '(' && LA12_0 <= '[' ) || (
+                            LA12_0 >= ']' && LA12_0 <= '\uFFFF' ) ) ) {
+                        alt12 = 2;
+                    }
+
+
+                    switch ( alt12 ) {
+                        case 1:
+                            // org.apache.usergrid/persistence/query/QueryFilter.g:58:15: ESC_SEQ
+                        {
+                            mESC_SEQ();
+                        }
+                        break;
+                        case 2:
+                            // org.apache.usergrid/persistence/query/QueryFilter.g:58:25: ~ ( '\\\\' | '\\'' )
+                        {
+                            if ( ( input.LA( 1 ) >= '\u0000' && input.LA( 1 ) <= '&' ) || ( input.LA( 1 ) >= '('
+                                    && input.LA( 1 ) <= '[' ) || ( input.LA( 1 ) >= ']'
+                                    && input.LA( 1 ) <= '\uFFFF' ) ) {
+                                input.consume();
+                            }
+                            else {
+                                MismatchedSetException mse = new MismatchedSetException( null, input );
+                                recover( mse );
+                                throw mse;
+                            }
+                        }
+                        break;
+
+                        default:
+                            break loop12;
+                    }
+                }
+                while ( true );
+
+                match( '\'' );
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        }
+    }
+    // $ANTLR end "STRING"
+
+
+    // $ANTLR start "BOOLEAN"
+    public final void mBOOLEAN() throws RecognitionException {
+        try {
+            // org.apache.usergrid/persistence/query/QueryFilter.g:62:9: ( ( 'true' | 'false' ) )
+            // org.apache.usergrid/persistence/query/QueryFilter.g:62:11: ( 'true' | 'false' )
+            {
+                // org.apache.usergrid/persistence/query/QueryFilter.g:62:11: ( 'true' | 'false' )
+                int alt13 = 2;
+                int LA13_0 = input.LA( 1 );
+
+                if ( ( LA13_0 == 't' ) ) {
+                    alt13 = 1;
+                }
+                else if ( ( LA13_0 == 'f' ) ) {
+                    alt13 = 2;
+                }
+                else {
+                    NoViableAltException nvae = new NoViableAltException( "", 13, 0, input );
+
+                    throw nvae;
+                }
+                switch ( alt13 ) {
+                    case 1:
+                        // org.apache.usergrid/persistence/query/QueryFilter.g:62:12: 'true'
+                    {
+                        match( "true" );
+                    }
+                    break;
+                    case 2:
+                        // org.apache.usergrid/persistence/query/QueryFilter.g:62:20: 'false'
+                    {
+                        match( "false" );
+                    }
+                    break;
+                }
+            }
+        }
+        finally {
+        }
+    }
+    // $ANTLR end "BOOLEAN"
+
+
+    // $ANTLR start "UUID"
+    public final void mUUID() throws RecognitionException {
+        try {
+            int _type = UUID;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // org.apache.usergrid/persistence/query/QueryFilter.g:64:6: ( HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT
+            // HEX_DIGIT HEX_DIGIT HEX_DIGIT '-' HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT '-' HEX_DIGIT HEX_DIGIT
+            // HEX_DIGIT HEX_DIGIT '-' HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT '-' HEX_DIGIT HEX_DIGIT HEX_DIGIT
+            // HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT )
+            // org.apache.usergrid/persistence/query/QueryFilter.g:64:8: HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT
+            // HEX_DIGIT HEX_DIGIT HEX_DIGIT '-' HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT '-' HEX_DIGIT HEX_DIGIT
+            // HEX_DIGIT HEX_DIGIT '-' HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT '-' HEX_DIGIT HEX_DIGIT HEX_DIGIT
+            // HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT
+            {
+                mHEX_DIGIT();
+                mHEX_DIGIT();
+                mHEX_DIGIT();
+                mHEX_DIGIT();
+                mHEX_DIGIT();
+                mHEX_DIGIT();
+                mHEX_DIGIT();
+                mHEX_DIGIT();
+                match( '-' );
+                mHEX_DIGIT();
+                mHEX_DIGIT();
+                mHEX_DIGIT();
+                mHEX_DIGIT();
+                match( '-' );
+                mHEX_DIGIT();
+                mHEX_DIGIT();
+                mHEX_DIGIT();
+                mHEX_DIGIT();
+                match( '-' );
+                mHEX_DIGIT();
+                mHEX_DIGIT();
+                mHEX_DIGIT();
+                mHEX_DIGIT();
+                match( '-' );
+                mHEX_DIGIT();
+                mHEX_DIGIT();
+                mHEX_DIGIT();
+                mHEX_DIGIT();
+                mHEX_DIGIT();
+                mHEX_DIGIT();
+                mHEX_DIGIT();
+                mHEX_DIGIT();
+                mHEX_DIGIT();
+                mHEX_DIGIT();
+                mHEX_DIGIT();
+                mHEX_DIGIT();
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        }
+    }
+    // $ANTLR end "UUID"
+
+
+    // $ANTLR start "EXPONENT"
+    public final void mEXPONENT() throws RecognitionException {
+        try {
+            // org.apache.usergrid/persistence/query/QueryFilter.g:75:10: ( ( 'e' | 'E' ) ( '+' | '-' )? ( '0' .. '9' )+ )
+            // org.apache.usergrid/persistence/query/QueryFilter.g:75:12: ( 'e' | 'E' ) ( '+' | '-' )? ( '0' .. '9' )+
+            {
+                if ( input.LA( 1 ) == 'E' || input.LA( 1 ) == 'e' ) {
+                    input.consume();
+                }
+                else {
+                    MismatchedSetException mse = new MismatchedSetException( null, input );
+                    recover( mse );
+                    throw mse;
+                }
+
+                // org.apache.usergrid/persistence/query/QueryFilter.g:75:22: ( '+' | '-' )?
+                int alt14 = 2;
+                int LA14_0 = input.LA( 1 );
+
+                if ( ( LA14_0 == '+' || LA14_0 == '-' ) ) {
+                    alt14 = 1;
+                }
+                switch ( alt14 ) {
+                    case 1:
+                        // org.apache.usergrid/persistence/query/QueryFilter.g:
+                    {
+                        if ( input.LA( 1 ) == '+' || input.LA( 1 ) == '-' ) {
+                            input.consume();
+                        }
+                        else {
+                            MismatchedSetException mse = new MismatchedSetException( null, input );
+                            recover( mse );
+                            throw mse;
+                        }
+                    }
+                    break;
+                }
+
+                // org.apache.usergrid/persistence/query/QueryFilter.g:75:33: ( '0' .. '9' )+
+                int cnt15 = 0;
+                loop15:
+                do {
+                    int alt15 = 2;
+                    int LA15_0 = input.LA( 1 );
+
+                    if ( ( ( LA15_0 >= '0' && LA15_0 <= '9' ) ) ) {
+                        alt15 = 1;
+                    }
+
+
+                    switch ( alt15 ) {
+                        case 1:
+                            // org.apache.usergrid/persistence/query/QueryFilter.g:75:34: '0' .. '9'
+                        {
+                            matchRange( '0', '9' );
+                        }
+                        break;
+
+                        default:
+                            if ( cnt15 >= 1 ) {
+                                break loop15;
+                            }
+                            EarlyExitException eee = new EarlyExitException( 15, input );
+                            throw eee;
+                    }
+                    cnt15++;
+                }
+                while ( true );
+            }
+        }
+        finally {
+        }
+    }
+    // $ANTLR end "EXPONENT"
+
+
+    // $ANTLR start "HEX_DIGIT"
+    public final void mHEX_DIGIT() throws RecognitionException {
+        try {
+            // org.apache.usergrid/persistence/query/QueryFilter.g:78:11: ( ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' ) )
+            // org.apache.usergrid/persistence/query/QueryFilter.g:78:13: ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' )
+            {
+                if ( ( input.LA( 1 ) >= '0' && input.LA( 1 ) <= '9' ) || ( input.LA( 1 ) >= 'A'
+                        && input.LA( 1 ) <= 'F' ) || ( input.LA( 1 ) >= 'a' && input.LA( 1 ) <= 'f' ) ) {
+                    input.consume();
+                }
+                else {
+                    MismatchedSetException mse = new MismatchedSetException( null, input );
+                    recover( mse );
+                    throw mse;
+                }
+            }
+        }
+        finally {
+        }
+    }
+    // $ANTLR end "HEX_DIGIT"
+
+
+    // $ANTLR start "ESC_SEQ"
+    public final void mESC_SEQ() throws RecognitionException {
+        try {
+            // org.apache.usergrid/persistence/query/QueryFilter.g:82:5: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' |
+            // '\\'' | '\\\\' ) | UNICODE_ESC | OCTAL_ESC )
+            int alt16 = 3;
+            int LA16_0 = input.LA( 1 );
+
+            if ( ( LA16_0 == '\\' ) ) {
+                switch ( input.LA( 2 ) ) {
+                    case '\"':
+                    case '\'':
+                    case '\\':
+                    case 'b':
+                    case 'f':
+                    case 'n':
+                    case 'r':
+                    case 't': {
+                        alt16 = 1;
+                    }
+                    break;
+                    case 'u': {
+                        alt16 = 2;
+                    }
+                    break;
+                    case '0':
+                    case '1':
+                    case '2':
+                    case '3':
+                    case '4':
+                    case '5':
+                    case '6':
+                    case '7': {
+                        alt16 = 3;
+                    }
+                    break;
+                    default:
+                        NoViableAltException nvae = new NoViableAltException( "", 16, 1, input );
+
+                        throw nvae;
+                }
+            }
+            else {
+                NoViableAltException nvae = new NoViableAltException( "", 16, 0, input );
+
+                throw nvae;
+            }
+            switch ( alt16 ) {
+                case 1:
+                    // org.apache.usergrid/persistence/query/QueryFilter.g:82:9: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' |
+                    // '\\\"' | '\\'' | '\\\\' )
+                {
+                    match( '\\' );
+                    if ( input.LA( 1 ) == '\"' || input.LA( 1 ) == '\'' || input.LA( 1 ) == '\\' || input.LA( 1 ) == 'b'
+                            || input.LA( 1 ) == 'f' || input.LA( 1 ) == 'n' || input.LA( 1 ) == 'r'
+                            || input.LA( 1 ) == 't' ) {
+                        input.consume();
+                    }
+                    else {
+                        MismatchedSetException mse = new MismatchedSetException( null, input );
+                        recover( mse );
+                        throw mse;
+                    }
+                }
+                break;
+                case 2:
+                    // org.apache.usergrid/persistence/query/QueryFilter.g:83:9: UNICODE_ESC
+                {
+                    mUNICODE_ESC();
+                }
+                break;
+                case 3:
+                    // org.apache.usergrid/persistence/query/QueryFilter.g:84:9: OCTAL_ESC
+                {
+                    mOCTAL_ESC();
+                }
+                break;
+            }
+        }
+        finally {
+        }
+    }
+    // $ANTLR end "ESC_SEQ"
+
+
+    // $ANTLR start "OCTAL_ESC"
+    public final void mOCTAL_ESC() throws RecognitionException {
+        try {
+            // org.apache.usergrid/persistence/query/QueryFilter.g:89:5: ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7'
+            // ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) )
+            int alt17 = 3;
+            int LA17_0 = input.LA( 1 );
+
+            if ( ( LA17_0 == '\\' ) ) {
+                int LA17_1 = input.LA( 2 );
+
+                if ( ( ( LA17_1 >= '0' && LA17_1 <= '3' ) ) ) {
+                    int LA17_2 = input.LA( 3 );
+
+                    if ( ( ( LA17_2 >= '0' && LA17_2 <= '7' ) ) ) {
+                        int LA17_4 = input.LA( 4 );
+
+                        if ( ( ( LA17_4 >= '0' && LA17_4 <= '7' ) ) ) {
+                            alt17 = 1;
+                        }
+                        else {
+                            alt17 = 2;
+                        }
+                    }
+                    else {
+                        alt17 = 3;
+                    }
+                }
+                else if ( ( ( LA17_1 >= '4' && LA17_1 <= '7' ) ) ) {
+                    int LA17_3 = input.LA( 3 );
+
+                    if ( ( ( LA17_3 >= '0' && LA17_3 <= '7' ) ) ) {
+                        alt17 = 2;
+                    }
+                    else {
+                        alt17 = 3;
+                    }
+                }
+                else {
+                    NoViableAltException nvae = new NoViableAltException( "", 17, 1, input );
+
+                    throw nvae;
+                }
+            }
+            else {
+                NoViableAltException nvae = new NoViableAltException( "", 17, 0, input );
+
+                throw nvae;
+            }
+            switch ( alt17 ) {
+                case 1:
+                    // org.apache.usergrid/persistence/query/QueryFilter.g:89:9: '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0'
+                    // .. '7' )
+                {
+                    match( '\\' );
+                    // org.apache.usergrid/persistence/query/QueryFilter.g:89:14: ( '0' .. '3' )
+                    // org.apache.usergrid/persistence/query/QueryFilter.g:89:15: '0' .. '3'
+                    {
+                        matchRange( '0', '3' );
+                    }
+
+                    // org.apache.usergrid/persistence/query/QueryFilter.g:89:25: ( '0' .. '7' )
+                    // org.apache.usergrid/persistence/query/QueryFilter.g:89:26: '0' .. '7'
+                    {
+                        matchRange( '0', '7' );
+                    }
+
+                    // org.apache.usergrid/persistence/query/QueryFilter.g:89:36: ( '0' .. '7' )
+                    // org.apache.usergrid/persistence/query/QueryFilter.g:89:37: '0' .. '7'
+                    {
+                        matchRange( '0', '7' );
+                    }
+                }
+                break;
+                case 2:
+                    // org.apache.usergrid/persistence/query/QueryFilter.g:90:9: '\\\\' ( '0' .. '7' ) ( '0' .. '7' )
+                {
+                    match( '\\' );
+                    // org.apache.usergrid/persistence/query/QueryFilter.g:90:14: ( '0' .. '7' )
+                    // org.apache.usergrid/persistence/query/QueryFilter.g:90:15: '0' .. '7'
+                    {
+                        matchRange( '0', '7' );
+                    }
+
+                    // org.apache.usergrid/persistence/query/QueryFilter.g:90:25: ( '0' .. '7' )
+                    // org.apache.usergrid/persistence/query/QueryFilter.g:90:26: '0' .. '7'
+                    {
+                        matchRange( '0', '7' );
+                    }
+                }
+                break;
+                case 3:
+                    // org.apache.usergrid/persistence/query/QueryFilter.g:91:9: '\\\\' ( '0' .. '7' )
+                {
+                    match( '\\' );
+                    // org.apache.usergrid/persistence/query/QueryFilter.g:91:14: ( '0' .. '7' )
+                    // org.apache.usergrid/persistence/query/QueryFilter.g:91:15: '0' .. '7'
+                    {
+                        matchRange( '0', '7' );
+                    }
+                }
+                break;
+            }
+        }
+        finally {
+        }
+    }
+    // $ANTLR end "OCTAL_ESC"
+
+
+    // $ANTLR start "UNICODE_ESC"
+    public final void mUNICODE_ESC() throws RecognitionException {
+        try {
+            // org.apache.usergrid/persistence/query/QueryFilter.g:96:5: ( '\\\\' 'u' HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT )
+            // org.apache.usergrid/persistence/query/QueryFilter.g:96:9: '\\\\' 'u' HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT
+            {
+                match( '\\' );
+                match( 'u' );
+                mHEX_DIGIT();
+                mHEX_DIGIT();
+                mHEX_DIGIT();
+                mHEX_DIGIT();
+            }
+        }
+        finally {
+        }
+    }
+    // $ANTLR end "UNICODE_ESC"
+
+
+    // $ANTLR start "WS"
+    public final void mWS() throws RecognitionException {
+        try {
+            int _type = WS;
+            int _channel = DEFAULT_TOKEN_CHANNEL;
+            // org.apache.usergrid/persistence/query/QueryFilter.g:99:4: ( ( ' ' | '\\t' | '\\n' | '\\r' | '\\f' )+ )
+            // org.apache.usergrid/persistence/query/QueryFilter.g:99:6: ( ' ' | '\\t' | '\\n' | '\\r' | '\\f' )+
+            {
+                // org.apache.usergrid/persistence/query/QueryFilter.g:99:6: ( ' ' | '\\t' | '\\n' | '\\r' | '\\f' )+
+                int cnt18 = 0;
+                loop18:
+                do {
+                    int alt18 = 2;
+                    int LA18_0 = input.LA( 1 );
+
+                    if ( ( ( LA18_0 >= '\t' && LA18_0 <= '\n' ) || ( LA18_0 >= '\f' && LA18_0 <= '\r' )
+                            || LA18_0 == ' ' ) ) {
+                        alt18 = 1;
+                    }
+
+
+                    switch ( alt18 ) {
+                        case 1:
+                            // org.apache.usergrid/persistence/query/QueryFilter.g:
+                        {
+                            if ( ( input.LA( 1 ) >= '\t' && input.LA( 1 ) <= '\n' ) || ( input.LA( 1 ) >= '\f'
+                                    && input.LA( 1 ) <= '\r' ) || input.LA( 1 ) == ' ' ) {
+                                input.consume();
+                            }
+                            else {
+                                MismatchedSetException mse = new MismatchedSetException( null, input );
+                                recover( mse );
+                                throw mse;
+                            }
+                        }
+                        break;
+
+                        default:
+                            if ( cnt18 >= 1 ) {
+                                break loop18;
+                            }
+                            EarlyExitException eee = new EarlyExitException( 18, input );
+                            throw eee;
+                    }
+                    cnt18++;
+                }
+                while ( true );
+
+                _channel = HIDDEN;
+            }
+
+            state.type = _type;
+            state.channel = _channel;
+        }
+        finally {
+        }
+    }
+    // $ANTLR end "WS"
+
+
+    public void mTokens() throws RecognitionException {
+        // org.apache.usergrid/persistence/query/QueryFilter.g:1:8: ( T__16 | T__17 | T__18 | T__19 | T__20 | T__21 | T__22
+        // | T__23 | T__24 | T__25 | T__26 | T__27 | T__28 | T__29 | T__30 | T__31 | T__32 | T__33 | T__34 | T__35 |
+        // T__36 | T__37 | T__38 | T__39 | T__40 | ID | INT | FLOAT | STRING | UUID | WS )
+        int alt19 = 31;
+        alt19 = dfa19.predict( input );
+        switch ( alt19 ) {
+            case 1:
+                // org.apache.usergrid/persistence/query/QueryFilter.g:1:10: T__16
+            {
+                mT__16();
+            }
+            break;
+            case 2:
+                // org.apache.usergrid/persistence/query/QueryFilter.g:1:16: T__17
+            {
+                mT__17();
+            }
+            break;
+            case 3:
+                // org.apache.usergrid/persistence/query/QueryFilter.g:1:22: T__18
+            {
+                mT__18();
+            }
+            break;
+            case 4:
+                // org.apache.usergrid/persistence/query/QueryFilter.g:1:28: T__19
+            {
+                mT__19();
+            }
+            break;
+            case 5:
+                // org.apache.usergrid/persistence/query/QueryFilter.g:1:34: T__20
+            {
+                mT__20();
+            }
+            break;
+            case 6:
+                // org.apache.usergrid/persistence/query/QueryFilter.g:1:40: T__21
+            {
+                mT__21();
+            }
+            break;
+            case 7:
+                // org.apache.usergrid/persistence/query/QueryFilter.g:1:46: T__22
+            {
+                mT__22();
+            }
+            break;
+            case 8:
+                // org.apache.usergrid/persistence/query/QueryFilter.g:1:52: T__23
+            {
+                mT__23();
+            }
+            break;
+            case 9:
+                // org.apache.usergrid/persistence/query/QueryFilter.g:1:58: T__24
+            {
+                mT__24();
+            }
+            break;
+            case 10:
+                // org.apache.usergrid/persistence/query/QueryFilter.g:1:64: T__25
+            {
+                mT__25();
+            }
+            break;
+            case 11:
+                // org.apache.usergrid/persistence/query/QueryFilter.g:1:70: T__26
+            {
+                mT__26();
+            }
+            break;
+            case 12:
+                // org.apache.usergrid/persistence/query/QueryFilter.g:1:76: T__27
+            {
+                mT__27();
+            }
+            break;
+            case 13:
+                // org.apache.usergrid/persistence/query/QueryFilter.g:1:82: T__28
+            {
+                mT__28();
+            }
+            break;
+            case 14:
+                // org.apache.usergrid/persistence/query/QueryFilter.g:1:88: T__29
+            {
+                mT__29();
+            }
+            break;
+            case 15:
+                // org.apache.usergrid/persistence/query/QueryFilter.g:1:94: T__30
+            {
+                mT__30();
+            }
+            break;
+            case 16:
+                // org.apache.usergrid/persistence/query/QueryFilter.g:1:100: T__31
+            {
+                mT__31();
+            }
+            break;
+            case 17:
+                // org.apache.usergrid/persistence/query/QueryFilter.g:1:106: T__32
+            {
+                mT__32();
+            }
+            break;
+            case 18:
+                // org.apache.usergrid/persistence/query/QueryFilter.g:1:112: T__33
+            {
+                mT__33();
+            }
+            break;
+            case 19:
+                // org.apache.usergrid/persistence/query/QueryFilter.g:1:118: T__34
+            {
+                mT__34();
+            }
+            break;
+            case 20:
+                // org.apache.usergrid/persistence/query/QueryFilter.g:1:124: T__35
+            {
+                mT__35();
+            }
+            break;
+            case 21:
+                // org.apache.usergrid/persistence/query/QueryFilter.g:1:130: T__36
+            {
+                mT__36();
+            }
+            break;
+            case 22:
+                // org.apache.usergrid/persistence/query/QueryFilter.g:1:136: T__37
+            {
+                mT__37();
+            }
+            break;
+            case 23:
+                // org.apache.usergrid/persistence/query/QueryFilter.g:1:142: T__38
+            {
+                mT__38();
+            }
+            break;
+            case 24:
+                // org.apache.usergrid/persistence/query/QueryFilter.g:1:148: T__39
+            {
+                mT__39();
+            }
+            break;
+            case 25:
+                // org.apache.usergrid/persistence/query/QueryFilter.g:1:154: T__40
+            {
+                mT__40();
+            }
+            break;
+            case 26:
+                // org.apache.usergrid/persistence/query/QueryFilter.g:1:160: ID
+            {
+                mID();
+            }
+            break;
+            case 27:
+                // org.apache.usergrid/persistence/query/QueryFilter.g:1:163: INT
+            {
+                mINT();
+            }
+            break;
+            case 28:
+                // org.apache.usergrid/persistence/query/QueryFilter.g:1:167: FLOAT
+            {
+                mFLOAT();
+            }
+            break;
+            case 29:
+                // org.apache.usergrid/persistence/query/QueryFilter.g:1:173: STRING
+            {
+                mSTRING();
+            }
+            break;
+            case 30:
+                // org.apache.usergrid/persistence/query/QueryFilter.g:1:180: UUID
+            {
+                mUUID();
+            }
+            break;
+            case 31:
+                // org.apache.usergrid/persistence/query/QueryFilter.g:1:185: WS
+            {
+                mWS();
+            }
+            break;
+        }
+    }
+
+
+    protected DFA11 dfa11 = new DFA11( this );
+    protected DFA19 dfa19 = new DFA19( this );
+    static final String DFA11_eotS = "\5\uffff";
+    static final String DFA11_eofS = "\5\uffff";
+    static final String DFA11_minS = "\2\56\3\uffff";
+    static final String DFA11_maxS = "\1\71\1\145\3\uffff";
+    static final String DFA11_acceptS = "\2\uffff\1\2\1\3\1\1";
+    static final String DFA11_specialS = "\5\uffff}>";
+    static final String[] DFA11_transitionS = {
+            "\1\2\1\uffff\12\1", "\1\4\1\uffff\12\1\13\uffff\1\3\37\uffff\1\3", "", "", ""
+    };
+
+    static final short[] DFA11_eot = DFA.unpackEncodedString( DFA11_eotS );
+    static final short[] DFA11_eof = DFA.unpackEncodedString( DFA11_eofS );
+    static final char[] DFA11_min = DFA.unpackEncodedStringToUnsignedChars( DFA11_minS );
+    static final char[] DFA11_max = DFA.unpackEncodedStringToUnsignedChars( DFA11_maxS );
+    static final short[] DFA11_accept = DFA.unpackEncodedString( DFA11_acceptS );
+    static final short[] DFA11_special = DFA.unpackEncodedString( DFA11_specialS );
+    static final short[][] DFA11_transition;
+
+
+    static {
+        int numStates = DFA11_transitionS.length;
+        DFA11_transition = new short[numStates][];
+        for ( int i = 0; i < numStates; i++ ) {
+            DFA11_transition[i] = DFA.unpackEncodedString( DFA11_transitionS[i] );
+        }
+    }
+
+
+    class DFA11 extends DFA {
+
+        public DFA11( BaseRecognizer recognizer ) {
+            this.recognizer = recognizer;
+            this.decisionNumber = 11;
+            this.eot = DFA11_eot;
+            this.eof = DFA11_eof;
+            this.min = DFA11_min;
+            this.max = DFA11_max;
+            this.accept = DFA11_accept;
+            this.special = DFA11_special;
+            this.transition = DFA11_transition;
+        }
+
+
+        public String getDescription() {
+            return "52:15: ( ( '0' .. '9' )+ '.' ( '0' .. '9' )* ( EXPONENT )? | '.' ( '0' .. '9' )+ ( EXPONENT )? | "
+                    + "( '0' .. '9' )+ EXPONENT )";
+        }
+    }
+
+
+    static final String DFA19_eotS = "\1\uffff\1\33\1\uffff\1\35\6\30\1\uffff\1\30\1\uffff\2\30\3\uffff" +
+            "\2\30\1\uffff\1\56\10\uffff\1\61\1\62\1\30\1\65\1\67\3\30\1\73\5" +
+            "\30\2\56\5\uffff\1\30\1\105\1\uffff\1\106\1\uffff\3\30\1\uffff\1" +
+            "\30\1\113\1\114\2\30\1\56\1\uffff\1\26\1\30\2\uffff\4\30\2\uffff" +
+            "\1\127\1\30\1\56\1\uffff\1\26\3\30\1\137\1\30\1\uffff\1\30\1\56" +
+            "\1\uffff\1\26\2\30\1\147\2\uffff\1\150\1\56\1\uffff\1\26\2\30\2" +
+            "\uffff\1\56\1\uffff\1\26\1\30\1\161\1\56\1\uffff\1\26\2\uffff\4" +
+            "\26";
+    static final String DFA19_eofS = "\167\uffff";
+    static final String DFA19_minS = "\1\11\1\75\1\uffff\1\75\1\156\1\60\2\164\1\60\1\150\1\uffff\1\146" +
+            "\1\uffff\2\60\3\uffff\1\145\1\60\2\56\10\uffff\2\56\1\60\2\56\1" +
+            "\156\1\164\1\145\1\56\1\144\1\143\1\144\1\60\1\154\2\56\1\uffff" +
+            "\1\53\3\uffff\1\60\1\56\1\uffff\1\56\1\uffff\1\164\1\150\1\162\1" +
+            "\uffff\1\145\2\56\1\143\1\145\1\56\1\53\2\60\2\uffff\1\141\1\151" +
+            "\1\145\1\162\2\uffff\1\56\1\143\1\56\1\53\2\60\1\151\1\156\1\56" +
+            "\1\40\1\uffff\1\164\1\56\1\53\2\60\1\156\1\56\2\uffff\2\56\1\53" +
+            "\2\60\1\163\2\uffff\1\56\1\53\1\60\1\55\1\56\1\55\1\53\1\55\1\uffff" +
+            "\4\60\1\55";
+    static final String DFA19_maxS = "\1\175\1\75\1\uffff\1\75\1\156\1\161\2\164\1\157\1\151\1\uffff\1" +
+            "\162\1\uffff\1\163\1\146\3\uffff\1\145\1\146\1\71\1\146\10\uffff" +
+            "\2\172\1\146\2\172\1\156\1\164\1\145\1\172\1\144\1\143\1\144\1\163" +
+            "\1\154\1\145\1\146\1\uffff\1\146\3\uffff\1\146\1\172\1\uffff\1\172" +
+            "\1\uffff\1\164\1\150\1\162\1\uffff\1\145\2\172\1\143\1\145\4\146" +
+            "\2\uffff\1\141\1\151\1\145\1\162\2\uffff\1\172\1\143\4\146\1\151" +
+            "\1\156\1\172\1\40\1\uffff\1\164\4\146\1\156\1\172\2\uffff\1\172" +
+            "\4\146\1\163\2\uffff\3\146\1\55\1\172\1\145\1\71\1\55\1\uffff\4" +
+            "\146\1\55";
+    static final String DFA19_acceptS = "\2\uffff\1\3\7\uffff\1\16\1\uffff\1\20\2\uffff\1\23\1\24\1\25\4" +
+            "\uffff\1\34\1\35\1\32\1\37\1\2\1\1\1\5\1\4\20\uffff\1\33\1\uffff" +
+            "\1\36\1\6\1\7\2\uffff\1\10\1\uffff\1\11\3\uffff\1\17\11\uffff\1" +
+            "\12\1\13\4\uffff\1\21\1\30\12\uffff\1\22\7\uffff\1\27\1\31\6\uffff" +
+            "\1\15\1\26\10\uffff\1\14\5\uffff";
+    static final String DFA19_specialS = "\167\uffff}>";
+    static final String[] DFA19_transitionS = {
+            "\2\31\1\uffff\2\31\22\uffff\1\31\6\uffff\1\27\2\uffff\1\17\1" +
+                    "\uffff\1\12\1\24\1\26\1\uffff\12\25\1\14\1\uffff\1\1\1\2\1\3" +
+                    "\2\uffff\6\23\24\30\4\uffff\1\30\1\uffff\1\15\1\23\1\10\1\16" +
+                    "\1\5\1\23\1\7\1\30\1\4\2\30\1\6\2\30\1\13\3\30\1\22\3\30\1\11" +
+                    "\3\30\1\20\1\uffff\1\21", "\1\32", "", "\1\34", "\1\36",
+            "\12\40\7\uffff\6\40\32\uffff\6\40\12\uffff\1\37", "\1\41", "\1\42",
+            "\12\40\7\uffff\6\40\32\uffff\6\40\10\uffff\1\43", "\1\45\1\44", "", "\1\46\13\uffff\1\47", "",
+            "\12\40\7\uffff\6\40\32\uffff\6\40\7\uffff\1\51\4\uffff\1\50",
+            "\12\40\7\uffff\6\40\32\uffff\4\40\1\52\1\40", "", "", "", "\1\53", "\12\40\7\uffff\6\40\32\uffff\6\40",
+            "\1\26\1\uffff\12\54", "\1\26\1\uffff\12\55\7\uffff\4\60\1\57\1\60\32\uffff\4\60\1" + "\57\1\60", "", "",
+            "", "", "", "", "", "", "\1\30\1\uffff\12\30\7\uffff\32\30\4\uffff\1\30\1\uffff\32\30",
+            "\1\30\1\uffff\12\30\7\uffff\32\30\4\uffff\1\30\1\uffff\32\30", "\12\63\7\uffff\6\63\32\uffff\6\63",
+            "\1\30\1\uffff\12\30\7\uffff\32\30\4\uffff\1\30\1\uffff\4\30" + "\1\64\25\30",
+            "\1\30\1\uffff\12\30\7\uffff\32\30\4\uffff\1\30\1\uffff\4\30" + "\1\66\25\30", "\1\70", "\1\71", "\1\72",
+            "\1\30\1\uffff\12\30\7\uffff\32\30\4\uffff\1\30\1\uffff\32\30", "\1\74", "\1\75", "\1\76",
+            "\12\63\7\uffff\6\63\32\uffff\6\63\14\uffff\1\77", "\1\100",
+            "\1\26\1\uffff\12\54\13\uffff\1\26\37\uffff\1\26",
+            "\1\26\1\uffff\12\101\7\uffff\4\60\1\102\1\60\32\uffff\4\60" + "\1\102\1\60", "",
+            "\1\26\1\uffff\1\26\2\uffff\12\103\7\uffff\6\60\32\uffff\6\60", "", "", "",
+            "\12\104\7\uffff\6\104\32\uffff\6\104", "\1\30\1\uffff\12\30\7\uffff\32\30\4\uffff\1\30\1\uffff\32\30", "",
+            "\1\30\1\uffff\12\30\7\uffff\32\30\4\uffff\1\30\1\uffff\32\30", "", "\1\107", "\1\110", "\1\111", "",
+            "\1\112", "\1\30\1\uffff\12\30\7\uffff\32\30\4\uffff\1\30\1\uffff\32\30",
+            "\1\30\1\uffff\12\30\7\uffff\32\30\4\uffff\1\30\1\uffff\32\30", "\1\115", "\1\116",
+            "\1\26\1\uffff\12\117\7\uffff\4\60\1\120\1\60\32\uffff\4\60" + "\1\120\1\60",
+            "\1\26\1\uffff\1\26\2\uffff\12\121\7\uffff\6\60\32\uffff\6\60", "\12\121\7\uffff\6\60\32\uffff\6\60",
+            "\12\122\7\uffff\6\122\32\uffff\6\122", "", "", "\1\123", "\1\124", "\1\125", "\1\126", "", "",
+            "\1\30\1\uffff\12\30\7\uffff\32\30\4\uffff\1\30\1\uffff\32\30", "\1\130",
+            "\1\26\1\uffff\12\131\7\uffff\4\60\1\132\1\60\32\uffff\4\60" + "\1\132\1\60",
+            "\1\26\1\uffff\1\26\2\uffff\12\133\7\uffff\6\60\32\uffff\6\60", "\12\133\7\uffff\6\60\32\uffff\6\60",
+            "\12\134\7\uffff\6\134\32\uffff\6\134", "\1\135", "\1\136",
+            "\1\30\1\uffff\12\30\7\uffff\32\30\4\uffff\1\30\1\uffff\32\30", "\1\140", "", "\1\141",
+            "\1\26\1\uffff\12\142\7\uffff\4\60\1\143\1\60\32\uffff\4\60" + "\1\143\1\60",
+            "\1\26\1\uffff\1\26\2\uffff\12\144\7\uffff\6\60\32\uffff\6\60", "\12\144\7\uffff\6\60\32\uffff\6\60",
+            "\12\145\7\uffff\6\145\32\uffff\6\145", "\1\146",
+            "\1\30\1\uffff\12\30\7\uffff\32\30\4\uffff\1\30\1\uffff\32\30", "", "",
+            "\1\30\1\uffff\12\30\7\uffff\32\30\4\uffff\1\30\1\uffff\32\30",
+            "\1\26\1\uffff\12\151\7\uffff\4\60\1\152\1\60\32\uffff\4\60" + "\1\152\1\60",
+            "\1\26\1\uffff\1\26\2\uffff\12\153\7\uffff\6\60\32\uffff\6\60", "\12\153\7\uffff\6\60\32\uffff\6\60",
+            "\12\154\7\uffff\6\154\32\uffff\6\154", "\1\155", "", "",
+            "\1\26\1\uffff\12\156\7\uffff\4\60\1\157\1\60\32\uffff\4\60" + "\1\157\1\60",
+            "\1\26\1\uffff\1\26\2\uffff\12\160\7\uffff\6\60\32\uffff\6\60", "\12\160\7\uffff\6\60\32\uffff\6\60",
+            "\1\60", "\1\30\1\uffff\12\30\7\uffff\32\30\4\uffff\1\30\1\uffff\32\30",
+            "\1\60\1\26\1\uffff\12\54\13\uffff\1\26\37\uffff\1\26", "\1\26\1\uffff\1\162\2\uffff\12\26", "\1\60", "",
+            "\12\163\7\uffff\6\60\32\uffff\6\60", "\12\164\7\uffff\6\60\32\uffff\6\60",
+            "\12\165\7\uffff\6\60\32\uffff\6\60", "\12\166\7\uffff\6\60\32\uffff\6\60", "\1\60"
+    };
+
+    static final short[] DFA19_eot = DFA.unpackEncodedString( DFA19_eotS );
+    static final short[] DFA19_eof = DFA.unpackEncodedString( DFA19_eofS );
+    static final char[] DFA19_min = DFA.unpackEncodedStringToUnsignedChars( DFA19_minS );
+    static final char[] DFA19_max = DFA.unpackEncodedStringToUnsignedChars( DFA19_maxS );
+    static final short[] DFA19_accept = DFA.unpackEncodedString( DFA19_acceptS );
+    static final short[] DFA19_special = DFA.unpackEncodedString( DFA19_specialS );
+    static final short[][] DFA19_transition;
+
+
+    static {
+        int numStates = DFA19_transitionS.length;
+        DFA19_transition = new short[numStates][];
+        for ( int i = 0; i < numStates; i++ ) {
+            DFA19_transition[i] = DFA.unpackEncodedString( DFA19_transitionS[i] );
+        }
+    }
+
+
+    class DFA19 extends DFA {
+
+        public DFA19( BaseRecognizer recognizer ) {
+            this.recognizer = recognizer;
+            this.decisionNumber = 19;
+            this.eot = DFA19_eot;
+            this.eof = DFA19_eof;
+            this.min = DFA19_min;
+            this.max = DFA19_max;
+            this.accept = DFA19_accept;
+            this.special = DFA19_special;
+            this.transition = DFA19_transition;
+        }
+
+
+        public String getDescription() {
+            return "1:1: Tokens : ( T__16 | T__17 | T__18 | T__19 | T__20 | T__21 | T__22 | T__23 | T__24 | T__25 | " +
+                    "T__26 | T__27 | T__28 | T__29 | T__30 | T__31 | T__32 | T__33 | T__34 | T__35 | T__36 | T__37 | " +
+                    "T__38 | T__39 | T__40 | ID | INT | FLOAT | STRING | UUID | WS );";
+        }
+    }
+}


[40/96] [abbrv] [partial] Change package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/Schema.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/Schema.java b/stack/core/src/main/java/org/apache/usergrid/persistence/Schema.java
new file mode 100644
index 0000000..7f24079
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/Schema.java
@@ -0,0 +1,1786 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence;
+
+
+import java.beans.PropertyDescriptor;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Field;
+import java.nio.ByteBuffer;
+import java.security.SecureRandom;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.UUID;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.TimeUnit;
+
+import javax.crypto.Cipher;
+import javax.crypto.KeyGenerator;
+import javax.crypto.SecretKey;
+import javax.crypto.spec.SecretKeySpec;
+
+import org.codehaus.jackson.JsonNode;
+import org.codehaus.jackson.map.ObjectMapper;
+import org.codehaus.jackson.map.SerializationConfig;
+import org.codehaus.jackson.node.ObjectNode;
+import org.codehaus.jackson.smile.SmileFactory;
+import org.codehaus.jackson.type.TypeReference;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.config.BeanDefinition;
+import org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider;
+import org.springframework.core.type.filter.AssignableTypeFilter;
+import org.apache.commons.beanutils.PropertyUtils;
+import org.apache.commons.lang.reflect.FieldUtils;
+import org.apache.usergrid.persistence.annotations.EntityCollection;
+import org.apache.usergrid.persistence.annotations.EntityDictionary;
+import org.apache.usergrid.persistence.annotations.EntityProperty;
+import org.apache.usergrid.persistence.cassandra.CassandraPersistenceUtils;
+import org.apache.usergrid.persistence.entities.Application;
+import org.apache.usergrid.persistence.exceptions.PropertyTypeConversionException;
+import org.apache.usergrid.persistence.schema.CollectionInfo;
+import org.apache.usergrid.persistence.schema.DictionaryInfo;
+import org.apache.usergrid.persistence.schema.EntityInfo;
+import org.apache.usergrid.persistence.schema.PropertyInfo;
+import org.apache.usergrid.utils.InflectionUtils;
+import org.apache.usergrid.utils.JsonUtils;
+import org.apache.usergrid.utils.MapUtils;
+
+import com.google.common.cache.CacheBuilder;
+import com.google.common.cache.CacheLoader;
+import com.google.common.cache.LoadingCache;
+
+import me.prettyprint.hector.api.beans.ColumnSlice;
+import me.prettyprint.hector.api.beans.HColumn;
+import me.prettyprint.hector.api.beans.Row;
+import static org.apache.commons.lang.StringUtils.isNotBlank;
+import static org.apache.usergrid.utils.ConversionUtils.bytebuffer;
+import static org.apache.usergrid.utils.ConversionUtils.string;
+import static org.apache.usergrid.utils.ConversionUtils.uuid;
+import static org.apache.usergrid.utils.InflectionUtils.pluralize;
+import static org.apache.usergrid.utils.InflectionUtils.singularize;
+import static org.apache.usergrid.utils.JsonUtils.toJsonNode;
+import static org.apache.usergrid.utils.MapUtils.hashMap;
+import static org.apache.usergrid.utils.StringUtils.stringOrSubstringAfterLast;
+
+
+/**
+ * The controller class for determining Entity relationships as well as properties types. This class loads the entity
+ * schema definition from a YAML file called usergrid-schema.yaml at the root of the classpath.
+ *
+ * @author edanuff
+ */
+public class Schema {
+
+    private static final Logger logger = LoggerFactory.getLogger( Schema.class );
+
+    public static final String DEFAULT_ENTITIES_PACKAGE = "org.apache.usergrid.persistence.entities";
+
+    public static final String TYPE_APPLICATION = "application";
+    public static final String TYPE_ENTITY = "entity";
+    public static final String TYPE_ROLE = "role";
+    public static final String TYPE_CONNECTION = "connection";
+    public static final String TYPE_MEMBER = "member";
+
+    public static final String PROPERTY_ACTIVATED = "activated";
+    public static final String PROPERTY_COLLECTION_NAME = "collectionName";
+    public static final String PROPERTY_CREATED = "created";
+    public static final String PROPERTY_CONFIRMED = "confirmed";
+    public static final String PROPERTY_DISABLED = "disabled";
+    public static final String PROPERTY_UUID = "uuid";
+    public static final String PROPERTY_EMAIL = "email";
+    public static final String PROPERTY_ITEM = "item";
+    public static final String PROPERTY_ITEM_TYPE = "itemType";
+    public static final String PROPERTY_MEMBERSHIP = "membership";
+    public static final String PROPERTY_METADATA = "metadata";
+    public static final String PROPERTY_MODIFIED = "modified";
+    public static final String PROPERTY_NAME = "name";
+    public static final String PROPERTY_OWNER = "owner";
+    public static final String PROPERTY_OWNER_TYPE = "ownerType";
+    public static final String PROPERTY_PATH = "path";
+    public static final String PROPERTY_PICTURE = "picture";
+    public static final String PROPERTY_PUBLISHED = "published";
+    public static final String PROPERTY_SECRET = "secret";
+    public static final String PROPERTY_TIMESTAMP = "timestamp";
+    public static final String PROPERTY_TITLE = "title";
+    public static final String PROPERTY_TYPE = "type";
+    public static final String PROPERTY_URI = "uri";
+    public static final String PROPERTY_USERNAME = "username";
+    public static final String PROPERTY_INACTIVITY = "inactivity";
+
+    public static final String PROPERTY_CONNECTION = "connection";
+    public static final String PROPERTY_ASSOCIATED = "associated";
+    public static final String PROPERTY_CURSOR = "cursor";
+
+    public static final String COLLECTION_ROLES = "roles";
+    public static final String COLLECTION_USERS = "users";
+    public static final String COLLECTION_GROUPS = "groups";
+
+    public static final String INDEX_COLLECTIONS = "collections";
+    public static final String INDEX_CONNECTIONS = "connections";
+
+    public static final String DICTIONARY_PROPERTIES = "properties";
+    public static final String DICTIONARY_SETS = "sets";
+    public static final String DICTIONARY_COLLECTIONS = "collections";
+    public static final String DICTIONARY_CONNECTIONS = "connections";
+    public static final String DICTIONARY_INDEXES = "indexes";
+    public static final String DICTIONARY_CONNECTING_TYPES = "connecting_types";
+    public static final String DICTIONARY_CONNECTING_ENTITIES = "connecting_entities";
+    public static final String DICTIONARY_CONNECTED_TYPES = "connected_types";
+    public static final String DICTIONARY_CONNECTED_ENTITIES = "connected_entities";
+    public static final String DICTIONARY_CONTAINER_ENTITIES = "container_entities";
+    public static final String DICTIONARY_CREDENTIALS = "credentials";
+    public static final String DICTIONARY_ROLENAMES = "rolenames";
+    public static final String DICTIONARY_ROLETIMES = "roletimes";
+    public static final String DICTIONARY_PERMISSIONS = "permissions";
+    public static final String DICTIONARY_ID_SETS = "id_sets";
+    public static final String DICTIONARY_COUNTERS = "counters";
+    public static final String DICTIONARY_GEOCELL = "geocell";
+
+    private static List<String> entitiesPackage = new ArrayList<String>();
+    private static List<String> entitiesScanPath = new ArrayList<String>();
+
+    @SuppressWarnings("rawtypes")
+    public static Map<String, Class> DEFAULT_DICTIONARIES =
+            hashMap( DICTIONARY_PROPERTIES, ( Class ) String.class ).map( DICTIONARY_SETS, String.class )
+                    .map( DICTIONARY_INDEXES, String.class ).map( DICTIONARY_COLLECTIONS, String.class )
+                    .map( DICTIONARY_CONNECTIONS, String.class ).map( DICTIONARY_CONNECTING_TYPES, String.class )
+                    .map( DICTIONARY_CONNECTING_ENTITIES, String.class ).map( DICTIONARY_CONNECTED_TYPES, String.class )
+                    .map( DICTIONARY_CONNECTED_ENTITIES, String.class )
+                    .map( DICTIONARY_CONTAINER_ENTITIES, String.class )
+                    .map( DICTIONARY_CREDENTIALS, CredentialsInfo.class ).map( DICTIONARY_ROLENAMES, String.class )
+                    .map( DICTIONARY_ROLETIMES, Long.class ).map( DICTIONARY_PERMISSIONS, String.class )
+                    .map( DICTIONARY_ID_SETS, String.class );
+
+    private static LoadingCache<String, String> baseEntityTypes =
+            CacheBuilder.newBuilder().expireAfterAccess( 10, TimeUnit.MINUTES )
+                        .build( new CacheLoader<String, String>() {
+                            public String load( String key ) { // no checked exception
+                                return createNormalizedEntityType( key, true );
+                            }
+                        } );
+
+    private static LoadingCache<String, String> nonbaseEntityTypes =
+            CacheBuilder.newBuilder().expireAfterAccess( 10, TimeUnit.MINUTES )
+                        .build( new CacheLoader<String, String>() {
+                            public String load( String key ) { // no checked exception
+                                return createNormalizedEntityType( key, false );
+                            }
+                        } );
+
+    private static LoadingCache<String, String> collectionNameCache =
+            CacheBuilder.newBuilder().maximumSize( 1000 ).build( new CacheLoader<String, String>() {
+                public String load( String key ) { // no checked exception
+                    return _defaultCollectionName( key );
+                }
+            } );
+
+    private final ObjectMapper mapper = new ObjectMapper();
+
+    @SuppressWarnings("unused")
+    private final SmileFactory smile = new SmileFactory();
+
+    private final Map<String, Class<? extends Entity>> typeToEntityClass =
+            new ConcurrentHashMap<String, Class<? extends Entity>>();
+
+    private final Map<Class<? extends Entity>, String> entityClassToType =
+            new ConcurrentHashMap<Class<? extends Entity>, String>();
+
+    private final Map<Class<? extends Entity>, Map<String, PropertyDescriptor>> entityClassPropertyToDescriptor =
+            new ConcurrentHashMap<Class<? extends Entity>, Map<String, PropertyDescriptor>>();
+
+    private final Map<Class<? extends Entity>, EntityInfo> registeredEntityClasses =
+            new ConcurrentHashMap<Class<? extends Entity>, EntityInfo>();
+
+    Map<String, EntityInfo> entityMap = new TreeMap<String, EntityInfo>( String.CASE_INSENSITIVE_ORDER );
+    ;
+
+    Map<String, Map<String, Set<CollectionInfo>>> entityContainerCollections =
+            new TreeMap<String, Map<String, Set<CollectionInfo>>>( String.CASE_INSENSITIVE_ORDER );
+
+    Map<String, Map<String, Set<CollectionInfo>>> entityContainerCollectionsIndexingProperties =
+            new TreeMap<String, Map<String, Set<CollectionInfo>>>( String.CASE_INSENSITIVE_ORDER );
+    Map<String, Map<String, Set<CollectionInfo>>> entityContainerCollectionsIndexingDictionaries =
+            new TreeMap<String, Map<String, Set<CollectionInfo>>>( String.CASE_INSENSITIVE_ORDER );
+    Map<String, Map<String, Set<CollectionInfo>>> entityContainerCollectionsIndexingDynamicDictionaries =
+            new TreeMap<String, Map<String, Set<CollectionInfo>>>( String.CASE_INSENSITIVE_ORDER );
+
+    Map<String, Map<String, Map<String, Set<CollectionInfo>>>> entityPropertyContainerCollectionsIndexingProperty =
+            new TreeMap<String, Map<String, Map<String, Set<CollectionInfo>>>>( String.CASE_INSENSITIVE_ORDER );
+
+    Map<String, Map<String, Map<String, Set<CollectionInfo>>>> entityDictionaryContainerCollectionsIndexingDictionary =
+            new TreeMap<String, Map<String, Map<String, Set<CollectionInfo>>>>( String.CASE_INSENSITIVE_ORDER );
+
+    Map<String, PropertyInfo> allIndexedProperties = new TreeMap<String, PropertyInfo>( String.CASE_INSENSITIVE_ORDER );
+
+    Map<String, PropertyInfo> allProperties = new TreeMap<String, PropertyInfo>( String.CASE_INSENSITIVE_ORDER );
+
+    private static Schema instance;
+
+    boolean initialized = false;
+
+
+    public Schema() {
+        setDefaultSchema( this );
+
+        mapper.configure( SerializationConfig.Feature.WRITE_DATES_AS_TIMESTAMPS, false );
+    }
+
+
+    public static final Object initLock = new Object();
+
+
+    public static void setDefaultSchema( Schema instance ) {
+        synchronized ( initLock ) {
+            if ( Schema.instance == null ) {
+                Schema.instance = instance;
+            }
+        }
+    }
+
+
+    public static Schema getDefaultSchema() {
+        if ( instance == null ) {
+            synchronized ( initLock ) {
+                if ( instance == null ) {
+                    logger.info( "Initializing schema..." );
+                    instance = new Schema();
+                    instance.init();
+                    logger.info( "Schema initialized" );
+                }
+            }
+        }
+        return instance;
+    }
+
+
+    public void mapCollector( String entityType, String containerType, String collectionName,
+                              CollectionInfo collection ) {
+
+        MapUtils.addMapMapSet( entityContainerCollections, true, entityType, containerType, collection );
+
+        if ( !collection.getPropertiesIndexed().isEmpty() ) {
+            MapUtils.addMapMapSet( entityContainerCollectionsIndexingProperties, true, entityType, containerType,
+                    collection );
+            for ( String propertyName : collection.getPropertiesIndexed() ) {
+                MapUtils.addMapMapMapSet( entityPropertyContainerCollectionsIndexingProperty, true, entityType,
+                        propertyName, containerType, collection );
+            }
+        }
+
+        if ( !collection.getDictionariesIndexed().isEmpty() ) {
+            MapUtils.addMapMapSet( entityContainerCollectionsIndexingDictionaries, true, entityType, containerType,
+                    collection );
+            for ( String dictionaryName : collection.getDictionariesIndexed() ) {
+                MapUtils.addMapMapMapSet( entityDictionaryContainerCollectionsIndexingDictionary, true, entityType,
+                        dictionaryName, containerType, collection );
+            }
+        }
+
+        if ( collection.isIndexingDynamicDictionaries() ) {
+            MapUtils.addMapMapSet( entityContainerCollectionsIndexingDynamicDictionaries, true, entityType,
+                    containerType, collection );
+        }
+    }
+
+
+    private <T extends Annotation> T getAnnotation( Class<? extends Entity> entityClass, PropertyDescriptor descriptor,
+                                                    Class<T> annotationClass ) {
+        try {
+            if ( ( descriptor.getReadMethod() != null ) && descriptor.getReadMethod()
+                                                                     .isAnnotationPresent( annotationClass ) ) {
+                return descriptor.getReadMethod().getAnnotation( annotationClass );
+            }
+            if ( ( descriptor.getWriteMethod() != null ) && descriptor.getWriteMethod()
+                                                                      .isAnnotationPresent( annotationClass ) ) {
+                return descriptor.getWriteMethod().getAnnotation( annotationClass );
+            }
+            Field field = FieldUtils.getField( entityClass, descriptor.getName(), true );
+            if ( field != null ) {
+                if ( field.isAnnotationPresent( annotationClass ) ) {
+                    return field.getAnnotation( annotationClass );
+                }
+            }
+        }
+        catch ( Exception e ) {
+            logger.error( "Could not retrieve the annotations", e );
+        }
+        return null;
+    }
+
+
+    public synchronized void registerEntity( Class<? extends Entity> entityClass ) {
+        logger.info( "Registering {}", entityClass );
+        EntityInfo e = registeredEntityClasses.get( entityClass );
+        if ( e != null ) {
+            return;
+        }
+
+        Map<String, PropertyDescriptor> propertyDescriptors = entityClassPropertyToDescriptor.get( entityClass );
+        if ( propertyDescriptors == null ) {
+            EntityInfo entity = new EntityInfo();
+
+            String type = getEntityType( entityClass );
+
+            propertyDescriptors = new LinkedHashMap<String, PropertyDescriptor>();
+            Map<String, PropertyInfo> properties = new TreeMap<String, PropertyInfo>( String.CASE_INSENSITIVE_ORDER );
+            Map<String, CollectionInfo> collections =
+                    new TreeMap<String, CollectionInfo>( String.CASE_INSENSITIVE_ORDER );
+            Map<String, DictionaryInfo> sets = new TreeMap<String, DictionaryInfo>( String.CASE_INSENSITIVE_ORDER );
+
+            PropertyDescriptor[] descriptors = PropertyUtils.getPropertyDescriptors( entityClass );
+
+            for ( PropertyDescriptor descriptor : descriptors ) {
+                String name = descriptor.getName();
+
+                EntityProperty propertyAnnotation = getAnnotation( entityClass, descriptor, EntityProperty.class );
+                if ( propertyAnnotation != null ) {
+                    if ( isNotBlank( propertyAnnotation.name() ) ) {
+                        name = propertyAnnotation.name();
+                    }
+                    propertyDescriptors.put( name, descriptor );
+
+                    PropertyInfo propertyInfo = new PropertyInfo( propertyAnnotation );
+                    propertyInfo.setName( name );
+                    propertyInfo.setType( descriptor.getPropertyType() );
+
+                    properties.put( name, propertyInfo );
+                    // logger.info(propertyInfo);
+                }
+
+                EntityCollection collectionAnnotation =
+                        getAnnotation( entityClass, descriptor, EntityCollection.class );
+                if ( collectionAnnotation != null ) {
+                    CollectionInfo collectionInfo = new CollectionInfo( collectionAnnotation );
+                    collectionInfo.setName( name );
+                    collectionInfo.setContainer( entity );
+
+                    collections.put( name, collectionInfo );
+                    // logger.info(collectionInfo);
+                }
+
+                EntityDictionary setAnnotation = getAnnotation( entityClass, descriptor, EntityDictionary.class );
+                if ( setAnnotation != null ) {
+                    DictionaryInfo setInfo = new DictionaryInfo( setAnnotation );
+                    setInfo.setName( name );
+                    // setInfo.setType(descriptor.getPropertyType());
+                    sets.put( name, setInfo );
+                    // logger.info(setInfo);
+                }
+            }
+
+            if ( !DynamicEntity.class.isAssignableFrom( entityClass ) ) {
+                entity.setProperties( properties );
+                entity.setCollections( collections );
+                entity.setDictionaries( sets );
+                entity.mapCollectors( this, type );
+
+                entityMap.put( type, entity );
+
+                allProperties.putAll( entity.getProperties() );
+
+                Set<String> propertyNames = entity.getIndexedProperties();
+                for ( String propertyName : propertyNames ) {
+                    PropertyInfo property = entity.getProperty( propertyName );
+                    if ( ( property != null ) && !allIndexedProperties.containsKey( propertyName ) ) {
+                        allIndexedProperties.put( propertyName, property );
+                    }
+                }
+            }
+
+            entityClassPropertyToDescriptor.put( entityClass, propertyDescriptors );
+
+            registeredEntityClasses.put( entityClass, entity );
+        }
+    }
+
+
+    public synchronized void init() {
+        if ( !initialized ) {
+            initialized = true;
+            addEntitiesPackage( DEFAULT_ENTITIES_PACKAGE );
+            scanEntities();
+        }
+    }
+
+
+    @SuppressWarnings("unchecked")
+    public void scanEntities() {
+        synchronized ( entitiesScanPath ) {
+            for ( String path : entitiesScanPath ) {
+                ClassPathScanningCandidateComponentProvider provider =
+                        new ClassPathScanningCandidateComponentProvider( true );
+                provider.addIncludeFilter( new AssignableTypeFilter( TypedEntity.class ) );
+
+                Set<BeanDefinition> components = provider.findCandidateComponents( path );
+                for ( BeanDefinition component : components ) {
+                    try {
+                        Class<?> cls = Class.forName( component.getBeanClassName() );
+                        if ( Entity.class.isAssignableFrom( cls ) ) {
+                            registerEntity( ( Class<? extends Entity> ) cls );
+                        }
+                    }
+                    catch ( ClassNotFoundException e ) {
+                        logger.error( "Unable to get entity class ", e );
+                    }
+                }
+                registerEntity( DynamicEntity.class );
+            }
+        }
+    }
+
+
+    public void addEntitiesPackage( String entityPackage ) {
+        if ( !entitiesPackage.contains( entityPackage ) ) {
+            entitiesPackage.add( entityPackage );
+            String path = entityPackage.replaceAll( "\\.", "/" );
+            synchronized ( entitiesScanPath ) {
+                entitiesScanPath.add( path );
+            }
+        }
+    }
+
+
+    public void removeEntitiesPackage( String entityPackage ) {
+        entitiesPackage.remove( entityPackage );
+        String path = entityPackage.replaceAll( "\\.", "/" );
+        synchronized ( entitiesScanPath ) {
+            entitiesScanPath.remove( path );
+        }
+    }
+
+
+    @SuppressWarnings("unchecked")
+    public List<String> getEntitiesPackage() {
+        return ( List<String> ) ( ( ArrayList<String> ) entitiesPackage ).clone();
+    }
+
+
+    /** @return value */
+    public Map<String, PropertyInfo> getAllIndexedProperties() {
+
+        return allIndexedProperties;
+    }
+
+
+    public Set<String> getAllIndexedPropertyNames() {
+
+        return allIndexedProperties.keySet();
+    }
+
+
+    public Set<String> getAllPropertyNames() {
+
+        return allProperties.keySet();
+    }
+
+
+    public String[] getAllPropertyNamesAsArray() {
+
+        return allProperties.keySet().toArray( new String[0] );
+    }
+
+
+    /** @return value */
+    public EntityInfo getEntityInfo( String entityType ) {
+
+        if ( entityType == null ) {
+            return null;
+        }
+
+        entityType = normalizeEntityType( entityType );
+
+        if ( "dynamicentity".equalsIgnoreCase( entityType ) ) {
+            throw new IllegalArgumentException( entityType + " is not a valid entity type" );
+        }
+
+        EntityInfo entity = entityMap.get( entityType );
+        if ( entity == null ) {
+            return getDynamicEntityInfo( entityType );
+        }
+        return entity;
+    }
+
+
+    public JsonNode getEntityJsonSchema( String entityType ) {
+        Class<?> cls = getEntityClass( entityType );
+        if ( cls == null ) {
+            cls = DynamicEntity.class;
+        }
+        try {
+            JsonNode schemaNode = mapper.generateJsonSchema( cls ).getSchemaNode();
+            if ( schemaNode != null ) {
+                JsonNode properties = schemaNode.get( "properties" );
+                if ( properties instanceof ObjectNode ) {
+                    Set<String> fieldsToRemove = new LinkedHashSet<String>();
+                    Iterator<String> i = properties.getFieldNames();
+                    while ( i.hasNext() ) {
+                        String propertyName = i.next();
+                        if ( !hasProperty( entityType, propertyName ) ) {
+                            fieldsToRemove.add( propertyName );
+                        }
+                        else {
+                            ObjectNode property = ( ObjectNode ) properties.get( propertyName );
+                            if ( isRequiredProperty( entityType, propertyName ) ) {
+                                property.put( "optional", false );
+                            }
+                        }
+                    }
+                    ( ( ObjectNode ) properties ).remove( fieldsToRemove );
+                }
+            }
+            return schemaNode;
+        }
+        catch ( Exception e ) {
+            logger.error( "Unable to get schema for entity type " + entityType, e );
+        }
+        return null;
+    }
+
+
+    public String getEntityType( Class<? extends Entity> cls ) {
+        String type = entityClassToType.get( cls );
+        if ( type != null ) {
+            return type;
+        }
+
+        String className = cls.getName();
+        boolean finded = false;
+        for ( String entityPackage : entitiesPackage ) {
+            String entityPackagePrefix = entityPackage + ".";
+            if ( className.startsWith( entityPackagePrefix ) ) {
+                type = className.substring( entityPackagePrefix.length() );
+                type = InflectionUtils.underscore( type );
+                finded = true;
+            }
+        }
+
+        if ( !finded ) {
+            type = className;
+        }
+
+        typeToEntityClass.put( type, cls );
+        entityClassToType.put( cls, type );
+        return type;
+    }
+
+
+    @SuppressWarnings("unchecked")
+    private Class<? extends Entity> entityClassForName( String className ) {
+        try {
+            @SuppressWarnings("rawtypes") Class cls = Class.forName( className );
+            if ( Entity.class.isAssignableFrom( cls ) ) {
+                return cls;
+            }
+        }
+        catch ( ClassNotFoundException e ) {
+        }
+        return null;
+    }
+
+
+    public Class<? extends Entity> getEntityClass( String type ) {
+        type = getAssociatedEntityType( type );
+        Class<? extends Entity> cls = typeToEntityClass.get( type );
+        if ( cls != null ) {
+            return cls;
+        }
+
+        for ( String entityPackage : entitiesPackage ) {
+            String entityPackagePrefix = entityPackage + ".";
+            cls = entityClassForName( entityPackagePrefix + InflectionUtils.camelCase( type, true ) );
+            if ( cls == null ) {
+                cls = entityClassForName( entityPackagePrefix + type );
+            }
+
+            if ( cls == null ) {
+                cls = entityClassForName( type );
+            }
+
+            if ( cls != null ) {
+                break;
+            }
+        }
+
+        if ( cls == null ) {
+            cls = DynamicEntity.class;
+        }
+
+        typeToEntityClass.put( type, cls );
+        entityClassToType.put( cls, type );
+        return cls;
+    }
+
+
+    /** @return value */
+    public boolean hasProperties( String entityType ) {
+
+        EntityInfo entity = getEntityInfo( entityType );
+        if ( entity == null ) {
+            return false;
+        }
+
+        return entity.hasProperties();
+    }
+
+
+    /** @return value */
+    public Set<String> getPropertyNames( String entityType ) {
+
+        EntityInfo entity = getEntityInfo( entityType );
+        if ( entity == null ) {
+            return null;
+        }
+
+        return entity.getProperties().keySet();
+    }
+
+
+    /** @return value */
+    public String[] getPropertyNamesAsArray( String entityType ) {
+
+        EntityInfo entity = getEntityInfo( entityType );
+        if ( entity == null ) {
+            return new String[0];
+        }
+
+        return entity.getProperties().keySet().toArray( new String[0] );
+    }
+
+
+    /** @return value */
+    public boolean hasProperty( String entityType, String propertyName ) {
+
+        if ( propertyName.equals( PROPERTY_UUID ) || propertyName.equals( PROPERTY_TYPE ) ) {
+            return true;
+        }
+
+        EntityInfo entity = getEntityInfo( entityType );
+        if ( entity == null ) {
+            return false;
+        }
+
+        return entity.hasProperty( propertyName );
+    }
+
+
+    public String aliasProperty( String entityType ) {
+
+        EntityInfo entity = getEntityInfo( entityType );
+        if ( entity == null ) {
+            return null;
+        }
+
+        return entity.getAliasProperty();
+    }
+
+
+    /** @return value */
+    public boolean isPropertyMutable( String entityType, String propertyName ) {
+
+        EntityInfo entity = getEntityInfo( entityType );
+        if ( entity == null ) {
+            return false;
+        }
+
+        return entity.isPropertyMutable( propertyName );
+    }
+
+
+    public boolean isPropertyUnique( String entityType, String propertyName ) {
+
+        EntityInfo entity = getEntityInfo( entityType );
+        if ( entity == null ) {
+            return false;
+        }
+
+        return entity.isPropertyUnique( propertyName );
+    }
+
+
+    public boolean isPropertyIndexed( String entityType, String propertyName ) {
+
+        EntityInfo entity = getEntityInfo( entityType );
+        if ( entity == null ) {
+            return true;
+        }
+
+        if ( entity.hasProperty( propertyName ) ) {
+            return entity.isPropertyIndexed( propertyName );
+        }
+
+        return true;
+    }
+
+
+    public boolean isPropertyFulltextIndexed( String entityType, String propertyName ) {
+
+        EntityInfo entity = getEntityInfo( entityType );
+        if ( entity == null ) {
+            return true;
+        }
+
+        if ( entity.hasProperty( propertyName ) ) {
+            return entity.isPropertyFulltextIndexed( propertyName );
+        }
+
+        return true;
+    }
+
+
+    public boolean isPropertyTimestamp( String entityType, String propertyName ) {
+
+        EntityInfo entity = getEntityInfo( entityType );
+        if ( entity == null ) {
+            return false;
+        }
+
+        return entity.isPropertyTimestamp( propertyName );
+    }
+
+
+    /** @return value */
+    public Set<String> getRequiredProperties( String entityType ) {
+
+        EntityInfo entity = getEntityInfo( entityType );
+        if ( entity == null ) {
+            return null;
+        }
+
+        return entity.getRequiredProperties();
+    }
+
+
+    /** @return value */
+    public boolean isRequiredProperty( String entityType, String propertyName ) {
+
+        if ( propertyName.equals( PROPERTY_UUID ) || propertyName.equals( PROPERTY_TYPE ) ) {
+            return true;
+        }
+
+        EntityInfo entity = getEntityInfo( entityType );
+        if ( entity == null ) {
+            return false;
+        }
+
+        return entity.isPropertyRequired( propertyName );
+    }
+
+
+    /** @return value */
+    public Class<?> getPropertyType( String entityType, String propertyName ) {
+
+        EntityInfo entity = getEntityInfo( entityType );
+        if ( entity == null ) {
+            return null;
+        }
+
+        PropertyInfo property = entity.getProperty( propertyName );
+        if ( property == null ) {
+            return null;
+        }
+
+        return property.getType();
+    }
+
+
+    /** @return value */
+    public boolean isPropertyIndexedInCollection( String containerType, String collectionName, String propertyName ) {
+
+        CollectionInfo collection = getCollection( containerType, collectionName );
+        if ( collection == null ) {
+            return false;
+        }
+
+        return collection.isPropertyIndexed( propertyName );
+    }
+
+
+    /** @return value */
+    public boolean hasDictionaries( String entityType ) {
+
+        EntityInfo entity = getEntityInfo( entityType );
+        if ( entity == null ) {
+            return false;
+        }
+
+        return entity.hasDictionaries();
+    }
+
+
+    /** @return value */
+    public Set<String> getDictionaryNames( String entityType ) {
+
+        EntityInfo entity = getEntityInfo( entityType );
+        if ( entity == null ) {
+            return null;
+        }
+
+        return entity.getDictionaries().keySet();
+    }
+
+
+    /** @return value */
+    public boolean hasDictionary( String entityType, String dictionaryName ) {
+
+        EntityInfo entity = getEntityInfo( entityType );
+        if ( entity == null ) {
+            return false;
+        }
+
+        return entity.hasDictionary( dictionaryName );
+    }
+
+
+    /** @return value */
+    public Class<?> getDictionaryKeyType( String entityType, String dictionaryName ) {
+
+        EntityInfo entity = getEntityInfo( entityType );
+        if ( entity == null ) {
+            return null;
+        }
+
+        DictionaryInfo set = entity.getDictionary( dictionaryName );
+        if ( set == null ) {
+            return null;
+        }
+
+        return set.getKeyType();
+    }
+
+
+    public Class<?> getDictionaryValueType( String entityType, String dictionaryName ) {
+
+        EntityInfo entity = getEntityInfo( entityType );
+        if ( entity == null ) {
+            return null;
+        }
+
+        DictionaryInfo dictionary = entity.getDictionary( dictionaryName );
+        if ( dictionary == null ) {
+            return null;
+        }
+
+        return dictionary.getValueType();
+    }
+
+
+    /** @return value */
+    public boolean isDictionaryIndexedInConnections( String entityType, String dictionaryName ) {
+
+        EntityInfo entity = getEntityInfo( entityType );
+        if ( entity == null ) {
+            return false;
+        }
+
+        DictionaryInfo dictionary = entity.getDictionary( dictionaryName );
+        if ( dictionary == null ) {
+            return false;
+        }
+
+        return dictionary.isKeysIndexedInConnections();
+    }
+
+
+    /** @return value */
+    public boolean isDictionaryIndexedInCollection( String containerType, String collectionName,
+                                                    String dictionaryName ) {
+
+        CollectionInfo collection = getCollection( containerType, collectionName );
+        if ( collection == null ) {
+            return false;
+        }
+
+        return collection.isDictionaryIndexed( dictionaryName );
+    }
+
+
+    /** @return value */
+    public boolean hasCollection( String containerType, String collectionName ) {
+
+        return getCollection( containerType, collectionName ) != null;
+    }
+
+
+    public boolean isCollectionPathBased( String containerType, String collectionName ) {
+
+        CollectionInfo collection = getCollection( containerType, collectionName );
+        if ( collection == null ) {
+            return false;
+        }
+
+        EntityInfo item = getEntityInfo( collection.getType() );
+        if ( item == null ) {
+            return false;
+        }
+
+        PropertyInfo property = item.getAliasPropertyObject();
+        if ( property == null ) {
+            return false;
+        }
+
+        return property.isPathBasedName();
+    }
+
+
+    public boolean isCollectionReversed( String containerType, String collectionName ) {
+
+        CollectionInfo collection = getCollection( containerType, collectionName );
+        if ( collection == null ) {
+            return false;
+        }
+
+        return collection.isReversed();
+    }
+
+
+    public String getCollectionSort( String containerType, String collectionName ) {
+
+        CollectionInfo collection = getCollection( containerType, collectionName );
+        if ( collection == null ) {
+            return null;
+        }
+
+        return collection.getSort();
+    }
+
+
+    /** @return value */
+    public CollectionInfo getCollection( String containerType, String collectionName ) {
+
+        containerType = normalizeEntityType( containerType, true );
+
+        EntityInfo entity = getEntityInfo( containerType );
+        if ( entity == null ) {
+            return null;
+        }
+
+        CollectionInfo collection = entity.getCollection( collectionName );
+
+        if ( ( collection == null ) && ( Application.ENTITY_TYPE.equalsIgnoreCase( containerType ) ) ) {
+            collection = getDynamicApplicationCollection( collectionName );
+        }
+
+        return collection;
+    }
+
+
+    private CollectionInfo getDynamicApplicationCollection( String collectionName ) {
+        EntityInfo entity = getEntityInfo( Application.ENTITY_TYPE );
+        if ( entity == null ) {
+            return null;
+        }
+
+        CollectionInfo collection = entity.getCollection( collectionName );
+
+        if ( collection != null ) {
+            return collection;
+        }
+
+        collection = new CollectionInfo();
+        collection.setName( collectionName );
+        collection.setContainer( entity );
+        collection.setType( normalizeEntityType( collectionName ) );
+        Set<String> properties = new LinkedHashSet<String>();
+        properties.add( PROPERTY_NAME );
+        properties.add( PROPERTY_CREATED );
+        properties.add( PROPERTY_MODIFIED );
+        collection.setPropertiesIndexed( properties );
+        // entity.getCollections().put(collectionName, collection);
+        // mapCollector(collection.getType(), Application.ENTITY_TYPE,
+        // collectionName, collection);
+
+        return collection;
+    }
+
+
+    public String getCollectionType( String containerType, String collectionName ) {
+
+        containerType = normalizeEntityType( containerType );
+
+        CollectionInfo collection = getCollection( containerType, collectionName );
+
+        if ( collection == null ) {
+
+            if ( Application.ENTITY_TYPE.equalsIgnoreCase( containerType ) ) {
+                return normalizeEntityType( collectionName );
+            }
+            return null;
+        }
+
+        return collection.getType();
+    }
+
+
+    /** @return value */
+    public Map<String, CollectionInfo> getCollections( String entityType ) {
+
+        EntityInfo entity = getEntityInfo( normalizeEntityType( entityType, true ) );
+        if ( entity == null ) {
+            return null;
+        }
+
+        return entity.getCollections();
+    }
+
+
+    public Set<String> getCollectionNames( String entityType ) {
+
+        EntityInfo entity = getEntityInfo( normalizeEntityType( entityType, true ) );
+        if ( entity == null ) {
+            return null;
+        }
+
+        Map<String, CollectionInfo> map = entity.getCollections();
+
+        if ( map != null ) {
+            return map.keySet();
+        }
+
+        return null;
+    }
+
+
+    public java.util.List<String> getCollectionNamesAsList( String entityType ) {
+        Set<String> set = getCollectionNames( normalizeEntityType( entityType, true ) );
+        if ( set != null ) {
+            return new ArrayList<String>( set );
+        }
+        return null;
+    }
+
+
+    private Map<String, Set<CollectionInfo>> addDynamicApplicationCollectionAsContainer(
+            Map<String, Set<CollectionInfo>> containers, String entityType ) {
+
+        Map<String, Set<CollectionInfo>> copy =
+                new TreeMap<String, Set<CollectionInfo>>( String.CASE_INSENSITIVE_ORDER );
+        if ( containers != null ) {
+            copy.putAll( containers );
+        }
+        containers = copy;
+
+        if ( !containers.containsKey( Application.ENTITY_TYPE ) ) {
+            MapUtils.addMapSet( containers, true, Application.ENTITY_TYPE,
+                    getCollection( Application.ENTITY_TYPE, defaultCollectionName( entityType ) ) );
+        }
+
+        return containers;
+    }
+
+
+    /** @return value */
+    public Map<String, Set<CollectionInfo>> getContainers( String entityType ) {
+
+        entityType = normalizeEntityType( entityType );
+
+        // Add the application as a container to all entities
+        return addDynamicApplicationCollectionAsContainer( entityContainerCollections.get( entityType ), entityType );
+    }
+
+
+    /** @return value */
+    public CollectionInfo getContainerCollectionLinkedToCollection( String containerType, String collectionName ) {
+
+        CollectionInfo collection = getCollection( containerType, collectionName );
+        if ( collection == null ) {
+            return null;
+        }
+
+        String linkedCollection = collection.getLinkedCollection();
+        if ( linkedCollection == null ) {
+            return null;
+        }
+
+        return getCollection( collection.getType(), linkedCollection );
+    }
+
+
+    /** @return value */
+    public Map<String, Set<CollectionInfo>> getContainersIndexingProperties( String entityType ) {
+
+        entityType = normalizeEntityType( entityType );
+
+        // Add the application as a container indexing some properties by
+        // default
+        return addDynamicApplicationCollectionAsContainer(
+                entityContainerCollectionsIndexingProperties.get( entityType ), entityType );
+    }
+
+
+    /** @return value */
+    public Map<String, Set<CollectionInfo>> getContainersIndexingDictionaries( String entityType ) {
+
+        entityType = normalizeEntityType( entityType );
+
+        // Application does index any sets by default
+        return entityContainerCollectionsIndexingDictionaries.get( entityType );
+    }
+
+
+    /** @return value */
+    public Map<String, Set<CollectionInfo>> getContainersIndexingDynamicSetInfos( String entityType ) {
+
+        entityType = normalizeEntityType( entityType );
+
+        // Application does index dynamic sets by default
+        return entityContainerCollectionsIndexingDynamicDictionaries.get( entityType );
+    }
+
+
+    /** @return value */
+    public Map<String, Set<CollectionInfo>> getContainersIndexingProperty( String entityType, String propertyName ) {
+
+        entityType = normalizeEntityType( entityType );
+
+        Map<String, Map<String, Set<CollectionInfo>>> propertyContainerCollectionsIndexingPropertyInfo =
+                entityPropertyContainerCollectionsIndexingProperty.get( entityType );
+
+        // Application indexes name property by default
+        if ( propertyName.equalsIgnoreCase( PROPERTY_NAME ) || propertyName.equalsIgnoreCase( PROPERTY_CREATED )
+                || propertyName.equalsIgnoreCase( PROPERTY_MODIFIED ) ) {
+            return addDynamicApplicationCollectionAsContainer(
+                    propertyContainerCollectionsIndexingPropertyInfo != null ?
+                    propertyContainerCollectionsIndexingPropertyInfo.get( propertyName ) : null, entityType );
+        }
+
+        if ( propertyContainerCollectionsIndexingPropertyInfo == null ) {
+            return null;
+        }
+
+        return propertyContainerCollectionsIndexingPropertyInfo.get( propertyName );
+    }
+
+
+    /** @return value */
+    public Map<String, Set<CollectionInfo>> getContainersIndexingDictionary( String entityType,
+                                                                             String dictionaryName ) {
+
+        entityType = normalizeEntityType( entityType );
+
+        /*
+         * if (entityType == null) { return null; }
+         */
+
+        Map<String, Map<String, Set<CollectionInfo>>> dictionaryContainerCollectionsIndexingDictionary =
+                entityDictionaryContainerCollectionsIndexingDictionary.get( entityType );
+
+        if ( dictionaryContainerCollectionsIndexingDictionary == null ) {
+            return null;
+        }
+
+        // Application does index any set by default
+        return dictionaryContainerCollectionsIndexingDictionary.get( dictionaryName );
+    }
+
+
+    public static String defaultCollectionName( String entityType ) {
+        try {
+            return collectionNameCache.get( entityType );
+        }
+        catch ( ExecutionException ex ) {
+            ex.printStackTrace();
+        }
+        return _defaultCollectionName( entityType );
+    }
+
+
+    private static String _defaultCollectionName( String entityType ) {
+        entityType = normalizeEntityType( entityType );
+        return pluralize( entityType );
+    }
+
+
+    public static String normalizeEntityType( String entityType ) {
+        return normalizeEntityType( entityType, false );
+    }
+
+
+    public static String getAssociatedEntityType( String entityType ) {
+        if ( entityType == null ) {
+            return null;
+        }
+        entityType = stringOrSubstringAfterLast( entityType, ':' );
+        return normalizeEntityType( entityType, false );
+    }
+
+
+    public static String normalizeEntityType( String entityType, boolean baseType ) {
+        if ( entityType == null ) {
+            return null;
+        }
+        return baseType ? baseEntityTypes.getUnchecked( entityType ) : nonbaseEntityTypes.getUnchecked( entityType );
+    }
+
+
+    /** uncached - use normalizeEntityType() */
+    private static String createNormalizedEntityType( String entityType, boolean baseType ) {
+        if ( baseType ) {
+            int i = entityType.indexOf( ':' );
+            if ( i >= 0 ) {
+                entityType = entityType.substring( 0, i );
+            }
+        }
+        entityType = entityType.toLowerCase();
+        if ( entityType.startsWith( "org.apache.usergrid.persistence" ) ) {
+            entityType = stringOrSubstringAfterLast( entityType, '.' );
+        }
+        entityType = singularize( entityType );
+
+        if ( "dynamicentity".equalsIgnoreCase( entityType ) ) {
+            throw new IllegalArgumentException( entityType + " is not a valid entity type" );
+        }
+
+        // entityType = capitalizeDelimiter(entityType, '.', '_');
+        return entityType;
+    }
+
+
+    public static boolean isAssociatedEntityType( String entityType ) {
+        if ( entityType == null ) {
+            return false;
+        }
+        return entityType.indexOf( ':' ) != -1;
+    }
+
+
+    /** @return value */
+    public EntityInfo getDynamicEntityInfo( String entityType ) {
+
+        entityType = normalizeEntityType( entityType );
+
+        EntityInfo entity = new EntityInfo();
+        entity.setType( entityType );
+
+        Map<String, PropertyInfo> properties = new LinkedHashMap<String, PropertyInfo>();
+        PropertyInfo property = new PropertyInfo();
+        property.setName( PROPERTY_UUID );
+        property.setRequired( true );
+        property.setType( UUID.class );
+        property.setMutable( false );
+        property.setBasic( true );
+        properties.put( PROPERTY_UUID, property );
+
+        property = new PropertyInfo();
+        property.setName( PROPERTY_TYPE );
+        property.setRequired( true );
+        property.setType( String.class );
+        property.setMutable( false );
+        property.setBasic( true );
+        properties.put( PROPERTY_TYPE, property );
+
+        property = new PropertyInfo();
+        property.setName( PROPERTY_NAME );
+        property.setRequired( false );
+        property.setType( String.class );
+        property.setMutable( false );
+        property.setAliasProperty( true );
+        property.setIndexed( true );
+        property.setBasic( true );
+        property.setUnique( true );
+        properties.put( PROPERTY_NAME, property );
+
+        property = new PropertyInfo();
+        property.setName( PROPERTY_CREATED );
+        property.setRequired( true );
+        property.setType( Long.class );
+        property.setMutable( false );
+        property.setIndexed( true );
+        properties.put( PROPERTY_CREATED, property );
+
+        property = new PropertyInfo();
+        property.setName( PROPERTY_MODIFIED );
+        property.setRequired( true );
+        property.setType( Long.class );
+        property.setIndexed( true );
+        properties.put( PROPERTY_MODIFIED, property );
+
+        property = new PropertyInfo();
+        property.setName( PROPERTY_ITEM );
+        property.setRequired( false );
+        property.setType( UUID.class );
+        property.setMutable( false );
+        property.setAliasProperty( false );
+        property.setIndexed( false );
+        properties.put( PROPERTY_ITEM, property );
+
+        property = new PropertyInfo();
+        property.setName( PROPERTY_ITEM_TYPE );
+        property.setRequired( false );
+        property.setType( String.class );
+        property.setMutable( false );
+        property.setAliasProperty( false );
+        property.setIndexed( false );
+        properties.put( PROPERTY_ITEM_TYPE, property );
+
+        property = new PropertyInfo();
+        property.setName( PROPERTY_COLLECTION_NAME );
+        property.setRequired( false );
+        property.setType( String.class );
+        property.setMutable( false );
+        property.setAliasProperty( false );
+        property.setIndexed( false );
+        properties.put( PROPERTY_COLLECTION_NAME, property );
+
+        entity.setProperties( properties );
+
+        Map<String, DictionaryInfo> sets = new LinkedHashMap<String, DictionaryInfo>();
+
+        DictionaryInfo set = new DictionaryInfo();
+        set.setName( DICTIONARY_CONNECTIONS );
+        set.setKeyType( String.class );
+        sets.put( DICTIONARY_CONNECTIONS, set );
+
+        entity.setDictionaries( sets );
+
+        return entity;
+    }
+
+
+    public Map<String, Object> cleanUpdatedProperties( String entityType, Map<String, Object> properties ) {
+        return cleanUpdatedProperties( entityType, properties, false );
+    }
+
+
+    public Map<String, Object> cleanUpdatedProperties( String entityType, Map<String, Object> properties,
+                                                       boolean create ) {
+
+        if ( properties == null ) {
+            return null;
+        }
+
+        entityType = normalizeEntityType( entityType );
+
+        properties.remove( PROPERTY_UUID );
+        properties.remove( PROPERTY_TYPE );
+        properties.remove( PROPERTY_METADATA );
+        properties.remove( PROPERTY_MEMBERSHIP );
+        properties.remove( PROPERTY_CONNECTION );
+
+        Iterator<Entry<String, Object>> iterator = properties.entrySet().iterator();
+        while ( iterator.hasNext() ) {
+            Entry<String, Object> entry = iterator.next();
+            if ( hasProperty( entityType, entry.getKey() ) ) {
+                if ( !create && !isPropertyMutable( entityType, entry.getKey() ) ) {
+                    iterator.remove();
+                    continue;
+                }
+                Object propertyValue = entry.getValue();
+                if ( ( propertyValue instanceof String ) && ( ( ( String ) propertyValue ) == "" ) ) {
+                    propertyValue = null;
+                }
+                if ( ( propertyValue == null ) && isRequiredProperty( entityType, entry.getKey() ) ) {
+                    iterator.remove();
+                }
+            }
+        }
+        return properties;
+    }
+
+
+    public Object validateEntityPropertyValue( String entityType, String propertyName, Object propertyValue )
+            throws PropertyTypeConversionException {
+
+        entityType = normalizeEntityType( entityType );
+
+        if ( ( propertyValue instanceof String ) && ( ( String ) propertyValue ).equals( "" ) ) {
+            propertyValue = null;
+        }
+
+        if ( !hasProperty( entityType, propertyName ) ) {
+            return propertyValue;
+        }
+
+        /*
+         * if (PROPERTY_TYPE.equals(propertyName)) { return
+         * string(propertyValue); } else if (PROPERTY_ID.equals(propertyName)) {
+         * return uuid(propertyValue); }
+         */
+
+        Class<?> type = getPropertyType( entityType, propertyName );
+        if ( type != null ) {
+            // propertyValue = coerce(type, propertyValue);
+            try {
+                propertyValue = mapper.convertValue( propertyValue, type );
+            }
+            catch ( Exception e ) {
+                throw new PropertyTypeConversionException( entityType, propertyName, propertyValue, type, e );
+            }
+        }
+
+        return propertyValue;
+    }
+
+
+    public Object validateEntitySetValue( String entityType, String dictionaryName, Object elementValue ) {
+
+        entityType = normalizeEntityType( entityType );
+
+        if ( ( elementValue instanceof String ) && ( ( String ) elementValue ).equals( "" ) ) {
+            elementValue = null;
+        }
+
+        if ( !hasDictionary( entityType, dictionaryName ) ) {
+            return elementValue;
+        }
+
+        Class<?> type = getDictionaryKeyType( entityType, dictionaryName );
+        if ( type != null ) {
+            // elementValue = coerce(type, elementValue);
+            elementValue = mapper.convertValue( elementValue, type );
+        }
+
+        return elementValue;
+    }
+
+
+    public Entity toEntity( Map<String, Object> map ) {
+        Class<? extends Entity> entityClass = DynamicEntity.class;
+        String type = ( String ) map.get( PROPERTY_TYPE );
+        if ( type != null ) {
+            entityClass = getEntityClass( type );
+        }
+        if ( entityClass == null ) {
+            entityClass = DynamicEntity.class;
+        }
+        Entity entity = mapper.convertValue( map, entityClass );
+        return entity;
+    }
+
+    /*
+     * public Entity toEntity(Reader reader) { Entity entity =
+     * mapper.convertValue(reader, Entity.class); return entity; }
+     * 
+     * public Entity toEntity(InputStream input) { Entity entity =
+     * mapper.convertValue(input, Entity.class); return entity; }
+     * 
+     * public Entity toEntity(String string) { Entity entity =
+     * mapper.convertValue(string, Entity.class); return entity; }
+     */
+
+
+    public Map<String, Object> toMap( Entity entity ) {
+        Map<String, Object> map = mapper.convertValue( entity, new TypeReference<Map<String, Object>>() {} );
+        return map;
+    }
+
+
+    public Object convertToPropertyType( Class<? extends Entity> entityClass, String property, Object value ) {
+        Class<?> cls = getPropertyType( getEntityType( entityClass ), property );
+        if ( cls != null ) {
+            return mapper.convertValue( value, cls );
+        }
+        return value;
+    }
+
+
+    public Object convertToPropertyType( String type, String property, Object value ) {
+        Class<?> cls = getPropertyType( type, property );
+        if ( cls != null ) {
+            return mapper.convertValue( value, cls );
+        }
+        return value;
+    }
+
+
+    public PropertyDescriptor getDescriptorForEntityProperty( Class<? extends Entity> entityClass, String property ) {
+        Map<String, PropertyDescriptor> propertyDescriptors = entityClassPropertyToDescriptor.get( entityClass );
+        if ( propertyDescriptors == null ) {
+            return null;
+        }
+        return propertyDescriptors.get( property );
+    }
+
+
+    public void setEntityProperty( Entity entity, String property, Object value ) {
+        PropertyDescriptor descriptor = getDescriptorForEntityProperty( entity.getClass(), property );
+        if ( descriptor != null ) {
+            Class<?> cls = descriptor.getPropertyType();
+            if ( cls != null ) {
+                if ( ( value == null ) || ( cls.isAssignableFrom( value.getClass() ) ) ) {
+                    try {
+                        descriptor.getWriteMethod().invoke( entity, value );
+                        return;
+                    }
+                    catch ( Exception e ) {
+                        logger.error( "Unable to set entity property " + property, e );
+                    }
+                }
+                try {
+                    descriptor.getWriteMethod().invoke( entity, mapper.convertValue( value, cls ) );
+                    return;
+                }
+                catch ( Exception e ) {
+                    logger.error( "Unable to set entity property " + property, e );
+                }
+            }
+        }
+        entity.setDynamicProperty( property, value );
+    }
+
+
+    public Object getEntityProperty( Entity entity, String property ) {
+        PropertyDescriptor descriptor = getDescriptorForEntityProperty( entity.getClass(), property );
+        if ( descriptor != null ) {
+            try {
+                return descriptor.getReadMethod().invoke( entity );
+            }
+            catch ( Exception e ) {
+                logger.error( "Unable to get entity property " + property, e );
+            }
+            return null;
+        }
+        Map<String, Object> properties = entity.getDynamicProperties();
+        if ( properties != null ) {
+            return properties.get( property );
+        }
+        return null;
+    }
+
+
+    public Map<String, Object> getEntityProperties( Entity entity ) {
+        Map<String, Object> properties = new LinkedHashMap<String, Object>();
+        Map<String, PropertyDescriptor> propertyDescriptors = entityClassPropertyToDescriptor.get( entity.getClass() );
+
+        if ( propertyDescriptors == null ) {
+            registerEntity( entity.getClass() );
+            propertyDescriptors = entityClassPropertyToDescriptor.get( entity.getClass() );
+        }
+
+        for ( Entry<String, PropertyDescriptor> propertyEntry : propertyDescriptors.entrySet() ) {
+            String property = propertyEntry.getKey();
+            PropertyDescriptor descriptor = propertyEntry.getValue();
+            if ( descriptor != null ) {
+                try {
+                    Object value = descriptor.getReadMethod().invoke( entity );
+                    if ( value != null ) {
+                        properties.put( property, value );
+                    }
+                }
+                catch ( Exception e ) {
+                    logger.error( "Unable to get entity property " + property, e );
+                }
+            }
+        }
+        Map<String, Object> dynamicProperties = entity.getDynamicProperties();
+        if ( dynamicProperties != null ) {
+            properties.putAll( dynamicProperties );
+        }
+        return properties;
+    }
+
+
+    public static Map<String, Object> deserializeEntityProperties( Row<UUID, String, ByteBuffer> row ) {
+        if ( row == null ) {
+            return null;
+        }
+        ColumnSlice<String, ByteBuffer> slice = row.getColumnSlice();
+        if ( slice == null ) {
+            return null;
+        }
+        return deserializeEntityProperties( slice.getColumns(), true, false );
+    }
+
+
+    /** @return entity properties from columns as a map */
+    public static Map<String, Object> deserializeEntityProperties( List<HColumn<String, ByteBuffer>> columns ) {
+        return deserializeEntityProperties( CassandraPersistenceUtils.asMap( columns ), true, false );
+    }
+
+
+    public static Map<String, Object> deserializeEntityProperties( Map<String, ByteBuffer> columns ) {
+        return deserializeEntityProperties( columns, true, false );
+    }
+
+
+    public static Map<String, Object> deserializeEntityProperties( List<HColumn<String, ByteBuffer>> columns,
+                                                                   boolean checkId, boolean checkRequired ) {
+        return deserializeEntityProperties( CassandraPersistenceUtils.asMap( columns ), checkId, checkRequired );
+    }
+
+
+    /** @return entity properties from columns as a map */
+    public static Map<String, Object> deserializeEntityProperties( Map<String, ByteBuffer> columns, boolean checkId,
+                                                                   boolean checkRequired ) {
+
+        if ( columns == null ) {
+            return null;
+        }
+
+        String entityType = string( columns.get( PROPERTY_TYPE ) );
+        if ( entityType == null ) {
+            logger.debug( "deserializeEntityProperties(): No type for entity found, entity probably doesn't exist" );
+            return null;
+        }
+        if ( checkId && !columns.containsKey( PROPERTY_UUID ) ) {
+            logger.error( "No id for entity ( {} ) found!", entityType );
+            return null;
+        }
+
+        if ( checkRequired ) {
+            Set<String> required_properties = Schema.getDefaultSchema().getRequiredProperties( entityType );
+            if ( required_properties != null ) {
+                for ( String property_name : required_properties ) {
+                    if ( !columns.containsKey( property_name ) ) {
+                        logger.error( "Entity (" + entityType + ") missing required property: " + property_name,
+                                new Throwable() );
+                        return null;
+                    }
+                }
+            }
+        }
+
+        Map<String, Object> properties_map = new TreeMap<String, Object>( String.CASE_INSENSITIVE_ORDER );
+        for ( Entry<String, ByteBuffer> column : columns.entrySet() ) {
+            String propertyName = column.getKey();
+            Object propertyValue = deserializeEntityProperty( entityType, propertyName, column.getValue() );
+            properties_map.put( propertyName, propertyValue );
+        }
+        return properties_map;
+    }
+
+
+    /** @return object of correct type deserialize from column bytes */
+    public static Object deserializeEntityProperty( String entityType, String propertyName, ByteBuffer bytes ) {
+        Object propertyValue = null;
+        if ( PROPERTY_UUID.equals( propertyName ) ) {
+            propertyValue = uuid( bytes );
+        }
+        else if ( PROPERTY_TYPE.equals( propertyName ) ) {
+            propertyValue = string( bytes );
+        }
+        else {
+            if ( Schema.getDefaultSchema().isPropertyEncrypted( entityType, propertyName ) ) {
+                bytes = decrypt( bytes );
+            }
+            propertyValue = Schema.deserializePropertyValueFromJsonBinary( bytes );
+        }
+        return propertyValue;
+    }
+
+
+    public static ByteBuffer serializeEntityProperty( String entityType, String propertyName, Object propertyValue ) {
+        ByteBuffer bytes = null;
+        if ( PROPERTY_UUID.equals( propertyName ) ) {
+            bytes = bytebuffer( uuid( propertyValue ) );
+        }
+        else if ( PROPERTY_TYPE.equals( propertyName ) ) {
+            bytes = bytebuffer( string( propertyValue ) );
+        }
+        else {
+            bytes = Schema.serializePropertyValueToJsonBinary( toJsonNode( propertyValue ) );
+            if ( Schema.getDefaultSchema().isPropertyEncrypted( entityType, propertyName ) ) {
+                bytes.rewind();
+                bytes = encrypt( bytes );
+            }
+        }
+        return bytes;
+    }
+
+
+    public static ByteBuffer serializePropertyValueToJsonBinary( Object obj ) {
+        return JsonUtils.toByteBuffer( obj );
+    }
+
+
+    public static Object deserializePropertyValueFromJsonBinary( ByteBuffer bytes ) {
+        return JsonUtils.normalizeJsonTree( JsonUtils.fromByteBuffer( bytes ) );
+    }
+
+
+    public static Object deserializePropertyValueFromJsonBinary( ByteBuffer bytes, Class<?> classType ) {
+        return JsonUtils.normalizeJsonTree( JsonUtils.fromByteBuffer( bytes, classType ) );
+    }
+
+
+    public boolean isPropertyEncrypted( String entityType, String propertyName ) {
+
+        EntityInfo entity = getEntityInfo( entityType );
+        if ( entity == null ) {
+            return false;
+        }
+
+        PropertyInfo property = entity.getProperty( propertyName );
+        if ( property == null ) {
+            return false;
+        }
+
+        return property.isEncrypted();
+    }
+
+
+    private static final byte[] DEFAULT_ENCRYPTION_SEED =
+            "oWyWX?I2kZAhkKb_jQ8SZvjmgkiF4eGSjsfIkhnRetD4Dvtx2J".getBytes();
+    private static byte[] encryptionSeed =
+            ( System.getProperty( "encryptionSeed" ) != null ) ? System.getProperty( "encryptionSeed" ).getBytes() :
+            DEFAULT_ENCRYPTION_SEED;
+
+
+    public static ByteBuffer encrypt( ByteBuffer clear ) {
+        if ( clear == null || !clear.hasRemaining() ) {
+            return clear;
+        }
+        try {
+            SecretKeySpec sKeySpec = new SecretKeySpec( getRawKey( encryptionSeed ), "AES" );
+            Cipher cipher = Cipher.getInstance( "AES" );
+            cipher.init( Cipher.ENCRYPT_MODE, sKeySpec );
+            ByteBuffer encrypted = ByteBuffer.allocate( cipher.getOutputSize( clear.remaining() ) );
+            cipher.doFinal( clear, encrypted );
+            encrypted.rewind();
+            return encrypted;
+        }
+        catch ( Exception e ) {
+            throw new IllegalStateException( e );
+        }
+    }
+
+
+    public static ByteBuffer decrypt( ByteBuffer encrypted ) {
+        if ( encrypted == null || !encrypted.hasRemaining() ) {
+            return encrypted;
+        }
+        try {
+            SecretKeySpec sKeySpec = new SecretKeySpec( getRawKey( encryptionSeed ), "AES" );
+            Cipher cipher = Cipher.getInstance( "AES" );
+            cipher.init( Cipher.DECRYPT_MODE, sKeySpec );
+            ByteBuffer decrypted = ByteBuffer.allocate( cipher.getOutputSize( encrypted.remaining() ) );
+            cipher.doFinal( encrypted, decrypted );
+            decrypted.rewind();
+            return decrypted;
+        }
+        catch ( Exception e ) {
+            throw new IllegalStateException( e );
+        }
+    }
+
+
+    private static byte[] getRawKey( byte[] seed ) throws Exception {
+        KeyGenerator keyGenerator = KeyGenerator.getInstance( "AES" );
+        SecureRandom sr = SecureRandom.getInstance( "SHA1PRNG" );
+        sr.setSeed( seed );
+        keyGenerator.init( 128, sr ); // 192 and 256 bits may not be available
+        SecretKey secretKey = keyGenerator.generateKey();
+        return secretKey.getEncoded();
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/SimpleCollectionRef.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/SimpleCollectionRef.java b/stack/core/src/main/java/org/apache/usergrid/persistence/SimpleCollectionRef.java
new file mode 100644
index 0000000..1d4742c
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/SimpleCollectionRef.java
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence;
+
+
+import java.util.UUID;
+
+import org.apache.usergrid.persistence.cassandra.CassandraPersistenceUtils;
+
+
+public class SimpleCollectionRef implements CollectionRef {
+
+    public static final String MEMBER_ENTITY_TYPE = "member";
+
+    protected final EntityRef ownerRef;
+    protected final String collectionName;
+    protected final EntityRef itemRef;
+    protected final String type;
+    protected final UUID id;
+
+
+    public SimpleCollectionRef( EntityRef ownerRef, String collectionName, EntityRef itemRef ) {
+        this.ownerRef = ownerRef;
+        this.collectionName = collectionName;
+        this.itemRef = itemRef;
+        type = itemRef.getType() + ":" + MEMBER_ENTITY_TYPE;
+        id = CassandraPersistenceUtils.keyID( ownerRef.getUuid(), collectionName, itemRef.getUuid() );
+    }
+
+
+    @Override
+    public EntityRef getOwnerEntity() {
+        return ownerRef;
+    }
+
+
+    @Override
+    public String getCollectionName() {
+        return collectionName;
+    }
+
+
+    @Override
+    public EntityRef getItemRef() {
+        return itemRef;
+    }
+
+
+    @Override
+    public UUID getUuid() {
+        return id;
+    }
+
+
+    @Override
+    public String getType() {
+        return type;
+    }
+
+
+    @Override
+    public String toString() {
+        if ( ( type == null ) && ( id == null ) ) {
+            return "CollectionRef(" + SimpleEntityRef.NULL_ID.toString() + ")";
+        }
+        if ( type == null ) {
+            return "CollectionRef(" + id.toString() + ")";
+        }
+        return type + "(" + id + "," + ownerRef + "," + collectionName + "," + itemRef + ")";
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/SimpleEntityRef.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/SimpleEntityRef.java b/stack/core/src/main/java/org/apache/usergrid/persistence/SimpleEntityRef.java
new file mode 100644
index 0000000..20d9d66
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/SimpleEntityRef.java
@@ -0,0 +1,149 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence;
+
+
+import java.util.UUID;
+
+
+public class SimpleEntityRef implements EntityRef {
+
+    public static final UUID NULL_ID = new UUID( 0, 0 );
+
+    protected final String type;
+
+    protected final UUID id;
+
+
+    public SimpleEntityRef( UUID id ) {
+        this.id = id;
+        type = null;
+    }
+
+
+    public SimpleEntityRef( String type, UUID id ) {
+        this.type = type;
+        this.id = id;
+    }
+
+
+    public SimpleEntityRef( EntityRef entityRef ) {
+        type = entityRef.getType();
+        id = entityRef.getUuid();
+    }
+
+
+    public static EntityRef ref() {
+        return new SimpleEntityRef( null, null );
+    }
+
+
+    @Override
+    public UUID getUuid() {
+        return id;
+    }
+
+
+    @Override
+    public String getType() {
+        return type;
+    }
+
+
+    public static EntityRef ref( String entityType, UUID entityId ) {
+        return new SimpleEntityRef( entityType, entityId );
+    }
+
+
+    public static EntityRef ref( UUID entityId ) {
+        return new SimpleEntityRef( null, entityId );
+    }
+
+
+    public static EntityRef ref( EntityRef ref ) {
+        return new SimpleEntityRef( ref );
+    }
+
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ( ( id == null ) ? 0 : id.hashCode() );
+        result = prime * result + ( ( type == null ) ? 0 : type.hashCode() );
+        return result;
+    }
+
+
+    @Override
+    public boolean equals( Object obj ) {
+        if ( this == obj ) {
+            return true;
+        }
+        if ( obj == null ) {
+            return false;
+        }
+        if ( getClass() != obj.getClass() ) {
+            return false;
+        }
+        SimpleEntityRef other = ( SimpleEntityRef ) obj;
+        if ( id == null ) {
+            if ( other.id != null ) {
+                return false;
+            }
+        }
+        else if ( !id.equals( other.id ) ) {
+            return false;
+        }
+        if ( type == null ) {
+            if ( other.type != null ) {
+                return false;
+            }
+        }
+        else if ( !type.equals( other.type ) ) {
+            return false;
+        }
+        return true;
+    }
+
+
+    @Override
+    public String toString() {
+        if ( ( type == null ) && ( id == null ) ) {
+            return "EntityRef(" + NULL_ID.toString() + ")";
+        }
+        if ( type == null ) {
+            return "EntityRef(" + id.toString() + ")";
+        }
+        return type + "(" + id + ")";
+    }
+
+
+    public static UUID getUuid( EntityRef ref ) {
+        if ( ref == null ) {
+            return null;
+        }
+        return ref.getUuid();
+    }
+
+
+    public static String getType( EntityRef ref ) {
+        if ( ref == null ) {
+            return null;
+        }
+        return ref.getType();
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/SimpleRoleRef.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/SimpleRoleRef.java b/stack/core/src/main/java/org/apache/usergrid/persistence/SimpleRoleRef.java
new file mode 100644
index 0000000..0b07ea1
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/SimpleRoleRef.java
@@ -0,0 +1,125 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence;
+
+
+import java.util.UUID;
+
+import org.apache.usergrid.persistence.cassandra.CassandraPersistenceUtils;
+import org.apache.usergrid.persistence.entities.Group;
+import org.apache.usergrid.utils.StringUtils;
+import org.apache.usergrid.utils.UUIDUtils;
+import org.springframework.util.Assert;
+
+
+public class SimpleRoleRef implements RoleRef {
+
+    protected final UUID groupId;
+    protected final String roleName;
+    protected final UUID id;
+
+
+    public SimpleRoleRef( String roleName ) {
+        this( null, roleName );
+    }
+
+
+    public SimpleRoleRef( UUID groupId, String roleName ) {
+        Assert.notNull( roleName );
+        if ( groupId != null ) {
+            this.groupId = groupId;
+        }
+        else {
+            this.groupId = UUIDUtils.tryExtractUUID( roleName );
+        }
+        this.roleName = StringUtils.stringOrSubstringAfterLast( roleName.toLowerCase(), ':' );
+        if ( groupId == null ) {
+            id = CassandraPersistenceUtils.keyID( "role", this.groupId, this.roleName );
+        }
+        else {
+            id = CassandraPersistenceUtils.keyID( "role", this.roleName );
+        }
+    }
+
+
+    public static SimpleRoleRef forRoleEntity( Entity role ) {
+        if ( role == null ) {
+            return null;
+        }
+        UUID groupId = ( UUID ) role.getProperty( "group" );
+        String name = role.getName();
+        return new SimpleRoleRef( groupId, name );
+    }
+
+
+    public static SimpleRoleRef forRoleName( String roleName ) {
+        return new SimpleRoleRef( null, roleName );
+    }
+
+
+    public static SimpleRoleRef forGroupIdAndRoleName( UUID groupId, String roleName ) {
+        return new SimpleRoleRef( groupId, roleName );
+    }
+
+
+    public static UUID getIdForRoleName( String roleName ) {
+        return forRoleName( roleName ).getUuid();
+    }
+
+
+    public static UUID getIdForGroupIdAndRoleName( UUID groupId, String roleName ) {
+        return forGroupIdAndRoleName( groupId, roleName ).getUuid();
+    }
+
+
+    @Override
+    public UUID getUuid() {
+        return id;
+    }
+
+
+    @Override
+    public String getType() {
+        return "role";
+    }
+
+
+    @Override
+    public EntityRef getGroupRef() {
+        return new SimpleEntityRef( Group.ENTITY_TYPE, groupId );
+    }
+
+
+    @Override
+    public String getRoleName() {
+        return roleName;
+    }
+
+
+    @Override
+    public UUID getGroupId() {
+        return groupId;
+    }
+
+
+    @Override
+    public String getApplicationRoleName() {
+        if ( groupId == null ) {
+            return roleName;
+        }
+        return groupId + ":" + roleName;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/TypedEntity.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/TypedEntity.java b/stack/core/src/main/java/org/apache/usergrid/persistence/TypedEntity.java
new file mode 100644
index 0000000..36e38fe
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/TypedEntity.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence;
+
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+
+/**
+ * TypedEntity is the abstract superclass for all typed entities. A typed entity refers to an entity that has a concrete
+ * Java class mapped to it. Entities do not need to have concrete typed classes, the service interacts with entities in
+ * an entirely dynamic fashion and uses the Schema class to determine relationships and property types, however using
+ * the typed entity classes can be more convenient.
+ *
+ * @author edanuff
+ */
+@XmlRootElement
+public abstract class TypedEntity extends AbstractEntity {
+
+    @Override
+    public Entity toTypedEntity() {
+        return this;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/Update.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/Update.java b/stack/core/src/main/java/org/apache/usergrid/persistence/Update.java
new file mode 100644
index 0000000..013d490
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/Update.java
@@ -0,0 +1,75 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence;
+
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+public class Update {
+
+    private List<UpdateOperation> operationList = new ArrayList<UpdateOperation>();
+
+
+    public class UpdateOperation {
+        String propertyName;
+        UpdateOperator operator;
+        Object value;
+
+
+        UpdateOperation( String propertyName, UpdateOperator operator, Object value ) {
+            this.propertyName = propertyName;
+            this.operator = operator;
+            this.value = value;
+        }
+
+
+        public String getPropertyName() {
+            return propertyName;
+        }
+
+
+        public UpdateOperator getOperator() {
+            return operator;
+        }
+
+
+        public Object getValue() {
+            return value;
+        }
+    }
+
+
+    public static enum UpdateOperator {
+        UPDATE, DELETE, ADD_TO_LIST, REMOVE_FROM_LIST;
+    }
+
+
+    public Update() {
+    }
+
+
+    public void add( String propertyName, UpdateOperator operator, Object value ) {
+        UpdateOperation operation = new UpdateOperation( propertyName, operator, value );
+        operationList.add( operation );
+    }
+
+
+    public void clear() {
+        operationList = new ArrayList<UpdateOperation>();
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/annotations/EntityCollection.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/annotations/EntityCollection.java b/stack/core/src/main/java/org/apache/usergrid/persistence/annotations/EntityCollection.java
new file mode 100644
index 0000000..332782b
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/annotations/EntityCollection.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.annotations;
+
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+
+@Target(value = { ElementType.METHOD, ElementType.FIELD })
+@Retention(RetentionPolicy.RUNTIME)
+public @interface EntityCollection {
+    String type();
+
+    String[] dictionariesIndexed() default { };
+
+    boolean indexingDynamicDictionaries() default false;
+
+    String linkedCollection() default "";
+
+    boolean publicVisible() default true;
+
+    boolean reversed() default false;
+
+    boolean includedInExport() default true;
+
+    String sort() default "";
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/annotations/EntityDictionary.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/annotations/EntityDictionary.java b/stack/core/src/main/java/org/apache/usergrid/persistence/annotations/EntityDictionary.java
new file mode 100644
index 0000000..539f8d4
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/annotations/EntityDictionary.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.annotations;
+
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+
+@Target(value = { ElementType.METHOD, ElementType.FIELD })
+@Retention(RetentionPolicy.RUNTIME)
+public @interface EntityDictionary {
+
+    Class<?> keyType();
+
+    boolean keysIndexedInConnections() default false;
+
+    Class<?> valueType() default Object.class;
+
+    boolean publicVisible() default true;
+
+    boolean includedInExport() default true;
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/annotations/EntityProperty.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/annotations/EntityProperty.java b/stack/core/src/main/java/org/apache/usergrid/persistence/annotations/EntityProperty.java
new file mode 100644
index 0000000..6adee94
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/annotations/EntityProperty.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.annotations;
+
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+
+@Target(value = { ElementType.METHOD, ElementType.FIELD })
+@Retention(RetentionPolicy.RUNTIME)
+public @interface EntityProperty {
+
+    String name() default "";
+
+    boolean indexed() default true;
+
+    boolean basic() default false;
+
+    boolean required() default false;
+
+    boolean mutable() default true;
+
+    boolean unique() default false;
+
+    boolean aliasProperty() default false;
+
+    boolean pathBasedName() default false;
+
+    boolean fulltextIndexed() default false;
+
+    boolean publicVisible() default false;
+
+    boolean includedInExport() default true;
+
+    boolean timestamp() default false;
+
+    boolean encrypted() default false;
+}


[04/96] [abbrv] [partial] Change package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/utils/ConversionUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/utils/ConversionUtils.java b/stack/core/src/main/java/org/usergrid/utils/ConversionUtils.java
deleted file mode 100644
index 83cd5e4..0000000
--- a/stack/core/src/main/java/org/usergrid/utils/ConversionUtils.java
+++ /dev/null
@@ -1,765 +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.usergrid.utils;
-
-
-import java.io.UnsupportedEncodingException;
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.commons.lang.math.NumberUtils;
-
-
-/** Convenience methods for converting to and from formats, primarily between byte arrays and UUIDs, Strings,
- * and Longs. */
-public class ConversionUtils {
-
-    private static final Logger logger = LoggerFactory.getLogger( ConversionUtils.class );
-
-    /**
-     *
-     */
-    public static final String UTF8_ENCODING = "UTF-8";
-
-    /**
-     *
-     */
-    public static final String ASCII_ENCODING = "US-ASCII";
-
-    public static final ByteBuffer HOLDER = ByteBuffer.wrap( new byte[] { 0 } );
-
-
-    /**
-     * @param uuid
-     * @return
-     */
-    public static UUID uuid( byte[] uuid ) {
-        return uuid( uuid, 0 );
-    }
-
-
-    /**
-     * @param uuid
-     * @param offset
-     * @return
-     */
-    public static UUID uuid( byte[] uuid, int offset ) {
-        ByteBuffer bb = ByteBuffer.wrap( uuid, offset, 16 );
-        return new UUID( bb.getLong(), bb.getLong() );
-    }
-
-
-    public static UUID uuid( ByteBuffer bb ) {
-        if ( bb == null ) {
-            return null;
-        }
-        if ( bb.remaining() < 16 ) {
-            return null;
-        }
-        bb = bb.slice();
-        return new UUID( bb.getLong(), bb.getLong() );
-    }
-
-
-    /**
-     * @param uuid
-     * @return
-     */
-    public static UUID uuid( String uuid ) {
-        try {
-            return UUID.fromString( uuid );
-        }
-        catch ( Exception e ) {
-            logger.error( "Bad UUID", e );
-        }
-        return UUIDUtils.ZERO_UUID;
-    }
-
-
-    /**
-     * @param obj
-     * @return
-     */
-    public static UUID uuid( Object obj ) {
-        return uuid( obj, UUIDUtils.ZERO_UUID );
-    }
-
-
-    public static UUID uuid( Object obj, UUID defaultValue ) {
-        if ( obj instanceof UUID ) {
-            return ( UUID ) obj;
-        }
-        else if ( obj instanceof byte[] ) {
-            return uuid( ( byte[] ) obj );
-        }
-        else if ( obj instanceof ByteBuffer ) {
-            return uuid( ( ByteBuffer ) obj );
-        }
-        else if ( obj instanceof String ) {
-            return uuid( ( String ) obj );
-        }
-        return defaultValue;
-    }
-
-
-    /**
-     * @param uuid
-     * @return
-     */
-    public static byte[] bytes( UUID uuid ) {
-        if ( uuid == null ) {
-            return null;
-        }
-        long msb = uuid.getMostSignificantBits();
-        long lsb = uuid.getLeastSignificantBits();
-        byte[] buffer = new byte[16];
-
-        for ( int i = 0; i < 8; i++ ) {
-            buffer[i] = ( byte ) ( msb >>> ( 8 * ( 7 - i ) ) );
-        }
-        for ( int i = 8; i < 16; i++ ) {
-            buffer[i] = ( byte ) ( lsb >>> ( 8 * ( 7 - i ) ) );
-        }
-
-        return buffer;
-    }
-
-
-    public static ByteBuffer bytebuffer( UUID uuid ) {
-        if ( uuid == null ) {
-            return null;
-        }
-        return ByteBuffer.wrap( bytes( uuid ) );
-    }
-
-
-    /**
-     * @param uuid
-     * @return
-     */
-    public static byte[] uuidToBytesNullOk( UUID uuid ) {
-        if ( uuid != null ) {
-            return bytes( uuid );
-        }
-        return new byte[16];
-    }
-
-
-    /**
-     * @param s
-     * @return
-     */
-    public static byte[] bytes( String s ) {
-        return bytes( s, UTF8_ENCODING );
-    }
-
-
-    public static ByteBuffer bytebuffer( String s ) {
-        return ByteBuffer.wrap( bytes( s ) );
-    }
-
-
-    /**
-     * @param s
-     * @return
-     */
-    public static byte[] ascii( String s ) {
-        if ( s == null ) {
-            return new byte[0];
-        }
-        return bytes( s, ASCII_ENCODING );
-    }
-
-
-    public ByteBuffer asciibuffer( String s ) {
-        return ByteBuffer.wrap( ascii( s ) );
-    }
-
-
-    /**
-     * @param s
-     * @param encoding
-     * @return
-     */
-    public static byte[] bytes( String s, String encoding ) {
-        try {
-            return s.getBytes( encoding );
-        }
-        catch ( UnsupportedEncodingException e ) {
-            // logger.log(Level.SEVERE, "UnsupportedEncodingException ", e);
-            throw new RuntimeException( e );
-        }
-    }
-
-
-    public static byte[] bytes( ByteBuffer bb ) {
-        byte[] b = new byte[bb.remaining()];
-        bb.duplicate().get( b );
-        return b;
-    }
-
-
-    public static ByteBuffer bytebuffer( String s, String encoding ) {
-        return ByteBuffer.wrap( bytes( s, encoding ) );
-    }
-
-
-    /**
-     * @param b
-     * @return
-     */
-    public static byte[] bytes( Boolean b ) {
-        byte[] bytes = new byte[1];
-        bytes[0] = b ? ( byte ) 1 : 0;
-        return bytes;
-    }
-
-
-    public static ByteBuffer bytebuffer( Boolean b ) {
-        return ByteBuffer.wrap( bytes( b ) );
-    }
-
-
-    /**
-     * @param val
-     * @return
-     */
-    public static byte[] bytes( Long val ) {
-        ByteBuffer buf = ByteBuffer.allocate( 8 );
-        buf.order( ByteOrder.BIG_ENDIAN );
-        buf.putLong( val );
-        return buf.array();
-    }
-
-
-    public static ByteBuffer bytebuffer( Long val ) {
-        ByteBuffer buf = ByteBuffer.allocate( 8 );
-        buf.order( ByteOrder.BIG_ENDIAN );
-        buf.putLong( val );
-        return ( ByteBuffer ) buf.rewind();
-    }
-
-
-    /**
-     * @param obj
-     * @return
-     */
-    public static byte[] bytes( Object obj ) {
-        if ( obj == null ) {
-            return new byte[0];
-        }
-        else if ( obj instanceof byte[] ) {
-            return ( byte[] ) obj;
-        }
-        else if ( obj instanceof Long ) {
-            return bytes( ( Long ) obj );
-        }
-        else if ( obj instanceof String ) {
-            return bytes( ( String ) obj );
-        }
-        else if ( obj instanceof UUID ) {
-            return bytes( ( UUID ) obj );
-        }
-        else if ( obj instanceof Boolean ) {
-            return bytes( ( Boolean ) obj );
-        }
-        else if ( obj instanceof Date ) {
-            return bytes( ( ( Date ) obj ).getTime() );
-        }
-        else {
-            return bytes( obj.toString() );
-        }
-    }
-
-
-    public static ByteBuffer bytebuffer( byte[] bytes ) {
-        return ByteBuffer.wrap( bytes );
-    }
-
-
-    public static ByteBuffer bytebuffer( ByteBuffer bytes ) {
-        return bytes.duplicate();
-    }
-
-
-    public static ByteBuffer bytebuffer( Object obj ) {
-        if ( obj instanceof ByteBuffer ) {
-            return ( ( ByteBuffer ) obj ).duplicate();
-        }
-        return ByteBuffer.wrap( bytes( obj ) );
-    }
-
-
-    public static List<ByteBuffer> bytebuffers( List<?> l ) {
-        List<ByteBuffer> results = new ArrayList<ByteBuffer>( l.size() );
-        for ( Object o : l ) {
-            results.add( bytebuffer( o ) );
-        }
-        return results;
-    }
-
-
-    /**
-     * @param bytes
-     * @return
-     */
-    public static boolean getBoolean( byte[] bytes ) {
-        return bytes[0] != 0;
-    }
-
-
-    public static boolean getBoolean( ByteBuffer bytes ) {
-        return bytes.slice().get() != 0;
-    }
-
-
-    /**
-     * @param bytes
-     * @param offset
-     * @return
-     */
-    public static boolean getBoolean( byte[] bytes, int offset ) {
-        return bytes[offset] != 0;
-    }
-
-
-    public static boolean getBoolean( Object obj ) {
-        if ( obj instanceof Boolean ) {
-            return ( Boolean ) obj;
-        }
-        else if ( obj instanceof String ) {
-            return Boolean.parseBoolean( ( String ) obj );
-        }
-        else if ( obj instanceof Number ) {
-            return ( ( Number ) obj ).longValue() > 0;
-        }
-
-        return false;
-    }
-
-
-    /**
-     * @param obj
-     * @return
-     */
-    public static String string( Object obj ) {
-        if ( obj instanceof String ) {
-            return ( String ) obj;
-        }
-        else if ( obj instanceof byte[] ) {
-            return string( ( byte[] ) obj );
-        }
-        else if ( obj instanceof ByteBuffer ) {
-            return string( ( ByteBuffer ) obj );
-        }
-        else if ( obj != null ) {
-            return obj.toString();
-        }
-        return null;
-    }
-
-
-    /**
-     * @param bytes
-     * @return
-     */
-    public static String string( byte[] bytes ) {
-        if ( bytes == null ) {
-            return null;
-        }
-        return string( bytes, 0, bytes.length, UTF8_ENCODING );
-    }
-
-
-    public static String string( ByteBuffer bytes ) {
-        if ( bytes == null ) {
-            return null;
-        }
-        return string( bytes.array(), bytes.arrayOffset() + bytes.position(), bytes.remaining(), UTF8_ENCODING );
-    }
-
-
-    /**
-     * @param bytes
-     * @param offset
-     * @param length
-     * @return
-     */
-    public static String string( byte[] bytes, int offset, int length ) {
-        return string( bytes, offset, length, UTF8_ENCODING );
-    }
-
-
-    /**
-     * @param bytes
-     * @param offset
-     * @param length
-     * @param encoding
-     * @return
-     */
-    public static String string( byte[] bytes, int offset, int length, String encoding ) {
-
-        if ( length <= 0 ) {
-            return "";
-        }
-
-        if ( bytes == null ) {
-            return "";
-        }
-
-        try {
-            return new String( bytes, offset, length, encoding );
-        }
-        catch ( UnsupportedEncodingException e ) {
-            // logger.log(Level.SEVERE, "UnsupportedEncodingException ", e);
-            throw new RuntimeException( e );
-        }
-    }
-
-
-    public static <T> List<String> strings( Collection<T> items ) {
-        List<String> strings = new ArrayList<String>();
-        for ( T item : items ) {
-            strings.add( string( item ) );
-        }
-        return strings;
-    }
-
-
-    /**
-     * @param bytes
-     * @param offset
-     * @return
-     */
-    public static String stringFromLong( byte[] bytes, int offset ) {
-        if ( bytes.length == 0 ) {
-            return "";
-        }
-        if ( ( bytes.length - offset ) < 8 ) {
-            throw new IllegalArgumentException( "A long is at least 8 bytes" );
-        }
-        return String.valueOf( ByteBuffer.wrap( bytes, offset, 8 ).getLong() );
-    }
-
-
-    /**
-     * @param bytes
-     * @return
-     */
-    public static long getLong( byte[] bytes ) {
-        return ByteBuffer.wrap( bytes, 0, 8 ).getLong();
-    }
-
-
-    public static long getLong( ByteBuffer bytes ) {
-        return bytes.slice().getLong();
-    }
-
-
-    public static long getLong( Object obj ) {
-        if ( obj instanceof Long ) {
-            return ( Long ) obj;
-        }
-        if ( obj instanceof Number ) {
-            return ( ( Number ) obj ).longValue();
-        }
-        if ( obj instanceof String ) {
-            return NumberUtils.toLong( ( String ) obj );
-        }
-        if ( obj instanceof Date ) {
-            return ( ( Date ) obj ).getTime();
-        }
-        if ( obj instanceof byte[] ) {
-            return getLong( ( byte[] ) obj );
-        }
-        if ( obj instanceof ByteBuffer ) {
-            return getLong( ( ByteBuffer ) obj );
-        }
-        return 0;
-    }
-
-
-    /**
-     * @param bytes
-     * @return
-     */
-    public static int getInt( byte[] bytes ) {
-        return ByteBuffer.wrap( bytes, 0, 4 ).getInt();
-    }
-
-
-    public static int getInt( ByteBuffer bytes ) {
-        return bytes.slice().getInt();
-    }
-
-
-    public static int getInt( Object obj ) {
-        if ( obj instanceof Integer ) {
-            return ( Integer ) obj;
-        }
-        if ( obj instanceof Number ) {
-            return ( ( Number ) obj ).intValue();
-        }
-        if ( obj instanceof String ) {
-            return NumberUtils.toInt( ( String ) obj );
-        }
-        if ( obj instanceof Date ) {
-            return ( int ) ( ( Date ) obj ).getTime();
-        }
-        if ( obj instanceof byte[] ) {
-            return getInt( ( byte[] ) obj );
-        }
-        if ( obj instanceof ByteBuffer ) {
-            return getInt( ( ByteBuffer ) obj );
-        }
-        return 0;
-    }
-
-
-    /**
-     * @param bytes
-     * @return
-     */
-    public static float getFloat( byte[] bytes ) {
-        return ByteBuffer.wrap( bytes, 0, 4 ).getFloat();
-    }
-
-
-    public static float getFloat( ByteBuffer bytes ) {
-        return bytes.slice().getFloat();
-    }
-
-
-    public static float getFloat( Object obj ) {
-        if ( obj instanceof Float ) {
-            return ( Float ) obj;
-        }
-        if ( obj instanceof Number ) {
-            return ( ( Number ) obj ).floatValue();
-        }
-        if ( obj instanceof String ) {
-            return NumberUtils.toFloat( ( String ) obj );
-        }
-        if ( obj instanceof Date ) {
-            return ( ( Date ) obj ).getTime();
-        }
-        if ( obj instanceof byte[] ) {
-            return getFloat( ( byte[] ) obj );
-        }
-        if ( obj instanceof ByteBuffer ) {
-            return getFloat( ( ByteBuffer ) obj );
-        }
-        return 0;
-    }
-
-
-    public static double getDouble( byte[] bytes ) {
-        return ByteBuffer.wrap( bytes, 0, 8 ).getDouble();
-    }
-
-
-    public static double getDouble( ByteBuffer bytes ) {
-        return bytes.slice().getDouble();
-    }
-
-
-    public static double getDouble( Object obj ) {
-        if ( obj instanceof Double ) {
-            return ( Double ) obj;
-        }
-        if ( obj instanceof Number ) {
-            return ( ( Number ) obj ).doubleValue();
-        }
-        if ( obj instanceof String ) {
-            return NumberUtils.toDouble( ( String ) obj );
-        }
-        if ( obj instanceof Date ) {
-            return ( ( Date ) obj ).getTime();
-        }
-        if ( obj instanceof byte[] ) {
-            return getDouble( ( byte[] ) obj );
-        }
-        if ( obj instanceof ByteBuffer ) {
-            return getDouble( ( ByteBuffer ) obj );
-        }
-        return 0;
-    }
-
-
-    /**
-     * @param type
-     * @param bytes
-     * @return
-     */
-    public static Object object( Class<?> type, byte[] bytes ) {
-
-        try {
-            if ( Long.class.isAssignableFrom( type ) ) {
-                return getLong( bytes );
-            }
-            else if ( UUID.class.isAssignableFrom( type ) ) {
-                return uuid( bytes );
-            }
-            else if ( String.class.isAssignableFrom( type ) ) {
-                return string( bytes );
-            }
-            else if ( Boolean.class.isAssignableFrom( type ) ) {
-                return getBoolean( bytes );
-            }
-            else if ( Integer.class.isAssignableFrom( type ) ) {
-                return getInt( bytes );
-            }
-            else if ( Double.class.isAssignableFrom( type ) ) {
-                return getDouble( bytes );
-            }
-            else if ( Float.class.isAssignableFrom( type ) ) {
-                return getFloat( bytes );
-            }
-            else if ( byte[].class.isAssignableFrom( type ) ) {
-                return bytes;
-            }
-        }
-        catch ( Exception e ) {
-            logger.error( "Unable to get object from bytes for type " + type.getName(), e );
-        }
-        return null;
-    }
-
-
-    public static Object object( Class<?> type, ByteBuffer bytes ) {
-
-        try {
-            if ( Long.class.isAssignableFrom( type ) ) {
-                return bytes.slice().getLong();
-            }
-            else if ( UUID.class.isAssignableFrom( type ) ) {
-                return uuid( bytes );
-            }
-            else if ( String.class.isAssignableFrom( type ) ) {
-                return string( bytes );
-            }
-            else if ( Boolean.class.isAssignableFrom( type ) ) {
-                return bytes.slice().get() != 0;
-            }
-            else if ( Integer.class.isAssignableFrom( type ) ) {
-                return bytes.slice().getInt();
-            }
-            else if ( Double.class.isAssignableFrom( type ) ) {
-                return bytes.slice().getDouble();
-            }
-            else if ( Float.class.isAssignableFrom( type ) ) {
-                return bytes.slice().getFloat();
-            }
-            else if ( ByteBuffer.class.isAssignableFrom( type ) ) {
-                return bytes.duplicate();
-            }
-            else if ( byte[].class.isAssignableFrom( type ) ) {
-                byte[] b = new byte[bytes.remaining()];
-                bytes.slice().get( b );
-                return b;
-            }
-        }
-        catch ( Exception e ) {
-            logger.error( "Unable to get object from bytes for type " + type.getName(), e );
-        }
-        return null;
-    }
-
-
-    /**
-     * @param bb
-     * @param bytes
-     * @param len
-     * @return
-     */
-    public static ByteBuffer appendToByteBuffer( ByteBuffer bb, byte[] bytes, int len ) {
-        if ( len > bytes.length ) {
-            int pos = bb.position();
-            bb.put( bytes );
-            bb.position( pos + len );
-        }
-        else {
-            bb.put( bytes, 0, len );
-        }
-        return bb;
-    }
-
-
-    public static Object coerce( Class<?> type, Object obj ) {
-
-        if ( obj == null ) {
-            return null;
-        }
-
-        if ( type == null ) {
-            return obj;
-        }
-
-        try {
-            if ( Long.class.isAssignableFrom( type ) ) {
-                return getLong( obj );
-            }
-            else if ( UUID.class.isAssignableFrom( type ) ) {
-                return uuid( obj );
-            }
-            else if ( String.class.isAssignableFrom( type ) ) {
-                return string( obj );
-            }
-            else if ( Boolean.class.isAssignableFrom( type ) ) {
-                return getBoolean( obj );
-            }
-            else if ( Integer.class.isAssignableFrom( type ) ) {
-                return getInt( obj );
-            }
-            else if ( Double.class.isAssignableFrom( type ) ) {
-                return getDouble( obj );
-            }
-            else if ( Float.class.isAssignableFrom( type ) ) {
-                return getFloat( obj );
-            }
-            else if ( byte[].class.isAssignableFrom( type ) ) {
-                return bytes( obj );
-            }
-            else if ( ByteBuffer.class.isAssignableFrom( type ) ) {
-                return bytebuffer( obj );
-            }
-        }
-        catch ( Exception e ) {
-            logger.error( "Unable to get object from bytes for type " + type.getName(), e );
-        }
-        return null;
-    }
-
-
-    public static Map<String, Object> coerceMap( Map<String, Class<?>> types, Map<String, Object> values ) {
-        for ( Map.Entry<String, Object> entry : values.entrySet() ) {
-            if ( types.containsKey( entry.getKey() ) ) {
-                values.put( entry.getKey(), coerce( types.get( entry.getKey() ), entry.getValue() ) );
-            }
-        }
-        return values;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/utils/DateUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/utils/DateUtils.java b/stack/core/src/main/java/org/usergrid/utils/DateUtils.java
deleted file mode 100644
index b13922b..0000000
--- a/stack/core/src/main/java/org/usergrid/utils/DateUtils.java
+++ /dev/null
@@ -1,88 +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.
- */
-
-// Copyright 2010-2011 Amazon.com, Inc. or its affiliates. All Rights Reserved.
-//
-// Portions copyright 2006-2009 James Murty. Please see LICENSE.txt
-// for applicable license terms and NOTICE.txt for applicable notices.
-//
-// Licensed under the Apache License, Version 2.0 (the "License").
-// You may not use this file except in compliance with the License.
-// A copy of the License is located at
-//  http://aws.amazon.com/apache2.0
-// or in the "license" file accompanying this file. This file 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.usergrid.utils;
-
-
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.Locale;
-import java.util.SimpleTimeZone;
-
-
-/**
- * Utilities for parsing and formatting dates.
- * <p/>
- * Note that this class doesn't use static methods because of the synchronization issues with SimpleDateFormat. This
- * lets synchronization be done on a per-object level, instead of on a per-class level.
- */
-public class DateUtils {
-
-    /** ISO 8601 parser */
-    protected final SimpleDateFormat iso8601DateParser = new SimpleDateFormat( "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'" );
-
-    /** Alternate ISO 8601 parser without fractional seconds */
-    protected final SimpleDateFormat alternateIo8601DateParser = new SimpleDateFormat( "yyyy-MM-dd'T'HH:mm:ss'Z'" );
-
-    /** RFC 822 parser */
-    protected final SimpleDateFormat rfc822DateParser =
-            new SimpleDateFormat( "EEE, dd MMM yyyy HH:mm:ss z", Locale.US );
-
-
-    /** Constructs a new DateUtils object, ready to parse/format dates. */
-    public DateUtils() {
-        iso8601DateParser.setTimeZone( new SimpleTimeZone( 0, "GMT" ) );
-        rfc822DateParser.setTimeZone( new SimpleTimeZone( 0, "GMT" ) );
-        alternateIo8601DateParser.setTimeZone( new SimpleTimeZone( 0, "GMT" ) );
-    }
-
-
-    public static DateUtils instance = new DateUtils();
-
-
-    /**
-     * Formats the specified date as an ISO 8601 string.
-     *
-     * @param date The date to format.
-     *
-     * @return The ISO 8601 string representing the specified date.
-     */
-    public String formatIso8601Date( Date date ) {
-        synchronized ( iso8601DateParser ) {
-            return iso8601DateParser.format( date );
-        }
-    }
-
-
-    public String iso8601DateNow() {
-        return formatIso8601Date( new Date() );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/utils/HttpUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/utils/HttpUtils.java b/stack/core/src/main/java/org/usergrid/utils/HttpUtils.java
deleted file mode 100644
index a088a37..0000000
--- a/stack/core/src/main/java/org/usergrid/utils/HttpUtils.java
+++ /dev/null
@@ -1,51 +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.usergrid.utils;
-
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.http.NameValuePair;
-import org.apache.http.client.utils.URLEncodedUtils;
-
-
-public class HttpUtils {
-
-    public static Map<String, List<String>> parseQueryString( String queryString ) {
-        Map<String, List<String>> mapOfLists = new HashMap<String, List<String>>();
-        if ( ( queryString == null ) || ( queryString.length() == 0 ) ) {
-            return mapOfLists;
-        }
-        List<NameValuePair> list = URLEncodedUtils.parse( URI.create( "http://localhost/?" + queryString ), "UTF-8" );
-        for ( NameValuePair pair : list ) {
-            List<String> values = mapOfLists.get( pair.getName() );
-            if ( values == null ) {
-                values = new ArrayList<String>();
-                mapOfLists.put( pair.getName(), values );
-            }
-            if ( pair.getValue() != null ) {
-                values.add( pair.getValue() );
-            }
-        }
-
-        return mapOfLists;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/utils/IndexUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/utils/IndexUtils.java b/stack/core/src/main/java/org/usergrid/utils/IndexUtils.java
deleted file mode 100644
index 91f2a87..0000000
--- a/stack/core/src/main/java/org/usergrid/utils/IndexUtils.java
+++ /dev/null
@@ -1,218 +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.usergrid.utils;
-
-
-import java.io.IOException;
-import java.io.StringReader;
-import java.util.AbstractMap;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.UUID;
-
-import org.apache.lucene.analysis.Analyzer;
-import org.apache.lucene.analysis.TokenStream;
-import org.apache.lucene.analysis.standard.StandardAnalyzer;
-import org.apache.lucene.analysis.tokenattributes.TermAttribute;
-import org.apache.lucene.util.Version;
-
-import static org.usergrid.utils.ClassUtils.cast;
-import static org.usergrid.utils.ClassUtils.isBasicType;
-import static org.usergrid.utils.JsonUtils.quoteString;
-import static org.usergrid.utils.JsonUtils.toJsonNode;
-
-import org.codehaus.jackson.JsonNode;
-import org.codehaus.jackson.node.ArrayNode;
-import org.codehaus.jackson.node.ObjectNode;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-public class IndexUtils {
-
-    private static final Logger LOG = LoggerFactory.getLogger( IndexUtils.class );
-
-    static Analyzer analyzer = new StandardAnalyzer( Version.LUCENE_30 );
-
-
-    private static void buildKeyValueSet( Object node, Map<String, List<Object>> keyValues, String path,
-                                          boolean fulltextIndex, Object... history ) {
-
-        if ( node == null ) {
-            return;
-        }
-
-        if ( node instanceof Collection ) {
-            Object[] newHistory = Arrays.copyOf( history, history.length + 1 );
-            newHistory[history.length] = node;
-            @SuppressWarnings("unchecked") Collection<Object> c = ( Collection<Object> ) node;
-            for ( Object o : c ) {
-                buildKeyValueSet( o, keyValues, path, fulltextIndex, newHistory );
-            }
-        }
-        else if ( node instanceof Map ) {
-            Object[] newHistory = Arrays.copyOf( history, history.length + 1 );
-            newHistory[history.length] = node;
-            @SuppressWarnings("unchecked") Map<Object, Object> m = ( Map<Object, Object> ) node;
-            for ( Entry<Object, Object> e : m.entrySet() ) {
-                String newPath;
-                String key = e.getKey().toString();
-                key = quoteString( key );
-                if ( key.indexOf( '\\' ) == -1 ) {
-                    if ( path != null ) {
-                        newPath = path + "." + key;
-                    }
-                    else {
-                        newPath = "" + key;
-                    }
-                }
-                else {
-                    if ( path != null ) {
-                        newPath = path + "[\"" + key + "\"]";
-                    }
-                    else {
-                        newPath = "" + "[\"" + key + "\"]";
-                    }
-                }
-                buildKeyValueSet( e.getValue(), keyValues, newPath, fulltextIndex, newHistory );
-            }
-        }
-        else if ( node instanceof ArrayNode ) {
-            Object[] newHistory = Arrays.copyOf( history, history.length + 1 );
-            newHistory[history.length] = node;
-            ArrayNode c = ( ArrayNode ) node;
-            for ( JsonNode o : c ) {
-                buildKeyValueSet( o, keyValues, path, fulltextIndex, newHistory );
-            }
-        }
-        else if ( node instanceof ObjectNode ) {
-            Object[] newHistory = Arrays.copyOf( history, history.length + 1 );
-            newHistory[history.length] = node;
-            ObjectNode c = ( ObjectNode ) node;
-            Iterator<Entry<String, JsonNode>> i = c.getFields();
-            while ( i.hasNext() ) {
-                Entry<String, JsonNode> e = i.next();
-                String newPath;
-                String key = e.getKey();
-                key = quoteString( key );
-                if ( key.indexOf( '\\' ) == -1 ) {
-                    if ( path != null ) {
-                        newPath = path + "." + key;
-                    }
-                    else {
-                        newPath = "" + key;
-                    }
-                }
-                else {
-                    if ( path != null ) {
-                        newPath = path + "[\"" + key + "\"]";
-                    }
-                    else {
-                        newPath = "" + "[\"" + key + "\"]";
-                    }
-                }
-                buildKeyValueSet( e.getValue(), keyValues, newPath, fulltextIndex, newHistory );
-            }
-        }
-        else if ( !isBasicType( node.getClass() ) && ( !( node instanceof JsonNode ) ) ) {
-            buildKeyValueSet( toJsonNode( node ), keyValues, path, fulltextIndex, history );
-        }
-        else {
-
-            if ( node instanceof JsonNode ) {
-                if ( ( ( JsonNode ) node ).isTextual() ) {
-                    node = ( ( JsonNode ) node ).getTextValue();
-                    UUID uuid = UUIDUtils.tryGetUUID( ( String ) node );
-                    if ( uuid != null ) {
-                        node = uuid;
-                    }
-                }
-                else if ( ( ( JsonNode ) node ).isNumber() ) {
-                    node = ( ( JsonNode ) node ).getNumberValue();
-                }
-                else {
-                    return;
-                }
-            }
-
-            if ( path == null ) {
-                path = "";
-            }
-            List<Object> l = keyValues.get( path );
-            if ( l == null ) {
-                l = new ArrayList<Object>();
-                keyValues.put( path, l );
-            }
-
-            l.add( node );
-
-            if ( ( node instanceof String ) && fulltextIndex ) {
-                String keywordsPath = ( path.length() > 0 ) ? path + ".keywords" : "keywords";
-                List<Object> keywords = cast( keywords( ( String ) node ) );
-
-                if ( keywords.size() > 0 ) {
-                    keyValues.put( keywordsPath, keywords );
-                }
-            }
-        }
-    }
-
-
-    public static Map<String, List<Object>> getKeyValues( String path, Object obj, boolean fulltextIndex ) {
-        Map<String, List<Object>> keys = new LinkedHashMap<String, List<Object>>();
-        buildKeyValueSet( obj, keys, path, fulltextIndex );
-        return keys;
-    }
-
-
-    public static List<Map.Entry<String, Object>> getKeyValueList( String path, Object obj, boolean fulltextIndex ) {
-        Map<String, List<Object>> map = getKeyValues( path, obj, fulltextIndex );
-        List<Map.Entry<String, Object>> list = new ArrayList<Map.Entry<String, Object>>();
-        for ( Entry<String, List<Object>> entry : map.entrySet() ) {
-            for ( Object value : entry.getValue() ) {
-                list.add( new AbstractMap.SimpleEntry<String, Object>( entry.getKey(), value ) );
-            }
-        }
-        return list;
-    }
-
-
-    public static List<Entry<String, Object>> getKeyValueList( Object obj, boolean fulltextIndex ) {
-        return getKeyValueList( null, obj, fulltextIndex );
-    }
-
-
-    public static List<String> keywords( String source ) {
-        TokenStream ts = analyzer.tokenStream( "keywords", new StringReader( source ) );
-        List<String> keywords = new ArrayList<String>();
-        try {
-            while ( ts.incrementToken() ) {
-                keywords.add( ts.getAttribute( TermAttribute.class ).term() );
-            }
-        }
-        catch ( IOException e ) {
-            LOG.error( "Error getting keywords ", e );
-        }
-        return keywords;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/utils/InflectionUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/utils/InflectionUtils.java b/stack/core/src/main/java/org/usergrid/utils/InflectionUtils.java
deleted file mode 100644
index 34fad79..0000000
--- a/stack/core/src/main/java/org/usergrid/utils/InflectionUtils.java
+++ /dev/null
@@ -1,51 +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.usergrid.utils;
-
-
-public class InflectionUtils {
-
-    public static String pluralize( Object word ) {
-        return Inflector.INSTANCE.pluralize( word );
-    }
-
-
-    public static String singularize( Object word ) {
-        return Inflector.INSTANCE.singularize( word );
-    }
-
-
-    public static boolean isPlural( Object word ) {
-        return Inflector.INSTANCE.isPlural( word );
-    }
-
-
-    public static boolean isSingular( Object word ) {
-        return Inflector.INSTANCE.isSingular( word );
-    }
-
-
-    public static String underscore( String s ) {
-        return Inflector.INSTANCE.underscore( s );
-    }
-
-
-    public static String camelCase( String lowerCaseAndUnderscoredWord, boolean uppercaseFirstLetter,
-                                    char... delimiterChars ) {
-        return Inflector.INSTANCE.camelCase( lowerCaseAndUnderscoredWord, uppercaseFirstLetter, delimiterChars );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/utils/Inflector.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/utils/Inflector.java b/stack/core/src/main/java/org/usergrid/utils/Inflector.java
deleted file mode 100644
index f6e3d92..0000000
--- a/stack/core/src/main/java/org/usergrid/utils/Inflector.java
+++ /dev/null
@@ -1,553 +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.
- */
-
-// TODO - This Class needs to go - it's LGPL Source !!!
-// ModeShape (http://www.modeshape.org)
-// See the COPYRIGHT.txt file distributed with this work for information
-// regarding copyright ownership.  Some portions may be licensed
-// to Red Hat, Inc. under one or more contributor license agreements.
-// See the AUTHORS.txt file in the distribution for a full listing of
-// individual contributors.
-//
-// ModeShape is free software. Unless otherwise indicated, all code in ModeShape
-// is licensed to you under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 2.1 of
-// the License, or (at your option) any later version.
-//
-// ModeShape is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this software; if not, write to the Free
-// Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-// 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-//
-
-package org.usergrid.utils;
-
-
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.Set;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-
-/**
- * Transforms words to singular, plural, humanized (human readable), underscore, camel case, or ordinal form. This is
- * inspired by the <a href="http://api.rubyonrails.org/classes/Inflector.html">Inflector</a> class in <a
- * href="http://www.rubyonrails.org">Ruby on Rails</a>, which is distributed under the <a
- * href="http://wiki.rubyonrails.org/rails/pages/License">Rails license</a>.
- */
-public class Inflector {
-
-    protected static final Inflector INSTANCE = new Inflector();
-
-
-    public static Inflector getInstance() {
-        return INSTANCE;
-    }
-
-
-    protected class Rule {
-
-        protected final String expression;
-        protected final Pattern expressionPattern;
-        protected final String replacement;
-
-
-        protected Rule( String expression, String replacement ) {
-            this.expression = expression;
-            this.replacement = replacement != null ? replacement : "";
-            expressionPattern = Pattern.compile( this.expression, Pattern.CASE_INSENSITIVE );
-        }
-
-
-        /**
-         * Apply the rule against the input string, returning the modified string or null if the rule didn't apply (and
-         * no modifications were made)
-         *
-         * @param input the input string
-         *
-         * @return the modified string if this rule applied, or null if the input was not modified by this rule
-         */
-        protected String apply( String input ) {
-            Matcher matcher = expressionPattern.matcher( input );
-            if ( !matcher.find() ) {
-                return null;
-            }
-            return matcher.replaceAll( replacement );
-        }
-
-
-        @Override
-        public int hashCode() {
-            return expression.hashCode();
-        }
-
-
-        @Override
-        public boolean equals( Object obj ) {
-            if ( obj == this ) {
-                return true;
-            }
-            if ( ( obj != null ) && ( obj.getClass() == this.getClass() ) ) {
-                final Rule that = ( Rule ) obj;
-                if ( expression.equalsIgnoreCase( that.expression ) ) {
-                    return true;
-                }
-            }
-            return false;
-        }
-
-
-        @Override
-        public String toString() {
-            return expression + ", " + replacement;
-        }
-    }
-
-
-    private final LinkedList<Rule> plurals = new LinkedList<Rule>();
-    private final LinkedList<Rule> singulars = new LinkedList<Rule>();
-    /**
-     * The lowercase words that are to be excluded and not processed. This map can be modified by the users via {@link
-     * #getUncountables()}.
-     */
-    private final Set<String> uncountables = new HashSet<String>();
-
-
-    public Inflector() {
-        initialize();
-    }
-
-
-    protected Inflector( Inflector original ) {
-        plurals.addAll( original.plurals );
-        singulars.addAll( original.singulars );
-        uncountables.addAll( original.uncountables );
-    }
-
-
-    @Override
-    @SuppressWarnings("all")
-    public Inflector clone() {
-        return new Inflector( this );
-    }
-
-    // ------------------------------------------------------------------------------------------------
-    // Usage functions
-    // ------------------------------------------------------------------------------------------------
-
-
-    /**
-     * Returns the plural form of the word in the string. <p> Examples: <p/>
-     * <pre>
-     *   inflector.pluralize(&quot;post&quot;)               #=&gt; &quot;posts&quot;
-     *   inflector.pluralize(&quot;octopus&quot;)            #=&gt; &quot;octopi&quot;
-     *   inflector.pluralize(&quot;sheep&quot;)              #=&gt; &quot;sheep&quot;
-     *   inflector.pluralize(&quot;words&quot;)              #=&gt; &quot;words&quot;
-     *   inflector.pluralize(&quot;the blue mailman&quot;)   #=&gt; &quot;the blue mailmen&quot;
-     *   inflector.pluralize(&quot;CamelOctopus&quot;)       #=&gt; &quot;CamelOctopi&quot;
-     * </pre>
-     * <p/> </p> <p> Note that if the {@link Object#toString()} is called on the supplied object, so this method works
-     * for non-strings, too. </p>
-     *
-     * @param word the word that is to be pluralized.
-     *
-     * @return the pluralized form of the word, or the word itself if it could not be pluralized
-     *
-     * @see #singularize(Object)
-     */
-    public String pluralize( Object word ) {
-        if ( word == null ) {
-            return null;
-        }
-        String wordStr = word.toString().trim();
-        if ( wordStr.length() == 0 ) {
-            return wordStr;
-        }
-        if ( isUncountable( wordStr ) ) {
-            return wordStr;
-        }
-        for ( Rule rule : plurals ) {
-            String result = rule.apply( wordStr );
-            if ( result != null ) {
-                return result;
-            }
-        }
-        return wordStr;
-    }
-
-
-    public String pluralize( Object word, int count ) {
-        if ( word == null ) {
-            return null;
-        }
-        if ( ( count == 1 ) || ( count == -1 ) ) {
-            return word.toString();
-        }
-        return pluralize( word );
-    }
-
-
-    public boolean isPlural( Object word ) {
-        if ( word == null ) {
-            return false;
-        }
-        return pluralize( word ).equals( word.toString() );
-    }
-
-
-    /**
-     * Returns the singular form of the word in the string. <p> Examples: <p/>
-     * <pre>
-     *   inflector.singularize(&quot;posts&quot;)             #=&gt; &quot;post&quot;
-     *   inflector.singularize(&quot;octopi&quot;)            #=&gt; &quot;octopus&quot;
-     *   inflector.singularize(&quot;sheep&quot;)             #=&gt; &quot;sheep&quot;
-     *   inflector.singularize(&quot;words&quot;)             #=&gt; &quot;word&quot;
-     *   inflector.singularize(&quot;the blue mailmen&quot;)  #=&gt; &quot;the blue mailman&quot;
-     *   inflector.singularize(&quot;CamelOctopi&quot;)       #=&gt; &quot;CamelOctopus&quot;
-     * </pre>
-     * <p/> </p> <p> Note that if the {@link Object#toString()} is called on the supplied object, so this method works
-     * for non-strings, too. </p>
-     *
-     * @param word the word that is to be pluralized.
-     *
-     * @return the pluralized form of the word, or the word itself if it could not be pluralized
-     *
-     * @see #pluralize(Object)
-     */
-    public String singularize( Object word ) {
-        if ( word == null ) {
-            return null;
-        }
-        String wordStr = word.toString().trim();
-        if ( wordStr.length() == 0 ) {
-            return wordStr;
-        }
-        if ( isUncountable( wordStr ) ) {
-            return wordStr;
-        }
-        for ( Rule rule : singulars ) {
-            String result = rule.apply( wordStr );
-            if ( result != null ) {
-                return result;
-            }
-        }
-        return wordStr;
-    }
-
-
-    public boolean isSingular( Object word ) {
-        if ( word == null ) {
-            return false;
-        }
-        return singularize( word ).equals( word.toString() );
-    }
-
-
-    /**
-     * By default, this method converts strings to UpperCamelCase. If the <code>uppercaseFirstLetter</code> argument to
-     * false, then this method produces lowerCamelCase. This method will also use any extra delimiter characters to
-     * identify word boundaries. <p> Examples: <p/>
-     * <pre>
-     *   inflector.camelCase(&quot;active_record&quot;,false)    #=&gt; &quot;activeRecord&quot;
-     *   inflector.camelCase(&quot;active_record&quot;,true)     #=&gt; &quot;ActiveRecord&quot;
-     *   inflector.camelCase(&quot;first_name&quot;,false)       #=&gt; &quot;firstName&quot;
-     *   inflector.camelCase(&quot;first_name&quot;,true)        #=&gt; &quot;FirstName&quot;
-     *   inflector.camelCase(&quot;name&quot;,false)             #=&gt; &quot;name&quot;
-     *   inflector.camelCase(&quot;name&quot;,true)              #=&gt; &quot;Name&quot;
-     * </pre>
-     * <p/> </p>
-     *
-     * @param lowerCaseAndUnderscoredWord the word that is to be converted to camel case
-     * @param uppercaseFirstLetter true if the first character is to be uppercased, or false if the first character is
-     * to be lowercased
-     * @param delimiterChars optional characters that are used to delimit word boundaries
-     *
-     * @return the camel case version of the word
-     *
-     * @see #underscore(String, char[])
-     */
-    public String camelCase( String lowerCaseAndUnderscoredWord, boolean uppercaseFirstLetter,
-                             char... delimiterChars ) {
-        if ( lowerCaseAndUnderscoredWord == null ) {
-            return null;
-        }
-        lowerCaseAndUnderscoredWord = lowerCaseAndUnderscoredWord.trim();
-        if ( lowerCaseAndUnderscoredWord.length() == 0 ) {
-            return "";
-        }
-        if ( uppercaseFirstLetter ) {
-            String result = lowerCaseAndUnderscoredWord;
-            // Replace any extra delimiters with underscores (before the
-            // underscores are converted in the next step)...
-            if ( delimiterChars != null ) {
-                for ( char delimiterChar : delimiterChars ) {
-                    result = result.replace( delimiterChar, '_' );
-                }
-            }
-
-            // Change the case at the beginning at after each underscore ...
-            return replaceAllWithUppercase( result, "(^|_)(.)", 2 );
-        }
-        if ( lowerCaseAndUnderscoredWord.length() < 2 ) {
-            return lowerCaseAndUnderscoredWord;
-        }
-        return "" + Character.toLowerCase( lowerCaseAndUnderscoredWord.charAt( 0 ) ) + camelCase(
-                lowerCaseAndUnderscoredWord, true, delimiterChars ).substring( 1 );
-    }
-
-
-    /**
-     * Makes an underscored form from the expression in the string (the reverse of the {@link #camelCase(String,
-     * boolean, char[]) camelCase} method. Also changes any characters that match the supplied delimiters into
-     * underscore. <p> Examples: <p/>
-     * <pre>
-     *   inflector.underscore(&quot;activeRecord&quot;)     #=&gt; &quot;active_record&quot;
-     *   inflector.underscore(&quot;ActiveRecord&quot;)     #=&gt; &quot;active_record&quot;
-     *   inflector.underscore(&quot;firstName&quot;)        #=&gt; &quot;first_name&quot;
-     *   inflector.underscore(&quot;FirstName&quot;)        #=&gt; &quot;first_name&quot;
-     *   inflector.underscore(&quot;name&quot;)             #=&gt; &quot;name&quot;
-     *   inflector.underscore(&quot;The.firstName&quot;)    #=&gt; &quot;the_first_name&quot;
-     * </pre>
-     * <p/> </p>
-     *
-     * @param camelCaseWord the camel-cased word that is to be converted;
-     * @param delimiterChars optional characters that are used to delimit word boundaries (beyond capitalization)
-     *
-     * @return a lower-cased version of the input, with separate words delimited by the underscore character.
-     */
-    public String underscore( String camelCaseWord, char... delimiterChars ) {
-        if ( camelCaseWord == null ) {
-            return null;
-        }
-        String result = camelCaseWord.trim();
-        if ( result.length() == 0 ) {
-            return "";
-        }
-        result = result.replaceAll( "([A-Z]+)([A-Z][a-z])", "$1_$2" );
-        result = result.replaceAll( "([a-z\\d])([A-Z])", "$1_$2" );
-        result = result.replace( '-', '_' );
-        if ( delimiterChars != null ) {
-            for ( char delimiterChar : delimiterChars ) {
-                result = result.replace( delimiterChar, '_' );
-            }
-        }
-        return result.toLowerCase();
-    }
-
-
-    /**
-     * Returns a copy of the input with the first character converted to uppercase and the remainder to lowercase.
-     *
-     * @param words the word to be capitalized
-     *
-     * @return the string with the first character capitalized and the remaining characters lowercased
-     */
-    public String capitalize( String words ) {
-        if ( words == null ) {
-            return null;
-        }
-        String result = words.trim();
-        if ( result.length() == 0 ) {
-            return "";
-        }
-        if ( result.length() == 1 ) {
-            return result.toUpperCase();
-        }
-        return "" + Character.toUpperCase( result.charAt( 0 ) ) + result.substring( 1 ).toLowerCase();
-    }
-
-
-    // ------------------------------------------------------------------------------------------------
-    // Management methods
-    // ------------------------------------------------------------------------------------------------
-
-
-    /**
-     * Determine whether the supplied word is considered uncountable by the {@link #pluralize(Object) pluralize} and
-     * {@link #singularize(Object) singularize} methods.
-     *
-     * @param word the word
-     *
-     * @return true if the plural and singular forms of the word are the same
-     */
-    public boolean isUncountable( String word ) {
-        if ( word == null ) {
-            return false;
-        }
-        String trimmedLower = word.trim().toLowerCase();
-        return uncountables.contains( trimmedLower );
-    }
-
-
-    /**
-     * Get the set of words that are not processed by the Inflector. The resulting map is directly modifiable.
-     *
-     * @return the set of uncountable words
-     */
-    public Set<String> getUncountables() {
-        return uncountables;
-    }
-
-
-    public void addPluralize( String rule, String replacement ) {
-        final Rule pluralizeRule = new Rule( rule, replacement );
-        plurals.addFirst( pluralizeRule );
-    }
-
-
-    public void addSingularize( String rule, String replacement ) {
-        final Rule singularizeRule = new Rule( rule, replacement );
-        singulars.addFirst( singularizeRule );
-    }
-
-
-    public void addIrregular( String singular, String plural ) {
-        if ( org.apache.commons.lang.StringUtils.isEmpty( singular ) ) {
-            throw new IllegalArgumentException( "singular rule may not be empty" );
-        }
-        if ( org.apache.commons.lang.StringUtils.isEmpty( plural ) ) {
-            throw new IllegalArgumentException( "plural rule may not be empty" );
-        }
-        String singularRemainder = singular.length() > 1 ? singular.substring( 1 ) : "";
-        String pluralRemainder = plural.length() > 1 ? plural.substring( 1 ) : "";
-        addPluralize( "(" + singular.charAt( 0 ) + ")" + singularRemainder + "$", "$1" + pluralRemainder );
-        addSingularize( "(" + plural.charAt( 0 ) + ")" + pluralRemainder + "$", "$1" + singularRemainder );
-    }
-
-
-    public void addUncountable( String... words ) {
-        if ( ( words == null ) || ( words.length == 0 ) ) {
-            return;
-        }
-        for ( String word : words ) {
-            if ( word != null ) {
-                uncountables.add( word.trim().toLowerCase() );
-            }
-        }
-    }
-
-
-    /**
-     * Utility method to replace all occurrences given by the specific backreference with its uppercased form, and
-     * remove all other backreferences. <p> The Java {@link Pattern regular expression processing} does not use the
-     * preprocessing directives <code>\l</code>, <code>&#92;u</code>, <code>\L</code>, and <code>\U</code>. If so, such
-     * directives could be used in the replacement string to uppercase or lowercase the backreferences. For example,
-     * <code>\L1</code> would lowercase the first backreference, and <code>&#92;u3</code> would uppercase the 3rd
-     * backreference. </p>
-     *
-     * @return the input string with the appropriate characters converted to upper-case
-     */
-    protected static String replaceAllWithUppercase( String input, String regex, int groupNumberToUppercase ) {
-        Pattern underscoreAndDotPattern = Pattern.compile( regex );
-        Matcher matcher = underscoreAndDotPattern.matcher( input );
-        StringBuffer sb = new StringBuffer();
-        while ( matcher.find() ) {
-            matcher.appendReplacement( sb, matcher.group( groupNumberToUppercase ).toUpperCase() );
-        }
-        matcher.appendTail( sb );
-        return sb.toString();
-    }
-
-
-    /** Completely remove all rules within this inflector. */
-    public void clear() {
-        uncountables.clear();
-        plurals.clear();
-        singulars.clear();
-    }
-
-
-    protected void initialize() {
-        Inflector inflect = this;
-        inflect.addPluralize( "$", "s" );
-        inflect.addPluralize( "s$", "s" );
-        inflect.addPluralize( "(ax|test)is$", "$1es" );
-        inflect.addPluralize( "(octop|vir)us$", "$1i" );
-        inflect.addPluralize( "(octop|vir)i$", "$1i" ); // already plural
-        inflect.addPluralize( "(alias|status)$", "$1es" );
-        inflect.addPluralize( "(bu)s$", "$1ses" );
-        inflect.addPluralize( "(buffal|tomat)o$", "$1oes" );
-        inflect.addPluralize( "([ti])um$", "$1a" );
-        inflect.addPluralize( "([ti])a$", "$1a" ); // already plural
-        inflect.addPluralize( "sis$", "ses" );
-        inflect.addPluralize( "(?:([^f])fe|([lr])f)$", "$1$2ves" );
-        inflect.addPluralize( "(hive)$", "$1s" );
-        inflect.addPluralize( "([^aeiouy]|qu)y$", "$1ies" );
-        inflect.addPluralize( "(x|ch|ss|sh)$", "$1es" );
-        inflect.addPluralize( "(matr|vert|ind)ix|ex$", "$1ices" );
-        inflect.addPluralize( "([m|l])ouse$", "$1ice" );
-        inflect.addPluralize( "([m|l])ice$", "$1ice" );
-        inflect.addPluralize( "^(ox)$", "$1en" );
-        inflect.addPluralize( "(quiz)$", "$1zes" );
-        // Need to check for the following words that are already pluralized:
-        inflect.addPluralize( "(people|men|children|sexes|moves|stadiums)$", "$1" ); // irregulars
-        inflect.addPluralize( "(oxen|octopi|viri|aliases|quizzes)$", "$1" ); // special
-        // rules
-
-        inflect.addSingularize( "s$", "" );
-        inflect.addSingularize( "(s|si|u)s$", "$1s" ); // '-us' and '-ss' are
-        // already singular
-        inflect.addSingularize( "(n)ews$", "$1ews" );
-        inflect.addSingularize( "([ti])a$", "$1um" );
-        inflect.addSingularize( "((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$", "$1$2sis" );
-        inflect.addSingularize( "(^analy)ses$", "$1sis" );
-        inflect.addSingularize( "(^analy)sis$", "$1sis" ); // already singular,
-        // but ends in 's'
-        inflect.addSingularize( "([^f])ves$", "$1fe" );
-        inflect.addSingularize( "(hive)s$", "$1" );
-        inflect.addSingularize( "(tive)s$", "$1" );
-        inflect.addSingularize( "([lr])ves$", "$1f" );
-        inflect.addSingularize( "([^aeiouy]|qu)ies$", "$1y" );
-        inflect.addSingularize( "(s)eries$", "$1eries" );
-        inflect.addSingularize( "(m)ovies$", "$1ovie" );
-        inflect.addSingularize( "(x|ch|ss|sh)es$", "$1" );
-        inflect.addSingularize( "([m|l])ice$", "$1ouse" );
-        inflect.addSingularize( "(bus)es$", "$1" );
-        inflect.addSingularize( "(o)es$", "$1" );
-        inflect.addSingularize( "(shoe)s$", "$1" );
-        inflect.addSingularize( "(cris|ax|test)is$", "$1is" ); // already
-        // singular, but
-        // ends in 's'
-        inflect.addSingularize( "(cris|ax|test)es$", "$1is" );
-        inflect.addSingularize( "(octop|vir)i$", "$1us" );
-        inflect.addSingularize( "(octop|vir)us$", "$1us" ); // already singular,
-        // but ends in 's'
-        inflect.addSingularize( "(alias|status)es$", "$1" );
-        inflect.addSingularize( "(alias|status)$", "$1" ); // already singular,
-        // but ends in 's'
-        inflect.addSingularize( "^(ox)en", "$1" );
-        inflect.addSingularize( "(vert|ind)ices$", "$1ex" );
-        inflect.addSingularize( "(matr)ices$", "$1ix" );
-        inflect.addSingularize( "(quiz)zes$", "$1" );
-
-        inflect.addIrregular( "person", "people" );
-        inflect.addIrregular( "man", "men" );
-        inflect.addIrregular( "child", "children" );
-        inflect.addIrregular( "sex", "sexes" );
-        inflect.addIrregular( "move", "moves" );
-        inflect.addIrregular( "stadium", "stadiums" );
-
-        inflect.addUncountable( "equipment", "information", "rice", "money", "species", "series", "fish", "sheep",
-                "data", "analytics" );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/utils/JsonUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/utils/JsonUtils.java b/stack/core/src/main/java/org/usergrid/utils/JsonUtils.java
deleted file mode 100644
index 6bd8300..0000000
--- a/stack/core/src/main/java/org/usergrid/utils/JsonUtils.java
+++ /dev/null
@@ -1,329 +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.usergrid.utils;
-
-
-import java.io.File;
-import java.math.BigInteger;
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
-
-import org.usergrid.exception.JsonReadException;
-import org.usergrid.exception.JsonWriteException;
-import org.usergrid.persistence.Entity;
-
-import org.codehaus.jackson.JsonNode;
-import org.codehaus.jackson.io.JsonStringEncoder;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.map.SerializationConfig.Feature;
-import org.codehaus.jackson.smile.SmileFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import static org.apache.commons.lang.StringUtils.substringAfter;
-
-import static org.usergrid.utils.StringUtils.stringOrSubstringBeforeFirst;
-
-
-public class JsonUtils {
-
-    private static final Logger LOG = LoggerFactory.getLogger( JsonUtils.class );
-
-    static ObjectMapper mapper = new ObjectMapper();
-
-    static SmileFactory smile = new SmileFactory();
-
-    static ObjectMapper smileMapper = new ObjectMapper( smile );
-
-    private static ObjectMapper indentObjectMapper = new ObjectMapper();
-
-
-    static {
-        indentObjectMapper.getSerializationConfig().set( Feature.INDENT_OUTPUT, true );
-    }
-
-
-    /** Converts object to JSON string, throws runtime exception JsonWriteException on failure. */
-    public static String mapToJsonString( Object obj ) {
-        try {
-            return mapper.writeValueAsString( obj );
-        }
-        catch ( Throwable t ) {
-            LOG.debug( "Error generating JSON", t );
-            throw new JsonWriteException( "Error generating JSON", t );
-        }
-    }
-
-
-    /** Converts object to JSON string, throws runtime exception JsonWriteException on failure. */
-    public static String mapToFormattedJsonString( Object obj ) {
-        try {
-            return indentObjectMapper.writeValueAsString( obj );
-        }
-        catch ( Throwable t ) {
-            LOG.debug( "Error generating JSON", t );
-            throw new JsonWriteException( "Error generating JSON", t );
-        }
-    }
-
-
-    /** Parses JSON string  and returns object, throws runtime exception JsonReadException on failure. */
-    public static Object parse( String json ) {
-        try {
-            return mapper.readValue( json, Object.class );
-        }
-        catch ( Throwable t ) {
-            LOG.debug( "Error parsing JSON", t );
-            throw new JsonReadException( "Error parsing JSON", t );
-        }
-    }
-
-
-    public static String quoteString( String s ) {
-        JsonStringEncoder encoder = new JsonStringEncoder();
-        return new String( encoder.quoteAsUTF8( s ) );
-    }
-
-
-    public static ByteBuffer toByteBuffer( Object obj ) {
-        if ( obj == null ) {
-            return null;
-        }
-
-        byte[] bytes = null;
-        try {
-            bytes = smileMapper.writeValueAsBytes( obj );
-        }
-        catch ( Exception e ) {
-            LOG.error( "Error getting SMILE bytes", e );
-        }
-        if ( bytes != null ) {
-            return ByteBuffer.wrap( bytes );
-        }
-        return null;
-    }
-
-
-    public static Object fromByteBuffer( ByteBuffer byteBuffer ) {
-        return fromByteBuffer( byteBuffer, Object.class );
-    }
-
-
-    public static Object fromByteBuffer( ByteBuffer byteBuffer, Class<?> clazz ) {
-        if ( ( byteBuffer == null ) || !byteBuffer.hasRemaining() ) {
-            return null;
-        }
-        if ( clazz == null ) {
-            clazz = Object.class;
-        }
-
-        Object obj = null;
-        try {
-            obj = smileMapper.readValue( byteBuffer.array(), byteBuffer.arrayOffset() + byteBuffer.position(),
-                    byteBuffer.remaining(), clazz );
-        }
-        catch ( Exception e ) {
-            LOG.error( "Error parsing SMILE bytes", e );
-        }
-        return obj;
-    }
-
-
-    public static JsonNode toJsonNode( Object obj ) {
-        if ( obj == null ) {
-            return null;
-        }
-        return mapper.convertValue( obj, JsonNode.class );
-    }
-
-
-    @SuppressWarnings("unchecked")
-    public static Map<String, Object> toJsonMap( Object obj ) {
-        if ( obj == null ) {
-            return null;
-        }
-
-        return ( Map<String, Object> ) mapper.convertValue( obj, Map.class );
-    }
-
-
-    private static UUID tryConvertToUUID( Object o ) {
-        if ( o instanceof String ) {
-            String s = ( String ) o;
-            if ( s.length() == 36 ) {
-                try {
-                    return UUID.fromString( s );
-                }
-                catch ( IllegalArgumentException e ) {
-                    LOG.warn( "Argument to UUID.fromString({}) was invalid.", s, e );
-                }
-            }
-        }
-        return null;
-    }
-
-
-    public static Object normalizeJsonTree( Object obj ) {
-        if ( obj instanceof Map ) {
-            @SuppressWarnings("unchecked") Map<Object, Object> m = ( Map<Object, Object> ) obj;
-            Object o;
-            UUID uuid;
-            for ( Object k : m.keySet() ) {
-                if ( k instanceof String && ( ( String ) k ).equalsIgnoreCase( "name" ) ) {
-                    continue;
-                }
-
-                o = m.get( k );
-                uuid = tryConvertToUUID( o );
-                if ( uuid != null ) {
-                    m.put( k, uuid );
-                }
-                else if ( o instanceof Integer ) {
-                    m.put( k, ( ( Integer ) o ).longValue() );
-                }
-                else if ( o instanceof BigInteger ) {
-                    m.put( k, ( ( BigInteger ) o ).longValue() );
-                }
-            }
-        }
-        else if ( obj instanceof List ) {
-            @SuppressWarnings("unchecked") List<Object> l = ( List<Object> ) obj;
-            Object o;
-            UUID uuid;
-            for ( int i = 0; i < l.size(); i++ ) {
-                o = l.get( i );
-                uuid = tryConvertToUUID( o );
-                if ( uuid != null ) {
-                    l.set( i, uuid );
-                }
-                else if ( ( o instanceof Map ) || ( o instanceof List ) ) {
-                    normalizeJsonTree( o );
-                }
-                else if ( o instanceof Integer ) {
-                    l.set( i, ( ( Integer ) o ).longValue() );
-                }
-                else if ( o instanceof BigInteger ) {
-                    l.set( i, ( ( BigInteger ) o ).longValue() );
-                }
-            }
-        }
-        else if ( obj instanceof String ) {
-            UUID uuid = tryConvertToUUID( obj );
-            if ( uuid != null ) {
-                return uuid;
-            }
-        }
-        else if ( obj instanceof Integer ) {
-            return ( ( Integer ) obj ).longValue();
-        }
-        else if ( obj instanceof BigInteger ) {
-            return ( ( BigInteger ) obj ).longValue();
-        }
-        else if ( obj instanceof JsonNode ) {
-            return mapper.convertValue( obj, Object.class );
-        }
-        return obj;
-    }
-
-
-    public static Object select( Object obj, String path ) {
-        return select( obj, path, false );
-    }
-
-
-    public static Object select( Object obj, String path, boolean buildResultTree ) {
-
-        if ( obj == null ) {
-            return null;
-        }
-
-        if ( org.apache.commons.lang.StringUtils.isBlank( path ) ) {
-            return obj;
-        }
-
-        String segment = stringOrSubstringBeforeFirst( path, '.' );
-        String remaining = substringAfter( path, "." );
-
-        if ( obj instanceof Map ) {
-            Map<?, ?> map = ( Map<?, ?> ) obj;
-            Object child = map.get( segment );
-            Object result = select( child, remaining, buildResultTree );
-            if ( result != null ) {
-                if ( buildResultTree ) {
-                    Map<Object, Object> results = new LinkedHashMap<Object, Object>();
-                    results.put( segment, result );
-                    return results;
-                }
-                else {
-                    return result;
-                }
-            }
-            return null;
-        }
-        if ( obj instanceof List ) {
-            List<Object> results = new ArrayList<Object>();
-            List<?> list = ( List<?> ) obj;
-            for ( Object i : list ) {
-                Object result = select( i, path, buildResultTree );
-                if ( result != null ) {
-                    results.add( result );
-                }
-            }
-            if ( !results.isEmpty() ) {
-                return results;
-            }
-            return null;
-        }
-
-        if ( obj instanceof Entity ) {
-            Object child = ( ( Entity ) obj ).getProperty( segment );
-            Object result = select( child, remaining, buildResultTree );
-            if ( result != null ) {
-                if ( buildResultTree ) {
-                    Map<Object, Object> results = new LinkedHashMap<Object, Object>();
-                    results.put( segment, result );
-                    return results;
-                }
-                else {
-                    return result;
-                }
-            }
-            else {
-                return result;
-            }
-        }
-
-        return obj;
-    }
-
-
-    public static Object loadFromFilesystem( String filename ) {
-        Object json = null;
-        try {
-            File file = new File( filename );
-            json = mapper.readValue( file, Object.class );
-        }
-        catch ( Exception e ) {
-            LOG.error( "Error loading JSON", e );
-        }
-        return json;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/utils/ListUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/utils/ListUtils.java b/stack/core/src/main/java/org/usergrid/utils/ListUtils.java
deleted file mode 100644
index 63050ee..0000000
--- a/stack/core/src/main/java/org/usergrid/utils/ListUtils.java
+++ /dev/null
@@ -1,230 +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.usergrid.utils;
-
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-import java.util.UUID;
-
-import org.apache.commons.lang.math.NumberUtils;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-public class ListUtils extends org.apache.commons.collections.ListUtils {
-    private static final Logger LOG = LoggerFactory.getLogger( ListUtils.class );
-
-
-    public static <A> A first( List<A> list ) {
-        if ( list == null ) {
-            return null;
-        }
-        if ( list.size() == 0 ) {
-            return null;
-        }
-        return list.get( 0 );
-    }
-
-
-    public static <A> A last( List<A> list ) {
-        if ( list == null ) {
-            return null;
-        }
-        if ( list.size() == 0 ) {
-            return null;
-        }
-        return list.get( list.size() - 1 );
-    }
-
-
-    public static <A> Integer firstInteger( List<A> list ) {
-        A a = first( list );
-        if ( a == null ) {
-            return null;
-        }
-
-        if ( a instanceof Integer ) {
-            return ( Integer ) a;
-        }
-
-        try {
-            return NumberUtils.toInt( ( String ) a );
-        }
-        catch ( Exception e ) {
-            LOG.warn( "Could not convert list item {} to int", a, e );
-        }
-        return null;
-    }
-
-
-    public static <A> Long firstLong( List<A> list ) {
-        A a = first( list );
-        if ( a == null ) {
-            return null;
-        }
-
-        if ( a instanceof Long ) {
-            return ( Long ) a;
-        }
-
-        try {
-            return NumberUtils.toLong( ( String ) a );
-        }
-        catch ( Exception e ) {
-            LOG.warn( "Could not convert list item {} to long", a, e );
-        }
-        return null;
-    }
-
-
-    public static <A> Boolean firstBoolean( List<A> list ) {
-        A a = first( list );
-        if ( a == null ) {
-            return null;
-        }
-
-        if ( a instanceof Boolean ) {
-            return ( Boolean ) a;
-        }
-
-        try {
-            return Boolean.parseBoolean( ( String ) a );
-        }
-        catch ( Exception e ) {
-            LOG.warn( "Could not convert list item {} to boolean", a, e );
-        }
-        return null;
-    }
-
-
-    public static <A> UUID firstUuid( List<A> list ) {
-        A i = first( list );
-        if ( i == null ) {
-            return null;
-        }
-
-        if ( i instanceof UUID ) {
-            return ( UUID ) i;
-        }
-
-        try {
-            return UUIDUtils.tryGetUUID( ( String ) i );
-        }
-        catch ( Exception e ) {
-            LOG.warn( "Could not convert list item {} to UUID", i, e );
-        }
-        return null;
-    }
-
-
-    public static boolean isEmpty( List<?> list ) {
-        return ( list == null ) || ( list.size() == 0 );
-    }
-
-
-    public static <T> List<T> dequeueCopy( List<T> list ) {
-        if ( !isEmpty( list ) ) {
-            list = list.subList( 1, list.size() );
-        }
-        return list;
-    }
-
-
-    public static <T> List<T> initCopy( List<T> list ) {
-        if ( !isEmpty( list ) ) {
-            list = new ArrayList<T>( list );
-        }
-        else {
-            list = new ArrayList<T>();
-        }
-        return list;
-    }
-
-
-    public static <T> T dequeue( List<T> list ) {
-        if ( !isEmpty( list ) ) {
-            return list.remove( 0 );
-        }
-        return null;
-    }
-
-
-    public static <T> List<T> queue( List<T> list, T item ) {
-        if ( list == null ) {
-            list = new ArrayList<T>();
-        }
-        list.add( item );
-        return list;
-    }
-
-
-    public static <T> List<T> requeue( List<T> list, T item ) {
-        if ( list == null ) {
-            list = new ArrayList<T>();
-        }
-        list.add( 0, item );
-        return list;
-    }
-
-
-    @SuppressWarnings({ "unchecked", "rawtypes" })
-    public static List<?> flatten( Collection<?> l ) {
-        boolean hasCollection = false;
-        for ( Object o : l ) {
-            if ( o instanceof Collection ) {
-                hasCollection = true;
-                break;
-            }
-        }
-        if ( !hasCollection && ( l instanceof List ) ) {
-            return ( List<?> ) l;
-        }
-        List newList = new ArrayList();
-        for ( Object o : l ) {
-            if ( o instanceof List ) {
-                newList.addAll( flatten( ( List ) o ) );
-            }
-            else {
-                newList.add( o );
-            }
-        }
-        return newList;
-    }
-
-
-    public static boolean anyNull( List<?> l ) {
-        for ( Object o : l ) {
-            if ( o == null ) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-
-    public static boolean anyNull( Object... objects ) {
-        for ( Object o : objects ) {
-            if ( o == null ) {
-                return true;
-            }
-        }
-        return false;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/utils/MailUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/utils/MailUtils.java b/stack/core/src/main/java/org/usergrid/utils/MailUtils.java
deleted file mode 100644
index a74d172..0000000
--- a/stack/core/src/main/java/org/usergrid/utils/MailUtils.java
+++ /dev/null
@@ -1,154 +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.usergrid.utils;
-
-
-import java.util.Properties;
-
-import javax.mail.Message;
-import javax.mail.MessagingException;
-import javax.mail.Session;
-import javax.mail.Transport;
-import javax.mail.internet.AddressException;
-import javax.mail.internet.InternetAddress;
-import javax.mail.internet.MimeBodyPart;
-import javax.mail.internet.MimeMessage;
-import javax.mail.internet.MimeMultipart;
-
-import org.jsoup.Jsoup;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.common.base.Preconditions;
-
-import static org.usergrid.utils.MapUtils.filter;
-
-
-/** Encapsulate the transport and error reporting of email */
-public class MailUtils {
-
-    private static final Logger logger = LoggerFactory.getLogger( MailUtils.class );
-
-    private static final String LOG_PREFIX = "MAIL-DELIVERY-FAILURE - description: [%s] recipient: [%s]";
-    private static final String LOG_PREFIX_OK = "MAIL-DELIVERY-SUCCESS - recipient: [%s]";
-    private static final String CONTENT_TYPE = "Content-Type";
-    private static final String MIME_VERSION = "MIME-Version";
-    private static final String MAIL_PROP_PREFIX = "mail.";
-    private static final String PROP_TRANSPORT = MAIL_PROP_PREFIX + "transport.protocol";
-
-
-    public static Properties getMailProperties( Properties properties ) {
-        return filter( properties, MAIL_PROP_PREFIX );
-    }
-
-
-    /**
-     * Send a message to the transport configured via the provided properties. Encapsulates the MIME multipart
-     * construction with the provided HTML and plain text forms.
-     * <p/>
-     * One of either plainText or htmlText (or both) are required. If both are null or empty we throw an
-     * IllegalArgumentException.
-     * <p/>
-     * In the case of only having htmlText, plainText is extracted from the body and wrapped in &lt;pre&gt; tags to
-     * create the multi-part.
-     *
-     * @param plainText can be null
-     */
-    public void sendMail( Properties props, String to, String from, String subject, String plainText,
-                          String htmlText ) {
-        Preconditions.checkArgument( StringUtils.isNotBlank( htmlText ) || StringUtils.isNotBlank( plainText ),
-                "htmlText and plainText were both blank" );
-
-        try {
-            if ( props == null ) {
-                props = System.getProperties();
-            }
-
-            String protocol = props.getProperty( PROP_TRANSPORT, "smtp" );
-            String host = props.getProperty( MAIL_PROP_PREFIX + protocol + ".host" );
-            String username = props.getProperty( MAIL_PROP_PREFIX + protocol + ".username" );
-            String password = props.getProperty( MAIL_PROP_PREFIX + protocol + ".password" );
-
-            Session session = Session.getInstance( props );
-            // session.setDebug(true);
-
-            MimeMultipart msgContent = new MimeMultipart( "alternative" );
-
-            if ( ( htmlText != null ) && ( plainText == null ) ) {
-                try {
-                    plainText = Jsoup.parse( htmlText ).body().wrap( "<pre></pre>" ).text();
-                }
-                catch ( Exception e ) {
-                    logger.error( "Html parse error", e );
-                }
-            }
-
-            if ( plainText != null ) {
-                MimeBodyPart plainPart = new MimeBodyPart();
-                plainPart.setContent( plainText, "text/plain" );
-                plainPart.setHeader( MIME_VERSION, "1.0" );
-                plainPart.setHeader( CONTENT_TYPE, "text/plain; charset=iso-8859-1" );
-                msgContent.addBodyPart( plainPart );
-            }
-
-            if ( htmlText != null ) {
-                MimeBodyPart htmlPart = new MimeBodyPart();
-                htmlPart.setContent( htmlText, "text/html" );
-                htmlPart.setHeader( MIME_VERSION, "1.0" );
-                htmlPart.setHeader( CONTENT_TYPE, "text/html; charset=iso-8859-1" );
-                msgContent.addBodyPart( htmlPart );
-            }
-
-            MimeMessage msg = new MimeMessage( session );
-            msg.setContent( msgContent );
-            msg.setFrom( new InternetAddress( from ) );
-            msg.addRecipient( Message.RecipientType.TO, new InternetAddress( to ) );
-            msg.setSubject( subject );
-
-            Transport transport = session.getTransport();
-
-            transport.connect( host, username, password );
-
-            transport.sendMessage( msg, msg.getAllRecipients() );
-            transport.close();
-            logger.info( String.format( LOG_PREFIX_OK, to ) );
-        }
-        catch ( AddressException ae ) {
-            logger.error( createErrorMessage( "could not send to bad address", to ), ae );
-        }
-        catch ( MessagingException me ) {
-            logger.error( createErrorMessage( "could not deliver message", to ), me );
-        }
-        catch ( Exception e ) {
-            logger.error( "General exception delivering mail", to, e );
-        }
-    }
-
-
-    /**
-     * Delegates to {@link #sendMail(java.util.Properties, String, String, String, String, String)} with null as the
-     * 'plainText' argument to such.
-     */
-    public void sendHtmlMail( Properties props, String to, String from, String subject, String html ) {
-        sendMail( props, to, from, subject, null, html );
-    }
-
-
-    String createErrorMessage( String message, String toAddress ) {
-        return String.format( LOG_PREFIX, message, toAddress );
-    }
-}


[81/96] [abbrv] USERGRID-2 package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/response/AggregateCounterSet.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/response/AggregateCounterSet.html b/sdks/android/doc/org/usergrid/android/client/response/AggregateCounterSet.html
index 288709a..88fc7fa 100644
--- a/sdks/android/doc/org/usergrid/android/client/response/AggregateCounterSet.html
+++ b/sdks/android/doc/org/usergrid/android/client/response/AggregateCounterSet.html
@@ -55,8 +55,8 @@ function windowTitle()
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/response/AggregateCounterSet.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="AggregateCounterSet.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
@@ -88,12 +88,12 @@ DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&n
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client.response</FONT>
+org.apache.usergrid.android.client.response</FONT>
 <BR>
 Class AggregateCounterSet</H2>
 <PRE>
 java.lang.Object
-  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.usergrid.android.client.response.AggregateCounterSet</B>
+  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.usergrid.android.client.response.AggregateCounterSet</B>
 </PRE>
 <HR>
 <DL>
@@ -117,7 +117,7 @@ java.lang.Object
 <TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/AggregateCounterSet.html#AggregateCounterSet(java.lang.String, java.util.UUID, java.lang.String, java.util.List)">AggregateCounterSet</A></B>(java.lang.String&nbsp;name,
                     java.util.UUID&nbsp;queue,
                     java.lang.String&nbsp;category,
-                    java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response">AggregateCounter</A>&gt;&nbsp;values)</CODE>
+                    java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response">AggregateCounter</A>&gt;&nbsp;values)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -127,7 +127,7 @@ java.lang.Object
                     java.util.UUID&nbsp;user,
                     java.util.UUID&nbsp;group,
                     java.lang.String&nbsp;category,
-                    java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response">AggregateCounter</A>&gt;&nbsp;values)</CODE>
+                    java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response">AggregateCounter</A>&gt;&nbsp;values)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -184,7 +184,7 @@ java.lang.Object
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response">AggregateCounter</A>&gt;</CODE></FONT></TD>
+<CODE>&nbsp;java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response">AggregateCounter</A>&gt;</CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/AggregateCounterSet.html#getValues()">getValues</A></B>()</CODE>
 
 <BR>
@@ -233,7 +233,7 @@ java.lang.Object
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/AggregateCounterSet.html#setValues(java.util.List)">setValues</A></B>(java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response">AggregateCounter</A>&gt;&nbsp;values)</CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/AggregateCounterSet.html#setValues(java.util.List)">setValues</A></B>(java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response">AggregateCounter</A>&gt;&nbsp;values)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -276,7 +276,7 @@ public <B>AggregateCounterSet</B>(java.lang.String&nbsp;name,
                            java.util.UUID&nbsp;user,
                            java.util.UUID&nbsp;group,
                            java.lang.String&nbsp;category,
-                           java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response">AggregateCounter</A>&gt;&nbsp;values)</PRE>
+                           java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response">AggregateCounter</A>&gt;&nbsp;values)</PRE>
 <DL>
 </DL>
 <HR>
@@ -287,7 +287,7 @@ AggregateCounterSet</H3>
 public <B>AggregateCounterSet</B>(java.lang.String&nbsp;name,
                            java.util.UUID&nbsp;queue,
                            java.lang.String&nbsp;category,
-                           java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response">AggregateCounter</A>&gt;&nbsp;values)</PRE>
+                           java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response">AggregateCounter</A>&gt;&nbsp;values)</PRE>
 <DL>
 </DL>
 
@@ -392,7 +392,7 @@ public void <B>setName</B>(java.lang.String&nbsp;name)</PRE>
 <A NAME="getValues()"><!-- --></A><H3>
 getValues</H3>
 <PRE>
-public java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response">AggregateCounter</A>&gt; <B>getValues</B>()</PRE>
+public java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response">AggregateCounter</A>&gt; <B>getValues</B>()</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -403,7 +403,7 @@ public java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/res
 <A NAME="setValues(java.util.List)"><!-- --></A><H3>
 setValues</H3>
 <PRE>
-public void <B>setValues</B>(java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response">AggregateCounter</A>&gt;&nbsp;values)</PRE>
+public void <B>setValues</B>(java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response">AggregateCounter</A>&gt;&nbsp;values)</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -476,8 +476,8 @@ public java.lang.String <B>toString</B>()</PRE>
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/response/AggregateCounterSet.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="AggregateCounterSet.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/response/ApiResponse.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/response/ApiResponse.html b/sdks/android/doc/org/usergrid/android/client/response/ApiResponse.html
index 56a480e..3255412 100644
--- a/sdks/android/doc/org/usergrid/android/client/response/ApiResponse.html
+++ b/sdks/android/doc/org/usergrid/android/client/response/ApiResponse.html
@@ -55,8 +55,8 @@ function windowTitle()
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/response/ApiResponse.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="ApiResponse.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
@@ -88,12 +88,12 @@ DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&n
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client.response</FONT>
+org.apache.usergrid.android.client.response</FONT>
 <BR>
 Class ApiResponse</H2>
 <PRE>
 java.lang.Object
-  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.usergrid.android.client.response.ApiResponse</B>
+  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.usergrid.android.client.response.ApiResponse</B>
 </PRE>
 <HR>
 <DL>
@@ -171,7 +171,7 @@ java.lang.Object
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response">AggregateCounterSet</A>&gt;</CODE></FONT></TD>
+<CODE>&nbsp;java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response">AggregateCounterSet</A>&gt;</CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html#getCounters()">getCounters</A></B>()</CODE>
 
 <BR>
@@ -179,7 +179,7 @@ java.lang.Object
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response">ClientCredentialsInfo</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response">ClientCredentialsInfo</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html#getCredentials()">getCredentials</A></B>()</CODE>
 
 <BR>
@@ -203,7 +203,7 @@ java.lang.Object
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt;</CODE></FONT></TD>
+<CODE>&nbsp;java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt;</CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html#getEntities()">getEntities</A></B>()</CODE>
 
 <BR>
@@ -215,7 +215,7 @@ java.lang.Object
 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
 <TR ALIGN="right" VALIGN="">
 <TD NOWRAP><FONT SIZE="-1">
-<CODE>&lt;T extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt; 
+<CODE>&lt;T extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt; 
 <BR>
 java.util.List&lt;T&gt;</CODE></FONT></TD>
 </TR>
@@ -268,7 +268,7 @@ java.util.List&lt;T&gt;</CODE></FONT></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html#getFirstEntity()">getFirstEntity</A></B>()</CODE>
 
 <BR>
@@ -280,7 +280,7 @@ java.util.List&lt;T&gt;</CODE></FONT></TD>
 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
 <TR ALIGN="right" VALIGN="">
 <TD NOWRAP><FONT SIZE="-1">
-<CODE>&lt;T extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt; 
+<CODE>&lt;T extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt; 
 <BR>
 T</CODE></FONT></TD>
 </TR>
@@ -293,7 +293,7 @@ T</CODE></FONT></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html#getFirstMessage()">getFirstMessage</A></B>()</CODE>
 
 <BR>
@@ -301,7 +301,7 @@ T</CODE></FONT></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response">QueueInfo</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response">QueueInfo</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html#getFirstQueue()">getFirstQueue</A></B>()</CODE>
 
 <BR>
@@ -317,7 +317,7 @@ T</CODE></FONT></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html#getLastEntity()">getLastEntity</A></B>()</CODE>
 
 <BR>
@@ -329,7 +329,7 @@ T</CODE></FONT></TD>
 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
 <TR ALIGN="right" VALIGN="">
 <TD NOWRAP><FONT SIZE="-1">
-<CODE>&lt;T extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt; 
+<CODE>&lt;T extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt; 
 <BR>
 T</CODE></FONT></TD>
 </TR>
@@ -342,7 +342,7 @@ T</CODE></FONT></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html#getLastMessage()">getLastMessage</A></B>()</CODE>
 
 <BR>
@@ -350,7 +350,7 @@ T</CODE></FONT></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response">QueueInfo</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response">QueueInfo</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html#getLastQueue()">getLastQueue</A></B>()</CODE>
 
 <BR>
@@ -382,7 +382,7 @@ T</CODE></FONT></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>&gt;</CODE></FONT></TD>
+<CODE>&nbsp;java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>&gt;</CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html#getMessages()">getMessages</A></B>()</CODE>
 
 <BR>
@@ -438,7 +438,7 @@ T</CODE></FONT></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response">QueueInfo</A>&gt;</CODE></FONT></TD>
+<CODE>&nbsp;java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response">QueueInfo</A>&gt;</CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html#getQueues()">getQueues</A></B>()</CODE>
 
 <BR>
@@ -470,7 +470,7 @@ T</CODE></FONT></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html#getUser()">getUser</A></B>()</CODE>
 
 <BR>
@@ -519,7 +519,7 @@ T</CODE></FONT></TD>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html#setCounters(java.util.List)">setCounters</A></B>(java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response">AggregateCounterSet</A>&gt;&nbsp;counters)</CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html#setCounters(java.util.List)">setCounters</A></B>(java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response">AggregateCounterSet</A>&gt;&nbsp;counters)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -527,7 +527,7 @@ T</CODE></FONT></TD>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html#setCredentials(org.usergrid.android.client.response.ClientCredentialsInfo)">setCredentials</A></B>(<A HREF="../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response">ClientCredentialsInfo</A>&nbsp;credentials)</CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html#setCredentials(org.apache.usergrid.android.client.response.ClientCredentialsInfo)">setCredentials</A></B>(<A HREF="../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response">ClientCredentialsInfo</A>&nbsp;credentials)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -551,7 +551,7 @@ T</CODE></FONT></TD>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html#setEntities(java.util.List)">setEntities</A></B>(java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt;&nbsp;entities)</CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html#setEntities(java.util.List)">setEntities</A></B>(java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt;&nbsp;entities)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -607,7 +607,7 @@ T</CODE></FONT></TD>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html#setMessages(java.util.List)">setMessages</A></B>(java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>&gt;&nbsp;messages)</CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html#setMessages(java.util.List)">setMessages</A></B>(java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>&gt;&nbsp;messages)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -664,7 +664,7 @@ T</CODE></FONT></TD>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html#setQueues(java.util.List)">setQueues</A></B>(java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response">QueueInfo</A>&gt;&nbsp;queues)</CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html#setQueues(java.util.List)">setQueues</A></B>(java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response">QueueInfo</A>&gt;&nbsp;queues)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -696,7 +696,7 @@ T</CODE></FONT></TD>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html#setUser(org.usergrid.android.client.entities.User)">setUser</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>&nbsp;user)</CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html#setUser(org.apache.usergrid.android.client.entities.User)">setUser</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>&nbsp;user)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -995,7 +995,7 @@ public void <B>setApplication</B>(java.util.UUID&nbsp;application)</PRE>
 <A NAME="getEntities()"><!-- --></A><H3>
 getEntities</H3>
 <PRE>
-public java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt; <B>getEntities</B>()</PRE>
+public java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt; <B>getEntities</B>()</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1006,7 +1006,7 @@ public java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/ent
 <A NAME="setEntities(java.util.List)"><!-- --></A><H3>
 setEntities</H3>
 <PRE>
-public void <B>setEntities</B>(java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt;&nbsp;entities)</PRE>
+public void <B>setEntities</B>(java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt;&nbsp;entities)</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1028,7 +1028,7 @@ public int <B>getEntityCount</B>()</PRE>
 <A NAME="getFirstEntity()"><!-- --></A><H3>
 getFirstEntity</H3>
 <PRE>
-public <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A> <B>getFirstEntity</B>()</PRE>
+public <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A> <B>getFirstEntity</B>()</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1039,7 +1039,7 @@ public <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html"
 <A NAME="getFirstEntity(java.lang.Class)"><!-- --></A><H3>
 getFirstEntity</H3>
 <PRE>
-public &lt;T extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt; T <B>getFirstEntity</B>(java.lang.Class&lt;T&gt;&nbsp;t)</PRE>
+public &lt;T extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt; T <B>getFirstEntity</B>(java.lang.Class&lt;T&gt;&nbsp;t)</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1050,7 +1050,7 @@ public &lt;T extends <A HREF="../../../../../org/usergrid/android/client/entitie
 <A NAME="getLastEntity()"><!-- --></A><H3>
 getLastEntity</H3>
 <PRE>
-public <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A> <B>getLastEntity</B>()</PRE>
+public <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A> <B>getLastEntity</B>()</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1061,7 +1061,7 @@ public <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html"
 <A NAME="getLastEntity(java.lang.Class)"><!-- --></A><H3>
 getLastEntity</H3>
 <PRE>
-public &lt;T extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt; T <B>getLastEntity</B>(java.lang.Class&lt;T&gt;&nbsp;t)</PRE>
+public &lt;T extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt; T <B>getLastEntity</B>(java.lang.Class&lt;T&gt;&nbsp;t)</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1072,7 +1072,7 @@ public &lt;T extends <A HREF="../../../../../org/usergrid/android/client/entitie
 <A NAME="getEntities(java.lang.Class)"><!-- --></A><H3>
 getEntities</H3>
 <PRE>
-public &lt;T extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt; java.util.List&lt;T&gt; <B>getEntities</B>(java.lang.Class&lt;T&gt;&nbsp;t)</PRE>
+public &lt;T extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt; java.util.List&lt;T&gt; <B>getEntities</B>(java.lang.Class&lt;T&gt;&nbsp;t)</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1259,7 +1259,7 @@ public void <B>setParams</B>(java.util.Map&lt;java.lang.String,java.util.List&lt
 <A NAME="getCounters()"><!-- --></A><H3>
 getCounters</H3>
 <PRE>
-public java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response">AggregateCounterSet</A>&gt; <B>getCounters</B>()</PRE>
+public java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response">AggregateCounterSet</A>&gt; <B>getCounters</B>()</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1270,7 +1270,7 @@ public java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/res
 <A NAME="setCounters(java.util.List)"><!-- --></A><H3>
 setCounters</H3>
 <PRE>
-public void <B>setCounters</B>(java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response">AggregateCounterSet</A>&gt;&nbsp;counters)</PRE>
+public void <B>setCounters</B>(java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response">AggregateCounterSet</A>&gt;&nbsp;counters)</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1281,7 +1281,7 @@ public void <B>setCounters</B>(java.util.List&lt;<A HREF="../../../../../org/use
 <A NAME="getCredentials()"><!-- --></A><H3>
 getCredentials</H3>
 <PRE>
-public <A HREF="../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response">ClientCredentialsInfo</A> <B>getCredentials</B>()</PRE>
+public <A HREF="../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response">ClientCredentialsInfo</A> <B>getCredentials</B>()</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1289,10 +1289,10 @@ public <A HREF="../../../../../org/usergrid/android/client/response/ClientCreden
 </DL>
 <HR>
 
-<A NAME="setCredentials(org.usergrid.android.client.response.ClientCredentialsInfo)"><!-- --></A><H3>
+<A NAME="setCredentials(org.apache.usergrid.android.client.response.ClientCredentialsInfo)"><!-- --></A><H3>
 setCredentials</H3>
 <PRE>
-public void <B>setCredentials</B>(<A HREF="../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response">ClientCredentialsInfo</A>&nbsp;credentials)</PRE>
+public void <B>setCredentials</B>(<A HREF="../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response">ClientCredentialsInfo</A>&nbsp;credentials)</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1303,7 +1303,7 @@ public void <B>setCredentials</B>(<A HREF="../../../../../org/usergrid/android/c
 <A NAME="getUser()"><!-- --></A><H3>
 getUser</H3>
 <PRE>
-public <A HREF="../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A> <B>getUser</B>()</PRE>
+public <A HREF="../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A> <B>getUser</B>()</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1311,10 +1311,10 @@ public <A HREF="../../../../../org/usergrid/android/client/entities/User.html" t
 </DL>
 <HR>
 
-<A NAME="setUser(org.usergrid.android.client.entities.User)"><!-- --></A><H3>
+<A NAME="setUser(org.apache.usergrid.android.client.entities.User)"><!-- --></A><H3>
 setUser</H3>
 <PRE>
-public void <B>setUser</B>(<A HREF="../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>&nbsp;user)</PRE>
+public void <B>setUser</B>(<A HREF="../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>&nbsp;user)</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1339,7 +1339,7 @@ public java.lang.String <B>toString</B>()</PRE>
 <A NAME="getMessages()"><!-- --></A><H3>
 getMessages</H3>
 <PRE>
-public java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>&gt; <B>getMessages</B>()</PRE>
+public java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>&gt; <B>getMessages</B>()</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1350,7 +1350,7 @@ public java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/ent
 <A NAME="setMessages(java.util.List)"><!-- --></A><H3>
 setMessages</H3>
 <PRE>
-public void <B>setMessages</B>(java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>&gt;&nbsp;messages)</PRE>
+public void <B>setMessages</B>(java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>&gt;&nbsp;messages)</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1372,7 +1372,7 @@ public int <B>getMessageCount</B>()</PRE>
 <A NAME="getFirstMessage()"><!-- --></A><H3>
 getFirstMessage</H3>
 <PRE>
-public <A HREF="../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A> <B>getFirstMessage</B>()</PRE>
+public <A HREF="../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A> <B>getFirstMessage</B>()</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1383,7 +1383,7 @@ public <A HREF="../../../../../org/usergrid/android/client/entities/Message.html
 <A NAME="getLastMessage()"><!-- --></A><H3>
 getLastMessage</H3>
 <PRE>
-public <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A> <B>getLastMessage</B>()</PRE>
+public <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A> <B>getLastMessage</B>()</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1416,7 +1416,7 @@ public void <B>setLast</B>(java.util.UUID&nbsp;last)</PRE>
 <A NAME="getQueues()"><!-- --></A><H3>
 getQueues</H3>
 <PRE>
-public java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response">QueueInfo</A>&gt; <B>getQueues</B>()</PRE>
+public java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response">QueueInfo</A>&gt; <B>getQueues</B>()</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1427,7 +1427,7 @@ public java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/res
 <A NAME="setQueues(java.util.List)"><!-- --></A><H3>
 setQueues</H3>
 <PRE>
-public void <B>setQueues</B>(java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response">QueueInfo</A>&gt;&nbsp;queues)</PRE>
+public void <B>setQueues</B>(java.util.List&lt;<A HREF="../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response">QueueInfo</A>&gt;&nbsp;queues)</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1438,7 +1438,7 @@ public void <B>setQueues</B>(java.util.List&lt;<A HREF="../../../../../org/userg
 <A NAME="getFirstQueue()"><!-- --></A><H3>
 getFirstQueue</H3>
 <PRE>
-public <A HREF="../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response">QueueInfo</A> <B>getFirstQueue</B>()</PRE>
+public <A HREF="../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response">QueueInfo</A> <B>getFirstQueue</B>()</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1449,7 +1449,7 @@ public <A HREF="../../../../../org/usergrid/android/client/response/QueueInfo.ht
 <A NAME="getLastQueue()"><!-- --></A><H3>
 getLastQueue</H3>
 <PRE>
-public <A HREF="../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response">QueueInfo</A> <B>getLastQueue</B>()</PRE>
+public <A HREF="../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response">QueueInfo</A> <B>getLastQueue</B>()</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -1541,8 +1541,8 @@ public void <B>setConsumer</B>(java.util.UUID&nbsp;consumer)</PRE>
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/response/ApiResponse.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="ApiResponse.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/response/ClientCredentialsInfo.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/response/ClientCredentialsInfo.html b/sdks/android/doc/org/usergrid/android/client/response/ClientCredentialsInfo.html
index 74e3587..8d0df17 100644
--- a/sdks/android/doc/org/usergrid/android/client/response/ClientCredentialsInfo.html
+++ b/sdks/android/doc/org/usergrid/android/client/response/ClientCredentialsInfo.html
@@ -55,8 +55,8 @@ function windowTitle()
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/response/ClientCredentialsInfo.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="ClientCredentialsInfo.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
@@ -88,12 +88,12 @@ DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&n
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client.response</FONT>
+org.apache.usergrid.android.client.response</FONT>
 <BR>
 Class ClientCredentialsInfo</H2>
 <PRE>
 java.lang.Object
-  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.usergrid.android.client.response.ClientCredentialsInfo</B>
+  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.usergrid.android.client.response.ClientCredentialsInfo</B>
 </PRE>
 <HR>
 <DL>
@@ -298,8 +298,8 @@ public java.lang.String <B>toString</B>()</PRE>
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/response/ClientCredentialsInfo.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="ClientCredentialsInfo.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/response/QueueInfo.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/response/QueueInfo.html b/sdks/android/doc/org/usergrid/android/client/response/QueueInfo.html
index c282feb..d4a9a1a 100644
--- a/sdks/android/doc/org/usergrid/android/client/response/QueueInfo.html
+++ b/sdks/android/doc/org/usergrid/android/client/response/QueueInfo.html
@@ -55,7 +55,7 @@ function windowTitle()
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response"><B>PREV CLASS</B></A>&nbsp;
 &nbsp;NEXT CLASS</FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/response/QueueInfo.html" target="_top"><B>FRAMES</B></A>  &nbsp;
@@ -88,12 +88,12 @@ DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&n
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client.response</FONT>
+org.apache.usergrid.android.client.response</FONT>
 <BR>
 Class QueueInfo</H2>
 <PRE>
 java.lang.Object
-  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.usergrid.android.client.response.QueueInfo</B>
+  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.usergrid.android.client.response.QueueInfo</B>
 </PRE>
 <HR>
 <DL>
@@ -274,7 +274,7 @@ public void <B>setQueue</B>(java.util.UUID&nbsp;queue)</PRE>
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response"><B>PREV CLASS</B></A>&nbsp;
 &nbsp;NEXT CLASS</FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/response/QueueInfo.html" target="_top"><B>FRAMES</B></A>  &nbsp;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/response/class-use/AggregateCounter.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/response/class-use/AggregateCounter.html b/sdks/android/doc/org/usergrid/android/client/response/class-use/AggregateCounter.html
index e29502b..f585384 100644
--- a/sdks/android/doc/org/usergrid/android/client/response/class-use/AggregateCounter.html
+++ b/sdks/android/doc/org/usergrid/android/client/response/class-use/AggregateCounter.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Class org.usergrid.android.client.response.AggregateCounter
+Uses of Class org.apache.usergrid.android.client.response.AggregateCounter
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Class org.usergrid.android.client.response.AggregateCounter
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Class org.usergrid.android.client.response.AggregateCounter";
+        parent.document.title="Uses of Class org.apache.usergrid.android.client.response.AggregateCounter";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,26 +81,26 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Class<br>org.usergrid.android.client.response.AggregateCounter</B></H2>
+<B>Uses of Class<br>org.apache.usergrid.android.client.response.AggregateCounter</B></H2>
 </CENTER>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Packages that use <A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response">AggregateCounter</A></FONT></TH>
+Packages that use <A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response">AggregateCounter</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client.response"><B>org.usergrid.android.client.response</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client.response"><B>org.apache.usergrid.android.client.response</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client.response"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client.response"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response">AggregateCounter</A> in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A></FONT></TH>
+Uses of <A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response">AggregateCounter</A> in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -108,11 +108,11 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/Aggregat
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A> that return types with arguments of type <A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response">AggregateCounter</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A> that return types with arguments of type <A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response">AggregateCounter</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response">AggregateCounter</A>&gt;</CODE></FONT></TD>
+<CODE>&nbsp;java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response">AggregateCounter</A>&gt;</CODE></FONT></TD>
 <TD><CODE><B>AggregateCounterSet.</B><B><A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounterSet.html#getValues()">getValues</A></B>()</CODE>
 
 <BR>
@@ -124,12 +124,12 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/Aggregat
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Method parameters in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A> with type arguments of type <A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response">AggregateCounter</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Method parameters in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A> with type arguments of type <A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response">AggregateCounter</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>AggregateCounterSet.</B><B><A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounterSet.html#setValues(java.util.List)">setValues</A></B>(java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response">AggregateCounter</A>&gt;&nbsp;values)</CODE>
+<TD><CODE><B>AggregateCounterSet.</B><B><A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounterSet.html#setValues(java.util.List)">setValues</A></B>(java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response">AggregateCounter</A>&gt;&nbsp;values)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -140,13 +140,13 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/Aggregat
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Constructor parameters in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A> with type arguments of type <A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response">AggregateCounter</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Constructor parameters in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A> with type arguments of type <A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response">AggregateCounter</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounterSet.html#AggregateCounterSet(java.lang.String, java.util.UUID, java.lang.String, java.util.List)">AggregateCounterSet</A></B>(java.lang.String&nbsp;name,
                     java.util.UUID&nbsp;queue,
                     java.lang.String&nbsp;category,
-                    java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response">AggregateCounter</A>&gt;&nbsp;values)</CODE>
+                    java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response">AggregateCounter</A>&gt;&nbsp;values)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -156,7 +156,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/Aggregat
                     java.util.UUID&nbsp;user,
                     java.util.UUID&nbsp;group,
                     java.lang.String&nbsp;category,
-                    java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response">AggregateCounter</A>&gt;&nbsp;values)</CODE>
+                    java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response">AggregateCounter</A>&gt;&nbsp;values)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -178,7 +178,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/Aggregat
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/response/class-use/AggregateCounterSet.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/response/class-use/AggregateCounterSet.html b/sdks/android/doc/org/usergrid/android/client/response/class-use/AggregateCounterSet.html
index 8311293..df14dbc 100644
--- a/sdks/android/doc/org/usergrid/android/client/response/class-use/AggregateCounterSet.html
+++ b/sdks/android/doc/org/usergrid/android/client/response/class-use/AggregateCounterSet.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Class org.usergrid.android.client.response.AggregateCounterSet
+Uses of Class org.apache.usergrid.android.client.response.AggregateCounterSet
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Class org.usergrid.android.client.response.AggregateCounterSet
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Class org.usergrid.android.client.response.AggregateCounterSet";
+        parent.document.title="Uses of Class org.apache.usergrid.android.client.response.AggregateCounterSet";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,26 +81,26 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Class<br>org.usergrid.android.client.response.AggregateCounterSet</B></H2>
+<B>Uses of Class<br>org.apache.usergrid.android.client.response.AggregateCounterSet</B></H2>
 </CENTER>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Packages that use <A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response">AggregateCounterSet</A></FONT></TH>
+Packages that use <A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response">AggregateCounterSet</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client.response"><B>org.usergrid.android.client.response</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client.response"><B>org.apache.usergrid.android.client.response</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client.response"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client.response"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response">AggregateCounterSet</A> in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A></FONT></TH>
+Uses of <A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response">AggregateCounterSet</A> in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -108,11 +108,11 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/Aggregat
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A> that return types with arguments of type <A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response">AggregateCounterSet</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A> that return types with arguments of type <A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response">AggregateCounterSet</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response">AggregateCounterSet</A>&gt;</CODE></FONT></TD>
+<CODE>&nbsp;java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response">AggregateCounterSet</A>&gt;</CODE></FONT></TD>
 <TD><CODE><B>ApiResponse.</B><B><A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html#getCounters()">getCounters</A></B>()</CODE>
 
 <BR>
@@ -124,12 +124,12 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/Aggregat
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Method parameters in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A> with type arguments of type <A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response">AggregateCounterSet</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Method parameters in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A> with type arguments of type <A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response">AggregateCounterSet</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>ApiResponse.</B><B><A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html#setCounters(java.util.List)">setCounters</A></B>(java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response">AggregateCounterSet</A>&gt;&nbsp;counters)</CODE>
+<TD><CODE><B>ApiResponse.</B><B><A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html#setCounters(java.util.List)">setCounters</A></B>(java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response">AggregateCounterSet</A>&gt;&nbsp;counters)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -151,7 +151,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/Aggregat
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>


[36/96] [abbrv] [partial] Change package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/EntityValueSerializer.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/EntityValueSerializer.java b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/EntityValueSerializer.java
new file mode 100644
index 0000000..49f991f
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/EntityValueSerializer.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.cassandra;
+
+
+import java.nio.ByteBuffer;
+import java.util.List;
+
+import me.prettyprint.cassandra.serializers.AbstractSerializer;
+import me.prettyprint.hector.api.beans.DynamicComposite;
+import static org.apache.usergrid.utils.ConversionUtils.bytebuffer;
+
+
+public class EntityValueSerializer extends AbstractSerializer<Object> {
+
+    @Override
+    public ByteBuffer toByteBuffer( Object obj ) {
+        ByteBuffer bytes = null;
+        if ( obj instanceof List ) {
+            bytes = DynamicComposite.toByteBuffer( ( List<?> ) obj );
+        }
+        else if ( obj instanceof Object[] ) {
+            bytes = DynamicComposite.toByteBuffer( ( Object[] ) obj );
+        }
+        else {
+            bytes = bytebuffer( obj );
+        }
+        return bytes;
+    }
+
+
+    @Override
+    public Object fromByteBuffer( ByteBuffer byteBuffer ) {
+        throw new IllegalStateException(
+                "The entity value serializer can only be used for data going to the database, " +
+                        "and not data coming from the database" );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/GeoIndexManager.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/GeoIndexManager.java b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/GeoIndexManager.java
new file mode 100644
index 0000000..bd470de
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/GeoIndexManager.java
@@ -0,0 +1,322 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.cassandra;
+
+
+import java.nio.ByteBuffer;
+import java.util.List;
+import java.util.UUID;
+
+import org.apache.usergrid.persistence.EntityRef;
+import org.apache.usergrid.persistence.IndexBucketLocator;
+import org.apache.usergrid.persistence.IndexBucketLocator.IndexType;
+import org.apache.usergrid.persistence.geo.EntityLocationRef;
+import org.apache.usergrid.persistence.geo.GeocellManager;
+import org.apache.usergrid.persistence.geo.model.Point;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import me.prettyprint.cassandra.serializers.ByteBufferSerializer;
+import me.prettyprint.hector.api.Keyspace;
+import me.prettyprint.hector.api.beans.DynamicComposite;
+import me.prettyprint.hector.api.beans.HColumn;
+import me.prettyprint.hector.api.mutation.Mutator;
+import static me.prettyprint.hector.api.factory.HFactory.createColumn;
+import static me.prettyprint.hector.api.factory.HFactory.createMutator;
+import static org.apache.usergrid.persistence.Schema.DICTIONARY_GEOCELL;
+import static org.apache.usergrid.persistence.Schema.INDEX_CONNECTIONS;
+import static org.apache.usergrid.persistence.cassandra.ApplicationCF.ENTITY_INDEX;
+import static org.apache.usergrid.persistence.cassandra.CassandraPersistenceUtils.addInsertToMutator;
+import static org.apache.usergrid.persistence.cassandra.CassandraPersistenceUtils.batchExecute;
+import static org.apache.usergrid.persistence.cassandra.CassandraPersistenceUtils.key;
+import static org.apache.usergrid.persistence.cassandra.CassandraPersistenceUtils.logBatchOperation;
+import static org.apache.usergrid.utils.ConversionUtils.bytebuffer;
+
+
+public class GeoIndexManager {
+
+    private static final Logger logger = LoggerFactory.getLogger( GeoIndexManager.class );
+
+    /**
+     * We only ever go down to max resolution of 9 because we use bucket hashing. Every level divides the region by
+     * 1/16. Our original "box" is 90 degrees by 45 degrees. We therefore have 90 * (1/16)^(r-1) and 45 * (1/16)^(r-1)
+     * for our size where r is the largest bucket resolution. This gives us a size of 90 deg => 0.0000000209547 deg =
+     * .2cm and 45 deg => 0.00000001047735 deg = .1 cm
+     */
+    public static final int MAX_RESOLUTION = 9;
+
+
+    EntityManagerImpl em;
+    CassandraService cass;
+
+
+    public GeoIndexManager() {
+    }
+
+
+    public GeoIndexManager init( EntityManagerImpl em ) {
+        this.em = em;
+        this.cass = em.getCass();
+        return this;
+    }
+
+
+    public static Mutator<ByteBuffer> addLocationEntryInsertionToMutator( Mutator<ByteBuffer> m, Object key,
+                                                                          EntityLocationRef entry ) {
+
+        DynamicComposite columnName = entry.getColumnName();
+        DynamicComposite columnValue = entry.getColumnValue();
+        long ts = entry.getTimestampInMicros();
+
+        logBatchOperation( "Insert", ENTITY_INDEX, key, columnName, columnValue, ts );
+
+        HColumn<ByteBuffer, ByteBuffer> column =
+                createColumn( columnName.serialize(), columnValue.serialize(), ts, ByteBufferSerializer.get(),
+                        ByteBufferSerializer.get() );
+        m.addInsertion( bytebuffer( key ), ENTITY_INDEX.toString(), column );
+
+        return m;
+    }
+
+
+    private static Mutator<ByteBuffer> batchAddConnectionIndexEntries( Mutator<ByteBuffer> m,
+                                                                       IndexBucketLocator locator, UUID appId,
+                                                                       String propertyName, String geoCell,
+                                                                       UUID[] index_keys, ByteBuffer columnName,
+                                                                       ByteBuffer columnValue, long timestamp ) {
+
+        // entity_id,prop_name
+        Object property_index_key =
+                key( index_keys[ConnectionRefImpl.ALL], INDEX_CONNECTIONS, propertyName, DICTIONARY_GEOCELL, geoCell,
+                        locator.getBucket( appId, IndexType.CONNECTION, index_keys[ConnectionRefImpl.ALL], geoCell ) );
+
+        // entity_id,entity_type,prop_name
+        Object entity_type_prop_index_key =
+                key( index_keys[ConnectionRefImpl.BY_ENTITY_TYPE], INDEX_CONNECTIONS, propertyName, DICTIONARY_GEOCELL,
+                        geoCell,
+                        locator.getBucket( appId, IndexType.CONNECTION, index_keys[ConnectionRefImpl.BY_ENTITY_TYPE],
+                                geoCell ) );
+
+        // entity_id,connection_type,prop_name
+        Object connection_type_prop_index_key =
+                key( index_keys[ConnectionRefImpl.BY_CONNECTION_TYPE], INDEX_CONNECTIONS, propertyName,
+                        DICTIONARY_GEOCELL, geoCell, locator.getBucket( appId, IndexType.CONNECTION,
+                        index_keys[ConnectionRefImpl.BY_CONNECTION_TYPE], geoCell ) );
+
+        // entity_id,connection_type,entity_type,prop_name
+        Object connection_type_and_entity_type_prop_index_key =
+                key( index_keys[ConnectionRefImpl.BY_CONNECTION_AND_ENTITY_TYPE], INDEX_CONNECTIONS, propertyName,
+                        DICTIONARY_GEOCELL, geoCell, locator.getBucket( appId, IndexType.CONNECTION,
+                        index_keys[ConnectionRefImpl.BY_CONNECTION_AND_ENTITY_TYPE], geoCell ) );
+
+        // composite(property_value,connected_entity_id,connection_type,entity_type,entry_timestamp)
+        addInsertToMutator( m, ENTITY_INDEX, property_index_key, columnName, columnValue, timestamp );
+
+        // composite(property_value,connected_entity_id,connection_type,entry_timestamp)
+        addInsertToMutator( m, ENTITY_INDEX, entity_type_prop_index_key, columnName, columnValue, timestamp );
+
+        // composite(property_value,connected_entity_id,entity_type,entry_timestamp)
+        addInsertToMutator( m, ENTITY_INDEX, connection_type_prop_index_key, columnName, columnValue, timestamp );
+
+        // composite(property_value,connected_entity_id,entry_timestamp)
+        addInsertToMutator( m, ENTITY_INDEX, connection_type_and_entity_type_prop_index_key, columnName, columnValue,
+                timestamp );
+
+        return m;
+    }
+
+
+    public static void batchStoreLocationInConnectionsIndex( Mutator<ByteBuffer> m, IndexBucketLocator locator,
+                                                             UUID appId, UUID[] index_keys, String propertyName,
+                                                             EntityLocationRef location ) {
+
+        Point p = location.getPoint();
+        List<String> cells = GeocellManager.generateGeoCell( p );
+
+        ByteBuffer columnName = location.getColumnName().serialize();
+        ByteBuffer columnValue = location.getColumnValue().serialize();
+        long ts = location.getTimestampInMicros();
+        for ( String cell : cells ) {
+            batchAddConnectionIndexEntries( m, locator, appId, propertyName, cell, index_keys, columnName, columnValue,
+                    ts );
+        }
+
+        logger.info( "Geocells to be saved for Point({} , {} ) are: {}", new Object[] {
+                location.getLatitude(), location.getLongitude(), cells
+        } );
+    }
+
+
+    private static Mutator<ByteBuffer> addLocationEntryDeletionToMutator( Mutator<ByteBuffer> m, Object key,
+                                                                          EntityLocationRef entry ) {
+
+        DynamicComposite columnName = entry.getColumnName();
+        long ts = entry.getTimestampInMicros();
+
+        logBatchOperation( "Delete", ENTITY_INDEX, key, columnName, null, ts );
+
+        m.addDeletion( bytebuffer( key ), ENTITY_INDEX.toString(), columnName.serialize(), ByteBufferSerializer.get(),
+                ts + 1 );
+
+        return m;
+    }
+
+
+    private static Mutator<ByteBuffer> batchDeleteConnectionIndexEntries( Mutator<ByteBuffer> m,
+                                                                          IndexBucketLocator locator, UUID appId,
+                                                                          String propertyName, String geoCell,
+                                                                          UUID[] index_keys, ByteBuffer columnName,
+                                                                          long timestamp ) {
+
+        // entity_id,prop_name
+        Object property_index_key =
+                key( index_keys[ConnectionRefImpl.ALL], INDEX_CONNECTIONS, propertyName, DICTIONARY_GEOCELL, geoCell,
+                        locator.getBucket( appId, IndexType.CONNECTION, index_keys[ConnectionRefImpl.ALL], geoCell ) );
+
+        // entity_id,entity_type,prop_name
+        Object entity_type_prop_index_key =
+                key( index_keys[ConnectionRefImpl.BY_ENTITY_TYPE], INDEX_CONNECTIONS, propertyName, DICTIONARY_GEOCELL,
+                        geoCell,
+                        locator.getBucket( appId, IndexType.CONNECTION, index_keys[ConnectionRefImpl.BY_ENTITY_TYPE],
+                                geoCell ) );
+
+        // entity_id,connection_type,prop_name
+        Object connection_type_prop_index_key =
+                key( index_keys[ConnectionRefImpl.BY_CONNECTION_TYPE], INDEX_CONNECTIONS, propertyName,
+                        DICTIONARY_GEOCELL, geoCell, locator.getBucket( appId, IndexType.CONNECTION,
+                        index_keys[ConnectionRefImpl.BY_CONNECTION_TYPE], geoCell ) );
+
+        // entity_id,connection_type,entity_type,prop_name
+        Object connection_type_and_entity_type_prop_index_key =
+                key( index_keys[ConnectionRefImpl.BY_CONNECTION_AND_ENTITY_TYPE], INDEX_CONNECTIONS, propertyName,
+                        DICTIONARY_GEOCELL, geoCell, locator.getBucket( appId, IndexType.CONNECTION,
+                        index_keys[ConnectionRefImpl.BY_CONNECTION_AND_ENTITY_TYPE], geoCell ) );
+
+        // composite(property_value,connected_entity_id,connection_type,entity_type,entry_timestamp)
+        m.addDeletion( bytebuffer( property_index_key ), ENTITY_INDEX.toString(), columnName,
+                ByteBufferSerializer.get(), timestamp );
+
+        // composite(property_value,connected_entity_id,connection_type,entry_timestamp)
+        m.addDeletion( bytebuffer( entity_type_prop_index_key ), ENTITY_INDEX.toString(), columnName,
+                ByteBufferSerializer.get(), timestamp );
+
+        // composite(property_value,connected_entity_id,entity_type,entry_timestamp)
+        m.addDeletion( bytebuffer( connection_type_prop_index_key ), ENTITY_INDEX.toString(), columnName,
+                ByteBufferSerializer.get(), timestamp );
+
+        // composite(property_value,connected_entity_id,entry_timestamp)
+        m.addDeletion( bytebuffer( connection_type_and_entity_type_prop_index_key ), ENTITY_INDEX.toString(),
+                columnName, ByteBufferSerializer.get(), timestamp );
+
+        return m;
+    }
+
+
+    public static void batchDeleteLocationInConnectionsIndex( Mutator<ByteBuffer> m, IndexBucketLocator locator,
+                                                              UUID appId, UUID[] index_keys, String propertyName,
+                                                              EntityLocationRef location ) {
+
+        Point p = location.getPoint();
+        List<String> cells = GeocellManager.generateGeoCell( p );
+
+        ByteBuffer columnName = location.getColumnName().serialize();
+
+        long ts = location.getTimestampInMicros();
+
+        for ( String cell : cells ) {
+
+            batchDeleteConnectionIndexEntries( m, locator, appId, propertyName, cell, index_keys, columnName, ts );
+        }
+
+        logger.info( "Geocells to be saved for Point({} , {} ) are: {}", new Object[] {
+                location.getLatitude(), location.getLongitude(), cells
+        } );
+    }
+
+
+    public static void batchStoreLocationInCollectionIndex( Mutator<ByteBuffer> m, IndexBucketLocator locator,
+                                                            UUID appId, Object key, UUID entityId,
+                                                            EntityLocationRef location ) {
+
+        Point p = location.getPoint();
+        List<String> cells = GeocellManager.generateGeoCell( p );
+
+        for ( int i = 0; i < MAX_RESOLUTION; i++ ) {
+            String cell = cells.get( i );
+
+            String indexBucket = locator.getBucket( appId, IndexType.GEO, entityId, cell );
+
+            addLocationEntryInsertionToMutator( m, key( key, DICTIONARY_GEOCELL, cell, indexBucket ), location );
+        }
+
+        if ( logger.isInfoEnabled() ) {
+            logger.info( "Geocells to be saved for Point({},{}) are: {}", new Object[] {
+                    location.getLatitude(), location.getLongitude(), cells
+            } );
+        }
+    }
+
+
+    public void storeLocationInCollectionIndex( EntityRef owner, String collectionName, UUID entityId,
+                                                String propertyName, EntityLocationRef location ) {
+
+        Keyspace ko = cass.getApplicationKeyspace( em.getApplicationId() );
+        Mutator<ByteBuffer> m = createMutator( ko, ByteBufferSerializer.get() );
+
+        batchStoreLocationInCollectionIndex( m, em.getIndexBucketLocator(), em.getApplicationId(),
+                key( owner.getUuid(), collectionName, propertyName ), owner.getUuid(), location );
+
+        batchExecute( m, CassandraService.RETRY_COUNT );
+    }
+
+
+    public static void batchRemoveLocationFromCollectionIndex( Mutator<ByteBuffer> m, IndexBucketLocator locator,
+                                                               UUID appId, Object key, EntityLocationRef location ) {
+
+        Point p = location.getPoint();
+        List<String> cells = GeocellManager.generateGeoCell( p );
+
+        // delete for every bucket in every resolution
+        for ( int i = 0; i < MAX_RESOLUTION; i++ ) {
+
+            String cell = cells.get( i );
+
+            for ( String indexBucket : locator.getBuckets( appId, IndexType.GEO, cell ) ) {
+
+                addLocationEntryDeletionToMutator( m, key( key, DICTIONARY_GEOCELL, cell, indexBucket ), location );
+            }
+        }
+
+        if ( logger.isInfoEnabled() ) {
+            logger.info( "Geocells to be deleted for Point({},{}) are: {}", new Object[] {
+                    location.getLatitude(), location.getLongitude(), cells
+            } );
+        }
+    }
+
+
+    public void removeLocationFromCollectionIndex( EntityRef owner, String collectionName, String propertyName,
+                                                   EntityLocationRef location ) {
+
+        Keyspace ko = cass.getApplicationKeyspace( em.getApplicationId() );
+        Mutator<ByteBuffer> m = createMutator( ko, ByteBufferSerializer.get() );
+
+        batchRemoveLocationFromCollectionIndex( m, em.getIndexBucketLocator(), em.getApplicationId(),
+                key( owner.getUuid(), collectionName, propertyName ), location );
+
+        batchExecute( m, CassandraService.RETRY_COUNT );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/IndexUpdate.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/IndexUpdate.java b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/IndexUpdate.java
new file mode 100644
index 0000000..7e57f63
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/IndexUpdate.java
@@ -0,0 +1,448 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.cassandra;
+
+
+import java.io.IOException;
+import java.math.BigInteger;
+import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
+
+import org.apache.usergrid.persistence.Entity;
+import org.codehaus.jackson.JsonNode;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.fasterxml.uuid.UUIDComparator;
+
+import me.prettyprint.hector.api.beans.DynamicComposite;
+import me.prettyprint.hector.api.mutation.Mutator;
+import static java.nio.ByteBuffer.wrap;
+import static java.util.Arrays.asList;
+import static org.apache.usergrid.utils.JsonUtils.toJsonNode;
+import static org.apache.usergrid.utils.UUIDUtils.getTimestampInMicros;
+
+
+public class IndexUpdate {
+
+    private static final Logger logger = LoggerFactory.getLogger( IndexUpdate.class );
+
+    public static final byte VALUE_CODE_BYTES = 0;
+    public static final byte VALUE_CODE_UTF8 = 1;
+    public static final byte VALUE_CODE_UUID = 2;
+    public static final byte VALUE_CODE_INT = 3;
+    public static final byte VALUE_CODE_MAX = 127;
+
+    public static int INDEX_STRING_VALUE_LENGTH = 1024;
+
+    private Mutator<ByteBuffer> batch;
+    private Entity entity;
+    private String entryName;
+    private Object entryValue;
+    private final List<IndexEntry> prevEntries = new ArrayList<IndexEntry>();
+    private final List<IndexEntry> newEntries = new ArrayList<IndexEntry>();
+    private final Set<String> indexesSet = new LinkedHashSet<String>();
+    private boolean schemaHasProperty;
+    private boolean isMultiValue;
+    private boolean removeListEntry;
+    private long timestamp;
+    private final UUID timestampUuid;
+    private UUID associatedId;
+
+
+    public IndexUpdate( Mutator<ByteBuffer> batch, Entity entity, String entryName, Object entryValue,
+                        boolean schemaHasProperty, boolean isMultiValue, boolean removeListEntry, UUID timestampUuid ) {
+        this.batch = batch;
+        this.entity = entity;
+        this.entryName = entryName;
+        this.entryValue = entryValue;
+        this.schemaHasProperty = schemaHasProperty;
+        this.isMultiValue = isMultiValue;
+        this.removeListEntry = removeListEntry;
+        timestamp = getTimestampInMicros( timestampUuid );
+        this.timestampUuid = timestampUuid;
+    }
+
+
+    public Mutator<ByteBuffer> getBatch() {
+        return batch;
+    }
+
+
+    public void setBatch( Mutator<ByteBuffer> batch ) {
+        this.batch = batch;
+    }
+
+
+    public Entity getEntity() {
+        return entity;
+    }
+
+
+    public void setEntity( Entity entity ) {
+        this.entity = entity;
+    }
+
+
+    public UUID getId() {
+        if ( associatedId != null ) {
+            return associatedId;
+        }
+        return entity.getUuid();
+    }
+
+
+    public String getEntryName() {
+        return entryName;
+    }
+
+
+    public void setEntryName( String entryName ) {
+        this.entryName = entryName;
+    }
+
+
+    public Object getEntryValue() {
+        return entryValue;
+    }
+
+
+    public void setEntryValue( Object entryValue ) {
+        this.entryValue = entryValue;
+    }
+
+
+    public long getTimestamp() {
+        return timestamp;
+    }
+
+
+    public void setTimestamp( long timestamp ) {
+        this.timestamp = timestamp;
+    }
+
+
+    public UUID getTimestampUuid() {
+        return timestampUuid;
+    }
+
+
+    public List<IndexEntry> getPrevEntries() {
+        return prevEntries;
+    }
+
+
+    public void addPrevEntry( String path, Object value, UUID timestamp, ByteBuffer ledgerValue ) {
+        IndexEntry entry = new IndexEntry( path, value, timestamp, ledgerValue );
+        prevEntries.add( entry );
+    }
+
+
+    public List<IndexEntry> getNewEntries() {
+        return newEntries;
+    }
+
+
+    public void addNewEntry( String path, Object value ) {
+        IndexEntry entry = new IndexEntry( path, value, timestampUuid, null );
+        newEntries.add( entry );
+    }
+
+
+    public Set<String> getIndexesSet() {
+        return indexesSet;
+    }
+
+
+    public void addIndex( String index ) {
+        logger.debug( "Indexing {}", index );
+        indexesSet.add( index );
+    }
+
+
+    public boolean isSchemaHasProperty() {
+        return schemaHasProperty;
+    }
+
+
+    public void setSchemaHasProperty( boolean schemaHasProperty ) {
+        this.schemaHasProperty = schemaHasProperty;
+    }
+
+
+    public boolean isMultiValue() {
+        return isMultiValue;
+    }
+
+
+    public void setMultiValue( boolean isMultiValue ) {
+        this.isMultiValue = isMultiValue;
+    }
+
+
+    public boolean isRemoveListEntry() {
+        return removeListEntry;
+    }
+
+
+    public void setRemoveListEntry( boolean removeListEntry ) {
+        this.removeListEntry = removeListEntry;
+    }
+
+
+    public void setAssociatedId( UUID associatedId ) {
+        this.associatedId = associatedId;
+    }
+
+
+    public UUID getAssociatedId() {
+        return associatedId;
+    }
+
+
+    public class IndexEntry {
+        private final byte code;
+        private String path;
+        private final Object value;
+        private final UUID timestampUuid;
+        private final ByteBuffer ledgerColumn;
+
+
+        public IndexEntry( String path, Object value, UUID timestampUuid, ByteBuffer ledgerColumn ) {
+            this.path = path;
+            this.value = value;
+            code = indexValueCode( value );
+            this.timestampUuid = timestampUuid;
+            this.ledgerColumn = ledgerColumn;
+        }
+
+
+        public String getPath() {
+            return path;
+        }
+
+
+        public void setPath( String path ) {
+            this.path = path;
+        }
+
+
+        public Object getValue() {
+            return value;
+        }
+
+
+        public byte getValueCode() {
+            return code;
+        }
+
+
+        public UUID getTimestampUuid() {
+            return timestampUuid;
+        }
+
+
+        public DynamicComposite getIndexComposite() {
+            return new DynamicComposite( code, value, getId(), timestampUuid );
+        }
+
+
+        public DynamicComposite getIndexComposite( Object... ids ) {
+            return new DynamicComposite( code, value, asList( ids ), timestampUuid );
+        }
+
+
+        public ByteBuffer getLedgerColumn() {
+            return this.ledgerColumn;
+        }
+    }
+
+
+    public static class UniqueIndexEntry {
+        private final byte code;
+        private String path;
+        private final Object value;
+
+
+        public UniqueIndexEntry( String path, Object value ) {
+            this.path = path;
+            this.value = value;
+            code = indexValueCode( value );
+        }
+
+
+        public String getPath() {
+            return path;
+        }
+
+
+        public void setPath( String path ) {
+            this.path = path;
+        }
+
+
+        public Object getValue() {
+            return value;
+        }
+
+
+        public byte getValueCode() {
+            return code;
+        }
+
+
+        public DynamicComposite getIndexComposite() {
+            return new DynamicComposite( code, value );
+        }
+    }
+
+
+    private static String prepStringForIndex( String str ) {
+        str = str.trim().toLowerCase();
+        str = str.substring( 0, Math.min( INDEX_STRING_VALUE_LENGTH, str.length() ) );
+        return str;
+    }
+
+
+    /**
+     * @param obj
+     * @return
+     */
+    public static Object toIndexableValue( Object obj ) {
+        if ( obj == null ) {
+            return null;
+        }
+
+        if ( obj instanceof String ) {
+            return prepStringForIndex( ( String ) obj );
+        }
+
+        // UUIDs, and BigIntegers map to Cassandra UTF8Type and IntegerType
+        if ( ( obj instanceof UUID ) || ( obj instanceof BigInteger ) ) {
+            return obj;
+        }
+
+        // For any numeric values, turn them into a long
+        // and make them BigIntegers for IntegerType
+        if ( obj instanceof Number ) {
+            return BigInteger.valueOf( ( ( Number ) obj ).longValue() );
+        }
+
+        if ( obj instanceof Boolean ) {
+            return BigInteger.valueOf( ( ( Boolean ) obj ) ? 1L : 0L );
+        }
+
+        if ( obj instanceof Date ) {
+            return BigInteger.valueOf( ( ( Date ) obj ).getTime() );
+        }
+
+        if ( obj instanceof byte[] ) {
+            return wrap( ( byte[] ) obj );
+        }
+
+        if ( obj instanceof ByteBuffer ) {
+            return obj;
+        }
+
+        JsonNode json = toJsonNode( obj );
+        if ( ( json != null ) && json.isValueNode() ) {
+            if ( json.isBigInteger() ) {
+                return json.getBigIntegerValue();
+            }
+            else if ( json.isNumber() || json.isBoolean() ) {
+                return BigInteger.valueOf( json.getValueAsLong() );
+            }
+            else if ( json.isTextual() ) {
+                return prepStringForIndex( json.getTextValue() );
+            }
+            else if ( json.isBinary() ) {
+                try {
+                    return wrap( json.getBinaryValue() );
+                }
+                catch ( IOException e ) {
+                }
+            }
+        }
+
+        return null;
+    }
+
+
+    public static boolean validIndexableValue( Object obj ) {
+        return toIndexableValue( obj ) != null;
+    }
+
+
+    public static boolean validIndexableValueOrJson( Object obj ) {
+        if ( ( obj instanceof Map ) || ( obj instanceof List ) || ( obj instanceof JsonNode ) ) {
+            return true;
+        }
+        return toIndexableValue( obj ) != null;
+    }
+
+
+    public static byte indexValueCode( Object obj ) {
+        obj = toIndexableValue( obj );
+        if ( obj instanceof String ) {
+            return VALUE_CODE_UTF8;
+        }
+        else if ( obj instanceof UUID ) {
+            return VALUE_CODE_UUID;
+        }
+        else if ( obj instanceof BigInteger ) {
+            return VALUE_CODE_INT;
+        }
+        else if ( obj instanceof Number ) {
+            return VALUE_CODE_INT;
+        }
+        else {
+            return VALUE_CODE_BYTES;
+        }
+    }
+
+
+    @SuppressWarnings({ "rawtypes", "unchecked" })
+    public static int compareIndexedValues( Object o1, Object o2 ) {
+        o1 = toIndexableValue( o1 );
+        o2 = toIndexableValue( o2 );
+        if ( ( o1 == null ) && ( o2 == null ) ) {
+            return 0;
+        }
+        else if ( o1 == null ) {
+            return -1;
+        }
+        else if ( o2 == null ) {
+            return 1;
+        }
+        int c1 = indexValueCode( o1 );
+        int c2 = indexValueCode( o2 );
+        if ( c1 == c2 ) {
+            if ( o1 instanceof UUID ) {
+                UUIDComparator.staticCompare( ( UUID ) o1, ( UUID ) o2 );
+            }
+            else if ( o1 instanceof Comparable ) {
+                return ( ( Comparable ) o1 ).compareTo( o2 );
+            }
+        }
+        return c1 - c2;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/QueryProcessor.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/QueryProcessor.java b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/QueryProcessor.java
new file mode 100644
index 0000000..2c43b4e
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/QueryProcessor.java
@@ -0,0 +1,719 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.cassandra;
+
+
+import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Stack;
+import java.util.UUID;
+
+import org.apache.usergrid.persistence.EntityManager;
+import org.apache.usergrid.persistence.Identifier;
+import org.apache.usergrid.persistence.Query;
+import org.apache.usergrid.persistence.Results;
+import org.apache.usergrid.persistence.Schema;
+import org.apache.usergrid.persistence.Query.SortDirection;
+import org.apache.usergrid.persistence.Query.SortPredicate;
+import org.apache.usergrid.persistence.entities.User;
+import org.apache.usergrid.persistence.exceptions.NoFullTextIndexException;
+import org.apache.usergrid.persistence.exceptions.NoIndexException;
+import org.apache.usergrid.persistence.exceptions.PersistenceException;
+import org.apache.usergrid.persistence.query.ir.AllNode;
+import org.apache.usergrid.persistence.query.ir.AndNode;
+import org.apache.usergrid.persistence.query.ir.EmailIdentifierNode;
+import org.apache.usergrid.persistence.query.ir.NameIdentifierNode;
+import org.apache.usergrid.persistence.query.ir.NotNode;
+import org.apache.usergrid.persistence.query.ir.OrNode;
+import org.apache.usergrid.persistence.query.ir.OrderByNode;
+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.query.ir.SliceNode;
+import org.apache.usergrid.persistence.query.ir.UuidIdentifierNode;
+import org.apache.usergrid.persistence.query.ir.WithinNode;
+import org.apache.usergrid.persistence.query.ir.result.ResultIterator;
+import org.apache.usergrid.persistence.query.ir.result.ResultsLoader;
+import org.apache.usergrid.persistence.query.ir.result.ResultsLoaderFactory;
+import org.apache.usergrid.persistence.query.ir.result.ScanColumn;
+import org.apache.usergrid.persistence.query.tree.AndOperand;
+import org.apache.usergrid.persistence.query.tree.ContainsOperand;
+import org.apache.usergrid.persistence.query.tree.Equal;
+import org.apache.usergrid.persistence.query.tree.EqualityOperand;
+import org.apache.usergrid.persistence.query.tree.GreaterThan;
+import org.apache.usergrid.persistence.query.tree.GreaterThanEqual;
+import org.apache.usergrid.persistence.query.tree.LessThan;
+import org.apache.usergrid.persistence.query.tree.LessThanEqual;
+import org.apache.usergrid.persistence.query.tree.Literal;
+import org.apache.usergrid.persistence.query.tree.NotOperand;
+import org.apache.usergrid.persistence.query.tree.Operand;
+import org.apache.usergrid.persistence.query.tree.OrOperand;
+import org.apache.usergrid.persistence.query.tree.QueryVisitor;
+import org.apache.usergrid.persistence.query.tree.StringLiteral;
+import org.apache.usergrid.persistence.query.tree.WithinOperand;
+import org.apache.usergrid.persistence.schema.CollectionInfo;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import me.prettyprint.cassandra.serializers.UUIDSerializer;
+import static org.apache.usergrid.persistence.Schema.getDefaultSchema;
+
+
+public class QueryProcessor {
+
+    private static final int PAGE_SIZE = 1000;
+    private static final Logger logger = LoggerFactory.getLogger( QueryProcessor.class );
+
+    private static final Schema SCHEMA = getDefaultSchema();
+
+    private final CollectionInfo collectionInfo;
+    private final EntityManager em;
+    private final ResultsLoaderFactory loaderFactory;
+
+    private Operand rootOperand;
+    private List<SortPredicate> sorts;
+    private CursorCache cursorCache;
+    private QueryNode rootNode;
+    private String entityType;
+
+    private int size;
+    private Query query;
+    private int pageSizeHint;
+
+
+    public QueryProcessor( Query query, CollectionInfo collectionInfo, EntityManager em,
+                           ResultsLoaderFactory loaderFactory ) throws PersistenceException {
+        setQuery( query );
+        this.collectionInfo = collectionInfo;
+        this.em = em;
+        this.loaderFactory = loaderFactory;
+        process();
+    }
+
+
+    public Query getQuery() {
+        return query;
+    }
+
+
+    public void setQuery( Query query ) {
+        this.sorts = query.getSortPredicates();
+        this.cursorCache = new CursorCache( query.getCursor() );
+        this.rootOperand = query.getRootOperand();
+        this.entityType = query.getEntityType();
+        this.size = query.getLimit();
+        this.query = query;
+    }
+
+
+    public CollectionInfo getCollectionInfo() {
+        return collectionInfo;
+    }
+
+
+    private void process() throws PersistenceException {
+
+        int opCount = 0;
+
+        // no operand. Check for sorts
+        if ( rootOperand != null ) {
+            // visit the tree
+
+            TreeEvaluator visitor = new TreeEvaluator();
+
+            rootOperand.visit( visitor );
+
+            rootNode = visitor.getRootNode();
+
+            opCount = visitor.getSliceCount();
+        }
+
+        // see if we have sorts, if so, we can add them all as a single node at
+        // the root
+        if ( sorts.size() > 0 ) {
+
+            OrderByNode order = generateSorts( opCount );
+
+            opCount += order.getFirstPredicate().getAllSlices().size();
+
+            rootNode = order;
+        }
+
+
+        //if we still don't have a root node, no query nor order by was specified,
+        // just use the all node or the identifiers
+        if ( rootNode == null ) {
+
+
+            //a name alias or email alias was specified
+            if ( query.containsSingleNameOrEmailIdentifier() ) {
+
+                Identifier ident = query.getSingleIdentifier();
+
+                //an email was specified.  An edge case that only applies to users.  This is fulgy to put here,
+                // but required
+                if ( query.getEntityType().equals( User.ENTITY_TYPE ) && ident.isEmail() ) {
+                    rootNode = new EmailIdentifierNode( ident );
+                }
+
+                //use the ident with the default alias.  could be an email
+                else {
+                    rootNode = new NameIdentifierNode( ident.getName() );
+                }
+            }
+            //a uuid was specified
+            else if ( query.containsSingleUuidIdentifier() ) {
+                rootNode = new UuidIdentifierNode( query.getSingleUuidIdentifier() );
+            }
+
+
+            //nothing was specified, order it by uuid
+            else {
+
+
+                //this is a bit ugly, but how we handle the start parameter
+                UUID startResult = query.getStartResult();
+
+                boolean startResultSet = startResult != null;
+
+                AllNode allNode = new AllNode( 0, startResultSet );
+
+                if ( startResultSet ) {
+                    cursorCache.setNextCursor( allNode.getSlice().hashCode(),
+                            UUIDSerializer.get().toByteBuffer( startResult ) );
+                }
+
+                rootNode = allNode;
+            }
+        }
+
+        if ( opCount > 1 ) {
+            pageSizeHint = PAGE_SIZE;
+        }
+        else {
+            pageSizeHint = Math.min( size, PAGE_SIZE );
+        }
+    }
+
+
+    public QueryNode getFirstNode() {
+        return rootNode;
+    }
+
+
+    /**
+     * Apply cursor position and sort order to this slice. This should only be invoke at evaluation time to ensure that
+     * the IR tree has already been fully constructed
+     */
+    public void applyCursorAndSort( QuerySlice slice ) {
+        // apply the sort first, since this can change the hash code
+        SortPredicate sort = getSort( slice.getPropertyName() );
+
+        if ( sort != null ) {
+            boolean isReversed = sort.getDirection() == SortDirection.DESCENDING;
+
+            //we're reversing the direction of this slice, reverse the params as well
+            if ( isReversed != slice.isReversed() ) {
+                slice.reverse();
+            }
+        }
+        // apply the cursor
+        ByteBuffer cursor = cursorCache.getCursorBytes( slice.hashCode() );
+
+        if ( cursor != null ) {
+            slice.setCursor( cursor );
+        }
+    }
+
+
+    /**
+     * Return the node id from the cursor cache
+     * @param nodeId
+     * @return
+     */
+    public ByteBuffer getCursorCache(int nodeId){
+        return cursorCache.getCursorBytes( nodeId );
+    }
+
+
+    private SortPredicate getSort( String propertyName ) {
+        for ( SortPredicate sort : sorts ) {
+            if ( sort.getPropertyName().equals( propertyName ) ) {
+                return sort;
+            }
+        }
+        return null;
+    }
+
+
+    /** Return the iterator results, ordered if required */
+    public Results getResults( SearchVisitor visitor ) throws Exception {
+        // if we have no order by just load the results
+
+        if ( rootNode == null ) {
+            return null;
+        }
+
+        rootNode.visit( visitor );
+
+        ResultIterator itr = visitor.getResults();
+
+        List<ScanColumn> entityIds = new ArrayList<ScanColumn>( Math.min( size, Query.MAX_LIMIT ) );
+
+        CursorCache resultsCursor = new CursorCache();
+
+        while ( entityIds.size() < size && itr.hasNext() ) {
+            entityIds.addAll( itr.next() );
+        }
+
+        //set our cursor, we paged through more entities than we want to return
+        if ( entityIds.size() > 0 ) {
+            int resultSize = Math.min( entityIds.size(), size );
+            entityIds = entityIds.subList( 0, resultSize );
+
+            if ( resultSize == size ) {
+                itr.finalizeCursor( resultsCursor, entityIds.get( resultSize - 1 ).getUUID() );
+            }
+        }
+        if (logger.isDebugEnabled()) {
+        	logger.debug("Getting result for query: [{}],  returning entityIds size: {}", getQuery(), entityIds.size());
+        }
+
+        final ResultsLoader loader = loaderFactory.getResultsLoader( em, query, query.getResultsLevel() );
+        final Results results = loader.getResults( entityIds );
+
+        if ( results == null ) {
+            return null;
+        }
+
+        // now we need to set the cursor from our tree evaluation for return
+        results.setCursor( resultsCursor.asString() );
+
+        results.setQuery( query );
+        results.setQueryProcessor( this );
+        results.setSearchVisitor( visitor );
+
+        return results;
+    }
+
+
+    private class TreeEvaluator implements QueryVisitor {
+
+        // stack for nodes that will be used to construct the tree and create
+        // objects
+        private CountingStack<QueryNode> nodes = new CountingStack<QueryNode>();
+
+
+        private int contextCount = -1;
+
+
+        /** Get the root node in our tree for runtime evaluation */
+        public QueryNode getRootNode() {
+            return nodes.peek();
+        }
+
+
+        /*
+         * (non-Javadoc)
+         *
+         * @see org.apache.usergrid.persistence.query.tree.QueryVisitor#visit(org.apache.usergrid
+         * .persistence.query.tree.AndOperand)
+         */
+        @Override
+        public void visit( AndOperand op ) throws PersistenceException {
+
+            op.getLeft().visit( this );
+
+            QueryNode leftResult = nodes.peek();
+
+            op.getRight().visit( this );
+
+            QueryNode rightResult = nodes.peek();
+
+            // if the result of the left and right are the same, we don't want
+            // to create an AND. We'll use the same SliceNode. Do nothing
+            if ( leftResult == rightResult ) {
+                return;
+            }
+
+            // otherwise create a new AND node from the result of the visit
+
+            QueryNode right = nodes.pop();
+            QueryNode left = nodes.pop();
+
+            AndNode newNode = new AndNode( left, right );
+
+            nodes.push( newNode );
+        }
+
+
+        /*
+         * (non-Javadoc)
+         *
+         * @see org.apache.usergrid.persistence.query.tree.QueryVisitor#visit(org.apache.usergrid
+         * .persistence.query.tree.OrOperand)
+         */
+        @Override
+        public void visit( OrOperand op ) throws PersistenceException {
+
+            // we need to create a new slicenode for the children of this
+            // operation
+
+            Operand left = op.getLeft();
+            Operand right = op.getRight();
+
+            // we only create a new slice node if our children are && and ||
+            // operations
+            createNewSlice( left );
+
+            left.visit( this );
+
+            // we only create a new slice node if our children are && and ||
+            // operations
+            createNewSlice( right );
+
+            right.visit( this );
+
+            QueryNode rightResult = nodes.pop();
+            QueryNode leftResult = nodes.pop();
+
+            // rewrite with the new Or operand
+            OrNode orNode = new OrNode( leftResult, rightResult,  ++contextCount );
+
+            nodes.push( orNode );
+        }
+
+
+        /*
+         * (non-Javadoc)
+         *
+         * @see org.apache.usergrid.persistence.query.tree.QueryVisitor#visit(org.apache.usergrid
+         * .persistence.query.tree.NotOperand)
+         */
+        @Override
+        public void visit( NotOperand op ) throws PersistenceException {
+
+            // create a new context since any child of NOT will need to be
+            // evaluated independently
+            Operand child = op.getOperation();
+            createNewSlice( child );
+            child.visit( this );
+
+            nodes.push( new NotNode( nodes.pop(), new AllNode( ++contextCount, false ) ) );
+        }
+
+
+        /*
+         * (non-Javadoc)
+         *
+         * @see org.apache.usergrid.persistence.query.tree.QueryVisitor#visit(org.apache.usergrid
+         * .persistence.query.tree.ContainsOperand)
+         */
+        @Override
+        public void visit( ContainsOperand op ) throws NoFullTextIndexException {
+
+            String propertyName = op.getProperty().getValue();
+
+            if ( !SCHEMA.isPropertyFulltextIndexed( entityType, propertyName ) ) {
+                throw new NoFullTextIndexException( entityType, propertyName );
+            }
+
+            StringLiteral string = op.getString();
+
+            String indexName = op.getProperty().getIndexedValue();
+
+            SliceNode node = null;
+
+            // sdg - if left & right have same field name, we need to create a new
+            // slice
+            if ( !nodes.isEmpty() && nodes.peek() instanceof SliceNode
+                    && ( ( SliceNode ) nodes.peek() ).getSlice( indexName ) != null ) {
+                node = newSliceNode();
+            }
+            else {
+                node = getUnionNode( op );
+            }
+
+            String fieldName = op.getProperty().getIndexedValue();
+
+            node.setStart( fieldName, string.getValue(), true );
+            node.setFinish( fieldName, string.getEndValue(), true );
+        }
+
+
+        /*
+         * (non-Javadoc)
+         *
+         * @see org.apache.usergrid.persistence.query.tree.QueryVisitor#visit(org.apache.usergrid
+         * .persistence.query.tree.WithinOperand)
+         */
+        @Override
+        public void visit( WithinOperand op ) {
+
+            // change the property name to coordinates
+            nodes.push( new WithinNode( op.getProperty().getIndexedName(), op.getDistance().getFloatValue(),
+                    op.getLattitude().getFloatValue(), op.getLongitude().getFloatValue(), ++contextCount ) );
+        }
+
+
+        /*
+         * (non-Javadoc)
+         *
+         * @see org.apache.usergrid.persistence.query.tree.QueryVisitor#visit(org.apache.usergrid
+         * .persistence.query.tree.LessThan)
+         */
+        @Override
+        public void visit( LessThan op ) throws NoIndexException {
+            String propertyName = op.getProperty().getValue();
+
+            checkIndexed( propertyName );
+
+            getUnionNode( op ).setFinish( propertyName, op.getLiteral().getValue(), false );
+        }
+
+
+        /*
+         * (non-Javadoc)
+         *
+         * @see org.apache.usergrid.persistence.query.tree.QueryVisitor#visit(org.apache.usergrid
+         * .persistence.query.tree.LessThanEqual)
+         */
+        @Override
+        public void visit( LessThanEqual op ) throws NoIndexException {
+
+            String propertyName = op.getProperty().getValue();
+
+            checkIndexed( propertyName );
+
+            getUnionNode( op ).setFinish( propertyName, op.getLiteral().getValue(), true );
+        }
+
+
+        /*
+         * (non-Javadoc)
+         *
+         * @see org.apache.usergrid.persistence.query.tree.QueryVisitor#visit(org.apache.usergrid
+         * .persistence.query.tree.Equal)
+         */
+        @Override
+        public void visit( Equal op ) throws NoIndexException {
+            String fieldName = op.getProperty().getValue();
+
+            checkIndexed( fieldName );
+
+            Literal<?> literal = op.getLiteral();
+            SliceNode node = getUnionNode( op );
+
+            // this is an edge case. If we get more edge cases, we need to push
+            // this down into the literals and let the objects
+            // handle this
+            if ( literal instanceof StringLiteral ) {
+
+                StringLiteral stringLiteral = ( StringLiteral ) literal;
+
+                String endValue = stringLiteral.getEndValue();
+
+                if ( endValue != null ) {
+                    node.setFinish( fieldName, endValue, true );
+                }
+            }
+            else {
+                node.setFinish( fieldName, literal.getValue(), true );
+            }
+
+            node.setStart( fieldName, literal.getValue(), true );
+        }
+
+
+        /*
+         * (non-Javadoc)
+         *
+         * @see org.apache.usergrid.persistence.query.tree.QueryVisitor#visit(org.apache.usergrid
+         * .persistence.query.tree.GreaterThan)
+         */
+        @Override
+        public void visit( GreaterThan op ) throws NoIndexException {
+            String propertyName = op.getProperty().getValue();
+
+            checkIndexed( propertyName );
+
+            getUnionNode( op ).setStart( propertyName, op.getLiteral().getValue(), false );
+        }
+
+
+        /*
+         * (non-Javadoc)
+         *
+         * @see org.apache.usergrid.persistence.query.tree.QueryVisitor#visit(org.apache.usergrid
+         * .persistence.query.tree.GreaterThanEqual)
+         */
+        @Override
+        public void visit( GreaterThanEqual op ) throws NoIndexException {
+            String propertyName = op.getProperty().getValue();
+
+            checkIndexed( propertyName );
+
+            getUnionNode( op ).setStart( propertyName, op.getLiteral().getValue(), true );
+        }
+
+
+        /**
+         * Return the current leaf node to add to if it exists. This means that we can compress multiple 'AND'
+         * operations and ranges into a single node. Otherwise a new node is created and pushed to the stack
+         *
+         * @param current The current operand node
+         */
+        private SliceNode getUnionNode( EqualityOperand current ) {
+
+            /**
+             * we only create a new slice node in 3 situations 1. No nodes exist 2.
+             * The parent node is not an AND node. Meaning we can't add this slice to
+             * the current set of slices 3. Our current top of stack is not a slice
+             * node.
+             */
+            // no nodes exist
+            if ( nodes.size() == 0 || !( nodes.peek() instanceof SliceNode ) ) {
+                return newSliceNode();
+            }
+
+            return ( SliceNode ) nodes.peek();
+        }
+
+
+        /** The new slice node */
+        private SliceNode newSliceNode() {
+            SliceNode sliceNode = new SliceNode( ++contextCount );
+
+            nodes.push( sliceNode );
+
+            return sliceNode;
+        }
+
+
+        /** Create a new slice if one will be required within the context of this node */
+        private void createNewSlice( Operand child ) {
+            if ( child instanceof EqualityOperand || child instanceof AndOperand || child instanceof ContainsOperand ) {
+                newSliceNode();
+            }
+        }
+
+
+        public int getSliceCount() {
+            return nodes.getSliceCount();
+        }
+    }
+
+
+    private static class CountingStack<T> extends Stack<T> {
+
+        private int count = 0;
+
+        /**
+         *
+         */
+        private static final long serialVersionUID = 1L;
+
+
+        /* (non-Javadoc)
+         * @see java.util.Stack#pop()
+         */
+        @Override
+        public synchronized T pop() {
+            T entry = super.pop();
+
+            if ( entry instanceof SliceNode ) {
+                count += ( ( SliceNode ) entry ).getAllSlices().size();
+            }
+
+            return entry;
+        }
+
+
+        public int getSliceCount() {
+
+            Iterator<T> itr = this.iterator();
+
+            T entry;
+
+            while ( itr.hasNext() ) {
+                entry = itr.next();
+
+                if ( entry instanceof SliceNode ) {
+                    count += ( ( SliceNode ) entry ).getAllSlices().size();
+                }
+            }
+
+            return count;
+        }
+    }
+
+
+    /** @return the pageSizeHint */
+    public int getPageSizeHint( QueryNode node ) {
+        /*****
+         * DO NOT REMOVE THIS PIECE OF CODE!!!!!!!!!!!
+         * It is crucial that the root iterator only needs the result set size per page
+         * otherwise our cursor logic will fail when passing cursor data to the leaf nodes
+         *******/
+        if(node == rootNode){
+            return size;
+        }
+
+        return pageSizeHint;
+    }
+
+
+    /** Generate a slice node with scan ranges for all the properties in our sort cache */
+    private OrderByNode generateSorts( int opCount ) throws NoIndexException {
+
+        // the value is irrelevant since we'll only ever have 1 slice node
+        // if this is called
+        SliceNode slice = new SliceNode( opCount );
+
+        SortPredicate first = sorts.get( 0 );
+
+        String propertyName = first.getPropertyName();
+
+        checkIndexed( propertyName );
+
+        slice.setStart( propertyName, null, true );
+        slice.setFinish( propertyName, null, true );
+
+
+        for ( int i = 1; i < sorts.size(); i++ ) {
+            checkIndexed( sorts.get( i ).getPropertyName() );
+        }
+
+
+        return new OrderByNode( slice, sorts.subList( 1, sorts.size() ), rootNode );
+    }
+
+
+    private void checkIndexed( String propertyName ) throws NoIndexException {
+
+        if ( propertyName == null || propertyName.isEmpty() || ( !SCHEMA.isPropertyIndexed( entityType, propertyName )
+                && collectionInfo != null ) ) {
+            throw new NoIndexException( entityType, propertyName );
+        }
+    }
+
+
+    public EntityManager getEntityManager() {
+        return em;
+    }
+}


[91/96] [abbrv] USERGRID-2 package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/index-files/index-6.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/index-files/index-6.html b/sdks/android/doc/index-files/index-6.html
index 285f851..d5e729d 100644
--- a/sdks/android/doc/index-files/index-6.html
+++ b/sdks/android/doc/index-files/index-6.html
@@ -83,411 +83,411 @@ function windowTitle()
 <B>G</B></H2>
 <DL>
 <DT><A HREF="../org/usergrid/android/client/Client.html#getAccessToken()"><B>getAccessToken()</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getAccessToken()"><B>getAccessToken()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getAction()"><B>getAction()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#getActor()"><B>getActor()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.html#getApiUrl()"><B>getApiUrl()</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getApplication()"><B>getApplication()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.html#getApplicationId()"><B>getApplicationId()</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getApplications()"><B>getApplications()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#getAttachments()"><B>getAttachments()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#getAuthor()"><B>getAuthor()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/utils/JsonUtils.html#getBooleanProperty(java.util.Map, java.lang.String)"><B>getBooleanProperty(Map&lt;String, JsonNode&gt;, String)</B></A> - 
-Static method in class org.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.usergrid.android.client.utils">JsonUtils</A>
+Static method in class org.apache.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.apache.usergrid.android.client.utils">JsonUtils</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#getCategory()"><B>getCategory()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Message.html#getCategory()"><B>getCategory()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html#getCategory()"><B>getCategory()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response">AggregateCounterSet</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response">AggregateCounterSet</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.html#getClientId()"><B>getClientId()</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.html#getClientSecret()"><B>getClientSecret()</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getConsumer()"><B>getConsumer()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#getContent()"><B>getContent()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#getContent()"><B>getContent()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Message.html#getCorrelationId()"><B>getCorrelationId()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getCounters()"><B>getCounters()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getCredentials()"><B>getCredentials()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.html#getCurrentOrganization()"><B>getCurrentOrganization()</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getCursor()"><B>getCursor()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getData()"><B>getData()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Message.html#getDestination()"><B>getDestination()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/utils/DeviceUuidFactory.html#getDeviceUuid()"><B>getDeviceUuid()</B></A> - 
-Method in class org.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/DeviceUuidFactory.html" title="class in org.usergrid.android.client.utils">DeviceUuidFactory</A>
+Method in class org.apache.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/DeviceUuidFactory.html" title="class in org.apache.usergrid.android.client.utils">DeviceUuidFactory</A>
 <DD>Returns a unique UUID for the current android device.
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#getDisplayName()"><B>getDisplayName()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#getDownstreamDuplicates()"><B>getDownstreamDuplicates()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html#getDuration()"><B>getDuration()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html#getDynamicProperties()"><B>getDynamicProperties()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.usergrid.android.client.entities">Activity.ActivityCollection</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityCollection</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#getDynamicProperties()"><B>getDynamicProperties()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html#getDynamicProperties()"><B>getDynamicProperties()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#getEmail()"><B>getEmail()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getEntities()"><B>getEntities()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getEntities(java.lang.Class)"><B>getEntities(Class&lt;T&gt;)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getEntityCount()"><B>getEntityCount()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#getEntityType()"><B>getEntityType()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getError()"><B>getError()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getErrorDescription()"><B>getErrorDescription()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getErrorUri()"><B>getErrorUri()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getException()"><B>getException()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getFirstEntity()"><B>getFirstEntity()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getFirstEntity(java.lang.Class)"><B>getFirstEntity(Class&lt;T&gt;)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getFirstMessage()"><B>getFirstMessage()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#getFirstname()"><B>getFirstname()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getFirstQueue()"><B>getFirstQueue()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#getGenerator()"><B>getGenerator()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html#getGroup()"><B>getGroup()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response">AggregateCounterSet</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response">AggregateCounterSet</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.html#getGroupsForUser(java.lang.String)"><B>getGroupsForUser(String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Get the groups for the user.
-<DT><A HREF="../org/usergrid/android/client/Client.html#getGroupsForUserAsync(java.lang.String, org.usergrid.android.client.callbacks.GroupsRetrievedCallback)"><B>getGroupsForUserAsync(String, GroupsRetrievedCallback)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#getGroupsForUserAsync(java.lang.String, org.apache.usergrid.android.client.callbacks.GroupsRetrievedCallback)"><B>getGroupsForUserAsync(String, GroupsRetrievedCallback)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Get the groups for the user.
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html#getHeight()"><B>getHeight()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#getIcon()"><B>getIcon()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#getId()"><B>getId()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ClientCredentialsInfo.html#getId()"><B>getId()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response">ClientCredentialsInfo</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response">ClientCredentialsInfo</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#getImage()"><B>getImage()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html#getItems()"><B>getItems()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.usergrid.android.client.entities">Activity.ActivityCollection</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityCollection</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getLast()"><B>getLast()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getLastEntity()"><B>getLastEntity()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getLastEntity(java.lang.Class)"><B>getLastEntity(Class&lt;T&gt;)</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getLastMessage()"><B>getLastMessage()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#getLastname()"><B>getLastname()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getLastQueue()"><B>getLastQueue()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getLastQueueId()"><B>getLastQueueId()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getList()"><B>getList()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.html#getLoggedInUser()"><B>getLoggedInUser()</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/utils/JsonUtils.html#getLongProperty(java.util.Map, java.lang.String)"><B>getLongProperty(Map&lt;String, JsonNode&gt;, String)</B></A> - 
-Static method in class org.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.usergrid.android.client.utils">JsonUtils</A>
+Static method in class org.apache.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.apache.usergrid.android.client.utils">JsonUtils</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getMessageCount()"><B>getMessageCount()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/Client.html#getMessages(java.lang.String, java.lang.String, java.util.UUID, java.lang.Long, java.lang.Integer, java.lang.Integer, java.lang.Integer, org.usergrid.android.client.Client.QueuePosition, java.lang.Boolean, java.lang.Boolean)"><B>getMessages(String, String, UUID, Long, Integer, Integer, Integer, Client.QueuePosition, Boolean, Boolean)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#getMessages(java.lang.String, java.lang.String, java.util.UUID, java.lang.Long, java.lang.Integer, java.lang.Integer, java.lang.Integer, org.apache.usergrid.android.client.Client.QueuePosition, java.lang.Boolean, java.lang.Boolean)"><B>getMessages(String, String, UUID, Long, Integer, Integer, Integer, Client.QueuePosition, Boolean, Boolean)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getMessages()"><B>getMessages()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getMetadata()"><B>getMetadata()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#getMiddlename()"><B>getMiddlename()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Device.html#getName()"><B>getName()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities">Device</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities">Device</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#getName()"><B>getName()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html#getName()"><B>getName()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response">AggregateCounterSet</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response">AggregateCounterSet</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#getNativeType()"><B>getNativeType()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Device.html#getNativeType()"><B>getNativeType()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities">Device</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities">Device</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Entity.html#getNativeType()"><B>getNativeType()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Group.html#getNativeType()"><B>getNativeType()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Message.html#getNativeType()"><B>getNativeType()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#getNativeType()"><B>getNativeType()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getNext()"><B>getNext()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#getObject()"><B>getObject()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/utils/JsonUtils.html#getObjectProperty(java.util.Map, java.lang.String, java.lang.Class)"><B>getObjectProperty(Map&lt;String, JsonNode&gt;, String, Class&lt;T&gt;)</B></A> - 
-Static method in class org.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.usergrid.android.client.utils">JsonUtils</A>
+Static method in class org.apache.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.apache.usergrid.android.client.utils">JsonUtils</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#getObjectType()"><B>getObjectType()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getParams()"><B>getParams()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Group.html#getPath()"><B>getPath()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getPath()"><B>getPath()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/QueueInfo.html#getPath()"><B>getPath()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response">QueueInfo</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response">QueueInfo</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#getPicture()"><B>getPicture()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Entity.html#getProperties()"><B>getProperties()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getProperties()"><B>getProperties()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#getPropertyNames()"><B>getPropertyNames()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Device.html#getPropertyNames()"><B>getPropertyNames()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities">Device</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities">Device</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Entity.html#getPropertyNames()"><B>getPropertyNames()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Group.html#getPropertyNames()"><B>getPropertyNames()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Message.html#getPropertyNames()"><B>getPropertyNames()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#getPropertyNames()"><B>getPropertyNames()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#getPublished()"><B>getPublished()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#getPublished()"><B>getPublished()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html#getQueue()"><B>getQueue()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response">AggregateCounterSet</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response">AggregateCounterSet</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getQueue()"><B>getQueue()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/QueueInfo.html#getQueue()"><B>getQueue()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response">QueueInfo</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response">QueueInfo</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getQueues()"><B>getQueues()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Message.html#getReplyTo()"><B>getReplyTo()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.Query.html#getResponse()"><B>getResponse()</B></A> - 
-Method in interface org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A>
+Method in interface org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ClientCredentialsInfo.html#getSecret()"><B>getSecret()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response">ClientCredentialsInfo</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response">ClientCredentialsInfo</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getStatus()"><B>getStatus()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/utils/JsonUtils.html#getStringProperty(java.util.Map, java.lang.String)"><B>getStringProperty(Map&lt;String, JsonNode&gt;, String)</B></A> - 
-Static method in class org.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.usergrid.android.client.utils">JsonUtils</A>
+Static method in class org.apache.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.apache.usergrid.android.client.utils">JsonUtils</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#getSummary()"><B>getSummary()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Message.html#getTimestamp()"><B>getTimestamp()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/AggregateCounter.html#getTimestamp()"><B>getTimestamp()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response">AggregateCounter</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response">AggregateCounter</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getTimestamp()"><B>getTimestamp()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#getTitle()"><B>getTitle()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Group.html#getTitle()"><B>getTitle()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html#getTotalItems()"><B>getTotalItems()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.usergrid.android.client.entities">Activity.ActivityCollection</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityCollection</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Entity.html#getType()"><B>getType()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#getUpdated()"><B>getUpdated()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#getUpstreamDuplicates()"><B>getUpstreamDuplicates()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getUri()"><B>getUri()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html#getUrl()"><B>getUrl()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.usergrid.android.client.entities">Activity.ActivityCollection</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityCollection</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#getUrl()"><B>getUrl()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html#getUrl()"><B>getUrl()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html#getUser()"><B>getUser()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response">AggregateCounterSet</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response">AggregateCounterSet</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#getUser()"><B>getUser()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#getUsername()"><B>getUsername()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#getUuid()"><B>getUuid()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Entity.html#getUuid()"><B>getUuid()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/utils/JsonUtils.html#getUUIDProperty(java.util.Map, java.lang.String)"><B>getUUIDProperty(Map&lt;String, JsonNode&gt;, String)</B></A> - 
-Static method in class org.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.usergrid.android.client.utils">JsonUtils</A>
+Static method in class org.apache.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.apache.usergrid.android.client.utils">JsonUtils</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/AggregateCounter.html#getValue()"><B>getValue()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response">AggregateCounter</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response">AggregateCounter</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html#getValues()"><B>getValues()</B></A> - 
-Method in class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response">AggregateCounterSet</A>
+Method in class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response">AggregateCounterSet</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#getVerb()"><B>getVerb()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html#getWidth()"><B>getWidth()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities"><B>Group</B></A> - Class in <A HREF="../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/entities/Group.html#Group()"><B>Group()</B></A> - 
-Constructor for class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A>
+<DT><A HREF="../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities"><B>Group</B></A> - Class in <A HREF="../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/entities/Group.html#Group()"><B>Group()</B></A> - 
+Constructor for class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/entities/Group.html#Group(org.usergrid.android.client.entities.Entity)"><B>Group(Entity)</B></A> - 
-Constructor for class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A>
+<DT><A HREF="../org/usergrid/android/client/entities/Group.html#Group(org.apache.usergrid.android.client.entities.Entity)"><B>Group(Entity)</B></A> - 
+Constructor for class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>GroupsRetrievedCallback</B></A> - Interface in <A HREF="../org/usergrid/android/client/callbacks/package-summary.html">org.usergrid.android.client.callbacks</A><DD>&nbsp;</DL>
+<DT><A HREF="../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>GroupsRetrievedCallback</B></A> - Interface in <A HREF="../org/usergrid/android/client/callbacks/package-summary.html">org.apache.usergrid.android.client.callbacks</A><DD>&nbsp;</DL>
 <HR>
 
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/index-files/index-7.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/index-files/index-7.html b/sdks/android/doc/index-files/index-7.html
index 86bbfd7..e06a61c 100644
--- a/sdks/android/doc/index-files/index-7.html
+++ b/sdks/android/doc/index-files/index-7.html
@@ -83,7 +83,7 @@ function windowTitle()
 <B>H</B></H2>
 <DL>
 <DT><A HREF="../org/usergrid/android/client/Client.html#httpRequest(org.springframework.http.HttpMethod, java.lang.Class, java.util.Map, java.lang.Object, java.lang.String...)"><B>httpRequest(HttpMethod, Class&lt;T&gt;, Map&lt;String, Object&gt;, Object, String...)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Low-level HTTP request method.
 </DL>
 <HR>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/index-files/index-8.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/index-files/index-8.html b/sdks/android/doc/index-files/index-8.html
index caaef14..1be6d98 100644
--- a/sdks/android/doc/index-files/index-8.html
+++ b/sdks/android/doc/index-files/index-8.html
@@ -83,22 +83,22 @@ function windowTitle()
 <B>I</B></H2>
 <DL>
 <DT><A HREF="../org/usergrid/android/client/Client.html#init()"><B>init()</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#isActivated()"><B>isActivated()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#isDisabled()"><B>isDisabled()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/utils/ObjectUtils.html#isEmpty(java.lang.Object)"><B>isEmpty(Object)</B></A> - 
-Static method in class org.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.usergrid.android.client.utils">ObjectUtils</A>
+Static method in class org.apache.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.apache.usergrid.android.client.utils">ObjectUtils</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Message.html#isIndexed()"><B>isIndexed()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Message.html#isPersistent()"><B>isPersistent()</B></A> - 
-Method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+Method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <DD>&nbsp;
 </DL>
 <HR>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/index-files/index-9.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/index-files/index-9.html b/sdks/android/doc/index-files/index-9.html
index bbcb461..418e059 100644
--- a/sdks/android/doc/index-files/index-9.html
+++ b/sdks/android/doc/index-files/index-9.html
@@ -82,8 +82,8 @@ function windowTitle()
 <A NAME="_J_"><!-- --></A><H2>
 <B>J</B></H2>
 <DL>
-<DT><A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.usergrid.android.client.utils"><B>JsonUtils</B></A> - Class in <A HREF="../org/usergrid/android/client/utils/package-summary.html">org.usergrid.android.client.utils</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/utils/JsonUtils.html#JsonUtils()"><B>JsonUtils()</B></A> - 
-Constructor for class org.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.usergrid.android.client.utils">JsonUtils</A>
+<DT><A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.apache.usergrid.android.client.utils"><B>JsonUtils</B></A> - Class in <A HREF="../org/usergrid/android/client/utils/package-summary.html">org.apache.usergrid.android.client.utils</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/utils/JsonUtils.html#JsonUtils()"><B>JsonUtils()</B></A> - 
+Constructor for class org.apache.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.apache.usergrid.android.client.utils">JsonUtils</A>
 <DD>&nbsp;
 </DL>
 <HR>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/Client.Query.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/Client.Query.html b/sdks/android/doc/org/usergrid/android/client/Client.Query.html
index 260d515..0221b70 100644
--- a/sdks/android/doc/org/usergrid/android/client/Client.Query.html
+++ b/sdks/android/doc/org/usergrid/android/client/Client.Query.html
@@ -55,8 +55,8 @@ function windowTitle()
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../index.html?org/usergrid/android/client/Client.Query.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="Client.Query.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
@@ -88,11 +88,11 @@ DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHO
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client</FONT>
+org.apache.usergrid.android.client</FONT>
 <BR>
 Interface Client.Query</H2>
 <DL>
-<DT><B>Enclosing class:</B><DD><A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A></DD>
+<DT><B>Enclosing class:</B><DD><A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A></DD>
 </DL>
 <HR>
 <DL>
@@ -114,7 +114,7 @@ Interface Client.Query</H2>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.Query.html#getResponse()">getResponse</A></B>()</CODE>
 
 <BR>
@@ -130,7 +130,7 @@ Interface Client.Query</H2>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.Query.html#next()">next</A></B>()</CODE>
 
 <BR>
@@ -153,7 +153,7 @@ Interface Client.Query</H2>
 <A NAME="getResponse()"><!-- --></A><H3>
 getResponse</H3>
 <PRE>
-<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A> <B>getResponse</B>()</PRE>
+<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A> <B>getResponse</B>()</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -175,7 +175,7 @@ boolean <B>more</B>()</PRE>
 <A NAME="next()"><!-- --></A><H3>
 next</H3>
 <PRE>
-<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A> <B>next</B>()</PRE>
+<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A> <B>next</B>()</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -212,8 +212,8 @@ next</H3>
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../index.html?org/usergrid/android/client/Client.Query.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="Client.Query.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;


[32/96] [abbrv] [partial] Change package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/TransactionNotFoundException.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/TransactionNotFoundException.java b/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/TransactionNotFoundException.java
new file mode 100644
index 0000000..21bc13e
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/TransactionNotFoundException.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.exceptions;
+
+
+public class TransactionNotFoundException extends PersistenceException {
+
+    /**
+     *
+     */
+    private static final long serialVersionUID = -3579346096812510039L;
+
+
+    public TransactionNotFoundException() {
+        super();
+    }
+
+
+    public TransactionNotFoundException( String message, Throwable cause ) {
+        super( message, cause );
+    }
+
+
+    public TransactionNotFoundException( String message ) {
+        super( message );
+    }
+
+
+    public TransactionNotFoundException( Throwable cause ) {
+        super( cause );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/UnexpectedEntityTypeException.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/UnexpectedEntityTypeException.java b/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/UnexpectedEntityTypeException.java
new file mode 100644
index 0000000..7f59830
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/UnexpectedEntityTypeException.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.exceptions;
+
+
+public class UnexpectedEntityTypeException extends PersistenceException {
+
+    /**
+     *
+     */
+    private static final long serialVersionUID = 8221919267880904834L;
+
+
+    public UnexpectedEntityTypeException() {
+        super();
+    }
+
+
+    public UnexpectedEntityTypeException( String message, Throwable cause ) {
+        super( message, cause );
+    }
+
+
+    public UnexpectedEntityTypeException( String message ) {
+        super( message );
+    }
+
+
+    public UnexpectedEntityTypeException( Throwable cause ) {
+        super( cause );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/geo/CollectionGeoSearch.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/geo/CollectionGeoSearch.java b/stack/core/src/main/java/org/apache/usergrid/persistence/geo/CollectionGeoSearch.java
new file mode 100644
index 0000000..eed451e
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/geo/CollectionGeoSearch.java
@@ -0,0 +1,51 @@
+package org.apache.usergrid.persistence.geo;
+
+
+import java.nio.ByteBuffer;
+import java.util.List;
+import java.util.TreeSet;
+import java.util.UUID;
+
+import org.apache.usergrid.persistence.EntityManager;
+import org.apache.usergrid.persistence.EntityRef;
+import org.apache.usergrid.persistence.IndexBucketLocator;
+import org.apache.usergrid.persistence.cassandra.CassandraService;
+import org.apache.usergrid.persistence.geo.model.Point;
+
+import me.prettyprint.hector.api.beans.HColumn;
+import static org.apache.usergrid.persistence.cassandra.CassandraPersistenceUtils.key;
+
+
+/**
+ * Class for loading collection search data
+ *
+ * @author tnine
+ */
+public class CollectionGeoSearch extends GeoIndexSearcher {
+
+    private final String collectionName;
+    private final EntityRef headEntity;
+
+
+    public CollectionGeoSearch( EntityManager entityManager, IndexBucketLocator locator, CassandraService cass,
+                                EntityRef headEntity, String collectionName ) {
+        super( entityManager, locator, cass );
+        this.collectionName = collectionName;
+        this.headEntity = headEntity;
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.apache.usergrid.persistence.query.ir.result.GeoIterator.GeoIndexSearcher
+     * #doSearch()
+     */
+    @Override
+    protected TreeSet<HColumn<ByteBuffer, ByteBuffer>> doSearch( List<String> geoCells, UUID startId, Point searchPoint,
+                                                                 String propertyName, int pageSize ) throws Exception {
+
+        return query( key( headEntity.getUuid(), collectionName, propertyName ), geoCells, searchPoint, startId,
+                pageSize );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/geo/ConnectionGeoSearch.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/geo/ConnectionGeoSearch.java b/stack/core/src/main/java/org/apache/usergrid/persistence/geo/ConnectionGeoSearch.java
new file mode 100644
index 0000000..be0d620
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/geo/ConnectionGeoSearch.java
@@ -0,0 +1,50 @@
+package org.apache.usergrid.persistence.geo;
+
+
+import java.nio.ByteBuffer;
+import java.util.List;
+import java.util.TreeSet;
+import java.util.UUID;
+
+import org.apache.usergrid.persistence.EntityManager;
+import org.apache.usergrid.persistence.IndexBucketLocator;
+import org.apache.usergrid.persistence.cassandra.CassandraService;
+import org.apache.usergrid.persistence.geo.model.Point;
+
+import me.prettyprint.hector.api.beans.HColumn;
+import static org.apache.usergrid.persistence.Schema.INDEX_CONNECTIONS;
+import static org.apache.usergrid.persistence.cassandra.CassandraPersistenceUtils.key;
+
+
+/**
+ * Class for loading connection data
+ *
+ * @author tnine
+ */
+public class ConnectionGeoSearch extends GeoIndexSearcher {
+
+    private final UUID connectionId;
+
+
+    public ConnectionGeoSearch( EntityManager entityManager, IndexBucketLocator locator, CassandraService cass,
+                                UUID connectionId ) {
+        super( entityManager, locator, cass );
+
+        this.connectionId = connectionId;
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see
+     * org.apache.usergrid.persistence.query.ir.result.GeoIterator.GeoIndexSearcher
+     * #doSearch()
+     */
+    @Override
+    protected TreeSet<HColumn<ByteBuffer, ByteBuffer>> doSearch( List<String> geoCells, UUID startId, Point searchPoint,
+                                                                 String propertyName, int pageSize ) throws Exception {
+
+        return query( key( connectionId, INDEX_CONNECTIONS, propertyName ), geoCells, searchPoint, startId, pageSize );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/geo/EntityLocationRef.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/geo/EntityLocationRef.java b/stack/core/src/main/java/org/apache/usergrid/persistence/geo/EntityLocationRef.java
new file mode 100644
index 0000000..138edae
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/geo/EntityLocationRef.java
@@ -0,0 +1,210 @@
+package org.apache.usergrid.persistence.geo;
+
+
+import java.util.UUID;
+
+import org.apache.usergrid.persistence.EntityRef;
+import org.apache.usergrid.persistence.geo.model.Point;
+import org.apache.usergrid.utils.UUIDUtils;
+
+import me.prettyprint.hector.api.beans.DynamicComposite;
+import static org.apache.commons.lang.math.NumberUtils.toDouble;
+import static org.apache.usergrid.utils.StringUtils.stringOrSubstringAfterLast;
+import static org.apache.usergrid.utils.StringUtils.stringOrSubstringBeforeFirst;
+
+
+public class EntityLocationRef implements EntityRef {
+
+    private UUID uuid;
+
+    private String type;
+
+    private UUID timestampUuid = UUIDUtils.newTimeUUID();
+
+    private double latitude;
+
+    private double longitude;
+
+    private double distance;
+
+
+    public EntityLocationRef() {
+    }
+
+
+    public EntityLocationRef( EntityRef entity, double latitude, double longitude ) {
+        this( entity.getType(), entity.getUuid(), latitude, longitude );
+    }
+
+
+    public EntityLocationRef( String type, UUID uuid, double latitude, double longitude ) {
+        this.type = type;
+        this.uuid = uuid;
+        this.latitude = latitude;
+        this.longitude = longitude;
+    }
+
+
+    public EntityLocationRef( EntityRef entity, UUID timestampUuid, double latitude, double longitude ) {
+        this( entity.getType(), entity.getUuid(), timestampUuid, latitude, longitude );
+    }
+
+
+    public EntityLocationRef( String type, UUID uuid, UUID timestampUuid, double latitude, double longitude ) {
+        this.type = type;
+        this.uuid = uuid;
+        this.timestampUuid = timestampUuid;
+        this.latitude = latitude;
+        this.longitude = longitude;
+    }
+
+
+    public EntityLocationRef( EntityRef entity, UUID timestampUuid, String coord ) {
+        this.type = entity.getType();
+        this.uuid = entity.getUuid();
+        this.timestampUuid = timestampUuid;
+        this.latitude = toDouble( stringOrSubstringBeforeFirst( coord, ',' ) );
+        this.longitude = toDouble( stringOrSubstringAfterLast( coord, ',' ) );
+    }
+
+
+    @Override
+    public UUID getUuid() {
+        return uuid;
+    }
+
+
+    public void setUuid( UUID uuid ) {
+        this.uuid = uuid;
+    }
+
+
+    @Override
+    public String getType() {
+        return type;
+    }
+
+
+    public void setType( String type ) {
+        this.type = type;
+    }
+
+
+    public UUID getTimestampUuid() {
+        return timestampUuid;
+    }
+
+
+    public void setTimestampUuid( UUID timestampUuid ) {
+        this.timestampUuid = timestampUuid;
+    }
+
+
+    public double getLatitude() {
+        return latitude;
+    }
+
+
+    public void setLatitude( double latitude ) {
+        this.latitude = latitude;
+    }
+
+
+    public double getLongitude() {
+        return longitude;
+    }
+
+
+    public void setLongitude( double longitude ) {
+        this.longitude = longitude;
+    }
+
+
+    public Point getPoint() {
+        return new Point( latitude, longitude );
+    }
+
+
+    public DynamicComposite getColumnName() {
+        return new DynamicComposite( uuid, type, timestampUuid );
+    }
+
+
+    public DynamicComposite getColumnValue() {
+        return new DynamicComposite( latitude, longitude );
+    }
+
+
+    public long getTimestampInMicros() {
+        return UUIDUtils.getTimestampInMicros( timestampUuid );
+    }
+
+
+    public long getTimestampInMillis() {
+        return UUIDUtils.getTimestampInMillis( timestampUuid );
+    }
+
+
+    public double getDistance() {
+        return distance;
+    }
+
+
+    /** Calculate, set and return the distance from this location to the point specified */
+    public double calcDistance( Point point ) {
+        distance = GeocellUtils.distance( getPoint(), point );
+        return distance;
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see java.lang.Object#hashCode()
+     */
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ( ( type == null ) ? 0 : type.hashCode() );
+        result = prime * result + ( ( uuid == null ) ? 0 : uuid.hashCode() );
+        return result;
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see java.lang.Object#equals(java.lang.Object)
+     */
+    @Override
+    public boolean equals( Object obj ) {
+        if ( this == obj ) {
+            return true;
+        }
+        if ( obj == null ) {
+            return false;
+        }
+        if ( getClass() != obj.getClass() ) {
+            return false;
+        }
+        EntityLocationRef other = ( EntityLocationRef ) obj;
+        if ( type == null ) {
+            if ( other.type != null ) {
+                return false;
+            }
+        }
+        else if ( !type.equals( other.type ) ) {
+            return false;
+        }
+        if ( uuid == null ) {
+            if ( other.uuid != null ) {
+                return false;
+            }
+        }
+        else if ( !uuid.equals( other.uuid ) ) {
+            return false;
+        }
+        return true;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/geo/EntityLocationRefDistanceComparator.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/geo/EntityLocationRefDistanceComparator.java b/stack/core/src/main/java/org/apache/usergrid/persistence/geo/EntityLocationRefDistanceComparator.java
new file mode 100644
index 0000000..baa5218
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/geo/EntityLocationRefDistanceComparator.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.geo;
+
+
+import java.util.Comparator;
+
+import org.apache.usergrid.utils.UUIDUtils;
+
+
+/**
+ * Compares 2 entity location refs by distance.  The one with the larger distance is considered greater than one with a
+ * smaller distance.  If the distances are the same they time uuids are compared based on the UUIDUtils.compare for time
+ * uuids.  The one with a larger time is considered greater
+ *
+ * @author tnine
+ */
+public class EntityLocationRefDistanceComparator implements Comparator<EntityLocationRef> {
+
+    /**
+     *
+     */
+    public EntityLocationRefDistanceComparator() {
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
+     */
+    @Override
+    public int compare( EntityLocationRef o1, EntityLocationRef o2 ) {
+
+        if ( o1 == null ) {
+
+            //second is not null
+            if ( o2 != null ) {
+                return 1;
+            }
+            //both null
+            return 0;
+        }
+        //second is null, first isn't
+        else if ( o2 == null ) {
+            return -1;
+        }
+
+        double o1Distance = o1.getDistance();
+        double o2Distance = o2.getDistance();
+
+
+        int doubleCompare = Double.compare( o1Distance, o2Distance );
+
+
+        //    int doubleCompare = Double.compare(o1.getDistance(), o2.getDistance());
+
+        if ( doubleCompare != 0 ) {
+            return doubleCompare;
+        }
+
+        return UUIDUtils.compare( o1.getUuid(), o2.getUuid() );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/geo/GeoIndexSearcher.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/geo/GeoIndexSearcher.java b/stack/core/src/main/java/org/apache/usergrid/persistence/geo/GeoIndexSearcher.java
new file mode 100644
index 0000000..d3f1158
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/geo/GeoIndexSearcher.java
@@ -0,0 +1,366 @@
+package org.apache.usergrid.persistence.geo;
+
+
+import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.TreeSet;
+import java.util.UUID;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.apache.commons.lang.StringUtils;
+import org.apache.usergrid.persistence.EntityManager;
+import org.apache.usergrid.persistence.IndexBucketLocator;
+import org.apache.usergrid.persistence.IndexBucketLocator.IndexType;
+import org.apache.usergrid.persistence.cassandra.CassandraService;
+import org.apache.usergrid.persistence.cassandra.GeoIndexManager;
+import org.apache.usergrid.persistence.cassandra.index.IndexMultiBucketSetLoader;
+import org.apache.usergrid.persistence.geo.model.Point;
+import org.apache.usergrid.persistence.geo.model.Tuple;
+
+import me.prettyprint.cassandra.serializers.DoubleSerializer;
+import me.prettyprint.cassandra.serializers.StringSerializer;
+import me.prettyprint.cassandra.serializers.UUIDSerializer;
+import me.prettyprint.hector.api.beans.AbstractComposite.ComponentEquality;
+import me.prettyprint.hector.api.beans.DynamicComposite;
+import me.prettyprint.hector.api.beans.HColumn;
+import static org.apache.usergrid.persistence.Schema.DICTIONARY_GEOCELL;
+import static org.apache.usergrid.persistence.cassandra.ApplicationCF.ENTITY_INDEX;
+import static org.apache.usergrid.persistence.cassandra.CassandraPersistenceUtils.key;
+import static org.apache.usergrid.utils.CompositeUtils.setEqualityFlag;
+
+
+public abstract class GeoIndexSearcher {
+
+    private static final Logger logger = LoggerFactory.getLogger( GeoIndexSearcher.class );
+
+    private static final EntityLocationRefDistanceComparator COMP = new EntityLocationRefDistanceComparator();
+
+    // The maximum *practical* geocell resolution.
+    private static final int MAX_GEOCELL_RESOLUTION = GeoIndexManager.MAX_RESOLUTION;
+
+    /** Max number of records to read+parse from cass per tile */
+    private static final int MAX_FETCH_SIZE = 1000;
+
+    protected final EntityManager em;
+    protected final IndexBucketLocator locator;
+    protected final CassandraService cass;
+
+
+    /**
+     * @param entityManager
+     * @param pageSize
+     * @param headEntity
+     * @param searchPoint
+     * @param propertyName
+     * @param distance
+     */
+    public GeoIndexSearcher( EntityManager entityManager, IndexBucketLocator locator, CassandraService cass ) {
+        this.em = entityManager;
+        this.locator = locator;
+        this.cass = cass;
+    }
+
+
+    /**
+     * Perform a search from the center. The corresponding entities returned must be >= minDistance(inclusive) and <
+     * maxDistance (exclusive)
+     *
+     * @param maxResults The maximum number of results to include
+     * @param minDistance The minimum distance (inclusive)
+     * @param maxDistance The maximum distance (exclusive)
+     * @param entityClass The entity class
+     * @param baseQuery The base query
+     * @param queryEngine The query engine to use
+     * @param maxGeocellResolution The max resolution to use when searching
+     */
+    public final SearchResults proximitySearch( final EntityLocationRef minMatch, final List<String> geoCells,
+                                                Point searchPoint, String propertyName, double minDistance,
+                                                double maxDistance, final int maxResults ) throws Exception {
+
+        List<EntityLocationRef> entityLocations = new ArrayList<EntityLocationRef>( maxResults );
+
+        List<String> curGeocells = new ArrayList<String>();
+        String curContainingGeocell = null;
+
+        // we have some cells used from last time, re-use them
+        if ( geoCells != null && geoCells.size() > 0 ) {
+            curGeocells.addAll( geoCells );
+            curContainingGeocell = geoCells.get( 0 );
+        }
+        // start at the bottom
+        else {
+
+      /*
+       * The currently-being-searched geocells. NOTES: Start with max possible.
+       * Must always be of the same resolution. Must always form a rectangular
+       * region. One of these must be equal to the cur_containing_geocell.
+       */
+            curContainingGeocell = GeocellUtils.compute( searchPoint, MAX_GEOCELL_RESOLUTION );
+            curGeocells.add( curContainingGeocell );
+        }
+
+        if ( minMatch != null ) {
+            minMatch.calcDistance( searchPoint );
+        }
+        // Set of already searched cells
+        Set<String> searchedCells = new HashSet<String>();
+
+        List<String> curGeocellsUnique = null;
+
+        double closestPossibleNextResultDist = 0;
+
+    /*
+     * Assumes both a and b are lists of (entity, dist) tuples, *sorted by
+     * dist*. NOTE: This is an in-place merge, and there are guaranteed no
+     * duplicates in the resulting list.
+     */
+
+        int noDirection[] = { 0, 0 };
+        List<Tuple<int[], Double>> sortedEdgesDistances = Arrays.asList( new Tuple<int[], Double>( noDirection, 0d ) );
+        boolean done = false;
+        UUID lastReturned = null;
+
+        while ( !curGeocells.isEmpty() && entityLocations.size() < maxResults ) {
+            closestPossibleNextResultDist = sortedEdgesDistances.get( 0 ).getSecond();
+            if ( maxDistance > 0 && closestPossibleNextResultDist > maxDistance ) {
+                break;
+            }
+
+            Set<String> curTempUnique = new HashSet<String>( curGeocells );
+            curTempUnique.removeAll( searchedCells );
+            curGeocellsUnique = new ArrayList<String>( curTempUnique );
+
+            Set<HColumn<ByteBuffer, ByteBuffer>> queryResults = null;
+
+            lastReturned = null;
+
+            // we need to keep searching everything in our tiles until we don't get
+            // any more results, then we'll have the closest points and can move on
+            // do the next tiles
+            do {
+                queryResults = doSearch( curGeocellsUnique, lastReturned, searchPoint, propertyName, MAX_FETCH_SIZE );
+
+                if ( logger.isDebugEnabled() ) {
+                    logger.debug( "fetch complete for: {}", StringUtils.join( curGeocellsUnique, ", " ) );
+                }
+
+                searchedCells.addAll( curGeocells );
+
+                // Begin storing distance from the search result entity to the
+                // search center along with the search result itself, in a tuple.
+
+                // Merge new_results into results
+                for ( HColumn<ByteBuffer, ByteBuffer> column : queryResults ) {
+
+                    DynamicComposite composite = DynamicComposite.fromByteBuffer( column.getName() );
+
+                    UUID uuid = composite.get( 0, UUIDSerializer.get() );
+
+                    lastReturned = uuid;
+
+                    String type = composite.get( 1, StringSerializer.get() );
+                    UUID timestampUuid = composite.get( 2, UUIDSerializer.get() );
+                    composite = DynamicComposite.fromByteBuffer( column.getValue() );
+                    Double latitude = composite.get( 0, DoubleSerializer.get() );
+                    Double longitude = composite.get( 1, DoubleSerializer.get() );
+
+                    EntityLocationRef entityLocation =
+                            new EntityLocationRef( type, uuid, timestampUuid, latitude, longitude );
+
+                    double distance = entityLocation.calcDistance( searchPoint );
+
+                    // discard, it's too close or too far, of closer than the minimum we
+                    // should match, skip it
+                    if ( distance < minDistance || ( maxDistance != 0 && distance > maxDistance ) || ( minMatch != null
+                            && COMP.compare( entityLocation, minMatch ) <= 0 ) ) {
+                        continue;
+                    }
+
+                    int index = Collections.binarySearch( entityLocations, entityLocation, COMP );
+
+                    // already in the index
+                    if ( index > -1 ) {
+                        continue;
+                    }
+
+                    // set the insert index
+                    index = ( index + 1 ) * -1;
+
+                    // no point in adding it
+                    if ( index >= maxResults ) {
+                        continue;
+                    }
+
+                    // results.add(index, entity);
+                    // distances.add(index, distance);
+                    entityLocations.add( index, entityLocation );
+
+                    /**
+                     * Discard an additional entries as we iterate to avoid holding them
+                     * all in ram
+                     */
+                    while ( entityLocations.size() > maxResults ) {
+                        entityLocations.remove( entityLocations.size() - 1 );
+                    }
+                }
+            }
+            while ( queryResults != null && queryResults.size() == MAX_FETCH_SIZE );
+
+            /**
+             * We've searched everything and have a full set, we want to return the
+             * "current" tiles to search next time for the cursor, since cass could
+             * contain more results
+             */
+            if ( done || entityLocations.size() == maxResults ) {
+                break;
+            }
+
+            sortedEdgesDistances = GeocellUtils.distanceSortedEdges( curGeocells, searchPoint );
+
+            if ( queryResults.size() == 0 || curGeocells.size() == 4 ) {
+        /*
+         * Either no results (in which case we optimize by not looking at
+         * adjacents, go straight to the parent) or we've searched 4 adjacent
+         * geocells, in which case we should now search the parents of those
+         * geocells.
+         */
+                curContainingGeocell =
+                        curContainingGeocell.substring( 0, Math.max( curContainingGeocell.length() - 1, 0 ) );
+                if ( curContainingGeocell.length() == 0 ) {
+                    // final check - top level tiles
+                    curGeocells.clear();
+                    String[] items = "0123456789abcdef".split( "(?!^)" );
+                    for ( String item : items ) {
+                        curGeocells.add( item );
+                    }
+                    done = true;
+                }
+                else {
+                    List<String> oldCurGeocells = new ArrayList<String>( curGeocells );
+                    curGeocells.clear();
+                    for ( String cell : oldCurGeocells ) {
+                        if ( cell.length() > 0 ) {
+                            String newCell = cell.substring( 0, cell.length() - 1 );
+                            if ( !curGeocells.contains( newCell ) ) {
+                                curGeocells.add( newCell );
+                            }
+                        }
+                    }
+                }
+            }
+            else if ( curGeocells.size() == 1 ) {
+                // Get adjacent in one direction.
+                // TODO(romannurik): Watch for +/- 90 degree latitude edge case
+                // geocells.
+                for ( int i = 0; i < sortedEdgesDistances.size(); i++ ) {
+
+                    int nearestEdge[] = sortedEdgesDistances.get( i ).getFirst();
+                    String edge = GeocellUtils.adjacent( curGeocells.get( 0 ), nearestEdge );
+
+                    // we're at the edge of the world, search in a different direction
+                    if ( edge == null ) {
+                        continue;
+                    }
+
+                    curGeocells.add( edge );
+                    break;
+                }
+            }
+            else if ( curGeocells.size() == 2 ) {
+                // Get adjacents in perpendicular direction.
+                int nearestEdge[] =
+                        GeocellUtils.distanceSortedEdges( Arrays.asList( curContainingGeocell ), searchPoint ).get( 0 )
+                                    .getFirst();
+                int[] perpendicularNearestEdge = { 0, 0 };
+                if ( nearestEdge[0] == 0 ) {
+                    // Was vertical, perpendicular is horizontal.
+                    for ( Tuple<int[], Double> edgeDistance : sortedEdgesDistances ) {
+                        if ( edgeDistance.getFirst()[0] != 0 ) {
+                            perpendicularNearestEdge = edgeDistance.getFirst();
+                            break;
+                        }
+                    }
+                }
+                else {
+                    // Was horizontal, perpendicular is vertical.
+                    for ( Tuple<int[], Double> edgeDistance : sortedEdgesDistances ) {
+                        if ( edgeDistance.getFirst()[0] == 0 ) {
+                            perpendicularNearestEdge = edgeDistance.getFirst();
+                            break;
+                        }
+                    }
+                }
+                List<String> tempCells = new ArrayList<String>();
+                for ( String cell : curGeocells ) {
+                    tempCells.add( GeocellUtils.adjacent( cell, perpendicularNearestEdge ) );
+                }
+                curGeocells.addAll( tempCells );
+            }
+
+            logger.debug( "{} results found.", entityLocations.size() );
+        }
+
+        // now we have our final sets, construct the results
+
+        return new SearchResults( entityLocations, curGeocells );
+    }
+
+
+    protected TreeSet<HColumn<ByteBuffer, ByteBuffer>> query( Object key, List<String> curGeocellsUnique,
+                                                              Point searchPoint, UUID startId, int count )
+            throws Exception {
+
+        List<Object> keys = new ArrayList<Object>();
+
+        UUID appId = em.getApplicationRef().getUuid();
+
+        for ( String geoCell : curGeocellsUnique ) {
+
+            // add buckets for each geoCell
+
+            for ( String indexBucket : locator.getBuckets( appId, IndexType.GEO, geoCell ) ) {
+                keys.add( key( key, DICTIONARY_GEOCELL, geoCell, indexBucket ) );
+            }
+        }
+
+        DynamicComposite start = null;
+
+        if ( startId != null ) {
+            start = new DynamicComposite( startId );
+            setEqualityFlag( start, ComponentEquality.GREATER_THAN_EQUAL );
+        }
+
+        TreeSet<HColumn<ByteBuffer, ByteBuffer>> columns =
+                IndexMultiBucketSetLoader.load( cass, ENTITY_INDEX, appId, keys, start, null, count, false );
+
+        return columns;
+    }
+
+
+    protected abstract TreeSet<HColumn<ByteBuffer, ByteBuffer>> doSearch( List<String> geoCells, UUID startId,
+                                                                          Point searchPoint, String propertyName,
+                                                                          int pageSize ) throws Exception;
+
+
+    public static class SearchResults {
+
+        public final List<EntityLocationRef> entityLocations;
+        public final List<String> lastSearchedGeoCells;
+
+
+        /**
+         * @param entityLocations
+         * @param curGeocells
+         */
+        public SearchResults( List<EntityLocationRef> entityLocations, List<String> lastSearchedGeoCells ) {
+            this.entityLocations = entityLocations;
+            this.lastSearchedGeoCells = lastSearchedGeoCells;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/geo/GeocellManager.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/geo/GeocellManager.java b/stack/core/src/main/java/org/apache/usergrid/persistence/geo/GeocellManager.java
new file mode 100644
index 0000000..c69a291
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/geo/GeocellManager.java
@@ -0,0 +1,179 @@
+package org.apache.usergrid.persistence.geo;
+
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.apache.usergrid.persistence.cassandra.GeoIndexManager;
+import org.apache.usergrid.persistence.geo.model.BoundingBox;
+import org.apache.usergrid.persistence.geo.model.CostFunction;
+import org.apache.usergrid.persistence.geo.model.DefaultCostFunction;
+import org.apache.usergrid.persistence.geo.model.Point;
+
+
+/**
+ #
+ # Copyright 2010 Alexandre Gellibert
+ #
+ # 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.
+ */
+
+
+/**
+ * Ported java version of python geocell: http://code.google.com/p/geomodel/source/browse/trunk/geo/geocell.py
+ * <p/>
+ * Defines the notion of 'geocells' and exposes methods to operate on them.
+ * <p/>
+ * A geocell is a hexadecimal string that defines a two dimensional rectangular region inside the [-90,90] x [-180,180]
+ * latitude/longitude space. A geocell's 'resolution' is its length. For most practical purposes, at high resolutions,
+ * geocells can be treated as single points.
+ * <p/>
+ * Much like geohashes (see http://en.wikipedia.org/wiki/Geohash), geocells are hierarchical, in that any prefix of a
+ * geocell is considered its ancestor, with geocell[:-1] being geocell's immediate parent cell.
+ * <p/>
+ * To calculate the rectangle of a given geocell string, first divide the [-90,90] x [-180,180] latitude/longitude space
+ * evenly into a 4x4 grid like so:
+ * <p/>
+ * +---+---+---+---+ (90, 180) | a | b | e | f | +---+---+---+---+ | 8 | 9 | c | d | +---+---+---+---+ | 2 | 3 | 6 | 7 |
+ * +---+---+---+---+ | 0 | 1 | 4 | 5 | (-90,-180) +---+---+---+---+
+ * <p/>
+ * NOTE: The point (0, 0) is at the intersection of grid cells 3, 6, 9 and c. And, for example, cell 7 should be the
+ * sub-rectangle from (-45, 90) to (0, 180).
+ * <p/>
+ * Calculate the sub-rectangle for the first character of the geocell string and re-divide this sub-rectangle into
+ * another 4x4 grid. For example, if the geocell string is '78a', we will re-divide the sub-rectangle like so:
+ * <p/>
+ * .                   . .                   . . . +----+----+----+----+ (0, 180) | 7a | 7b | 7e | 7f |
+ * +----+----+----+----+ | 78 | 79 | 7c | 7d | +----+----+----+----+ | 72 | 73 | 76 | 77 | +----+----+----+----+ | 70 |
+ * 71 | 74 | 75 | . . (-45,90) +----+----+----+----+ .                   . .                   .
+ * <p/>
+ * Continue to re-divide into sub-rectangles and 4x4 grids until the entire geocell string has been exhausted. The final
+ * sub-rectangle is the rectangular region for the geocell.
+ *
+ * @author api.roman.public@gmail.com (Roman Nurik)
+ * @author (java portage) Alexandre Gellibert
+ */
+
+public class GeocellManager {
+
+    // The maximum *practical* geocell resolution.
+    public static final int MAX_GEOCELL_RESOLUTION = GeoIndexManager.MAX_RESOLUTION;
+
+    // The maximum number of geocells to consider for a bounding box search.
+    private static final int MAX_FEASIBLE_BBOX_SEARCH_CELLS = 300;
+
+    // Function used if no custom function is used in bestBboxSearchCells method
+    private static final CostFunction DEFAULT_COST_FUNCTION = new DefaultCostFunction();
+
+    //    private static final Logger logger = GeocellLogger.get();
+
+
+    /**
+     * Returns the list of geocells (all resolutions) that are containing the point
+     *
+     * @return Returns the list of geocells (all resolutions) that are containing the point
+     */
+    public static List<String> generateGeoCell( Point point ) {
+        List<String> geocells = new ArrayList<String>();
+        String geocellMax = GeocellUtils.compute( point, GeocellManager.MAX_GEOCELL_RESOLUTION );
+        for ( int i = 1; i < GeocellManager.MAX_GEOCELL_RESOLUTION; i++ ) {
+            geocells.add( GeocellUtils.compute( point, i ) );
+        }
+        geocells.add( geocellMax );
+        return geocells;
+    }
+
+
+    /**
+     * Returns an efficient set of geocells to search in a bounding box query.
+     * <p/>
+     * This method is guaranteed to return a set of geocells having the same resolution (except in the case of
+     * antimeridian search i.e when east < west).
+     *
+     * @param bbox: A geotypes.Box indicating the bounding box being searched.
+     * @param costFunction: A function that accepts two arguments: numCells: the number of cells to search resolution:
+     * the resolution of each cell to search and returns the 'cost' of querying against this number of cells at the
+     * given resolution.)
+     *
+     * @return A list of geocell strings that contain the given box.
+     */
+    public static List<String> bestBboxSearchCells( BoundingBox bbox, CostFunction costFunction ) {
+        if ( bbox.getEast() < bbox.getWest() ) {
+            BoundingBox bboxAntimeridian1 =
+                    new BoundingBox( bbox.getNorth(), bbox.getEast(), bbox.getSouth(), GeocellUtils.MIN_LONGITUDE );
+            BoundingBox bboxAntimeridian2 =
+                    new BoundingBox( bbox.getNorth(), GeocellUtils.MAX_LONGITUDE, bbox.getSouth(), bbox.getWest() );
+            List<String> antimeridianList = bestBboxSearchCells( bboxAntimeridian1, costFunction );
+            antimeridianList.addAll( bestBboxSearchCells( bboxAntimeridian2, costFunction ) );
+            return antimeridianList;
+        }
+
+        String cellNE = GeocellUtils.compute( bbox.getNorthEast(), GeocellManager.MAX_GEOCELL_RESOLUTION );
+        String cellSW = GeocellUtils.compute( bbox.getSouthWest(), GeocellManager.MAX_GEOCELL_RESOLUTION );
+
+        // The current lowest BBOX-search cost found; start with practical infinity.
+        double minCost = Double.MAX_VALUE;
+
+        // The set of cells having the lowest calculated BBOX-search cost.
+        List<String> minCostCellSet = new ArrayList<String>();
+
+        // First find the common prefix, if there is one.. this will be the base
+        // resolution.. i.e. we don't have to look at any higher resolution cells.
+        int minResolution = 0;
+        int maxResoltuion = Math.min( cellNE.length(), cellSW.length() );
+        while ( minResolution < maxResoltuion && cellNE.substring( 0, minResolution + 1 )
+                                                       .startsWith( cellSW.substring( 0, minResolution + 1 ) ) ) {
+            minResolution++;
+        }
+
+        // Iteravely calculate all possible sets of cells that wholely contain
+        // the requested bounding box.
+        for ( int curResolution = minResolution; curResolution < GeocellManager.MAX_GEOCELL_RESOLUTION + 1;
+              curResolution++ ) {
+            String curNE = cellNE.substring( 0, curResolution );
+            String curSW = cellSW.substring( 0, curResolution );
+
+            int numCells = GeocellUtils.interpolationCount( curNE, curSW );
+            if ( numCells > MAX_FEASIBLE_BBOX_SEARCH_CELLS ) {
+                continue;
+            }
+
+            List<String> cellSet = GeocellUtils.interpolate( curNE, curSW );
+            Collections.sort( cellSet );
+
+            double cost;
+            if ( costFunction == null ) {
+                cost = DEFAULT_COST_FUNCTION.defaultCostFunction( cellSet.size(), curResolution );
+            }
+            else {
+                cost = costFunction.defaultCostFunction( cellSet.size(), curResolution );
+            }
+
+            if ( cost <= minCost ) {
+                minCost = cost;
+                minCostCellSet = cellSet;
+            }
+            else {
+                if ( minCostCellSet.size() == 0 ) {
+                    minCostCellSet = cellSet;
+                }
+                // Once the cost starts rising, we won't be able to do better, so abort.
+                break;
+            }
+        }
+        //        logger.log(Level.INFO, "Calculate cells "+StringUtils.join(minCostCellSet, ",
+        // ")+" in box ("+bbox.getSouth()+","+bbox.getWest()+") ("+bbox.getNorth()+","+bbox.getEast()+")");
+        return minCostCellSet;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/geo/GeocellUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/geo/GeocellUtils.java b/stack/core/src/main/java/org/apache/usergrid/persistence/geo/GeocellUtils.java
new file mode 100644
index 0000000..2bbf694
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/geo/GeocellUtils.java
@@ -0,0 +1,539 @@
+/*
+Copyright 2010 Alexandre Gellibert
+
+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.persistence.geo;
+
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.apache.usergrid.persistence.geo.comparator.DoubleTupleComparator;
+import org.apache.usergrid.persistence.geo.model.BoundingBox;
+import org.apache.usergrid.persistence.geo.model.Point;
+import org.apache.usergrid.persistence.geo.model.Tuple;
+
+/**
+ #
+ # Copyright 2010 Alexandre Gellibert
+ #
+ # 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.
+ */
+
+
+/**
+ * Utils class to compute geocells.
+ *
+ * @author api.roman.public@gmail.com (Roman Nurik)
+ * @author (java portage) Alexandre Gellibert
+ */
+public final class GeocellUtils {
+
+    public static final float MIN_LONGITUDE = -180.0f;
+    public static final float MAX_LONGITUDE = 180.0f;
+    public static final float MIN_LATITUDE = -90.0f;
+    public static final float MAX_LATITUDE = 90.0f;
+    // Geocell algorithm constants.
+    public static final int GEOCELL_GRID_SIZE = 4;
+    private static final String GEOCELL_ALPHABET = "0123456789abcdef";
+
+    // Direction enumerations.
+    private static final int[] NORTHWEST = new int[] { -1, 1 };
+    private static final int[] NORTH = new int[] { 0, 1 };
+    private static final int[] NORTHEAST = new int[] { 1, 1 };
+    private static final int[] EAST = new int[] { 1, 0 };
+    private static final int[] SOUTHEAST = new int[] { 1, -1 };
+    private static final int[] SOUTH = new int[] { 0, -1 };
+    private static final int[] SOUTHWEST = new int[] { -1, -1 };
+    private static final int[] WEST = new int[] { -1, 0 };
+
+    private static final int RADIUS = 6378135;
+
+
+    private GeocellUtils() {
+        // no instantiation allowed
+    }
+
+
+    /**
+     * Determines whether the given cells are collinear along a dimension.
+     * <p/>
+     * Returns True if the given cells are in the same row (columnTest=False) or in the same column (columnTest=True).
+     *
+     * @param cell1 : The first geocell string.
+     * @param cell2 : The second geocell string.
+     * @param columnTest : A boolean, where False invokes a row collinearity test and 1 invokes a column collinearity
+     * test.
+     *
+     * @return A bool indicating whether or not the given cells are collinear in the given dimension.
+     */
+    public static boolean collinear( String cell1, String cell2, boolean columnTest ) {
+
+        for ( int i = 0; i < Math.min( cell1.length(), cell2.length() ); i++ ) {
+            int l1[] = subdivXY( cell1.charAt( i ) );
+            int x1 = l1[0];
+            int y1 = l1[1];
+            int l2[] = subdivXY( cell2.charAt( i ) );
+            int x2 = l2[0];
+            int y2 = l2[1];
+
+            // Check row collinearity (assure y's are always the same).
+            if ( !columnTest && y1 != y2 ) {
+                return false;
+            }
+
+            // Check column collinearity (assure x's are always the same).
+            if ( columnTest && x1 != x2 ) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+
+    /**
+     * Calculates the grid of cells formed between the two given cells.
+     * <p/>
+     * Generates the set of cells in the grid created by interpolating from the given Northeast geocell to the given
+     * Southwest geocell.
+     * <p/>
+     * Assumes the Northeast geocell is actually Northeast of Southwest geocell.
+     *
+     * @param cellNE : The Northeast geocell string.
+     * @param cellSW : The Southwest geocell string.
+     *
+     * @return A list of geocell strings in the interpolation.
+     */
+    public static List<String> interpolate( String cellNE, String cellSW ) {
+        // 2D array, will later be flattened.
+        LinkedList<LinkedList<String>> cellSet = new LinkedList<LinkedList<String>>();
+        LinkedList<String> cellFirst = new LinkedList<String>();
+        cellFirst.add( cellSW );
+        cellSet.add( cellFirst );
+
+        // First get adjacent geocells across until Southeast--collinearity with
+        // Northeast in vertical direction (0) means we're at Southeast.
+        while ( !collinear( cellFirst.getLast(), cellNE, true ) ) {
+            String cellTmp = adjacent( cellFirst.getLast(), EAST );
+            if ( cellTmp == null ) {
+                break;
+            }
+            cellFirst.add( cellTmp );
+        }
+
+        // Then get adjacent geocells upwards.
+        while ( !cellSet.getLast().getLast().equalsIgnoreCase( cellNE ) ) {
+
+            LinkedList<String> cellTmpRow = new LinkedList<String>();
+            for ( String g : cellSet.getLast() ) {
+                cellTmpRow.add( adjacent( g, NORTH ) );
+            }
+            if ( cellTmpRow.getFirst() == null ) {
+                break;
+            }
+            cellSet.add( cellTmpRow );
+        }
+
+        // Flatten cellSet, since it's currently a 2D array.
+        List<String> result = new ArrayList<String>();
+        for ( LinkedList<String> list : cellSet ) {
+            result.addAll( list );
+        }
+        return result;
+    }
+
+
+    /**
+     * Computes the number of cells in the grid formed between two given cells.
+     * <p/>
+     * Computes the number of cells in the grid created by interpolating from the given Northeast geocell to the given
+     * Southwest geocell. Assumes the Northeast geocell is actually Northeast of Southwest geocell.
+     *
+     * @param cellNE : The Northeast geocell string.
+     * @param cellSW : The Southwest geocell string.
+     *
+     * @return An int, indicating the number of geocells in the interpolation.
+     */
+    public static int interpolationCount( String cellNE, String cellSW ) {
+
+        BoundingBox bboxNE = computeBox( cellNE );
+        BoundingBox bboxSW = computeBox( cellSW );
+
+        double cellLatSpan = bboxSW.getNorth() - bboxSW.getSouth();
+        double cellLonSpan = bboxSW.getEast() - bboxSW.getWest();
+
+        double numCols = ( ( bboxNE.getEast() - bboxSW.getWest() ) / cellLonSpan );
+        double numRows = ( ( bboxNE.getNorth() - bboxSW.getSouth() ) / cellLatSpan );
+
+        double totalCols = numCols * numRows * 1.0;
+        if ( totalCols > Integer.MAX_VALUE ) {
+            return Integer.MAX_VALUE;
+        }
+        return ( int ) totalCols;
+    }
+
+
+    /**
+     * Calculates all of the given geocell's adjacent geocells.
+     *
+     * @param cell : The geocell string for which to calculate adjacent/neighboring cells.
+     *
+     * @return A list of 8 geocell strings and/or None values indicating adjacent cells.
+     */
+
+    public static List<String> allAdjacents( String cell ) {
+        List<String> result = new ArrayList<String>();
+        for ( int[] d : Arrays.asList( NORTHWEST, NORTH, NORTHEAST, EAST, SOUTHEAST, SOUTH, SOUTHWEST, WEST ) ) {
+            result.add( adjacent( cell, d ) );
+        }
+        return result;
+    }
+
+
+    /**
+     * Calculates the geocell adjacent to the given cell in the given direction.
+     *
+     * @param cell : The geocell string whose neighbor is being calculated.
+     * @param dir : An (x, y) tuple indicating direction, where x and y can be -1, 0, or 1. -1 corresponds to West for x
+     * and South for y, and 1 corresponds to East for x and North for y. Available helper constants are NORTH, EAST,
+     * SOUTH, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, and SOUTHWEST.
+     *
+     * @return The geocell adjacent to the given cell in the given direction, or None if there is no such cell.
+     */
+    public static String adjacent( String cell, int[] dir ) {
+        if ( cell == null ) {
+            return null;
+        }
+        int dx = dir[0];
+        int dy = dir[1];
+        char[] cellAdjArr = cell.toCharArray(); // Split the geocell string
+        // characters into a list.
+        int i = cellAdjArr.length - 1;
+
+        while ( i >= 0 && ( dx != 0 || dy != 0 ) ) {
+            int l[] = subdivXY( cellAdjArr[i] );
+            int x = l[0];
+            int y = l[1];
+
+            // Horizontal adjacency.
+            if ( dx == -1 ) { // Asking for left.
+                if ( x == 0 ) { // At left of parent cell.
+                    x = GEOCELL_GRID_SIZE - 1; // Becomes right edge of adjacent parent.
+                }
+                else {
+                    x--; // Adjacent, same parent.
+                    dx = 0; // Done with x.
+                }
+            }
+            else if ( dx == 1 ) { // Asking for right.
+                if ( x == GEOCELL_GRID_SIZE - 1 ) { // At right of parent cell.
+                    x = 0; // Becomes left edge of adjacent parent.
+                }
+                else {
+                    x++; // Adjacent, same parent.
+                    dx = 0; // Done with x.
+                }
+            }
+
+            // Vertical adjacency.
+            if ( dy == 1 ) { // Asking for above.
+                if ( y == GEOCELL_GRID_SIZE - 1 ) { // At top of parent cell.
+                    y = 0; // Becomes bottom edge of adjacent parent.
+                }
+                else {
+                    y++; // Adjacent, same parent.
+                    dy = 0; // Done with y.
+                }
+            }
+            else if ( dy == -1 ) { // Asking for below.
+                if ( y == 0 ) { // At bottom of parent cell.
+                    y = GEOCELL_GRID_SIZE - 1; // Becomes top edge of adjacent parent.
+                }
+                else {
+                    y--; // Adjacent, same parent.
+                    dy = 0; // Done with y.
+                }
+            }
+
+            int l2[] = { x, y };
+            cellAdjArr[i] = subdivChar( l2 );
+            i--;
+        }
+        // If we're not done with y then it's trying to wrap vertically,
+        // which is a failure.
+        if ( dy != 0 ) {
+            return null;
+        }
+
+        // At this point, horizontal wrapping is done inherently.
+        return new String( cellAdjArr );
+    }
+
+
+    /**
+     * Returns whether or not the given cell contains the given point.
+     *
+     * @return Returns whether or not the given cell contains the given point.
+     */
+    public static boolean containsPoint( String cell, Point point ) {
+        return compute( point, cell.length() ).equalsIgnoreCase( cell );
+    }
+
+
+    /**
+     * Returns the shortest distance between a point and a geocell bounding box.
+     * <p/>
+     * If the point is inside the cell, the shortest distance is always to a 'edge' of the cell rectangle. If the point
+     * is outside the cell, the shortest distance will be to either a 'edge' or 'corner' of the cell rectangle.
+     *
+     * @return The shortest distance from the point to the geocell's rectangle, in meters.
+     */
+    public static double pointDistance( String cell, Point point ) {
+        BoundingBox bbox = computeBox( cell );
+
+        boolean betweenWE = bbox.getWest() <= point.getLon() && point.getLon() <= bbox.getEast();
+        boolean betweenNS = bbox.getSouth() <= point.getLat() && point.getLat() <= bbox.getNorth();
+
+        if ( betweenWE ) {
+            if ( betweenNS ) {
+                // Inside the geocell.
+                return Math.min( Math.min( distance( point, new Point( bbox.getSouth(), point.getLon() ) ),
+                        distance( point, new Point( bbox.getNorth(), point.getLon() ) ) ),
+                        Math.min( distance( point, new Point( point.getLat(), bbox.getEast() ) ),
+                                distance( point, new Point( point.getLat(), bbox.getWest() ) ) ) );
+            }
+            else {
+                return Math.min( distance( point, new Point( bbox.getSouth(), point.getLon() ) ),
+                        distance( point, new Point( bbox.getNorth(), point.getLon() ) ) );
+            }
+        }
+        else {
+            if ( betweenNS ) {
+                return Math.min( distance( point, new Point( point.getLat(), bbox.getEast() ) ),
+                        distance( point, new Point( point.getLat(), bbox.getWest() ) ) );
+            }
+            else {
+                // TODO(romannurik): optimize
+                return Math.min( Math.min( distance( point, new Point( bbox.getSouth(), bbox.getEast() ) ),
+                        distance( point, new Point( bbox.getNorth(), bbox.getEast() ) ) ),
+                        Math.min( distance( point, new Point( bbox.getSouth(), bbox.getWest() ) ),
+                                distance( point, new Point( bbox.getNorth(), bbox.getWest() ) ) ) );
+            }
+        }
+    }
+
+
+    /**
+     * Computes the geocell containing the given point to the given resolution.
+     * <p/>
+     * This is a simple 16-tree lookup to an arbitrary depth (resolution).
+     *
+     * @param point : The geotypes.Point to compute the cell for.
+     * @param resolution : An int indicating the resolution of the cell to compute.
+     *
+     * @return The geocell string containing the given point, of length resolution.
+     */
+    public static String compute( Point point, int resolution ) {
+        float north = MAX_LATITUDE;
+        float south = MIN_LATITUDE;
+        float east = MAX_LONGITUDE;
+        float west = MIN_LONGITUDE;
+
+        StringBuilder cell = new StringBuilder();
+        while ( cell.length() < resolution ) {
+            float subcellLonSpan = ( east - west ) / GEOCELL_GRID_SIZE;
+            float subcellLatSpan = ( north - south ) / GEOCELL_GRID_SIZE;
+
+            int x = Math.min( ( int ) ( GEOCELL_GRID_SIZE * ( point.getLon() - west ) / ( east - west ) ),
+                    GEOCELL_GRID_SIZE - 1 );
+            int y = Math.min( ( int ) ( GEOCELL_GRID_SIZE * ( point.getLat() - south ) / ( north - south ) ),
+                    GEOCELL_GRID_SIZE - 1 );
+
+            int l[] = { x, y };
+            cell.append( subdivChar( l ) );
+
+            south += subcellLatSpan * y;
+            north = south + subcellLatSpan;
+
+            west += subcellLonSpan * x;
+            east = west + subcellLonSpan;
+        }
+        return cell.toString();
+    }
+
+
+    /**
+     * Computes the rectangular boundaries (bounding box) of the given geocell.
+     *
+     * @param cell_ : The geocell string whose boundaries are to be computed.
+     *
+     * @return A geotypes.Box corresponding to the rectangular boundaries of the geocell.
+     */
+    public static BoundingBox computeBox( String cell_ ) {
+        if ( cell_ == null ) {
+            return null;
+        }
+
+        BoundingBox bbox = new BoundingBox( 90.0, 180.0, -90.0, -180.0 );
+        StringBuilder cell = new StringBuilder( cell_ );
+        while ( cell.length() > 0 ) {
+            double subcellLonSpan = ( bbox.getEast() - bbox.getWest() ) / GEOCELL_GRID_SIZE;
+            double subcellLatSpan = ( bbox.getNorth() - bbox.getSouth() ) / GEOCELL_GRID_SIZE;
+
+            int l[] = subdivXY( cell.charAt( 0 ) );
+            int x = l[0];
+            int y = l[1];
+
+            bbox = new BoundingBox( bbox.getSouth() + subcellLatSpan * ( y + 1 ),
+                    bbox.getWest() + subcellLonSpan * ( x + 1 ), bbox.getSouth() + subcellLatSpan * y,
+                    bbox.getWest() + subcellLonSpan * x );
+
+            cell.deleteCharAt( 0 );
+        }
+
+        return bbox;
+    }
+
+
+    /**
+     * Returns whether or not the given geocell string defines a valid geocell.
+     *
+     * @return Returns whether or not the given geocell string defines a valid geocell.
+     */
+    public static boolean isValid( String cell ) {
+        if ( cell == null || cell.trim().length() == 0 ) {
+            return false;
+        }
+        for ( char c : cell.toCharArray() ) {
+            if ( GEOCELL_ALPHABET.indexOf( c ) < 0 ) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+
+    /**
+     * Returns the (x, y) of the geocell character in the 4x4 alphabet grid.
+     *
+     * @return Returns the (x, y) of the geocell character in the 4x4 alphabet grid.
+     */
+    public static int[] subdivXY( char char_ ) {
+        // NOTE: This only works for grid size 4.
+        int charI = GEOCELL_ALPHABET.indexOf( char_ );
+        return new int[] {
+                ( charI & 4 ) >> 1 | ( charI & 1 ) >> 0, ( charI & 8 ) >> 2 | ( charI & 2 ) >> 1
+        };
+    }
+
+
+    /**
+     * Returns the geocell character in the 4x4 alphabet grid at pos. (x, y).
+     *
+     * @return Returns the geocell character in the 4x4 alphabet grid at pos. (x, y).
+     */
+    public static char subdivChar( int[] pos ) {
+        // NOTE: This only works for grid size 4.
+        return GEOCELL_ALPHABET.charAt( ( pos[1] & 2 ) << 2 |
+                ( pos[0] & 2 ) << 1 |
+                ( pos[1] & 1 ) << 1 |
+                ( pos[0] & 1 ) << 0 );
+    }
+
+
+    /**
+     * Calculates the great circle distance between two points (law of cosines).
+     *
+     * @param p1 : indicating the first point.
+     * @param p2 : indicating the second point.
+     *
+     * @return The 2D great-circle distance between the two given points, in meters.
+     */
+    public static double distance( Point p1, Point p2 ) {
+        double p1lat = Math.toRadians( p1.getLat() );
+        double p1lon = Math.toRadians( p1.getLon() );
+        double p2lat = Math.toRadians( p2.getLat() );
+        double p2lon = Math.toRadians( p2.getLon() );
+        return RADIUS * Math.acos( makeDoubleInRange(
+                Math.sin( p1lat ) * Math.sin( p2lat ) + Math.cos( p1lat ) * Math.cos( p2lat ) * Math
+                        .cos( p2lon - p1lon ) ) );
+    }
+
+
+    /**
+     * This function is used to fix issue 10: GeocellUtils.distance(...) uses Math.acos(arg) method. In some cases arg >
+     * 1 (i.e 1.0000000002), so acos cannot be calculated and the method returns NaN.
+     *
+     * @return a double between -1 and 1
+     */
+    public static double makeDoubleInRange( double d ) {
+        double result = d;
+        if ( d > 1 ) {
+            result = 1;
+        }
+        else if ( d < -1 ) {
+            result = -1;
+        }
+        return result;
+    }
+
+
+    /**
+     * Returns the edges of the rectangular region containing all of the given geocells, sorted by distance from the
+     * given point, along with the actual distances from the point to these edges.
+     *
+     * @param cells : The cells (should be adjacent) defining the rectangular region whose edge distances are
+     * requested.
+     * @param point : The point that should determine the edge sort order.
+     *
+     * @return A list of (direction, distance) tuples, where direction is the edge and distance is the distance from the
+     *         point to that edge. A direction value of (0,-1), for example, corresponds to the South edge of the
+     *         rectangular region containing all of the given geocells.
+     *         <p/>
+     *         TODO(romannurik): Assert that lat,lon are actually inside the geocell.
+     */
+    public static List<Tuple<int[], Double>> distanceSortedEdges( List<String> cells, Point point ) {
+        List<BoundingBox> boxes = new ArrayList<BoundingBox>();
+        for ( String cell : cells ) {
+            boxes.add( computeBox( cell ) );
+        }
+        double maxNorth = Double.NEGATIVE_INFINITY;
+        double maxEast = Double.NEGATIVE_INFINITY;
+        double maxSouth = Double.POSITIVE_INFINITY;
+        double maxWest = Double.POSITIVE_INFINITY;
+        for ( BoundingBox box : boxes ) {
+            maxNorth = Math.max( maxNorth, box.getNorth() );
+            maxEast = Math.max( maxEast, box.getEast() );
+            maxSouth = Math.min( maxSouth, box.getSouth() );
+            maxWest = Math.min( maxWest, box.getWest() );
+        }
+        List<Tuple<int[], Double>> result = new ArrayList<Tuple<int[], Double>>();
+        result.add( new Tuple<int[], Double>( SOUTH, distance( new Point( maxSouth, point.getLon() ), point ) ) );
+        result.add( new Tuple<int[], Double>( NORTH, distance( new Point( maxNorth, point.getLon() ), point ) ) );
+        result.add( new Tuple<int[], Double>( WEST, distance( new Point( point.getLat(), maxWest ), point ) ) );
+        result.add( new Tuple<int[], Double>( EAST, distance( new Point( point.getLat(), maxEast ), point ) ) );
+        Collections.sort( result, new DoubleTupleComparator() );
+        return result;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/geo/comparator/DoubleTupleComparator.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/geo/comparator/DoubleTupleComparator.java b/stack/core/src/main/java/org/apache/usergrid/persistence/geo/comparator/DoubleTupleComparator.java
new file mode 100644
index 0000000..07e4015
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/geo/comparator/DoubleTupleComparator.java
@@ -0,0 +1,23 @@
+package org.apache.usergrid.persistence.geo.comparator;
+
+
+import java.util.Comparator;
+
+import org.apache.usergrid.persistence.geo.model.Tuple;
+
+
+public class DoubleTupleComparator implements Comparator<Tuple<int[], Double>> {
+
+    public int compare( Tuple<int[], Double> o1, Tuple<int[], Double> o2 ) {
+        if ( o1 == null && o2 == null ) {
+            return 0;
+        }
+        if ( o1 == null ) {
+            return -1;
+        }
+        if ( o2 == null ) {
+            return 1;
+        }
+        return o1.getSecond().compareTo( o2.getSecond() );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/geo/model/BoundingBox.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/geo/model/BoundingBox.java b/stack/core/src/main/java/org/apache/usergrid/persistence/geo/model/BoundingBox.java
new file mode 100644
index 0000000..99d6f7a
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/geo/model/BoundingBox.java
@@ -0,0 +1,71 @@
+/*
+Copyright 2010 Alexandre Gellibert
+
+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.persistence.geo.model;
+
+
+/** @author Alexandre Gellibert */
+public class BoundingBox {
+
+    private Point northEast;
+    private Point southWest;
+
+
+    public BoundingBox( double north, double east, double south, double west ) {
+        double north_, south_;
+        if ( south > north ) {
+            south_ = north;
+            north_ = south;
+        }
+        else {
+            south_ = south;
+            north_ = north;
+        }
+
+        // Don't swap east and west to allow disambiguation of
+        // antimeridian crossing.
+
+        northEast = new Point( north_, east );
+        southWest = new Point( south_, west );
+    }
+
+
+    public double getNorth() {
+        return northEast.getLat();
+    }
+
+
+    public double getSouth() {
+        return southWest.getLat();
+    }
+
+
+    public double getWest() {
+        return southWest.getLon();
+    }
+
+
+    public double getEast() {
+        return northEast.getLon();
+    }
+
+
+    public Point getNorthEast() {
+        return northEast;
+    }
+
+
+    public Point getSouthWest() {
+        return southWest;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/geo/model/CostFunction.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/geo/model/CostFunction.java b/stack/core/src/main/java/org/apache/usergrid/persistence/geo/model/CostFunction.java
new file mode 100644
index 0000000..6d9914b
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/geo/model/CostFunction.java
@@ -0,0 +1,33 @@
+/*
+Copyright 2010 Alexandre Gellibert
+
+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.persistence.geo.model;
+
+
+/**
+ * Interface to create a cost function used in geocells algorithm. This function will determine the cost of an operation
+ * depending of number of cells and resolution. When the cost is going higher, the algorithm stops. The cost depends on
+ * application use of geocells.
+ *
+ * @author Alexandre Gellibert
+ */
+public interface CostFunction {
+
+    /**
+     * @param numCells number of cells found
+     * @param resolution resolution of those cells
+     *
+     * @return the cost of the operation
+     */
+    public double defaultCostFunction( int numCells, int resolution );
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/geo/model/DefaultCostFunction.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/geo/model/DefaultCostFunction.java b/stack/core/src/main/java/org/apache/usergrid/persistence/geo/model/DefaultCostFunction.java
new file mode 100644
index 0000000..c2dd6a8
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/geo/model/DefaultCostFunction.java
@@ -0,0 +1,34 @@
+/*
+Copyright 2010 Alexandre Gellibert 
+
+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.persistence.geo.model;
+
+
+import org.apache.usergrid.persistence.geo.GeocellUtils;
+
+
+/**
+ * Default cost function used if no cost function is specified in Geocell.bestBboxSearchCells method.
+ *
+ * @author Alexandre Gellibert
+ */
+public class DefaultCostFunction implements CostFunction {
+
+    /*
+     * (non-Javadoc)
+     * @see com.beoui.utils.CostFunction#defaultCostFunction(int, int)
+     */
+    public double defaultCostFunction( int numCells, int resolution ) {
+        return numCells > Math.pow( GeocellUtils.GEOCELL_GRID_SIZE, 2 ) ? Double.MAX_VALUE : 0;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/geo/model/Point.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/geo/model/Point.java b/stack/core/src/main/java/org/apache/usergrid/persistence/geo/model/Point.java
new file mode 100644
index 0000000..c8bf77c
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/geo/model/Point.java
@@ -0,0 +1,58 @@
+/*
+Copyright 2010 Alexandre Gellibert
+
+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.persistence.geo.model;
+
+
+import org.apache.commons.lang.Validate;
+
+
+/** @author Alexandre Gellibert */
+public class Point {
+
+    private double lat;
+    private double lon;
+
+
+    public Point() {
+
+    }
+
+
+    public Point( double lat, double lon ) {
+        Validate.isTrue( !( lat > 90.0 || lat < -90.0 ), "Latitude must be in [-90, 90]  but was ", lat );
+        Validate.isTrue( !( lon > 180.0 || lon < -180.0 ), "Longitude must be in [-180, 180] but was ", lon );
+        this.lat = lat;
+        this.lon = lon;
+    }
+
+
+    public double getLat() {
+        return lat;
+    }
+
+
+    public void setLat( double lat ) {
+        this.lat = lat;
+    }
+
+
+    public double getLon() {
+        return lon;
+    }
+
+
+    public void setLon( double lon ) {
+        this.lon = lon;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/geo/model/Tuple.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/geo/model/Tuple.java b/stack/core/src/main/java/org/apache/usergrid/persistence/geo/model/Tuple.java
new file mode 100644
index 0000000..83c018f
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/geo/model/Tuple.java
@@ -0,0 +1,24 @@
+package org.apache.usergrid.persistence.geo.model;
+
+
+public class Tuple<A, B> {
+
+    private A first;
+    private B second;
+
+
+    public Tuple( A first, B second ) {
+        this.first = first;
+        this.second = second;
+    }
+
+
+    public A getFirst() {
+        return first;
+    }
+
+
+    public B getSecond() {
+        return second;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/AllNode.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/AllNode.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/AllNode.java
new file mode 100644
index 0000000..08053f3
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/AllNode.java
@@ -0,0 +1,54 @@
+package org.apache.usergrid.persistence.query.ir;
+
+
+/**
+ * Used to represent a "select all".  This will iterate over the entities by UUID
+ *
+ * @author tnine
+ */
+public class AllNode extends QueryNode {
+
+
+    private final QuerySlice slice;
+    private final boolean forceKeepFirst;
+
+
+    /**
+     * Note that the slice isn't used on select, but is used when creating cursors
+     *
+     * @param id. The unique numeric id for this node
+     * @param forceKeepFirst True if we don't allow the iterator to skip the first result, regardless of cursor state.
+     * Used for startUUID paging
+     */
+    public AllNode( int id, boolean forceKeepFirst ) {
+        this.slice = new QuerySlice( "uuid", id );
+        this.forceKeepFirst = forceKeepFirst;
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.usergrid.persistence.query.ir.QueryNode#visit(org.apache.usergrid.persistence.query.ir.NodeVisitor)
+     */
+    @Override
+    public void visit( NodeVisitor visitor ) throws Exception {
+        visitor.visit( this );
+    }
+
+
+    @Override
+    public String toString() {
+        return "AllNode";
+    }
+
+
+    /** @return the slice */
+    public QuerySlice getSlice() {
+        return slice;
+    }
+
+
+    /** @return the skipFirstMatch */
+    public boolean isForceKeepFirst() {
+        return forceKeepFirst;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/AndNode.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/AndNode.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/AndNode.java
new file mode 100644
index 0000000..3e889b2
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/AndNode.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.query.ir;
+
+
+/**
+ * Node where the results need intersected.  Used instead of a SliceNode when one of the children is an operation other
+ * than slices.  I.E OR, NOT etc
+ *
+ * @author tnine
+ */
+public class AndNode extends BooleanNode {
+
+    /**
+     * @param left
+     * @param right
+     */
+    public AndNode( QueryNode left, QueryNode right ) {
+        super( left, right );
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.usergrid.persistence.query.ir.QueryNode#visit(org.apache.usergrid.persistence.query.ir.NodeVisitor)
+     */
+    @Override
+    public void visit( NodeVisitor visitor ) throws Exception {
+        visitor.visit( this );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/BooleanNode.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/BooleanNode.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/BooleanNode.java
new file mode 100644
index 0000000..e4eb813
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/BooleanNode.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.query.ir;
+
+
+/** @author tnine */
+public abstract class BooleanNode extends QueryNode {
+
+    protected QueryNode left;
+    protected QueryNode right;
+
+
+    public BooleanNode( QueryNode left, QueryNode right ) {
+        this.left = left;
+        this.right = right;
+    }
+
+
+    /** @return the left */
+    public QueryNode getLeft() {
+        return left;
+    }
+
+
+    /** @return the right */
+    public QueryNode getRight() {
+        return right;
+    }
+
+
+    @Override
+    public String toString() {
+        return "BooleanNode [left=" + left + ", right=" + right + "]";
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/EmailIdentifierNode.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/EmailIdentifierNode.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/EmailIdentifierNode.java
new file mode 100644
index 0000000..b126eb9
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/EmailIdentifierNode.java
@@ -0,0 +1,31 @@
+package org.apache.usergrid.persistence.query.ir;
+
+
+import org.apache.usergrid.persistence.Identifier;
+
+
+/**
+ * Class to represent a UUID based Identifier query
+ *
+ * @author tnine
+ */
+public class EmailIdentifierNode extends QueryNode {
+
+    private final Identifier identifier;
+
+
+    public EmailIdentifierNode( Identifier identifier ) {
+        this.identifier = identifier;
+    }
+
+
+    @Override
+    public void visit( NodeVisitor visitor ) throws Exception {
+        visitor.visit( this );
+    }
+
+
+    public Identifier getIdentifier() {
+        return identifier;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/NameIdentifierNode.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/NameIdentifierNode.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/NameIdentifierNode.java
new file mode 100644
index 0000000..9b6f2e0
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/NameIdentifierNode.java
@@ -0,0 +1,28 @@
+package org.apache.usergrid.persistence.query.ir;
+
+
+/**
+ * Class to represent a UUID based Identifier query
+ *
+ * @author tnine
+ */
+public class NameIdentifierNode extends QueryNode {
+
+    private final String name;
+
+
+    public NameIdentifierNode( String name ) {
+        this.name = name;
+    }
+
+
+    @Override
+    public void visit( NodeVisitor visitor ) throws Exception {
+        visitor.visit( this );
+    }
+
+
+    public String getName() {
+        return name;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/NodeVisitor.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/NodeVisitor.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/NodeVisitor.java
new file mode 100644
index 0000000..ab8c2b3
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/NodeVisitor.java
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.query.ir;
+
+
+/** @author tnine */
+public interface NodeVisitor {
+
+    /**
+     *
+     * @param node
+     * @throws Exception
+     */
+    public void visit( AndNode node ) throws Exception;
+
+    /**
+     *
+     * @param node
+     * @throws Exception
+     */
+    public void visit( NotNode node ) throws Exception;
+
+    /**
+     *
+     * @param node
+     * @throws Exception
+     */
+    public void visit( OrNode node ) throws Exception;
+
+    /**
+     *
+     * @param node
+     * @throws Exception
+     */
+    public void visit( SliceNode node ) throws Exception;
+
+    /**
+     *
+     * @param node
+     * @throws Exception
+     */
+    public void visit( WithinNode node ) throws Exception;
+
+    /**
+     *
+     * @param node
+     * @throws Exception
+     */
+    public void visit( AllNode node ) throws Exception;
+
+    /** Visit the name identifier node */
+    public void visit( NameIdentifierNode nameIdentifierNode ) throws Exception;
+
+    /** Visit the uuid identifier node */
+    public void visit( UuidIdentifierNode uuidIdentifierNode );
+
+    /**
+     * @param orderByNode
+     * @throws Exception
+     */
+    public void visit( OrderByNode orderByNode ) throws Exception;
+
+    /** Visit the email id node */
+    public void visit( EmailIdentifierNode emailIdentifierNode ) throws Exception;
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/NotNode.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/NotNode.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/NotNode.java
new file mode 100644
index 0000000..e8d037d
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/NotNode.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.query.ir;
+
+
+/** @author tnine */
+public class NotNode extends QueryNode {
+
+    protected QueryNode subtractNode, keepNode;
+
+
+    /** @param keepNode may be null if there are parents to this */
+    public NotNode( QueryNode subtractNode, QueryNode keepNode ) {
+        this.subtractNode = subtractNode;
+        this.keepNode = keepNode;
+//        throw new RuntimeException( "I'm a not node" );
+    }
+
+
+    /** @return the child */
+    public QueryNode getSubtractNode() {
+        return subtractNode;
+    }
+
+
+    /** @return the all */
+    public QueryNode getKeepNode() {
+        return keepNode;
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see
+     * org.apache.usergrid.persistence.query.ir.QueryNode#visit(org.apache.usergrid.persistence
+     * .query.ir.NodeVisitor)
+     */
+    @Override
+    public void visit( NodeVisitor visitor ) throws Exception {
+        visitor.visit( this );
+    }
+
+
+    @Override
+    public String toString() {
+        return "NotNode [child=" + subtractNode + "]";
+    }
+}


[09/96] [abbrv] [partial] Change package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/entities/Application.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/entities/Application.java b/stack/core/src/main/java/org/usergrid/persistence/entities/Application.java
deleted file mode 100644
index 2028b26..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/entities/Application.java
+++ /dev/null
@@ -1,609 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.entities;
-
-
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.UUID;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-import org.codehaus.jackson.annotate.JsonProperty;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
-import org.usergrid.persistence.TypedEntity;
-import org.usergrid.persistence.annotations.EntityCollection;
-import org.usergrid.persistence.annotations.EntityDictionary;
-import org.usergrid.persistence.annotations.EntityProperty;
-
-
-/** Applications represent the topmost container for all entities. */
-@XmlRootElement
-public class Application extends TypedEntity {
-
-    public static final String ENTITY_TYPE = "application";
-
-    public static final String COLLECTION_USERS = "users";
-
-    public static final String COLLECTION_GROUPS = "groups";
-
-    public static final String COLLECTION_ASSETS = "assets";
-
-    public static final String COLLECTION_ACTIVITIES = "activities";
-
-    @EntityProperty(indexed = true, fulltextIndexed = false, required = true, mutable = false, aliasProperty = true,
-            basic = true)
-    protected String name;
-
-    @EntityProperty(basic = true, indexed = false)
-    protected String title;
-
-    @EntityProperty(basic = true, indexed = false)
-    protected Long accesstokenttl;
-
-    @EntityProperty(indexed = false)
-    protected String description;
-
-    @EntityDictionary(keyType = java.lang.String.class)
-    protected Set<String> collections;
-
-    @EntityDictionary(keyType = java.lang.String.class, valueType = java.lang.String.class)
-    protected Map<String, String> rolenames;
-
-    @EntityDictionary(keyType = java.lang.String.class)
-    protected Set<String> counters;
-
-    @EntityProperty(indexed = false)
-    protected Boolean activated;
-
-    @EntityProperty(indexed = false)
-    protected Boolean disabled;
-
-    @EntityProperty(name = "allow_open_registration", indexed = false)
-    protected Boolean allowOpenRegistration;
-
-    @EntityProperty(name = "registration_requires_email_confirmation", indexed = false)
-    protected Boolean registrationRequiresEmailConfirmation;
-
-    @EntityProperty(name = "registration_requires_admin_approval", indexed = false)
-    protected Boolean registrationRequiresAdminApproval;
-
-    @EntityProperty(name = "notify_admin_of_new_users", indexed = false)
-    protected Boolean notifyAdminOfNewUsers;
-
-    @EntityDictionary(keyType = java.lang.String.class, valueType = OAuthProvider.class)
-    protected Map<String, OAuthProvider> oauthproviders;
-
-    @EntityDictionary(keyType = java.lang.String.class, valueType = java.lang.String.class)
-    protected Map<String, String> credentials;
-
-    @EntityDictionary(keyType = java.lang.String.class, valueType = WebHook.class)
-    protected Map<String, WebHook> webhooks;
-
-    @EntityCollection(type = "activity", reversed = true, sort = "published desc", indexingDynamicDictionaries = true)
-    protected List<UUID> activities;
-
-    @EntityCollection(type = "asset", indexingDynamicDictionaries = true)
-    protected List<UUID> assets;
-
-    @EntityCollection(type = "event", indexingDynamicDictionaries = true)
-    protected List<UUID> events;
-
-    @EntityCollection(type = "folder", indexingDynamicDictionaries = true)
-    protected List<UUID> folders;
-
-    @EntityCollection(type = "group")
-    protected List<UUID> groups;
-
-    @EntityCollection(type = "user", dictionariesIndexed = { "aliases" })
-    protected List<UUID> users;
-
-    @EntityCollection(type = "device")
-    protected List<UUID> devices;
-
-    @EntityCollection(type = "notification")
-    protected List<UUID> notifications;
-
-
-    public Application() {
-        // id = UUIDUtils.newTimeUUID();
-    }
-
-
-    public Application( UUID id ) {
-        uuid = id;
-    }
-
-
-    @Override
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public String getName() {
-        return name;
-    }
-
-
-    public void setName( String name ) {
-        this.name = name;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public String getTitle() {
-        return title;
-    }
-
-
-    public void setTitle( String title ) {
-        this.title = title;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public String getDescription() {
-        return description;
-    }
-
-
-    public void setDescription( String description ) {
-        this.description = description;
-    }
-
-
-    public boolean activated() {
-        return ( activated != null ) && activated;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public Boolean getActivated() {
-        return activated;
-    }
-
-
-    public void setActivated( Boolean activated ) {
-        this.activated = activated;
-    }
-
-
-    public boolean disabled() {
-        return ( disabled != null ) && disabled;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public Boolean getDisabled() {
-        return disabled;
-    }
-
-
-    public void setDisabled( Boolean disabled ) {
-        this.disabled = disabled;
-    }
-
-
-    public boolean allowOpenRegistration() {
-        return ( allowOpenRegistration != null ) && allowOpenRegistration;
-    }
-
-
-    @JsonProperty("allow_open_registration")
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public Boolean getAllowOpenRegistration() {
-        return allowOpenRegistration;
-    }
-
-
-    @JsonProperty("allow_open_registration")
-    public void setAllowOpenRegistration( Boolean allowOpenRegistration ) {
-        this.allowOpenRegistration = allowOpenRegistration;
-    }
-
-
-    public boolean registrationRequiresEmailConfirmation() {
-        return ( registrationRequiresEmailConfirmation != null ) && registrationRequiresEmailConfirmation;
-    }
-
-
-    @JsonProperty("registration_requires_email_confirmation")
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public Boolean getRegistrationRequiresEmailConfirmation() {
-        return registrationRequiresEmailConfirmation;
-    }
-
-
-    @JsonProperty("registration_requires_email_confirmation")
-    public void setRegistrationRequiresEmailConfirmation( Boolean registrationRequiresEmailConfirmation ) {
-        this.registrationRequiresEmailConfirmation = registrationRequiresEmailConfirmation;
-    }
-
-
-    public boolean registrationRequiresAdminApproval() {
-        return ( registrationRequiresAdminApproval != null ) && registrationRequiresAdminApproval;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    @JsonProperty("registration_requires_admin_approval")
-    public Boolean getRegistrationRequiresAdminApproval() {
-        return registrationRequiresAdminApproval;
-    }
-
-
-    @JsonProperty("registration_requires_admin_approval")
-    public void setRegistrationRequiresAdminApproval( Boolean registrationRequiresAdminApproval ) {
-        this.registrationRequiresAdminApproval = registrationRequiresAdminApproval;
-    }
-
-
-    public boolean notifyAdminOfNewUsers() {
-        return ( notifyAdminOfNewUsers != null ) && notifyAdminOfNewUsers;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    @JsonProperty("notify_admin_of_new_users")
-    public Boolean getNotifyAdminOfNewUsers() {
-        return notifyAdminOfNewUsers;
-    }
-
-
-    @JsonProperty("notify_admin_of_new_users")
-    public void setNotifyAdminOfNewUsers( Boolean notifyAdminOfNewUsers ) {
-        this.notifyAdminOfNewUsers = notifyAdminOfNewUsers;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public List<UUID> getUsers() {
-        return users;
-    }
-
-
-    public void setUsers( List<UUID> users ) {
-        this.users = users;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public List<UUID> getGroups() {
-        return groups;
-    }
-
-
-    public void setGroups( List<UUID> groups ) {
-        this.groups = groups;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public Set<String> getCollections() {
-        return collections;
-    }
-
-
-    public void setCollections( Set<String> collections ) {
-        this.collections = collections;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public Map<String, String> getRolenames() {
-        return rolenames;
-    }
-
-
-    public void setRolenames( Map<String, String> rolenames ) {
-        this.rolenames = rolenames;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public Set<String> getCounters() {
-        return counters;
-    }
-
-
-    public void setCounters( Set<String> counters ) {
-        this.counters = counters;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public List<UUID> getAssets() {
-        return assets;
-    }
-
-
-    public void setAssets( List<UUID> assets ) {
-        this.assets = assets;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public Map<String, String> getCredentials() {
-        return credentials;
-    }
-
-
-    public void setCredentials( Map<String, String> credentials ) {
-        this.credentials = credentials;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public List<UUID> getActivities() {
-        return activities;
-    }
-
-
-    public void setActivities( List<UUID> activities ) {
-        this.activities = activities;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public List<UUID> getFolders() {
-        return folders;
-    }
-
-
-    public void setFolders( List<UUID> folders ) {
-        this.folders = folders;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public List<UUID> getEvents() {
-        return events;
-    }
-
-
-    public void setEvents( List<UUID> events ) {
-        this.events = events;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public List<UUID> getDevices() {
-        return devices;
-    }
-
-
-    public void setDevices( List<UUID> devices ) {
-        this.devices = devices;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public Map<String, OAuthProvider> getOauthproviders() {
-        return oauthproviders;
-    }
-
-
-    public void setOauthproviders( Map<String, OAuthProvider> oauthproviders ) {
-        this.oauthproviders = oauthproviders;
-    }
-
-
-    /** Get the organization name of this app */
-    public String getOrganizationName() {
-        String[] names = name.split( "/" );
-
-        if ( names.length == 2 ) {
-            return names[0];
-        }
-
-        return null;
-    }
-
-
-    /** Get the application name of this app */
-    public String getApplicationName() {
-        String[] names = name.split( "/" );
-
-        if ( names.length == 2 ) {
-            return names[1];
-        }
-
-        return null;
-    }
-
-
-    /** @return the accesstokenttl */
-    public Long getAccesstokenttl() {
-        return accesstokenttl;
-    }
-
-
-    /** @param accesstokenttl the accesstokenttl to set */
-    public void setAccesstokenttl( Long accesstokenttl ) {
-        this.accesstokenttl = accesstokenttl;
-    }
-
-
-    @XmlRootElement
-    public static class OAuthProvider {
-        String clientId;
-        String clientSecret;
-        String redirectUris;
-        String javaScriptOrigins;
-        String authorizationEndpointUrl;
-        String accessTokenEndpointUrl;
-        String requestTokenEndpointUrl;
-        String version = "1.0a";
-
-
-        public OAuthProvider() {
-        }
-
-
-        public OAuthProvider( String clientId, String clientSecret ) {
-            this.clientId = clientId;
-            this.clientSecret = clientSecret;
-        }
-
-
-        public OAuthProvider( String clientId, String clientSecret, String redirectUris, String javaScriptOrigins ) {
-            this.clientId = clientId;
-            this.clientSecret = clientSecret;
-            this.redirectUris = redirectUris;
-            this.javaScriptOrigins = javaScriptOrigins;
-        }
-
-
-        public OAuthProvider( String clientId, String clientSecret, String redirectUris, String javaScriptOrigins,
-                              String authorizationEndpointUrl, String accessTokenEndpointUrl,
-                              String requestTokenEndpointUrl ) {
-            this.clientId = clientId;
-            this.clientSecret = clientSecret;
-            this.redirectUris = redirectUris;
-            this.javaScriptOrigins = javaScriptOrigins;
-            this.authorizationEndpointUrl = authorizationEndpointUrl;
-            this.accessTokenEndpointUrl = accessTokenEndpointUrl;
-            this.requestTokenEndpointUrl = requestTokenEndpointUrl;
-        }
-
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public String getVersion() {
-            return version;
-        }
-
-
-        public void setVersion( String version ) {
-            this.version = version;
-        }
-
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public String getClientId() {
-            return clientId;
-        }
-
-
-        public void setClientId( String clientId ) {
-            this.clientId = clientId;
-        }
-
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public String getClientSecret() {
-            return clientSecret;
-        }
-
-
-        public void setClientSecret( String clientSecret ) {
-            this.clientSecret = clientSecret;
-        }
-
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public String getRedirectUris() {
-            return redirectUris;
-        }
-
-
-        public void setRedirectUris( String redirectUris ) {
-            this.redirectUris = redirectUris;
-        }
-
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public String getJavaScriptOrigins() {
-            return javaScriptOrigins;
-        }
-
-
-        public void setJavaScriptOrigins( String javaScriptOrigins ) {
-            this.javaScriptOrigins = javaScriptOrigins;
-        }
-
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public String getAuthorizationEndpointUrl() {
-            return authorizationEndpointUrl;
-        }
-
-
-        public void setAuthorizationEndpointUrl( String authorizationEndpointUrl ) {
-            this.authorizationEndpointUrl = authorizationEndpointUrl;
-        }
-
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public String getAccessTokenEndpointUrl() {
-            return accessTokenEndpointUrl;
-        }
-
-
-        public void setAccessTokenEndpointUrl( String accessTokenEndpointUrl ) {
-            this.accessTokenEndpointUrl = accessTokenEndpointUrl;
-        }
-
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public String getRequestTokenEndpointUrl() {
-            return requestTokenEndpointUrl;
-        }
-
-
-        public void setRequestTokenEndpointUrl( String requestTokenEndpointUrl ) {
-            this.requestTokenEndpointUrl = requestTokenEndpointUrl;
-        }
-
-
-        @Override
-        public String toString() {
-            return "OAuthProvider [clientId=" + clientId + ", clientSecret=" + clientSecret + ", redirectUris="
-                    + redirectUris + ", javaScriptOrigins=" + javaScriptOrigins + ", authorizationEndpointUrl="
-                    + authorizationEndpointUrl + ", accessTokenEndpointUrl=" + accessTokenEndpointUrl
-                    + ", requestTokenEndpointUrl=" + requestTokenEndpointUrl + ", version=" + version + "]";
-        }
-    }
-
-
-    @XmlRootElement
-    public static class WebHook {
-        String type;
-        String uri;
-
-
-        public WebHook() {
-        }
-
-
-        public String getType() {
-            return type;
-        }
-
-
-        public void setType( String type ) {
-            this.type = type;
-        }
-
-
-        public String getUri() {
-            return uri;
-        }
-
-
-        public void setUri( String uri ) {
-            this.uri = uri;
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/entities/Asset.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/entities/Asset.java b/stack/core/src/main/java/org/usergrid/persistence/entities/Asset.java
deleted file mode 100644
index 518b391..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/entities/Asset.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.entities;
-
-
-import java.util.Set;
-import java.util.UUID;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
-import org.usergrid.persistence.TypedEntity;
-import org.usergrid.persistence.annotations.EntityDictionary;
-import org.usergrid.persistence.annotations.EntityProperty;
-
-
-/**
- * Asset entity for representing file-like objects.
- *
- * @deprecated
- */
-@XmlRootElement
-public class Asset extends TypedEntity {
-
-    public static final String ENTITY_TYPE = "asset";
-
-    @EntityProperty(required = true, indexed = true, mutable = false)
-    UUID owner;
-
-    @EntityProperty(indexed = true, fulltextIndexed = false, required = true, aliasProperty = true,
-            pathBasedName = true, mutable = false, unique = true)
-    protected String path;
-
-    @EntityDictionary(keyType = java.lang.String.class)
-    protected Set<String> connections;
-
-
-    public Asset() {
-        // id = UUIDUtils.newTimeUUID();
-    }
-
-
-    public Asset( UUID id ) {
-        this.uuid = id;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public String getPath() {
-        return path;
-    }
-
-
-    public void setPath( String name ) {
-        path = name;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public UUID getOwner() {
-        return owner;
-    }
-
-
-    public void setOwner( UUID owner ) {
-        this.owner = owner;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public Set<String> getConnections() {
-        return connections;
-    }
-
-
-    public void setConnections( Set<String> connections ) {
-        this.connections = connections;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/entities/Device.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/entities/Device.java b/stack/core/src/main/java/org/usergrid/persistence/entities/Device.java
deleted file mode 100644
index 43b0dd5..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/entities/Device.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.entities;
-
-
-import java.util.List;
-import java.util.UUID;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
-import org.usergrid.persistence.TypedEntity;
-import org.usergrid.persistence.annotations.EntityCollection;
-import org.usergrid.persistence.annotations.EntityProperty;
-
-
-/** The Device entity class for representing devices in the service. */
-@XmlRootElement
-public class Device extends TypedEntity {
-
-    public static final String ENTITY_TYPE = "device";
-    public static final String RECEIPTS_COLLECTION = "receipts";
-
-    @EntityProperty(indexed = true, fulltextIndexed = false, required = false, aliasProperty = true, unique = true,
-            basic = true)
-    protected String name;
-
-    @EntityCollection(type = "user", linkedCollection = "devices")
-    protected List<UUID> users;
-
-    @EntityCollection(type = "receipt")
-    protected List<UUID> receipts;
-
-    @EntityProperty
-    protected Integer badge;
-
-
-    public Device() {
-        // id = UUIDUtils.newTimeUUID();
-    }
-
-
-    public Device( UUID id ) {
-        uuid = id;
-    }
-
-
-    @Override
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public String getName() {
-        return name;
-    }
-
-
-    public void setName( String name ) {
-        this.name = name;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public List<UUID> getUsers() {
-        return users;
-    }
-
-
-    public void setUsers( List<UUID> users ) {
-        this.users = users;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public List<UUID> getReceipts() {
-        return receipts;
-    }
-
-
-    public void setReceipts( List<UUID> receipts ) {
-        this.receipts = receipts;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public Integer getBadge() {
-        return badge;
-    }
-
-
-    public void setBadge( Integer badge ) {
-        this.badge = badge;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/entities/Event.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/entities/Event.java b/stack/core/src/main/java/org/usergrid/persistence/entities/Event.java
deleted file mode 100644
index d85cbf5..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/entities/Event.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.entities;
-
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-import java.util.UUID;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
-import org.usergrid.persistence.TypedEntity;
-import org.usergrid.persistence.annotations.EntityDictionary;
-import org.usergrid.persistence.annotations.EntityProperty;
-
-
-/** An event type posted by the application. */
-@XmlRootElement
-public class Event extends TypedEntity {
-
-    public static final String ENTITY_TYPE = "event";
-
-    @EntityProperty(required = true, indexed = true, mutable = false)
-    long timestamp = System.currentTimeMillis();
-
-    @EntityProperty(required = false, indexed = true, mutable = false)
-    UUID user;
-
-    @EntityProperty(required = false, indexed = true, mutable = false)
-    UUID group;
-
-    @EntityProperty(fulltextIndexed = false, required = false, mutable = false, indexed = true)
-    String category;
-
-    @EntityProperty(indexed = false, required = false, mutable = false)
-    Map<String, Integer> counters;
-
-    @EntityProperty(indexed = true, required = false, mutable = false)
-    String message;
-
-    @EntityDictionary(keyType = java.lang.String.class)
-    protected Set<String> connections;
-
-
-    public Event() {
-        // id = UUIDUtils.newTimeUUID();
-    }
-
-
-    public Event( UUID id ) {
-        uuid = id;
-    }
-
-
-    public long getTimestamp() {
-        return timestamp;
-    }
-
-
-    public void setTimestamp( long timestamp ) {
-        if ( timestamp == 0 ) {
-            timestamp = System.currentTimeMillis();
-        }
-        this.timestamp = timestamp;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public UUID getUser() {
-        return user;
-    }
-
-
-    public void setUser( UUID user ) {
-        this.user = user;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public UUID getGroup() {
-        return group;
-    }
-
-
-    public void setGroup( UUID group ) {
-        this.group = group;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public String getCategory() {
-        return category;
-    }
-
-
-    public void setCategory( String category ) {
-        this.category = category;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public Map<String, Integer> getCounters() {
-        return counters;
-    }
-
-
-    public void setCounters( Map<String, Integer> counters ) {
-        this.counters = counters;
-    }
-
-
-    public void addCounter( String name, int value ) {
-        if ( counters == null ) {
-            counters = new HashMap<String, Integer>();
-        }
-        counters.put( name, value );
-    }
-
-
-    public String getMessage() {
-        return message;
-    }
-
-
-    public void setMessage( String message ) {
-        this.message = message;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public Set<String> getConnections() {
-        return connections;
-    }
-
-
-    public void setConnections( Set<String> connections ) {
-        this.connections = connections;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/entities/Folder.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/entities/Folder.java b/stack/core/src/main/java/org/usergrid/persistence/entities/Folder.java
deleted file mode 100644
index a218d2e..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/entities/Folder.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.entities;
-
-
-import java.util.Set;
-import java.util.UUID;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
-import org.usergrid.persistence.TypedEntity;
-import org.usergrid.persistence.annotations.EntityDictionary;
-import org.usergrid.persistence.annotations.EntityProperty;
-
-
-/**
- * Asset entity for representing folder-like objects.
- *
- * @deprecated
- */
-@XmlRootElement
-public class Folder extends TypedEntity {
-
-    public static final String ENTITY_TYPE = "asset";
-
-    @EntityProperty(required = true, indexed = true, mutable = false)
-    UUID owner;
-
-    @EntityProperty(indexed = true, fulltextIndexed = false, required = true, aliasProperty = true,
-            pathBasedName = true, mutable = false, unique = true)
-    protected String path;
-
-    @EntityDictionary(keyType = java.lang.String.class)
-    protected Set<String> connections;
-
-
-    public Folder() {
-        // id = UUIDUtils.newTimeUUID();
-    }
-
-
-    public Folder( UUID id ) {
-        this.uuid = id;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public String getPath() {
-        return path;
-    }
-
-
-    public void setPath( String name ) {
-        path = name;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public UUID getOwner() {
-        return owner;
-    }
-
-
-    public void setOwner( UUID owner ) {
-        this.owner = owner;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public Set<String> getConnections() {
-        return connections;
-    }
-
-
-    public void setConnections( Set<String> connections ) {
-        this.connections = connections;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/entities/Group.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/entities/Group.java b/stack/core/src/main/java/org/usergrid/persistence/entities/Group.java
deleted file mode 100644
index 9ffe504..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/entities/Group.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.entities;
-
-
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.UUID;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
-import org.usergrid.persistence.CredentialsInfo;
-import org.usergrid.persistence.TypedEntity;
-import org.usergrid.persistence.annotations.EntityCollection;
-import org.usergrid.persistence.annotations.EntityDictionary;
-import org.usergrid.persistence.annotations.EntityProperty;
-
-
-/** Groups are used to organize users. */
-@XmlRootElement
-public class Group extends TypedEntity {
-
-    public static final String ENTITY_TYPE = "group";
-
-    public static final String CONNECTION_MEMBERSHIP = "membership";
-
-    @EntityProperty(indexed = true, fulltextIndexed = false, required = true, aliasProperty = true,
-            pathBasedName = true, mutable = true, unique = true, basic = true)
-    protected String path;
-
-    @EntityDictionary(keyType = java.lang.String.class)
-    protected Set<String> connections;
-
-    @EntityDictionary(keyType = java.lang.String.class, valueType = java.lang.String.class)
-    protected Map<String, String> rolenames;
-
-    @EntityDictionary(keyType = java.lang.String.class)
-    protected Set<String> permissions;
-
-    @EntityDictionary(keyType = java.lang.String.class, valueType = CredentialsInfo.class)
-    protected Map<String, CredentialsInfo> credentials;
-
-    @EntityCollection(type = "user", linkedCollection = "groups")
-    protected List<UUID> users;
-
-    @EntityCollection(type = "activity", reversed = true, sort = "published desc", indexingDynamicDictionaries = true)
-    protected List<UUID> activities;
-
-    @EntityCollection(type = "activity", reversed = true, sort = "published desc", indexingDynamicDictionaries = true)
-    protected List<UUID> feed;
-
-    @EntityCollection(type = "role", linkedCollection = "groups", indexingDynamicDictionaries = true)
-    protected List<UUID> roles;
-
-
-    public Group() {
-        // id = UUIDUtils.newTimeUUID();
-    }
-
-
-    public Group( UUID id ) {
-        uuid = id;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public String getPath() {
-        return path;
-    }
-
-
-    public void setPath( String path ) {
-        this.path = path;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public List<UUID> getUsers() {
-        return users;
-    }
-
-
-    public void setUsers( List<UUID> users ) {
-        this.users = users;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public Set<String> getConnections() {
-        return connections;
-    }
-
-
-    public void setConnections( Set<String> connections ) {
-        this.connections = connections;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public Map<String, String> getRolenames() {
-        return rolenames;
-    }
-
-
-    public void setRolenames( Map<String, String> rolenames ) {
-        this.rolenames = rolenames;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public List<UUID> getActivities() {
-        return activities;
-    }
-
-
-    public void setActivities( List<UUID> activities ) {
-        this.activities = activities;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public List<UUID> getFeed() {
-        return feed;
-    }
-
-
-    public void setFeed( List<UUID> feed ) {
-        this.feed = feed;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public Map<String, CredentialsInfo> getCredentials() {
-        return credentials;
-    }
-
-
-    public void setCredentials( Map<String, CredentialsInfo> credentials ) {
-        this.credentials = credentials;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public List<UUID> getRoles() {
-        return roles;
-    }
-
-
-    public void setRoles( List<UUID> roles ) {
-        this.roles = roles;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/entities/JobData.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/entities/JobData.java b/stack/core/src/main/java/org/usergrid/persistence/entities/JobData.java
deleted file mode 100644
index 17761e0..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/entities/JobData.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.entities;
-
-
-import org.usergrid.persistence.TypedEntity;
-import org.usergrid.persistence.annotations.EntityProperty;
-
-
-/**
- * All job data should be contained in this entity
- *
- * @author tnine
- */
-public class JobData extends TypedEntity {
-
-
-    @EntityProperty(required = true, basic = true, indexed = true)
-    private String jobName;
-
-
-    /**
-     * @param jobName
-     * @param startTime
-     */
-    public JobData() {
-        super();
-    }
-
-
-    /** @return the jobName */
-    public String getJobName() {
-        return jobName;
-    }
-
-
-    /** @param jobName the jobName to set */
-    public void setJobName( String jobName ) {
-        this.jobName = jobName;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/entities/JobStat.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/entities/JobStat.java b/stack/core/src/main/java/org/usergrid/persistence/entities/JobStat.java
deleted file mode 100644
index 8c31a5e..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/entities/JobStat.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.entities;
-
-
-import java.util.UUID;
-
-import org.usergrid.persistence.TypedEntity;
-import org.usergrid.persistence.annotations.EntityProperty;
-
-
-/**
- * All job execution info should be in this entity
- *
- * @author tnine
- */
-public class JobStat extends TypedEntity {
-
-
-    @EntityProperty(required = true, basic = true, indexed = true)
-    private String jobName;
-
-    @EntityProperty(required = true, basic = true, indexed = true)
-    private UUID jobId;
-
-    @EntityProperty(required = true, basic = true, indexed = true)
-    private long startTime;
-
-    @EntityProperty(required = true, basic = true, indexed = true)
-    private int runCount;
-
-    @EntityProperty(required = true, basic = true, indexed = true)
-    private int delayCount;
-
-    @EntityProperty(required = true, basic = true, indexed = true)
-    private long duration;
-
-
-    /**
-     * @param jobName
-     * @param startTime
-     */
-    public JobStat() {
-    }
-
-
-    /**
-     * @param jobName
-     * @param jobId
-     */
-    public JobStat( String jobName, UUID jobId ) {
-        super();
-        this.jobName = jobName;
-        this.jobId = jobId;
-    }
-
-
-    /** @return the jobName */
-    public String getJobName() {
-        return jobName;
-    }
-
-
-    /** @param jobName the jobName to set */
-    public void setJobName( String jobName ) {
-        this.jobName = jobName;
-    }
-
-
-    /** @return the fireTime */
-    public long getStartTime() {
-        return startTime;
-    }
-
-
-    /**
-     * Don't set this, it won't accomplish anything.  This is overwritten by the job as an audit record
-     *
-     * @param startTime the fireTime to set
-     */
-    public void setStartTime( long startTime ) {
-        this.startTime = startTime;
-    }
-
-
-    /** Increment the run count */
-    public void incrementRuns() {
-        runCount++;
-    }
-
-
-    /** Increment the run count */
-    public void incrementDelays() {
-        delayCount++;
-    }
-
-
-    /** Get the number of times this job has failed */
-    public int getRunCount() {
-        return runCount;
-    }
-
-
-    /**
-     * DON'T CALL THIS, USE THE INRECMENT METHOD!
-     *
-     * @param failCount the failCount to set
-     */
-    public void setRunCount( int runCount ) {
-        this.runCount = runCount;
-    }
-
-
-    /**
-     * Return the total number of attempts that have resulted in an error and not an explicit delay
-     * <p/>
-     * runCount - delayCount
-     */
-    public int getTotalAttempts() {
-        return runCount - delayCount;
-    }
-
-
-    /** @return the delayCount */
-    public int getDelayCount() {
-        return delayCount;
-    }
-
-
-    /**
-     * DON'T CALL THIS, USE THE INRECMENT METHOD!
-     *
-     * @param delayCount the delayCount to set
-     */
-    public void setDelayCount( int delayCount ) {
-        this.delayCount = delayCount;
-    }
-
-
-    /** @return the duration */
-    public long getDuration() {
-        return duration;
-    }
-
-
-    /** @param duration the duration to set */
-    public void setDuration( long duration ) {
-        this.duration = duration;
-    }
-
-
-    /** @return the jobId */
-    public UUID getJobId() {
-        return jobId;
-    }
-
-
-    /** @param jobId the jobId to set */
-    public void setJobId( UUID jobId ) {
-        this.jobId = jobId;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/entities/Message.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/entities/Message.java b/stack/core/src/main/java/org/usergrid/persistence/entities/Message.java
deleted file mode 100644
index 30864e8..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/entities/Message.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.entities;
-
-
-import java.util.Set;
-import java.util.UUID;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
-import org.usergrid.persistence.TypedEntity;
-import org.usergrid.persistence.annotations.EntityDictionary;
-import org.usergrid.persistence.annotations.EntityProperty;
-
-
-/**
- * A generic Message type for message queue type operations. For status updates and other social actions, use Activity
- * instead.
- */
-@XmlRootElement
-public class Message extends TypedEntity {
-
-    public static final String ENTITY_TYPE = "message";
-
-    @EntityProperty(fulltextIndexed = false, required = true, mutable = false, indexed = true)
-    String category;
-
-    @EntityDictionary(keyType = java.lang.String.class)
-    protected Set<String> connections;
-
-
-    public Message() {
-        // id = UUIDUtils.newTimeUUID();
-    }
-
-
-    public Message( UUID id ) {
-        this.uuid = id;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public String getCategory() {
-        return category;
-    }
-
-
-    public void setCategory( String category ) {
-        this.category = category;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public Set<String> getConnections() {
-        return connections;
-    }
-
-
-    public void setConnections( Set<String> connections ) {
-        this.connections = connections;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/entities/Role.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/entities/Role.java b/stack/core/src/main/java/org/usergrid/persistence/entities/Role.java
deleted file mode 100644
index e8dd05a..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/entities/Role.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.entities;
-
-
-import java.util.List;
-import java.util.Set;
-import java.util.UUID;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
-import org.usergrid.persistence.TypedEntity;
-import org.usergrid.persistence.annotations.EntityCollection;
-import org.usergrid.persistence.annotations.EntityDictionary;
-import org.usergrid.persistence.annotations.EntityProperty;
-
-
-/** Groups are used to organize users. */
-@XmlRootElement
-public class Role extends TypedEntity {
-
-    public static final String ENTITY_TYPE = "role";
-
-    @EntityProperty(indexed = true, fulltextIndexed = false, required = true, aliasProperty = true, mutable = false,
-            unique = true)
-    protected String name;
-
-    @EntityProperty(mutable = true, indexed = true)
-    protected String roleName;
-
-    @EntityProperty(mutable = true, indexed = true)
-    protected String title;
-
-    @EntityProperty(mutable = true, indexed = true)
-    protected Long inactivity;
-
-    @EntityDictionary(keyType = java.lang.String.class)
-    protected Set<String> permissions;
-
-    @EntityCollection(type = "user", linkedCollection = "roles", indexingDynamicDictionaries = true)
-    protected List<UUID> users;
-
-    @EntityCollection(type = "group", linkedCollection = "roles", indexingDynamicDictionaries = true)
-    protected List<UUID> groups;
-
-
-    public Role() {
-        // id = UUIDUtils.newTimeUUID();
-    }
-
-
-    public Role( String roleName ) {
-        this.roleName = roleName;
-    }
-
-
-    public Role( UUID id ) {
-        this.uuid = id;
-    }
-
-
-    @Override
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public String getName() {
-        return name;
-    }
-
-
-    public void setName( String name ) {
-        this.name = name;
-    }
-
-
-    public String getRoleName() {
-        return roleName;
-    }
-
-
-    public void setRoleName( String roleName ) {
-        this.roleName = roleName;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public String getTitle() {
-        return title;
-    }
-
-
-    public void setTitle( String title ) {
-        this.title = title;
-    }
-
-
-    /** @return the inactivity */
-    public Long getInactivity() {
-        return inactivity;
-    }
-
-
-    /** @param inactivity the inactivity to set */
-    public void setInactivity( Long inactivity ) {
-        this.inactivity = inactivity;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public List<UUID> getUsers() {
-        return users;
-    }
-
-
-    public void setUsers( List<UUID> users ) {
-        this.users = users;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public Set<String> getPermissions() {
-        return permissions;
-    }
-
-
-    public void setPermissions( Set<String> permissions ) {
-        this.permissions = permissions;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public List<UUID> getGroups() {
-        return groups;
-    }
-
-
-    public void setGroups( List<UUID> groups ) {
-        this.groups = groups;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/entities/User.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/entities/User.java b/stack/core/src/main/java/org/usergrid/persistence/entities/User.java
deleted file mode 100644
index 32a1078..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/entities/User.java
+++ /dev/null
@@ -1,348 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.entities;
-
-
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.UUID;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-import org.codehaus.jackson.annotate.JsonIgnore;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
-import org.usergrid.persistence.CredentialsInfo;
-import org.usergrid.persistence.TypedEntity;
-import org.usergrid.persistence.annotations.EntityCollection;
-import org.usergrid.persistence.annotations.EntityDictionary;
-import org.usergrid.persistence.annotations.EntityProperty;
-
-import static org.apache.commons.lang.StringUtils.isNotBlank;
-
-
-/** The User entity class for representing users in the service. */
-@XmlRootElement
-public class User extends TypedEntity {
-
-    public static final String ENTITY_TYPE = "user";
-
-    public static final String CONNECTION_FOLLOW = "follow";
-
-    public static final String PROPERTY_UUID = "uuid";
-
-    public static final String PROPERTY_EMAIL = "email";
-
-    public static final String PROPERTY_HASHTYPE = "hashtype";
-
-    public static final String HASHTYPE_MD5 = "md5";
-
-    @EntityProperty(indexed = true, fulltextIndexed = false, required = true, aliasProperty = true, unique = true,
-            basic = true)
-    protected String username;
-
-    @EntityProperty(indexed = true, unique = true, basic = true)
-    protected String email;
-
-    @EntityProperty(indexed = true, fulltextIndexed = true)
-    protected String name;
-
-    @EntityProperty(indexed = true)
-    protected Boolean activated;
-
-    @EntityProperty(indexed = true)
-    protected Boolean confirmed;
-
-    @EntityProperty(indexed = true)
-    protected Boolean disabled;
-
-    @EntityProperty(indexed = false)
-    protected String picture;
-
-    /** The time this user was deactivated */
-    @EntityProperty(indexed = true)
-    protected Long deactivated;
-
-    @EntityDictionary(keyType = java.lang.String.class)
-    protected Set<String> connections;
-
-    @EntityDictionary(keyType = java.lang.String.class, valueType = java.lang.String.class)
-    protected Map<String, String> rolenames;
-
-    @EntityDictionary(keyType = java.lang.String.class)
-    protected Set<String> permissions;
-
-    @EntityDictionary(keyType = java.lang.String.class, valueType = CredentialsInfo.class)
-    protected Map<String, CredentialsInfo> credentials;
-
-    @EntityCollection(type = "group", linkedCollection = "users")
-    protected List<UUID> groups;
-
-    @EntityCollection(type = "device", linkedCollection = "users")
-    protected List<UUID> devices;
-
-    @EntityCollection(type = "activity", reversed = true, sort = "published desc", indexingDynamicDictionaries = true)
-    protected List<UUID> activities;
-
-    @EntityCollection(type = "activity", reversed = true, sort = "published desc", indexingDynamicDictionaries = true)
-    protected List<UUID> feed;
-
-    @EntityCollection(type = "role", linkedCollection = "users", indexingDynamicDictionaries = true)
-    protected List<UUID> roles;
-
-    @JsonIgnore
-    @EntityDictionary(keyType = String.class, valueType = CredentialsInfo.class)
-    protected Map<String, CredentialsInfo> credentialsHistory;
-
-
-    public Map<String, CredentialsInfo> getCredentialsHistory() {
-        return credentialsHistory;
-    }
-
-
-    public void setCredentialsHistory( Map<String, CredentialsInfo> credentialsHistory ) {
-        this.credentialsHistory = credentialsHistory;
-    }
-
-
-    public User() {
-        // id = UUIDUtils.newTimeUUID();
-    }
-
-
-    public User( UUID id ) {
-        uuid = id;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public String getUsername() {
-        return username;
-    }
-
-
-    public void setUsername( String username ) {
-        this.username = username;
-    }
-
-
-    @Override
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public String getName() {
-        return name;
-    }
-
-
-    public void setName( String name ) {
-        this.name = name;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public String getEmail() {
-        return email;
-    }
-
-
-    @JsonIgnore
-    public String getDisplayEmailAddress() {
-        if ( isNotBlank( name ) ) {
-            return name + " <" + email + ">";
-        }
-        return email;
-    }
-
-
-    public void setEmail( String email ) {
-        this.email = email;
-    }
-
-
-    public boolean activated() {
-        return ( activated != null ) && activated;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public Boolean getActivated() {
-        return activated;
-    }
-
-
-    public void setActivated( Boolean activated ) {
-        this.activated = activated;
-
-        if ( activated ) {
-            deactivated = null;
-        }
-    }
-
-
-    /** @return the deactivated */
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public Long getDeactivated() {
-        return deactivated;
-    }
-
-
-    /** @param deactivated the deactivated to set */
-    public void setDeactivated( Long deactivated ) {
-        this.deactivated = deactivated;
-    }
-
-
-    public boolean confirmed() {
-        return ( confirmed != null ) && confirmed;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public Boolean getConfirmed() {
-        return confirmed;
-    }
-
-
-    public void setConfirmed( Boolean confirmed ) {
-        this.confirmed = confirmed;
-    }
-
-
-    public boolean disabled() {
-        return ( disabled != null ) && disabled;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public Boolean getDisabled() {
-        return disabled;
-    }
-
-
-    public void setDisabled( Boolean disabled ) {
-        this.disabled = disabled;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public String getPicture() {
-        return picture;
-    }
-
-
-    public void setPicture( String picture ) {
-        this.picture = picture;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public List<UUID> getGroups() {
-        return groups;
-    }
-
-
-    public void setGroups( List<UUID> groups ) {
-        this.groups = groups;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public List<UUID> getDevices() {
-        return devices;
-    }
-
-
-    public void setDevices( List<UUID> devices ) {
-        this.devices = devices;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public Set<String> getConnections() {
-        return connections;
-    }
-
-
-    public void setConnections( Set<String> connections ) {
-        this.connections = connections;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public Map<String, String> getRolenames() {
-        return rolenames;
-    }
-
-
-    public void setRolenames( Map<String, String> rolenames ) {
-        this.rolenames = rolenames;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public Set<String> getPermissions() {
-        return permissions;
-    }
-
-
-    public void setPermissions( Set<String> permissions ) {
-        this.permissions = permissions;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public Map<String, CredentialsInfo> getCredentials() {
-        return credentials;
-    }
-
-
-    public void setCredentials( Map<String, CredentialsInfo> credentials ) {
-        this.credentials = credentials;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public List<UUID> getActivities() {
-        return activities;
-    }
-
-
-    public void setActivities( List<UUID> activities ) {
-        this.activities = activities;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public List<UUID> getFeed() {
-        return feed;
-    }
-
-
-    public void setFeed( List<UUID> feed ) {
-        this.feed = feed;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public List<UUID> getRoles() {
-        return roles;
-    }
-
-
-    public void setRoles( List<UUID> roles ) {
-        this.roles = roles;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/exceptions/ApplicationAlreadyExistsException.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/exceptions/ApplicationAlreadyExistsException.java b/stack/core/src/main/java/org/usergrid/persistence/exceptions/ApplicationAlreadyExistsException.java
deleted file mode 100644
index 0f3b72d..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/exceptions/ApplicationAlreadyExistsException.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.exceptions;
-
-
-public class ApplicationAlreadyExistsException extends PersistenceException {
-
-    /**
-     *
-     */
-    private static final long serialVersionUID = 1L;
-    final String applicationName;
-
-
-    public ApplicationAlreadyExistsException( String applicationName ) {
-        super( "Application " + applicationName + " already exists" );
-        this.applicationName = applicationName;
-    }
-
-
-    public String getApplicationName() {
-        return applicationName;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/exceptions/DuplicateUniquePropertyExistsException.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/exceptions/DuplicateUniquePropertyExistsException.java b/stack/core/src/main/java/org/usergrid/persistence/exceptions/DuplicateUniquePropertyExistsException.java
deleted file mode 100644
index f282444..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/exceptions/DuplicateUniquePropertyExistsException.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.exceptions;
-
-
-public class DuplicateUniquePropertyExistsException extends PersistenceException {
-
-    /**
-     *
-     */
-    private static final long serialVersionUID = 1L;
-    final String entityType;
-    final String propertyName;
-    final Object propertyValue;
-
-
-    public DuplicateUniquePropertyExistsException( String entityType, String propertyName, Object propertyValue ) {
-        super( "Entity " + entityType + " requires that property named " + propertyName + " be unique, value of "
-                + propertyValue + " exists" );
-        this.entityType = entityType;
-        this.propertyName = propertyName;
-        this.propertyValue = propertyValue;
-    }
-
-
-    public String getEntityType() {
-        return entityType;
-    }
-
-
-    public String getPropertyName() {
-        return propertyName;
-    }
-
-
-    public Object getPropertyValue() {
-        return propertyValue;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/exceptions/EntityNotFoundException.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/exceptions/EntityNotFoundException.java b/stack/core/src/main/java/org/usergrid/persistence/exceptions/EntityNotFoundException.java
deleted file mode 100644
index 93512b1..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/exceptions/EntityNotFoundException.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.exceptions;
-
-
-public class EntityNotFoundException extends PersistenceException {
-
-    /**
-     *
-     */
-    private static final long serialVersionUID = -3579346096812510039L;
-
-
-    public EntityNotFoundException() {
-        super();
-    }
-
-
-    public EntityNotFoundException( String message, Throwable cause ) {
-        super( message, cause );
-    }
-
-
-    public EntityNotFoundException( String message ) {
-        super( message );
-    }
-
-
-    public EntityNotFoundException( Throwable cause ) {
-        super( cause );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/exceptions/LockingException.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/exceptions/LockingException.java b/stack/core/src/main/java/org/usergrid/persistence/exceptions/LockingException.java
deleted file mode 100644
index b98a097..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/exceptions/LockingException.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.exceptions;
-
-
-/** General Exception for locking related operations. */
-public class LockingException extends Exception {
-
-    /**
-     *
-     */
-    private static final long serialVersionUID = 1630572186589575754L;
-
-
-    /**
-     *
-     */
-    public LockingException() {
-        // TODO Auto-generated constructor stub
-    }
-
-
-    /**
-     * @param arg0
-     */
-    public LockingException( String arg0 ) {
-        super( arg0 );
-        // TODO Auto-generated constructor stub
-    }
-
-
-    /**
-     * @param arg0
-     */
-    public LockingException( Throwable arg0 ) {
-        super( arg0 );
-        // TODO Auto-generated constructor stub
-    }
-
-
-    /**
-     * @param arg0
-     * @param arg1
-     */
-    public LockingException( String arg0, Throwable arg1 ) {
-        super( arg0, arg1 );
-        // TODO Auto-generated constructor stub
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/exceptions/NoFullTextIndexException.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/exceptions/NoFullTextIndexException.java b/stack/core/src/main/java/org/usergrid/persistence/exceptions/NoFullTextIndexException.java
deleted file mode 100644
index 9e4c712..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/exceptions/NoFullTextIndexException.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.exceptions;
-
-
-/**
- * Thrown when the user attempts to perform a "contains" operation on a field that isn't full text indexed
- *
- * @author tnine
- */
-public class NoFullTextIndexException extends PersistenceException {
-
-    /**
-     *
-     */
-    private static final long serialVersionUID = 1L;
-    final String entityType;
-    final String propertyName;
-
-
-    public NoFullTextIndexException( String entityType, String propertyName ) {
-        super( "Entity '" + entityType + "' with property named '" + propertyName
-                + "' is not full text indexed.  You cannot use the 'contains' operand on this field" );
-        this.entityType = entityType;
-        this.propertyName = propertyName;
-    }
-
-
-    public String getEntityType() {
-        return entityType;
-    }
-
-
-    public String getPropertyName() {
-        return propertyName;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/exceptions/NoIndexException.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/exceptions/NoIndexException.java b/stack/core/src/main/java/org/usergrid/persistence/exceptions/NoIndexException.java
deleted file mode 100644
index 1772be1..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/exceptions/NoIndexException.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.exceptions;
-
-
-/**
- * Thrown when the user attempts to perform a "contains" operation on a field that isn't full text indexed
- *
- * @author tnine
- */
-public class NoIndexException extends PersistenceException {
-
-    /**
-     *
-     */
-    private static final long serialVersionUID = 1L;
-    final String entityType;
-    final String propertyName;
-
-
-    public NoIndexException( String entityType, String propertyName ) {
-        super( "Entity '" + entityType + "' with property named '" + propertyName
-                + "' is not indexed.  You cannot use the this field in queries." );
-        this.entityType = entityType;
-        this.propertyName = propertyName;
-    }
-
-
-    public String getEntityType() {
-        return entityType;
-    }
-
-
-    public String getPropertyName() {
-        return propertyName;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/exceptions/PersistenceException.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/exceptions/PersistenceException.java b/stack/core/src/main/java/org/usergrid/persistence/exceptions/PersistenceException.java
deleted file mode 100644
index 9c523cc..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/exceptions/PersistenceException.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.exceptions;
-
-
-public class PersistenceException extends Exception {
-
-    /**
-     *
-     */
-    private static final long serialVersionUID = 1L;
-
-
-    public PersistenceException() {
-        super();
-    }
-
-
-    public PersistenceException( String message, Throwable cause ) {
-        super( message, cause );
-    }
-
-
-    public PersistenceException( String message ) {
-        super( message );
-    }
-
-
-    public PersistenceException( Throwable cause ) {
-        super( cause );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/exceptions/PropertyTypeConversionException.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/exceptions/PropertyTypeConversionException.java b/stack/core/src/main/java/org/usergrid/persistence/exceptions/PropertyTypeConversionException.java
deleted file mode 100644
index e293b89..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/exceptions/PropertyTypeConversionException.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.exceptions;
-
-
-public class PropertyTypeConversionException extends PersistenceException {
-
-    /**
-     *
-     */
-    private static final long serialVersionUID = 1L;
-    final String entityType;
-    final String propertyName;
-    final Object propertyValue;
-    final Class<?> propertyType;
-
-
-    public PropertyTypeConversionException( String entityType, String propertyName, Object propertyValue,
-                                            Class<?> propertyType ) {
-        super( "Unable to convert property \"" + propertyName + "\" of entity \"" + entityType
-                + "\" from value of type " + propertyValue.getClass() + " to value of type " + propertyType );
-        this.entityType = entityType;
-        this.propertyName = propertyName;
-        this.propertyValue = propertyValue;
-        this.propertyType = propertyType;
-    }
-
-
-    public PropertyTypeConversionException( String entityType, String propertyName, Object propertyValue,
-                                            Class<?> propertyType, Throwable cause ) {
-        super( "Unable to convert property \"" + propertyName + "\" of entity \"" + entityType
-                + "\" from value of type " + propertyValue.getClass() + " to value of type " + propertyType, cause );
-        this.entityType = entityType;
-        this.propertyName = propertyName;
-        this.propertyValue = propertyValue;
-        this.propertyType = propertyType;
-    }
-
-
-    public String getEntityType() {
-        return entityType;
-    }
-
-
-    public String getPropertyName() {
-        return propertyName;
-    }
-
-
-    public Object getPropertyValue() {
-        return propertyValue;
-    }
-
-
-    public Class<?> getPropertyType() {
-        return propertyType;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/exceptions/QueryIterationException.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/exceptions/QueryIterationException.java b/stack/core/src/main/java/org/usergrid/persistence/exceptions/QueryIterationException.java
deleted file mode 100644
index dfc31a9..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/exceptions/QueryIterationException.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package org.usergrid.persistence.exceptions;
-
-
-/**
- * Thrown when an error occurs during query iteration
- *
- * @author tnine
- */
-public class QueryIterationException extends RuntimeException {
-    public QueryIterationException( final String message ) {
-        super( message );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/exceptions/QueryParseException.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/exceptions/QueryParseException.java b/stack/core/src/main/java/org/usergrid/persistence/exceptions/QueryParseException.java
deleted file mode 100644
index 39c7c4e..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/exceptions/QueryParseException.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.exceptions;
-
-
-/**
- * An exception thrown when a query cannot be parsed
- *
- * @author tnine
- */
-public class QueryParseException extends RuntimeException {
-
-    /**
-     *
-     */
-    private static final long serialVersionUID = 1L;
-
-
-    /**
-     *
-     */
-    public QueryParseException() {
-        super();
-    }
-
-
-    /**
-     * @param arg0
-     * @param arg1
-     */
-    public QueryParseException( String arg0, Throwable arg1 ) {
-        super( arg0, arg1 );
-    }
-
-
-    /**
-     * @param arg0
-     */
-    public QueryParseException( String arg0 ) {
-        super( arg0 );
-    }
-
-
-    /**
-     * @param arg0
-     */
-    public QueryParseException( Throwable arg0 ) {
-        super( arg0 );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/exceptions/QueryTokenException.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/exceptions/QueryTokenException.java b/stack/core/src/main/java/org/usergrid/persistence/exceptions/QueryTokenException.java
deleted file mode 100644
index b9f473b..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/exceptions/QueryTokenException.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.exceptions;
-
-
-/**
- * An exception thrown when a query encounters a token it doesn't recognize
- * @author tnine
- */
-public class QueryTokenException extends RuntimeException {
-
-    /**
-     *
-     */
-    private static final long serialVersionUID = 1L;
-
-
-
-
-    /**
-     * @param arg0
-     */
-    public QueryTokenException( Throwable arg0 ) {
-        super( arg0 );
-    }
-
-
-    @Override
-    public String getMessage() {
-        //antlr errors or strange.  We have to do this, there's no message
-        return getCause().toString();
-    }
-
-
-    @Override
-    public String getLocalizedMessage() {
-        return getMessage();
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/exceptions/QueueException.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/exceptions/QueueException.java b/stack/core/src/main/java/org/usergrid/persistence/exceptions/QueueException.java
deleted file mode 100644
index f60bf41..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/exceptions/QueueException.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.exceptions;
-
-
-/** General Exception for queue related operations. */
-public class QueueException extends RuntimeException {
-
-    /**
-     *
-     */
-    private static final long serialVersionUID = 1630572186589575754L;
-
-
-    /**
-     *
-     */
-    public QueueException() {
-    }
-
-
-    /**
-     * @param arg0
-     */
-    public QueueException( String arg0 ) {
-        super( arg0 );
-    }
-
-
-    /**
-     * @param arg0
-     */
-    public QueueException( Throwable arg0 ) {
-        super( arg0 );
-    }
-
-
-    /**
-     * @param arg0
-     * @param arg1
-     */
-    public QueueException( String arg0, Throwable arg1 ) {
-        super( arg0, arg1 );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/exceptions/RequiredPropertyNotFoundException.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/exceptions/RequiredPropertyNotFoundException.java b/stack/core/src/main/java/org/usergrid/persistence/exceptions/RequiredPropertyNotFoundException.java
deleted file mode 100644
index e80f4cb..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/exceptions/RequiredPropertyNotFoundException.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.exceptions;
-
-
-public class RequiredPropertyNotFoundException extends PersistenceException {
-
-    private static final long serialVersionUID = 1L;
-    final String entityType;
-    final String propertyName;
-
-
-    public RequiredPropertyNotFoundException( String entityType, String propertyName ) {
-        super( "Entity " + entityType + " requires a property named " + propertyName );
-        this.entityType = entityType;
-        this.propertyName = propertyName;
-    }
-
-
-    public String getEntityType() {
-        return entityType;
-    }
-
-
-    public String getPropertyName() {
-        return propertyName;
-    }
-}


[46/96] [abbrv] [partial] Change package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/mq/QueryFilterParser.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/mq/QueryFilterParser.java b/stack/core/src/main/java/org/apache/usergrid/mq/QueryFilterParser.java
new file mode 100644
index 0000000..3450d1b
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/mq/QueryFilterParser.java
@@ -0,0 +1,1102 @@
+// $ANTLR 3.1.3 Mar 17, 2009 19:23:44 org.apache.usergrid/persistence/query/QueryFilter.g 2012-03-07 22:54:28
+
+package org.apache.usergrid.mq;
+
+
+import org.antlr.runtime.BitSet;
+import org.antlr.runtime.MismatchedSetException;
+import org.antlr.runtime.NoViableAltException;
+import org.antlr.runtime.Parser;
+import org.antlr.runtime.ParserRuleReturnScope;
+import org.antlr.runtime.RecognitionException;
+import org.antlr.runtime.RecognizerSharedState;
+import org.antlr.runtime.Token;
+import org.antlr.runtime.TokenStream;
+import org.apache.usergrid.mq.Query.FilterPredicate;
+import org.apache.usergrid.mq.Query.SortPredicate;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+public class QueryFilterParser extends Parser {
+    public static final String[] tokenNames = new String[] {
+            "<invalid>", "<EOR>", "<DOWN>", "<UP>", "ID", "INT", "EXPONENT", "FLOAT", "ESC_SEQ", "STRING", "BOOLEAN",
+            "HEX_DIGIT", "UUID", "UNICODE_ESC", "OCTAL_ESC", "WS", "'<'", "'<='", "'='", "'>'", "'>='", "'in'", "'eq'",
+            "'lt'", "'gt'", "'lte'", "'gte'", "'contains'", "'within'", "','", "'of'", "':'", "'asc'", "'desc'", "'*'",
+            "'{'", "'}'", "'select'", "'where'", "'and'", "'order by'"
+    };
+    public static final int T__40 = 40;
+    public static final int EXPONENT = 6;
+    public static final int T__29 = 29;
+    public static final int T__28 = 28;
+    public static final int T__27 = 27;
+    public static final int T__26 = 26;
+    public static final int UUID = 12;
+    public static final int T__25 = 25;
+    public static final int T__24 = 24;
+    public static final int T__23 = 23;
+    public static final int T__22 = 22;
+    public static final int T__21 = 21;
+    public static final int UNICODE_ESC = 13;
+    public static final int T__20 = 20;
+    public static final int OCTAL_ESC = 14;
+    public static final int HEX_DIGIT = 11;
+    public static final int FLOAT = 7;
+    public static final int INT = 5;
+    public static final int ID = 4;
+    public static final int EOF = -1;
+    public static final int T__19 = 19;
+    public static final int T__30 = 30;
+    public static final int T__31 = 31;
+    public static final int T__32 = 32;
+    public static final int WS = 15;
+    public static final int BOOLEAN = 10;
+    public static final int ESC_SEQ = 8;
+    public static final int T__33 = 33;
+    public static final int T__16 = 16;
+    public static final int T__34 = 34;
+    public static final int T__35 = 35;
+    public static final int T__18 = 18;
+    public static final int T__36 = 36;
+    public static final int T__17 = 17;
+    public static final int T__37 = 37;
+    public static final int T__38 = 38;
+    public static final int T__39 = 39;
+    public static final int STRING = 9;
+
+    // delegates
+    // delegators
+
+
+    public QueryFilterParser( TokenStream input ) {
+        this( input, new RecognizerSharedState() );
+    }
+
+
+    public QueryFilterParser( TokenStream input, RecognizerSharedState state ) {
+        super( input, state );
+    }
+
+
+    public String[] getTokenNames() { return QueryFilterParser.tokenNames; }
+
+
+    public String getGrammarFileName() { return "org.apache.usergrid/persistence/query/QueryFilter.g"; }
+
+
+    Query query = new Query();
+
+    private static final Logger logger = LoggerFactory.getLogger( QueryFilterLexer.class );
+
+
+    @Override
+    public void emitErrorMessage( String msg ) {
+        logger.info( msg );
+    }
+
+
+    public static class property_return extends ParserRuleReturnScope {}
+
+
+    ;
+
+
+    // $ANTLR start "property"
+    // org.apache.usergrid/persistence/query/QueryFilter.g:101:1: property : ( ID ) ;
+    public final QueryFilterParser.property_return property() throws RecognitionException {
+        QueryFilterParser.property_return retval = new QueryFilterParser.property_return();
+        retval.start = input.LT( 1 );
+
+        try {
+            // org.apache.usergrid/persistence/query/QueryFilter.g:102:2: ( ( ID ) )
+            // org.apache.usergrid/persistence/query/QueryFilter.g:102:5: ( ID )
+            {
+                // org.apache.usergrid/persistence/query/QueryFilter.g:102:5: ( ID )
+                // org.apache.usergrid/persistence/query/QueryFilter.g:102:6: ID
+                {
+                    match( input, ID, FOLLOW_ID_in_property597 );
+                }
+            }
+
+            retval.stop = input.LT( -1 );
+        }
+        catch ( RecognitionException re ) {
+            reportError( re );
+            recover( input, re );
+        }
+        finally {
+        }
+        return retval;
+    }
+    // $ANTLR end "property"
+
+
+    public static class operator_return extends ParserRuleReturnScope {}
+
+
+    ;
+
+
+    // $ANTLR start "operator"
+    // org.apache.usergrid/persistence/query/QueryFilter.g:104:1: operator : ( '<' | '<=' | '=' | '>' | '>=' | 'in' | 'eq' |
+    // 'lt' | 'gt' | 'lte' | 'gte' | 'contains' | 'within' ) ;
+    public final QueryFilterParser.operator_return operator() throws RecognitionException {
+        QueryFilterParser.operator_return retval = new QueryFilterParser.operator_return();
+        retval.start = input.LT( 1 );
+
+        try {
+            // org.apache.usergrid/persistence/query/QueryFilter.g:105:2: ( ( '<' | '<=' | '=' | '>' | '>=' | 'in' | 'eq' |
+            // 'lt' | 'gt' | 'lte' | 'gte' | 'contains' | 'within' ) )
+            // org.apache.usergrid/persistence/query/QueryFilter.g:105:4: ( '<' | '<=' | '=' | '>' | '>=' | 'in' | 'eq' |
+            // 'lt' | 'gt' | 'lte' | 'gte' | 'contains' | 'within' )
+            {
+                if ( ( input.LA( 1 ) >= 16 && input.LA( 1 ) <= 28 ) ) {
+                    input.consume();
+                    state.errorRecovery = false;
+                }
+                else {
+                    MismatchedSetException mse = new MismatchedSetException( null, input );
+                    throw mse;
+                }
+            }
+
+            retval.stop = input.LT( -1 );
+        }
+        catch ( RecognitionException re ) {
+            reportError( re );
+            recover( input, re );
+        }
+        finally {
+        }
+        return retval;
+    }
+    // $ANTLR end "operator"
+
+
+    public static class value_return extends ParserRuleReturnScope {}
+
+
+    ;
+
+
+    // $ANTLR start "value"
+    // org.apache.usergrid/persistence/query/QueryFilter.g:107:1: value : ( BOOLEAN | STRING | INT | FLOAT | UUID ) ;
+    public final QueryFilterParser.value_return value() throws RecognitionException {
+        QueryFilterParser.value_return retval = new QueryFilterParser.value_return();
+        retval.start = input.LT( 1 );
+
+        try {
+            // org.apache.usergrid/persistence/query/QueryFilter.g:107:8: ( ( BOOLEAN | STRING | INT | FLOAT | UUID ) )
+            // org.apache.usergrid/persistence/query/QueryFilter.g:107:10: ( BOOLEAN | STRING | INT | FLOAT | UUID )
+            {
+                if ( input.LA( 1 ) == INT || input.LA( 1 ) == FLOAT || ( input.LA( 1 ) >= STRING
+                        && input.LA( 1 ) <= BOOLEAN ) || input.LA( 1 ) == UUID ) {
+                    input.consume();
+                    state.errorRecovery = false;
+                }
+                else {
+                    MismatchedSetException mse = new MismatchedSetException( null, input );
+                    throw mse;
+                }
+            }
+
+            retval.stop = input.LT( -1 );
+        }
+        catch ( RecognitionException re ) {
+            reportError( re );
+            recover( input, re );
+        }
+        finally {
+        }
+        return retval;
+    }
+    // $ANTLR end "value"
+
+
+    public static class second_value_return extends ParserRuleReturnScope {}
+
+
+    ;
+
+
+    // $ANTLR start "second_value"
+    // org.apache.usergrid/persistence/query/QueryFilter.g:109:1: second_value : ( BOOLEAN | STRING | INT | FLOAT | UUID ) ;
+    public final QueryFilterParser.second_value_return second_value() throws RecognitionException {
+        QueryFilterParser.second_value_return retval = new QueryFilterParser.second_value_return();
+        retval.start = input.LT( 1 );
+
+        try {
+            // org.apache.usergrid/persistence/query/QueryFilter.g:109:15: ( ( BOOLEAN | STRING | INT | FLOAT | UUID ) )
+            // org.apache.usergrid/persistence/query/QueryFilter.g:109:17: ( BOOLEAN | STRING | INT | FLOAT | UUID )
+            {
+                if ( input.LA( 1 ) == INT || input.LA( 1 ) == FLOAT || ( input.LA( 1 ) >= STRING
+                        && input.LA( 1 ) <= BOOLEAN ) || input.LA( 1 ) == UUID ) {
+                    input.consume();
+                    state.errorRecovery = false;
+                }
+                else {
+                    MismatchedSetException mse = new MismatchedSetException( null, input );
+                    throw mse;
+                }
+            }
+
+            retval.stop = input.LT( -1 );
+        }
+        catch ( RecognitionException re ) {
+            reportError( re );
+            recover( input, re );
+        }
+        finally {
+        }
+        return retval;
+    }
+    // $ANTLR end "second_value"
+
+
+    public static class third_value_return extends ParserRuleReturnScope {}
+
+
+    ;
+
+
+    // $ANTLR start "third_value"
+    // org.apache.usergrid/persistence/query/QueryFilter.g:111:1: third_value : ( BOOLEAN | STRING | INT | FLOAT | UUID ) ;
+    public final QueryFilterParser.third_value_return third_value() throws RecognitionException {
+        QueryFilterParser.third_value_return retval = new QueryFilterParser.third_value_return();
+        retval.start = input.LT( 1 );
+
+        try {
+            // org.apache.usergrid/persistence/query/QueryFilter.g:111:14: ( ( BOOLEAN | STRING | INT | FLOAT | UUID ) )
+            // org.apache.usergrid/persistence/query/QueryFilter.g:111:16: ( BOOLEAN | STRING | INT | FLOAT | UUID )
+            {
+                if ( input.LA( 1 ) == INT || input.LA( 1 ) == FLOAT || ( input.LA( 1 ) >= STRING
+                        && input.LA( 1 ) <= BOOLEAN ) || input.LA( 1 ) == UUID ) {
+                    input.consume();
+                    state.errorRecovery = false;
+                }
+                else {
+                    MismatchedSetException mse = new MismatchedSetException( null, input );
+                    throw mse;
+                }
+            }
+
+            retval.stop = input.LT( -1 );
+        }
+        catch ( RecognitionException re ) {
+            reportError( re );
+            recover( input, re );
+        }
+        finally {
+        }
+        return retval;
+    }
+    // $ANTLR end "third_value"
+
+
+    // $ANTLR start "filter"
+    // org.apache.usergrid/persistence/query/QueryFilter.g:113:1: filter returns [FilterPredicate filter] : property
+    // operator value ( ( ',' | 'of' ) second_value ( ',' third_value )? )? EOF ;
+    public final FilterPredicate filter() throws RecognitionException {
+        FilterPredicate filter = null;
+
+        QueryFilterParser.property_return property1 = null;
+
+        QueryFilterParser.operator_return operator2 = null;
+
+        QueryFilterParser.value_return value3 = null;
+
+        QueryFilterParser.second_value_return second_value4 = null;
+
+        QueryFilterParser.third_value_return third_value5 = null;
+
+
+        try {
+            // org.apache.usergrid/persistence/query/QueryFilter.g:114:5: ( property operator value ( ( ',
+            // ' | 'of' ) second_value ( ',' third_value )? )? EOF )
+            // org.apache.usergrid/persistence/query/QueryFilter.g:114:9: property operator value ( ( ',
+            // ' | 'of' ) second_value ( ',' third_value )? )? EOF
+            {
+                pushFollow( FOLLOW_property_in_filter759 );
+                property1 = property();
+
+                state._fsp--;
+
+                pushFollow( FOLLOW_operator_in_filter761 );
+                operator2 = operator();
+
+                state._fsp--;
+
+                pushFollow( FOLLOW_value_in_filter763 );
+                value3 = value();
+
+                state._fsp--;
+
+                // org.apache.usergrid/persistence/query/QueryFilter.g:114:33: ( ( ',' | 'of' ) second_value ( ',
+                // ' third_value )? )?
+                int alt2 = 2;
+                int LA2_0 = input.LA( 1 );
+
+                if ( ( ( LA2_0 >= 29 && LA2_0 <= 30 ) ) ) {
+                    alt2 = 1;
+                }
+                switch ( alt2 ) {
+                    case 1:
+                        // org.apache.usergrid/persistence/query/QueryFilter.g:114:34: ( ',' | 'of' ) second_value ( ',
+                        // ' third_value )?
+                    {
+                        if ( ( input.LA( 1 ) >= 29 && input.LA( 1 ) <= 30 ) ) {
+                            input.consume();
+                            state.errorRecovery = false;
+                        }
+                        else {
+                            MismatchedSetException mse = new MismatchedSetException( null, input );
+                            throw mse;
+                        }
+
+                        pushFollow( FOLLOW_second_value_in_filter774 );
+                        second_value4 = second_value();
+
+                        state._fsp--;
+
+                        // org.apache.usergrid/persistence/query/QueryFilter.g:114:60: ( ',' third_value )?
+                        int alt1 = 2;
+                        int LA1_0 = input.LA( 1 );
+
+                        if ( ( LA1_0 == 29 ) ) {
+                            alt1 = 1;
+                        }
+                        switch ( alt1 ) {
+                            case 1:
+                                // org.apache.usergrid/persistence/query/QueryFilter.g:114:62: ',' third_value
+                            {
+                                match( input, 29, FOLLOW_29_in_filter778 );
+                                pushFollow( FOLLOW_third_value_in_filter780 );
+                                third_value5 = third_value();
+
+                                state._fsp--;
+                            }
+                            break;
+                        }
+                    }
+                    break;
+                }
+
+
+                String property = ( property1 != null ? input.toString( property1.start, property1.stop ) : null );
+                String operator = ( operator2 != null ? input.toString( operator2.start, operator2.stop ) : null );
+                String value = ( value3 != null ? input.toString( value3.start, value3.stop ) : null );
+                String second_value =
+                        ( second_value4 != null ? input.toString( second_value4.start, second_value4.stop ) : null );
+                String third_value =
+                        ( third_value5 != null ? input.toString( third_value5.start, third_value5.stop ) : null );
+                filter = new FilterPredicate( property, operator, value, second_value, third_value );
+                //System.out.println("Parsed query filter: " + property + " " + operator + " " + value + " " +
+                // second_value);
+
+
+                match( input, EOF, FOLLOW_EOF_in_filter789 );
+            }
+        }
+        catch ( RecognitionException re ) {
+            reportError( re );
+            recover( input, re );
+        }
+        finally {
+        }
+        return filter;
+    }
+    // $ANTLR end "filter"
+
+
+    public static class select_subject_return extends ParserRuleReturnScope {}
+
+
+    ;
+
+
+    // $ANTLR start "select_subject"
+    // org.apache.usergrid/persistence/query/QueryFilter.g:127:1: select_subject : ID ;
+    public final QueryFilterParser.select_subject_return select_subject() throws RecognitionException {
+        QueryFilterParser.select_subject_return retval = new QueryFilterParser.select_subject_return();
+        retval.start = input.LT( 1 );
+
+        try {
+            // org.apache.usergrid/persistence/query/QueryFilter.g:128:2: ( ID )
+            // org.apache.usergrid/persistence/query/QueryFilter.g:128:4: ID
+            {
+                match( input, ID, FOLLOW_ID_in_select_subject800 );
+
+
+                query.addSelect( input.toString( retval.start, input.LT( -1 ) ) );
+            }
+
+            retval.stop = input.LT( -1 );
+        }
+        catch ( RecognitionException re ) {
+            reportError( re );
+            recover( input, re );
+        }
+        finally {
+        }
+        return retval;
+    }
+    // $ANTLR end "select_subject"
+
+
+    public static class select_assign_target_return extends ParserRuleReturnScope {}
+
+
+    ;
+
+
+    // $ANTLR start "select_assign_target"
+    // org.apache.usergrid/persistence/query/QueryFilter.g:134:1: select_assign_target : ID ;
+    public final QueryFilterParser.select_assign_target_return select_assign_target() throws RecognitionException {
+        QueryFilterParser.select_assign_target_return retval = new QueryFilterParser.select_assign_target_return();
+        retval.start = input.LT( 1 );
+
+        try {
+            // org.apache.usergrid/persistence/query/QueryFilter.g:135:2: ( ID )
+            // org.apache.usergrid/persistence/query/QueryFilter.g:135:4: ID
+            {
+                match( input, ID, FOLLOW_ID_in_select_assign_target812 );
+            }
+
+            retval.stop = input.LT( -1 );
+        }
+        catch ( RecognitionException re ) {
+            reportError( re );
+            recover( input, re );
+        }
+        finally {
+        }
+        return retval;
+    }
+    // $ANTLR end "select_assign_target"
+
+
+    public static class select_assign_source_return extends ParserRuleReturnScope {}
+
+
+    ;
+
+
+    // $ANTLR start "select_assign_source"
+    // org.apache.usergrid/persistence/query/QueryFilter.g:137:1: select_assign_source : ID ;
+    public final QueryFilterParser.select_assign_source_return select_assign_source() throws RecognitionException {
+        QueryFilterParser.select_assign_source_return retval = new QueryFilterParser.select_assign_source_return();
+        retval.start = input.LT( 1 );
+
+        try {
+            // org.apache.usergrid/persistence/query/QueryFilter.g:138:2: ( ID )
+            // org.apache.usergrid/persistence/query/QueryFilter.g:138:4: ID
+            {
+                match( input, ID, FOLLOW_ID_in_select_assign_source823 );
+            }
+
+            retval.stop = input.LT( -1 );
+        }
+        catch ( RecognitionException re ) {
+            reportError( re );
+            recover( input, re );
+        }
+        finally {
+        }
+        return retval;
+    }
+    // $ANTLR end "select_assign_source"
+
+
+    // $ANTLR start "select_assign"
+    // org.apache.usergrid/persistence/query/QueryFilter.g:140:1: select_assign : select_assign_target ':'
+    // select_assign_source ;
+    public final void select_assign() throws RecognitionException {
+        QueryFilterParser.select_assign_source_return select_assign_source6 = null;
+
+        QueryFilterParser.select_assign_target_return select_assign_target7 = null;
+
+
+        try {
+            // org.apache.usergrid/persistence/query/QueryFilter.g:141:2: ( select_assign_target ':' select_assign_source )
+            // org.apache.usergrid/persistence/query/QueryFilter.g:141:4: select_assign_target ':' select_assign_source
+            {
+                pushFollow( FOLLOW_select_assign_target_in_select_assign836 );
+                select_assign_target7 = select_assign_target();
+
+                state._fsp--;
+
+                match( input, 31, FOLLOW_31_in_select_assign838 );
+                pushFollow( FOLLOW_select_assign_source_in_select_assign840 );
+                select_assign_source6 = select_assign_source();
+
+                state._fsp--;
+
+
+                query.addSelect( ( select_assign_source6 != null ?
+                                   input.toString( select_assign_source6.start, select_assign_source6.stop ) : null ),
+                        ( select_assign_target7 != null ?
+                          input.toString( select_assign_target7.start, select_assign_target7.stop ) : null ) );
+            }
+        }
+        catch ( RecognitionException re ) {
+            reportError( re );
+            recover( input, re );
+        }
+        finally {
+        }
+        return;
+    }
+    // $ANTLR end "select_assign"
+
+
+    // $ANTLR start "where"
+    // org.apache.usergrid/persistence/query/QueryFilter.g:148:1: where : ( property operator value ( ( ',
+    // ' | 'of' ) second_value ( ',' third_value )? )? ) ;
+    public final void where() throws RecognitionException {
+        QueryFilterParser.property_return property8 = null;
+
+        QueryFilterParser.operator_return operator9 = null;
+
+        QueryFilterParser.value_return value10 = null;
+
+        QueryFilterParser.second_value_return second_value11 = null;
+
+        QueryFilterParser.third_value_return third_value12 = null;
+
+
+        try {
+            // org.apache.usergrid/persistence/query/QueryFilter.g:149:2: ( ( property operator value ( ( ',
+            // ' | 'of' ) second_value ( ',' third_value )? )? ) )
+            // org.apache.usergrid/persistence/query/QueryFilter.g:149:4: ( property operator value ( ( ',
+            // ' | 'of' ) second_value ( ',' third_value )? )? )
+            {
+                // org.apache.usergrid/persistence/query/QueryFilter.g:149:4: ( property operator value ( ( ',
+                // ' | 'of' ) second_value ( ',' third_value )? )? )
+                // org.apache.usergrid/persistence/query/QueryFilter.g:149:5: property operator value ( ( ',
+                // ' | 'of' ) second_value ( ',' third_value )? )?
+                {
+                    pushFollow( FOLLOW_property_in_where855 );
+                    property8 = property();
+
+                    state._fsp--;
+
+                    pushFollow( FOLLOW_operator_in_where857 );
+                    operator9 = operator();
+
+                    state._fsp--;
+
+                    pushFollow( FOLLOW_value_in_where859 );
+                    value10 = value();
+
+                    state._fsp--;
+
+                    // org.apache.usergrid/persistence/query/QueryFilter.g:149:29: ( ( ',' | 'of' ) second_value ( ',
+                    // ' third_value )? )?
+                    int alt4 = 2;
+                    int LA4_0 = input.LA( 1 );
+
+                    if ( ( ( LA4_0 >= 29 && LA4_0 <= 30 ) ) ) {
+                        alt4 = 1;
+                    }
+                    switch ( alt4 ) {
+                        case 1:
+                            // org.apache.usergrid/persistence/query/QueryFilter.g:149:30: ( ',' | 'of' ) second_value ( ',
+                            // ' third_value )?
+                        {
+                            if ( ( input.LA( 1 ) >= 29 && input.LA( 1 ) <= 30 ) ) {
+                                input.consume();
+                                state.errorRecovery = false;
+                            }
+                            else {
+                                MismatchedSetException mse = new MismatchedSetException( null, input );
+                                throw mse;
+                            }
+
+                            pushFollow( FOLLOW_second_value_in_where870 );
+                            second_value11 = second_value();
+
+                            state._fsp--;
+
+                            // org.apache.usergrid/persistence/query/QueryFilter.g:149:56: ( ',' third_value )?
+                            int alt3 = 2;
+                            int LA3_0 = input.LA( 1 );
+
+                            if ( ( LA3_0 == 29 ) ) {
+                                alt3 = 1;
+                            }
+                            switch ( alt3 ) {
+                                case 1:
+                                    // org.apache.usergrid/persistence/query/QueryFilter.g:149:58: ',' third_value
+                                {
+                                    match( input, 29, FOLLOW_29_in_where874 );
+                                    pushFollow( FOLLOW_third_value_in_where876 );
+                                    third_value12 = third_value();
+
+                                    state._fsp--;
+                                }
+                                break;
+                            }
+                        }
+                        break;
+                    }
+
+
+                    String property = ( property8 != null ? input.toString( property8.start, property8.stop ) : null );
+                    String operator = ( operator9 != null ? input.toString( operator9.start, operator9.stop ) : null );
+                    String value = ( value10 != null ? input.toString( value10.start, value10.stop ) : null );
+                    int value_type = ( value10 != null ? ( ( Token ) value10.start ) : null ) != null ?
+                                     ( value10 != null ? ( ( Token ) value10.start ) : null ).getType() : 0;
+                    String second_value =
+                            ( second_value11 != null ? input.toString( second_value11.start, second_value11.stop ) :
+                              null );
+                    int second_value_type =
+                            ( second_value11 != null ? ( ( Token ) second_value11.start ) : null ) != null ?
+                            ( second_value11 != null ? ( ( Token ) second_value11.start ) : null ).getType() : 0;
+                    String third_value =
+                            ( third_value12 != null ? input.toString( third_value12.start, third_value12.stop ) :
+                              null );
+                    int third_value_type =
+                            ( third_value12 != null ? ( ( Token ) third_value12.start ) : null ) != null ?
+                            ( third_value12 != null ? ( ( Token ) third_value12.start ) : null ).getType() : 0;
+                    FilterPredicate filter =
+                            new FilterPredicate( property, operator, value, value_type, second_value, second_value_type,
+                                    third_value, third_value_type );
+                    query.addFilter( filter );
+                    //System.out.println("Parsed query filter: " + property + " " + operator + " " + value + " " +
+                    // second_value);
+
+
+                }
+            }
+        }
+        catch ( RecognitionException re ) {
+            reportError( re );
+            recover( input, re );
+        }
+        finally {
+        }
+        return;
+    }
+    // $ANTLR end "where"
+
+
+    public static class direction_return extends ParserRuleReturnScope {}
+
+
+    ;
+
+
+    // $ANTLR start "direction"
+    // org.apache.usergrid/persistence/query/QueryFilter.g:165:1: direction : ( 'asc' | 'desc' ) ;
+    public final QueryFilterParser.direction_return direction() throws RecognitionException {
+        QueryFilterParser.direction_return retval = new QueryFilterParser.direction_return();
+        retval.start = input.LT( 1 );
+
+        try {
+            // org.apache.usergrid/persistence/query/QueryFilter.g:165:12: ( ( 'asc' | 'desc' ) )
+            // org.apache.usergrid/persistence/query/QueryFilter.g:165:14: ( 'asc' | 'desc' )
+            {
+                if ( ( input.LA( 1 ) >= 32 && input.LA( 1 ) <= 33 ) ) {
+                    input.consume();
+                    state.errorRecovery = false;
+                }
+                else {
+                    MismatchedSetException mse = new MismatchedSetException( null, input );
+                    throw mse;
+                }
+            }
+
+            retval.stop = input.LT( -1 );
+        }
+        catch ( RecognitionException re ) {
+            reportError( re );
+            recover( input, re );
+        }
+        finally {
+        }
+        return retval;
+    }
+    // $ANTLR end "direction"
+
+
+    // $ANTLR start "order"
+    // org.apache.usergrid/persistence/query/QueryFilter.g:167:1: order : ( property ( direction )? ) ;
+    public final void order() throws RecognitionException {
+        QueryFilterParser.property_return property13 = null;
+
+        QueryFilterParser.direction_return direction14 = null;
+
+
+        try {
+            // org.apache.usergrid/persistence/query/QueryFilter.g:168:2: ( ( property ( direction )? ) )
+            // org.apache.usergrid/persistence/query/QueryFilter.g:168:4: ( property ( direction )? )
+            {
+                // org.apache.usergrid/persistence/query/QueryFilter.g:168:4: ( property ( direction )? )
+                // org.apache.usergrid/persistence/query/QueryFilter.g:168:5: property ( direction )?
+                {
+                    pushFollow( FOLLOW_property_in_order909 );
+                    property13 = property();
+
+                    state._fsp--;
+
+                    // org.apache.usergrid/persistence/query/QueryFilter.g:168:14: ( direction )?
+                    int alt5 = 2;
+                    int LA5_0 = input.LA( 1 );
+
+                    if ( ( ( LA5_0 >= 32 && LA5_0 <= 33 ) ) ) {
+                        alt5 = 1;
+                    }
+                    switch ( alt5 ) {
+                        case 1:
+                            // org.apache.usergrid/persistence/query/QueryFilter.g:168:14: direction
+                        {
+                            pushFollow( FOLLOW_direction_in_order911 );
+                            direction14 = direction();
+
+                            state._fsp--;
+                        }
+                        break;
+                    }
+                }
+
+
+                String property = ( property13 != null ? input.toString( property13.start, property13.stop ) : null );
+                String direction =
+                        ( direction14 != null ? input.toString( direction14.start, direction14.stop ) : null );
+                SortPredicate sort = new SortPredicate( property, direction );
+                query.addSort( sort );
+                System.out.println( "Parsed query order: " + property + " " + direction );
+            }
+        }
+        catch ( RecognitionException re ) {
+            reportError( re );
+            recover( input, re );
+        }
+        finally {
+        }
+        return;
+    }
+    // $ANTLR end "order"
+
+
+    // $ANTLR start "select_expr"
+    // org.apache.usergrid/persistence/query/QueryFilter.g:178:1: select_expr : ( '*' | select_subject ( ',
+    // ' select_subject )* | '{' select_assign ( ',' select_assign )* '}' ) ;
+    public final void select_expr() throws RecognitionException {
+        try {
+            // org.apache.usergrid/persistence/query/QueryFilter.g:179:2: ( ( '*' | select_subject ( ',
+            // ' select_subject )* | '{' select_assign ( ',' select_assign )* '}' ) )
+            // org.apache.usergrid/persistence/query/QueryFilter.g:179:4: ( '*' | select_subject ( ',
+            // ' select_subject )* | '{' select_assign ( ',' select_assign )* '}' )
+            {
+                // org.apache.usergrid/persistence/query/QueryFilter.g:179:4: ( '*' | select_subject ( ',
+                // ' select_subject )* | '{' select_assign ( ',' select_assign )* '}' )
+                int alt8 = 3;
+                switch ( input.LA( 1 ) ) {
+                    case 34: {
+                        alt8 = 1;
+                    }
+                    break;
+                    case ID: {
+                        alt8 = 2;
+                    }
+                    break;
+                    case 35: {
+                        alt8 = 3;
+                    }
+                    break;
+                    default:
+                        NoViableAltException nvae = new NoViableAltException( "", 8, 0, input );
+
+                        throw nvae;
+                }
+
+                switch ( alt8 ) {
+                    case 1:
+                        // org.apache.usergrid/persistence/query/QueryFilter.g:179:5: '*'
+                    {
+                        match( input, 34, FOLLOW_34_in_select_expr925 );
+                    }
+                    break;
+                    case 2:
+                        // org.apache.usergrid/persistence/query/QueryFilter.g:179:11: select_subject ( ',' select_subject )*
+                    {
+                        pushFollow( FOLLOW_select_subject_in_select_expr929 );
+                        select_subject();
+
+                        state._fsp--;
+
+                        // org.apache.usergrid/persistence/query/QueryFilter.g:179:26: ( ',' select_subject )*
+                        loop6:
+                        do {
+                            int alt6 = 2;
+                            int LA6_0 = input.LA( 1 );
+
+                            if ( ( LA6_0 == 29 ) ) {
+                                alt6 = 1;
+                            }
+
+
+                            switch ( alt6 ) {
+                                case 1:
+                                    // org.apache.usergrid/persistence/query/QueryFilter.g:179:27: ',' select_subject
+                                {
+                                    match( input, 29, FOLLOW_29_in_select_expr932 );
+                                    pushFollow( FOLLOW_select_subject_in_select_expr934 );
+                                    select_subject();
+
+                                    state._fsp--;
+                                }
+                                break;
+
+                                default:
+                                    break loop6;
+                            }
+                        }
+                        while ( true );
+                    }
+                    break;
+                    case 3:
+                        // org.apache.usergrid/persistence/query/QueryFilter.g:179:51: '{' select_assign ( ',
+                        // ' select_assign )* '}'
+                    {
+                        match( input, 35, FOLLOW_35_in_select_expr941 );
+                        pushFollow( FOLLOW_select_assign_in_select_expr943 );
+                        select_assign();
+
+                        state._fsp--;
+
+                        // org.apache.usergrid/persistence/query/QueryFilter.g:179:69: ( ',' select_assign )*
+                        loop7:
+                        do {
+                            int alt7 = 2;
+                            int LA7_0 = input.LA( 1 );
+
+                            if ( ( LA7_0 == 29 ) ) {
+                                alt7 = 1;
+                            }
+
+
+                            switch ( alt7 ) {
+                                case 1:
+                                    // org.apache.usergrid/persistence/query/QueryFilter.g:179:70: ',' select_assign
+                                {
+                                    match( input, 29, FOLLOW_29_in_select_expr946 );
+                                    pushFollow( FOLLOW_select_assign_in_select_expr948 );
+                                    select_assign();
+
+                                    state._fsp--;
+                                }
+                                break;
+
+                                default:
+                                    break loop7;
+                            }
+                        }
+                        while ( true );
+
+                        match( input, 36, FOLLOW_36_in_select_expr953 );
+                    }
+                    break;
+                }
+            }
+        }
+        catch ( RecognitionException re ) {
+            reportError( re );
+            recover( input, re );
+        }
+        finally {
+        }
+        return;
+    }
+    // $ANTLR end "select_expr"
+
+
+    // $ANTLR start "ql"
+    // org.apache.usergrid/persistence/query/QueryFilter.g:181:1: ql returns [Query q] : 'select' select_expr ( 'where'
+    // where ( 'and' where )* )? ( 'order by' order ( ',' order )* )? ;
+    public final Query ql() throws RecognitionException {
+        Query q = null;
+
+        try {
+            // org.apache.usergrid/persistence/query/QueryFilter.g:182:2: ( 'select' select_expr ( 'where' where ( 'and'
+            // where )* )? ( 'order by' order ( ',' order )* )? )
+            // org.apache.usergrid/persistence/query/QueryFilter.g:182:4: 'select' select_expr ( 'where' where ( 'and' where
+            // )* )? ( 'order by' order ( ',' order )* )?
+            {
+                match( input, 37, FOLLOW_37_in_ql970 );
+                pushFollow( FOLLOW_select_expr_in_ql972 );
+                select_expr();
+
+                state._fsp--;
+
+                // org.apache.usergrid/persistence/query/QueryFilter.g:182:25: ( 'where' where ( 'and' where )* )?
+                int alt10 = 2;
+                int LA10_0 = input.LA( 1 );
+
+                if ( ( LA10_0 == 38 ) ) {
+                    alt10 = 1;
+                }
+                switch ( alt10 ) {
+                    case 1:
+                        // org.apache.usergrid/persistence/query/QueryFilter.g:182:26: 'where' where ( 'and' where )*
+                    {
+                        match( input, 38, FOLLOW_38_in_ql975 );
+                        pushFollow( FOLLOW_where_in_ql977 );
+                        where();
+
+                        state._fsp--;
+
+                        // org.apache.usergrid/persistence/query/QueryFilter.g:182:40: ( 'and' where )*
+                        loop9:
+                        do {
+                            int alt9 = 2;
+                            int LA9_0 = input.LA( 1 );
+
+                            if ( ( LA9_0 == 39 ) ) {
+                                alt9 = 1;
+                            }
+
+
+                            switch ( alt9 ) {
+                                case 1:
+                                    // org.apache.usergrid/persistence/query/QueryFilter.g:182:41: 'and' where
+                                {
+                                    match( input, 39, FOLLOW_39_in_ql980 );
+                                    pushFollow( FOLLOW_where_in_ql982 );
+                                    where();
+
+                                    state._fsp--;
+                                }
+                                break;
+
+                                default:
+                                    break loop9;
+                            }
+                        }
+                        while ( true );
+                    }
+                    break;
+                }
+
+                // org.apache.usergrid/persistence/query/QueryFilter.g:182:57: ( 'order by' order ( ',' order )* )?
+                int alt12 = 2;
+                int LA12_0 = input.LA( 1 );
+
+                if ( ( LA12_0 == 40 ) ) {
+                    alt12 = 1;
+                }
+                switch ( alt12 ) {
+                    case 1:
+                        // org.apache.usergrid/persistence/query/QueryFilter.g:182:58: 'order by' order ( ',' order )*
+                    {
+                        match( input, 40, FOLLOW_40_in_ql989 );
+                        pushFollow( FOLLOW_order_in_ql991 );
+                        order();
+
+                        state._fsp--;
+
+                        // org.apache.usergrid/persistence/query/QueryFilter.g:182:75: ( ',' order )*
+                        loop11:
+                        do {
+                            int alt11 = 2;
+                            int LA11_0 = input.LA( 1 );
+
+                            if ( ( LA11_0 == 29 ) ) {
+                                alt11 = 1;
+                            }
+
+
+                            switch ( alt11 ) {
+                                case 1:
+                                    // org.apache.usergrid/persistence/query/QueryFilter.g:182:76: ',' order
+                                {
+                                    match( input, 29, FOLLOW_29_in_ql994 );
+                                    pushFollow( FOLLOW_order_in_ql996 );
+                                    order();
+
+                                    state._fsp--;
+                                }
+                                break;
+
+                                default:
+                                    break loop11;
+                            }
+                        }
+                        while ( true );
+                    }
+                    break;
+                }
+
+
+                q = query;
+            }
+        }
+        catch ( RecognitionException re ) {
+            reportError( re );
+            recover( input, re );
+        }
+        finally {
+        }
+        return q;
+    }
+    // $ANTLR end "ql"
+
+    // Delegated rules
+
+
+    public static final BitSet FOLLOW_ID_in_property597 = new BitSet( new long[] { 0x0000000000000002L } );
+    public static final BitSet FOLLOW_set_in_operator609 = new BitSet( new long[] { 0x0000000000000002L } );
+    public static final BitSet FOLLOW_set_in_value668 = new BitSet( new long[] { 0x0000000000000002L } );
+    public static final BitSet FOLLOW_set_in_second_value695 = new BitSet( new long[] { 0x0000000000000002L } );
+    public static final BitSet FOLLOW_set_in_third_value722 = new BitSet( new long[] { 0x0000000000000002L } );
+    public static final BitSet FOLLOW_property_in_filter759 = new BitSet( new long[] { 0x000000001FFF0000L } );
+    public static final BitSet FOLLOW_operator_in_filter761 = new BitSet( new long[] { 0x00000000000016A0L } );
+    public static final BitSet FOLLOW_value_in_filter763 = new BitSet( new long[] { 0x0000000060000000L } );
+    public static final BitSet FOLLOW_set_in_filter766 = new BitSet( new long[] { 0x00000000000016A0L } );
+    public static final BitSet FOLLOW_second_value_in_filter774 = new BitSet( new long[] { 0x0000000020000000L } );
+    public static final BitSet FOLLOW_29_in_filter778 = new BitSet( new long[] { 0x00000000000016A0L } );
+    public static final BitSet FOLLOW_third_value_in_filter780 = new BitSet( new long[] { 0x0000000000000000L } );
+    public static final BitSet FOLLOW_EOF_in_filter789 = new BitSet( new long[] { 0x0000000000000002L } );
+    public static final BitSet FOLLOW_ID_in_select_subject800 = new BitSet( new long[] { 0x0000000000000002L } );
+    public static final BitSet FOLLOW_ID_in_select_assign_target812 = new BitSet( new long[] { 0x0000000000000002L } );
+    public static final BitSet FOLLOW_ID_in_select_assign_source823 = new BitSet( new long[] { 0x0000000000000002L } );
+    public static final BitSet FOLLOW_select_assign_target_in_select_assign836 =
+            new BitSet( new long[] { 0x0000000080000000L } );
+    public static final BitSet FOLLOW_31_in_select_assign838 = new BitSet( new long[] { 0x0000000000000010L } );
+    public static final BitSet FOLLOW_select_assign_source_in_select_assign840 =
+            new BitSet( new long[] { 0x0000000000000002L } );
+    public static final BitSet FOLLOW_property_in_where855 = new BitSet( new long[] { 0x000000001FFF0000L } );
+    public static final BitSet FOLLOW_operator_in_where857 = new BitSet( new long[] { 0x00000000000016A0L } );
+    public static final BitSet FOLLOW_value_in_where859 = new BitSet( new long[] { 0x0000000060000002L } );
+    public static final BitSet FOLLOW_set_in_where862 = new BitSet( new long[] { 0x00000000000016A0L } );
+    public static final BitSet FOLLOW_second_value_in_where870 = new BitSet( new long[] { 0x0000000020000002L } );
+    public static final BitSet FOLLOW_29_in_where874 = new BitSet( new long[] { 0x00000000000016A0L } );
+    public static final BitSet FOLLOW_third_value_in_where876 = new BitSet( new long[] { 0x0000000000000002L } );
+    public static final BitSet FOLLOW_set_in_direction893 = new BitSet( new long[] { 0x0000000000000002L } );
+    public static final BitSet FOLLOW_property_in_order909 = new BitSet( new long[] { 0x0000000300000002L } );
+    public static final BitSet FOLLOW_direction_in_order911 = new BitSet( new long[] { 0x0000000000000002L } );
+    public static final BitSet FOLLOW_34_in_select_expr925 = new BitSet( new long[] { 0x0000000000000002L } );
+    public static final BitSet FOLLOW_select_subject_in_select_expr929 =
+            new BitSet( new long[] { 0x0000000020000002L } );
+    public static final BitSet FOLLOW_29_in_select_expr932 = new BitSet( new long[] { 0x0000000000000010L } );
+    public static final BitSet FOLLOW_select_subject_in_select_expr934 =
+            new BitSet( new long[] { 0x0000000020000002L } );
+    public static final BitSet FOLLOW_35_in_select_expr941 = new BitSet( new long[] { 0x0000000000000010L } );
+    public static final BitSet FOLLOW_select_assign_in_select_expr943 =
+            new BitSet( new long[] { 0x0000001020000000L } );
+    public static final BitSet FOLLOW_29_in_select_expr946 = new BitSet( new long[] { 0x0000000000000010L } );
+    public static final BitSet FOLLOW_select_assign_in_select_expr948 =
+            new BitSet( new long[] { 0x0000001020000000L } );
+    public static final BitSet FOLLOW_36_in_select_expr953 = new BitSet( new long[] { 0x0000000000000002L } );
+    public static final BitSet FOLLOW_37_in_ql970 = new BitSet( new long[] { 0x0000000C00000010L } );
+    public static final BitSet FOLLOW_select_expr_in_ql972 = new BitSet( new long[] { 0x0000014000000002L } );
+    public static final BitSet FOLLOW_38_in_ql975 = new BitSet( new long[] { 0x0000000000000010L } );
+    public static final BitSet FOLLOW_where_in_ql977 = new BitSet( new long[] { 0x0000018000000002L } );
+    public static final BitSet FOLLOW_39_in_ql980 = new BitSet( new long[] { 0x0000000000000010L } );
+    public static final BitSet FOLLOW_where_in_ql982 = new BitSet( new long[] { 0x0000018000000002L } );
+    public static final BitSet FOLLOW_40_in_ql989 = new BitSet( new long[] { 0x0000000000000010L } );
+    public static final BitSet FOLLOW_order_in_ql991 = new BitSet( new long[] { 0x0000000020000002L } );
+    public static final BitSet FOLLOW_29_in_ql994 = new BitSet( new long[] { 0x0000000000000010L } );
+    public static final BitSet FOLLOW_order_in_ql996 = new BitSet( new long[] { 0x0000000020000002L } );
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/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
new file mode 100644
index 0000000..86cd9ea
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/mq/QueryProcessor.java
@@ -0,0 +1,560 @@
+package org.apache.usergrid.mq;
+
+
+import java.nio.ByteBuffer;
+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 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 {
+
+    private static final Logger logger = LoggerFactory.getLogger( QueryProcessor.class );
+
+    Query query;
+
+    String cursor;
+    List<QuerySlice> slices;
+    List<FilterPredicate> filters;
+    List<SortPredicate> sorts;
+
+
+    public QueryProcessor( Query query ) {
+        this.query = query;
+        cursor = query.getCursor();
+        filters = query.getFilterPredicates();
+        sorts = query.getSortPredicates();
+        process();
+    }
+
+
+    public Query getQuery() {
+        return query;
+    }
+
+
+    public String getCursor() {
+        return cursor;
+    }
+
+
+    public List<QuerySlice> getSlices() {
+        return slices;
+    }
+
+
+    public List<FilterPredicate> getFilters() {
+        return filters;
+    }
+
+
+    public List<SortPredicate> getSorts() {
+        return sorts;
+    }
+
+
+    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 );
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+
+    @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;
+    }
+
+
+    private Set<String> getFilterPropertyNames() {
+        Set<String> names = new LinkedHashSet<String>();
+        for ( FilterPredicate f : filters ) {
+            names.add( f.getPropertyName() );
+        }
+        return names;
+    }
+
+
+    public QuerySlice getSliceForProperty( String name ) {
+        for ( QuerySlice s : slices ) {
+            if ( s.propertyName.equals( name ) ) {
+                return s;
+            }
+        }
+        return null;
+    }
+
+
+    public static class RangeValue {
+        byte code;
+        Object value;
+        boolean inclusive;
+
+
+        public RangeValue( byte code, Object value, boolean inclusive ) {
+            this.code = code;
+            this.value = value;
+            this.inclusive = inclusive;
+        }
+
+
+        public byte getCode() {
+            return code;
+        }
+
+
+        public void setCode( byte code ) {
+            this.code = code;
+        }
+
+
+        public Object getValue() {
+            return value;
+        }
+
+
+        public void setValue( Object value ) {
+            this.value = value;
+        }
+
+
+        public boolean isInclusive() {
+            return inclusive;
+        }
+
+
+        public void setInclusive( boolean inclusive ) {
+            this.inclusive = inclusive;
+        }
+
+
+        @Override
+        public int hashCode() {
+            final int prime = 31;
+            int result = 1;
+            result = prime * result + code;
+            result = prime * result + ( inclusive ? 1231 : 1237 );
+            result = prime * result + ( ( value == null ) ? 0 : value.hashCode() );
+            return result;
+        }
+
+
+        @Override
+        public boolean equals( Object obj ) {
+            if ( this == obj ) {
+                return true;
+            }
+            if ( obj == null ) {
+                return false;
+            }
+            if ( getClass() != obj.getClass() ) {
+                return false;
+            }
+            RangeValue other = ( RangeValue ) obj;
+            if ( code != other.code ) {
+                return false;
+            }
+            if ( inclusive != other.inclusive ) {
+                return false;
+            }
+            if ( value == null ) {
+                if ( other.value != null ) {
+                    return false;
+                }
+            }
+            else if ( !value.equals( other.value ) ) {
+                return false;
+            }
+            return true;
+        }
+
+
+        public int compareTo( RangeValue other, boolean finish ) {
+            if ( other == null ) {
+                return 1;
+            }
+            if ( code != other.code ) {
+                return NumberUtils.sign( code - other.code );
+            }
+            @SuppressWarnings({ "unchecked", "rawtypes" }) int c = ( ( Comparable ) value ).compareTo( other.value );
+            if ( c != 0 ) {
+                return c;
+            }
+            if ( finish ) {
+                // for finish values, inclusive means <= which is greater than <
+                if ( inclusive != other.inclusive ) {
+                    return inclusive ? 1 : -1;
+                }
+            }
+            else {
+                // for start values, inclusive means >= which is lest than >
+                if ( inclusive != other.inclusive ) {
+                    return inclusive ? -1 : 1;
+                }
+            }
+            return 0;
+        }
+
+
+        public static int compare( RangeValue v1, RangeValue v2, boolean finish ) {
+            if ( v1 == null ) {
+                if ( v2 == null ) {
+                    return 0;
+                }
+                return -1;
+            }
+            return v1.compareTo( v2, finish );
+        }
+    }
+
+
+    public static class RangePair {
+        RangeValue start;
+        RangeValue finish;
+
+
+        public RangePair( RangeValue start, RangeValue finish ) {
+            this.start = start;
+            this.finish = finish;
+        }
+
+
+        public RangeValue getStart() {
+            return start;
+        }
+
+
+        public void setStart( RangeValue start ) {
+            this.start = start;
+        }
+
+
+        public RangeValue getFinish() {
+            return finish;
+        }
+
+
+        public void setFinish( RangeValue finish ) {
+            this.finish = finish;
+        }
+
+
+        @Override
+        public int hashCode() {
+            final int prime = 31;
+            int result = 1;
+            result = prime * result + ( ( finish == null ) ? 0 : finish.hashCode() );
+            result = prime * result + ( ( start == null ) ? 0 : start.hashCode() );
+            return result;
+        }
+
+
+        @Override
+        public boolean equals( Object obj ) {
+            if ( this == obj ) {
+                return true;
+            }
+            if ( obj == null ) {
+                return false;
+            }
+            if ( getClass() != obj.getClass() ) {
+                return false;
+            }
+            RangePair other = ( RangePair ) obj;
+            if ( finish == null ) {
+                if ( other.finish != null ) {
+                    return false;
+                }
+            }
+            else if ( !finish.equals( other.finish ) ) {
+                return false;
+            }
+            if ( start == null ) {
+                if ( other.start != null ) {
+                    return false;
+                }
+            }
+            else if ( !start.equals( other.start ) ) {
+                return false;
+            }
+            return true;
+        }
+    }
+
+
+    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 {
+
+        String propertyName;
+        FilterOperator operator;
+        Object value;
+        RangeValue start;
+        RangeValue finish;
+        ByteBuffer cursor;
+        boolean reversed;
+
+
+        QuerySlice( String propertyName, FilterOperator operator, Object value, RangeValue start, RangeValue finish,
+                    ByteBuffer cursor, boolean reversed ) {
+            this.propertyName = propertyName;
+            this.operator = operator;
+            this.value = value;
+            this.start = start;
+            this.finish = finish;
+            this.cursor = cursor;
+            this.reversed = reversed;
+        }
+
+
+        public String getPropertyName() {
+            return propertyName;
+        }
+
+
+        public void setPropertyName( String propertyName ) {
+            this.propertyName = propertyName;
+        }
+
+
+        public RangeValue getStart() {
+            return start;
+        }
+
+
+        public void setStart( RangeValue start ) {
+            this.start = start;
+        }
+
+
+        public RangeValue getFinish() {
+            return finish;
+        }
+
+
+        public void setFinish( RangeValue finish ) {
+            this.finish = finish;
+        }
+
+
+        public Object getValue() {
+            return value;
+        }
+
+
+        public void setValue( Object value ) {
+            this.value = value;
+        }
+
+
+        public ByteBuffer getCursor() {
+            return cursor;
+        }
+
+
+        public void setCursor( ByteBuffer cursor ) {
+            this.cursor = cursor;
+        }
+
+
+        public boolean isReversed() {
+            return reversed;
+        }
+
+
+        public void setReversed( boolean reversed ) {
+            this.reversed = reversed;
+        }
+
+
+        @Override
+        public int hashCode() {
+            final int prime = 31;
+            int result = 1;
+            result = prime * result + ( ( finish == null ) ? 0 : finish.hashCode() );
+            result = prime * result + ( ( propertyName == null ) ? 0 : propertyName.hashCode() );
+            result = prime * result + ( ( start == null ) ? 0 : start.hashCode() );
+
+            //NOTE.  We have explicitly left out direction.  According to IndexTest:testCollectionOrdering,
+            // a cursor can be used and change direction
+            //of the ordering.
+            return result;
+        }
+
+
+        @Override
+        public boolean equals( Object obj ) {
+            if ( this == obj ) {
+                return true;
+            }
+            if ( obj == null ) {
+                return false;
+            }
+            if ( getClass() != obj.getClass() ) {
+                return false;
+            }
+            QuerySlice other = ( QuerySlice ) obj;
+            if ( finish == null ) {
+                if ( other.finish != null ) {
+                    return false;
+                }
+            }
+            else if ( !finish.equals( other.finish ) ) {
+                return false;
+            }
+            if ( propertyName == null ) {
+                if ( other.propertyName != null ) {
+                    return false;
+                }
+            }
+            else if ( !propertyName.equals( other.propertyName ) ) {
+                return false;
+            }
+
+            if ( start == null ) {
+                if ( other.start != null ) {
+                    return false;
+                }
+            }
+            else if ( !start.equals( other.start ) ) {
+                return false;
+            }
+            return true;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/mq/Queue.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/mq/Queue.java b/stack/core/src/main/java/org/apache/usergrid/mq/Queue.java
new file mode 100644
index 0000000..c9794b5
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/mq/Queue.java
@@ -0,0 +1,289 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.mq;
+
+
+import java.util.Map;
+import java.util.TreeMap;
+import java.util.UUID;
+
+import org.codehaus.jackson.annotate.JsonAnyGetter;
+import org.codehaus.jackson.annotate.JsonAnySetter;
+import org.codehaus.jackson.annotate.JsonIgnore;
+import org.apache.commons.lang.StringUtils;
+import org.apache.usergrid.utils.UUIDUtils;
+
+import static java.util.UUID.nameUUIDFromBytes;
+import static org.apache.commons.collections.MapUtils.getBooleanValue;
+import static org.apache.commons.collections.MapUtils.getByteValue;
+import static org.apache.commons.collections.MapUtils.getDoubleValue;
+import static org.apache.commons.collections.MapUtils.getFloatValue;
+import static org.apache.commons.collections.MapUtils.getIntValue;
+import static org.apache.commons.collections.MapUtils.getLongValue;
+import static org.apache.commons.collections.MapUtils.getShortValue;
+import static org.apache.commons.collections.MapUtils.getString;
+import static org.apache.usergrid.utils.MapUtils.hashMap;
+
+
+public class Queue {
+
+    public static final String QUEUE_ID = "uuid";
+    public static final String QUEUE_PATH = "path";
+    public static final String QUEUE_CREATED = "created";
+    public static final String QUEUE_MODIFIED = "modified";
+    public static final String QUEUE_NEWEST = "newest";
+    public static final String QUEUE_OLDEST = "oldest";
+
+    @SuppressWarnings("rawtypes")
+    public static final Map<String, Class> QUEUE_PROPERTIES =
+            hashMap( QUEUE_PATH, ( Class ) String.class ).map( QUEUE_ID, UUID.class ).map( QUEUE_CREATED, Long.class )
+                    .map( QUEUE_MODIFIED, Long.class ).map( QUEUE_NEWEST, UUID.class ).map( QUEUE_OLDEST, UUID.class );
+
+    protected Map<String, Object> properties = new TreeMap<String, Object>( String.CASE_INSENSITIVE_ORDER );
+
+
+    public Queue( String path ) {
+        setPath( path );
+    }
+
+
+    public Queue( Map<String, Object> properties ) {
+        this.properties.putAll( properties );
+    }
+
+
+    @Override
+    public String toString() {
+        return getPath();
+    }
+
+
+    @JsonIgnore
+    public String getPath() {
+        return getString( properties, QUEUE_PATH );
+    }
+
+
+    public void setPath( String path ) {
+        properties.put( QUEUE_PATH, path );
+    }
+
+
+    @JsonIgnore
+    public long getCreated() {
+        return getLongValue( properties, QUEUE_CREATED );
+    }
+
+
+    public void setCreated( long created ) {
+        properties.put( QUEUE_CREATED, created );
+    }
+
+
+    @JsonIgnore
+    public long getModified() {
+        return getLongValue( properties, QUEUE_MODIFIED );
+    }
+
+
+    public void setModified( long modified ) {
+        properties.put( QUEUE_MODIFIED, modified );
+    }
+
+
+    public static Queue getDestination( String path ) {
+        if ( path == null ) {
+            return null;
+        }
+        return new Queue( path );
+    }
+
+
+    @JsonAnySetter
+    public void setProperty( String key, Object value ) {
+        properties.put( key, value );
+    }
+
+
+    @JsonAnyGetter
+    public Map<String, Object> getProperties() {
+        return properties;
+    }
+
+
+    public static String[] getQueueParentPaths( String queuePath ) {
+        queuePath = queuePath.toLowerCase().trim();
+        String[] segments = StringUtils.split( queuePath, '/' );
+        String[] paths = new String[segments.length + 1];
+        paths[0] = "/";
+        for ( int i = 0; i < segments.length; i++ ) {
+            paths[i + 1] = "/" + StringUtils.join( segments, '/', 0, i + 1 ) + "/";
+        }
+        return paths;
+    }
+
+
+    public static String[] getQueuePathSegments( String queuePath ) {
+        queuePath = queuePath.toLowerCase().trim();
+        String[] segments = StringUtils.split( queuePath, '/' );
+        return segments;
+    }
+
+
+    public static String normalizeQueuePath( String queuePath ) {
+        if ( queuePath == null ) {
+            return null;
+        }
+        queuePath = queuePath.toLowerCase().trim();
+        if ( queuePath.length() == 0 ) {
+            return null;
+        }
+        queuePath = "/" + StringUtils.join( StringUtils.split( queuePath, '/' ), '/' );
+        if ( !queuePath.endsWith( "/" ) ) {
+            queuePath += "/";
+        }
+        return queuePath;
+    }
+
+
+    public static UUID getQueueId( String queuePath ) {
+        if ( queuePath == null ) {
+            return null;
+        }
+        // is the queuePath already a UUID?
+        UUID uuid = UUIDUtils.tryGetUUID( queuePath );
+        if ( uuid != null ) {
+            return uuid;
+        }
+        // UUID queuePath string might have been normalized
+        // look for /00000000-0000-0000-0000-000000000000/
+        // or /00000000-0000-0000-0000-000000000000
+        if ( ( queuePath.length() == 38 ) && queuePath.startsWith( "/" ) && queuePath.endsWith( "/" ) ) {
+            uuid = UUIDUtils.tryExtractUUID( queuePath, 1 );
+            if ( uuid != null ) {
+                return uuid;
+            }
+        }
+        else if ( ( queuePath.length() == 37 ) && queuePath.startsWith( "/" ) ) {
+            uuid = UUIDUtils.tryExtractUUID( queuePath, 1 );
+            if ( uuid != null ) {
+                return uuid;
+            }
+        }
+        queuePath = normalizeQueuePath( queuePath );
+        if ( queuePath == null ) {
+            return null;
+        }
+        uuid = nameUUIDFromBytes( queuePath.getBytes() );
+        return uuid;
+    }
+
+
+    @JsonIgnore
+    public UUID getUuid() {
+        return getQueueId( getPath() );
+    }
+
+
+    public float getFloatProperty( String name ) {
+        return getFloatValue( properties, name );
+    }
+
+
+    public void setFloatProperty( String name, float value ) {
+        properties.put( name, value );
+    }
+
+
+    public double getDoubleProperty( String name ) {
+        return getDoubleValue( properties, name );
+    }
+
+
+    public void setDoubleProperty( String name, double value ) {
+        properties.put( name, value );
+    }
+
+
+    public int getIntProperty( String name ) {
+        return getIntValue( properties, name );
+    }
+
+
+    public void setIntProperty( String name, int value ) {
+        properties.put( name, value );
+    }
+
+
+    public long getLongProperty( String name ) {
+        return getLongValue( properties, name );
+    }
+
+
+    public void setLongProperty( String name, long value ) {
+        properties.put( name, value );
+    }
+
+
+    public Object getObjectProperty( String name ) {
+        return properties.get( name );
+    }
+
+
+    public void setObjectProperty( String name, Object value ) {
+        properties.put( name, value );
+    }
+
+
+    public short getShortProperty( String name ) {
+        return getShortValue( properties, name );
+    }
+
+
+    public void setShortProperty( String name, short value ) {
+        properties.put( name, value );
+    }
+
+
+    public String getStringProperty( String name ) {
+        return getString( properties, name );
+    }
+
+
+    public void setStringProperty( String name, String value ) {
+        properties.put( name, value );
+    }
+
+
+    public boolean getBooleanProperty( String name ) {
+        return getBooleanValue( properties, name );
+    }
+
+
+    public void setBooleanProperty( String name, boolean value ) {
+        properties.put( name, value );
+    }
+
+
+    public byte getByteProperty( String name ) {
+        return getByteValue( properties, name );
+    }
+
+
+    public void setByteProperty( String name, byte value ) {
+        properties.put( name, value );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/mq/QueueManager.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/mq/QueueManager.java b/stack/core/src/main/java/org/apache/usergrid/mq/QueueManager.java
new file mode 100644
index 0000000..6118671
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/mq/QueueManager.java
@@ -0,0 +1,130 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.mq;
+
+
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
+
+import org.apache.usergrid.persistence.CounterResolution;
+import org.apache.usergrid.persistence.Results;
+import org.apache.usergrid.persistence.exceptions.TransactionNotFoundException;
+
+
+public interface QueueManager {
+
+    public Queue getQueue( String queuePath );
+
+    public Queue updateQueue( String queuePath, Map<String, Object> properties );
+
+    public Queue updateQueue( String queuePath, Queue queue );
+
+    public Message postToQueue( String queuePath, Message message );
+
+    public List<Message> postToQueue( String queuePath, List<Message> messages );
+
+    public QueueResults getFromQueue( String queuePath, QueueQuery query );
+
+    public Message getMessage( UUID messageId );
+
+    public UUID getNewConsumerId();
+
+    public QueueSet getQueues( String firstQueuePath, int limit );
+
+    public QueueSet subscribeToQueue( String publisherQueuePath, String subscriberQueuePath );
+
+    public QueueSet unsubscribeFromQueue( String publisherQueuePath, String subscriberQueuePath );
+
+    public QueueSet addSubscribersToQueue( String publisherQueuePath, List<String> subscriberQueuePaths );
+
+    public QueueSet removeSubscribersFromQueue( String publisherQueuePath, List<String> subscriberQueuePaths );
+
+    public QueueSet subscribeToQueues( String subscriberQueuePath, List<String> publisherQueuePaths );
+
+    public QueueSet unsubscribeFromQueues( String subscriberQueuePath, List<String> publisherQueuePaths );
+
+    public QueueSet getSubscribers( String publisherQueuePath, String firstSubscriberQueuePath, int limit );
+
+    public QueueSet getSubscriptions( String subscriberQueuePath, String firstSubscriptionQueuePath, int limit );
+
+    public QueueSet searchSubscribers( String publisherQueuePath, Query query );
+
+    public QueueSet getChildQueues( String publisherQueuePath, String firstQueuePath, int count );
+
+    public void incrementAggregateQueueCounters( String queuePath, String category, String counterName, long value );
+
+    public Results getAggregateQueueCounters( String queuePath, String category, String counterName,
+                                              CounterResolution resolution, long start, long finish, boolean pad );
+
+    public Results getAggregateQueueCounters( String queuePath, CounterQuery query ) throws Exception;
+
+    public Set<String> getQueueCounterNames( String queuePath ) throws Exception;
+
+    public void incrementQueueCounters( String queuePath, Map<String, Long> counts );
+
+    public void incrementQueueCounter( String queuePath, String name, long value );
+
+    public Map<String, Long> getQueueCounters( String queuePath ) throws Exception;
+
+    /**
+     * Renew a transaction.  Will remove the current transaction and return a new one
+     *
+     * @param queuePath The path to the queue
+     * @param transactionId The transaction id
+     */
+    public UUID renewTransaction( String queuePath, UUID transactionId, QueueQuery query )
+            throws TransactionNotFoundException;
+
+    /**
+     * Deletes the transaction for the consumer. Synonymous with "commit."
+     *
+     * @param queuePath The path to the queue
+     * @param transactionId The transaction id
+     *
+     * @see #commitTransaction(String, java.util.UUID, QueueQuery)
+     */
+    public void deleteTransaction( String queuePath, UUID transactionId, QueueQuery query );
+
+    /**
+     * Commits the Transaction for the consumer.
+     *
+     * @param queuePath The path to the queue
+     * @param transactionId The transaction id
+     */
+    public void commitTransaction( String queuePath, UUID transactionId, QueueQuery query );
+
+    /**
+     * Determines if there are any outstanding transactions on a queue
+     *
+     * @param queuePath The path to the queue
+     * @param consumerId The consumer id
+     */
+    public boolean hasOutstandingTransactions( String queuePath, UUID consumerId );
+
+    /**
+     * Determines if there are any Messages to retrieve in a queue. DOES NOT INCLUDE TRANSACTIONS!  If you've tried and
+     * failed to process a transaction on the last message in the queue, this will return false
+     *
+     * @param queuePath The path to the queue
+     * @param consumerId The consumer id
+     */
+    public boolean hasMessagesInQueue( String queuePath, UUID consumerId );
+
+    /** Returns true if there are messages waiting to be consumed or pending transactions */
+    public boolean hasPendingReads( String queuePath, UUID consumerId );
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/mq/QueueManagerFactory.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/mq/QueueManagerFactory.java b/stack/core/src/main/java/org/apache/usergrid/mq/QueueManagerFactory.java
new file mode 100644
index 0000000..37323c4
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/mq/QueueManagerFactory.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.mq;
+
+
+import java.util.UUID;
+
+
+public interface QueueManagerFactory {
+
+    /**
+     * A string description provided by the implementing class.
+     *
+     * @return description text
+     *
+     * @throws Exception the exception
+     */
+    public abstract String getImpementationDescription() throws Exception;
+
+    /**
+     * Gets the entity manager.
+     *
+     * @param applicationId the application id
+     *
+     * @return EntityDao for the specfied parameters
+     */
+    public abstract QueueManager getQueueManager( UUID applicationId );
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/mq/QueuePosition.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/mq/QueuePosition.java b/stack/core/src/main/java/org/apache/usergrid/mq/QueuePosition.java
new file mode 100644
index 0000000..054569d
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/mq/QueuePosition.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.mq;
+
+
+import java.util.EnumSet;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+
+public enum QueuePosition {
+    START( "start" ), END( "end" ), LAST( "last" ), CONSUMER( "consumer" );
+
+    private final String shortName;
+
+
+    QueuePosition( String shortName ) {
+        this.shortName = shortName;
+    }
+
+
+    static Map<String, QueuePosition> nameMap = new ConcurrentHashMap<String, QueuePosition>();
+
+
+    static {
+        for ( QueuePosition op : EnumSet.allOf( QueuePosition.class ) ) {
+            if ( op.shortName != null ) {
+                nameMap.put( op.shortName, op );
+            }
+        }
+    }
+
+
+    public static QueuePosition find( String s ) {
+        if ( s == null ) {
+            return null;
+        }
+        return nameMap.get( s.toLowerCase() );
+    }
+
+
+    @Override
+    public String toString() {
+        return shortName;
+    }
+}


[87/96] [abbrv] USERGRID-2 package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/DeviceRegistrationCallback.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/DeviceRegistrationCallback.html b/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/DeviceRegistrationCallback.html
index f6bef2a..b072d3d 100644
--- a/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/DeviceRegistrationCallback.html
+++ b/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/DeviceRegistrationCallback.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Interface org.usergrid.android.client.callbacks.DeviceRegistrationCallback
+Uses of Interface org.apache.usergrid.android.client.callbacks.DeviceRegistrationCallback
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Interface org.usergrid.android.client.callbacks.DeviceRegistrationCallba
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Interface org.usergrid.android.client.callbacks.DeviceRegistrationCallback";
+        parent.document.title="Uses of Interface org.apache.usergrid.android.client.callbacks.DeviceRegistrationCallback";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.usergrid.android.client.callbacks"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,26 +81,26 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Interface<br>org.usergrid.android.client.callbacks.DeviceRegistrationCallback</B></H2>
+<B>Uses of Interface<br>org.apache.usergrid.android.client.callbacks.DeviceRegistrationCallback</B></H2>
 </CENTER>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Packages that use <A HREF="../../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.usergrid.android.client.callbacks">DeviceRegistrationCallback</A></FONT></TH>
+Packages that use <A HREF="../../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">DeviceRegistrationCallback</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client"><B>org.usergrid.android.client</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client"><B>org.apache.usergrid.android.client</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.usergrid.android.client.callbacks">DeviceRegistrationCallback</A> in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A></FONT></TH>
+Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">DeviceRegistrationCallback</A> in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -108,14 +108,14 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/DeviceR
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.usergrid.android.client.callbacks">DeviceRegistrationCallback</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">DeviceRegistrationCallback</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#registerDeviceAsync(android.content.Context, java.util.Map, org.usergrid.android.client.callbacks.DeviceRegistrationCallback)">registerDeviceAsync</A></B>(android.content.Context&nbsp;context,
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#registerDeviceAsync(android.content.Context, java.util.Map, org.apache.usergrid.android.client.callbacks.DeviceRegistrationCallback)">registerDeviceAsync</A></B>(android.content.Context&nbsp;context,
                     java.util.Map&lt;java.lang.String,java.lang.Object&gt;&nbsp;properties,
-                    <A HREF="../../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.usergrid.android.client.callbacks">DeviceRegistrationCallback</A>&nbsp;callback)</CODE>
+                    <A HREF="../../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">DeviceRegistrationCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Registers a device using the device's unique device ID.</TD>
@@ -137,7 +137,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/DeviceR
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.usergrid.android.client.callbacks"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/GroupsRetrievedCallback.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/GroupsRetrievedCallback.html b/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/GroupsRetrievedCallback.html
index 695b885..c01a813 100644
--- a/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/GroupsRetrievedCallback.html
+++ b/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/GroupsRetrievedCallback.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Interface org.usergrid.android.client.callbacks.GroupsRetrievedCallback
+Uses of Interface org.apache.usergrid.android.client.callbacks.GroupsRetrievedCallback
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Interface org.usergrid.android.client.callbacks.GroupsRetrievedCallback
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Interface org.usergrid.android.client.callbacks.GroupsRetrievedCallback";
+        parent.document.title="Uses of Interface org.apache.usergrid.android.client.callbacks.GroupsRetrievedCallback";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.usergrid.android.client.callbacks"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,26 +81,26 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Interface<br>org.usergrid.android.client.callbacks.GroupsRetrievedCallback</B></H2>
+<B>Uses of Interface<br>org.apache.usergrid.android.client.callbacks.GroupsRetrievedCallback</B></H2>
 </CENTER>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Packages that use <A HREF="../../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.usergrid.android.client.callbacks">GroupsRetrievedCallback</A></FONT></TH>
+Packages that use <A HREF="../../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">GroupsRetrievedCallback</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client"><B>org.usergrid.android.client</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client"><B>org.apache.usergrid.android.client</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.usergrid.android.client.callbacks">GroupsRetrievedCallback</A> in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A></FONT></TH>
+Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">GroupsRetrievedCallback</A> in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -108,13 +108,13 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/GroupsR
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.usergrid.android.client.callbacks">GroupsRetrievedCallback</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">GroupsRetrievedCallback</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#getGroupsForUserAsync(java.lang.String, org.usergrid.android.client.callbacks.GroupsRetrievedCallback)">getGroupsForUserAsync</A></B>(java.lang.String&nbsp;userId,
-                      <A HREF="../../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.usergrid.android.client.callbacks">GroupsRetrievedCallback</A>&nbsp;callback)</CODE>
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#getGroupsForUserAsync(java.lang.String, org.apache.usergrid.android.client.callbacks.GroupsRetrievedCallback)">getGroupsForUserAsync</A></B>(java.lang.String&nbsp;userId,
+                      <A HREF="../../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">GroupsRetrievedCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the groups for the user.</TD>
@@ -136,7 +136,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/GroupsR
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.usergrid.android.client.callbacks"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/QueryResultsCallback.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/QueryResultsCallback.html b/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/QueryResultsCallback.html
index a524dee..30fb73a 100644
--- a/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/QueryResultsCallback.html
+++ b/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/QueryResultsCallback.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Interface org.usergrid.android.client.callbacks.QueryResultsCallback
+Uses of Interface org.apache.usergrid.android.client.callbacks.QueryResultsCallback
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Interface org.usergrid.android.client.callbacks.QueryResultsCallback
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Interface org.usergrid.android.client.callbacks.QueryResultsCallback";
+        parent.document.title="Uses of Interface org.apache.usergrid.android.client.callbacks.QueryResultsCallback";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,26 +81,26 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Interface<br>org.usergrid.android.client.callbacks.QueryResultsCallback</B></H2>
+<B>Uses of Interface<br>org.apache.usergrid.android.client.callbacks.QueryResultsCallback</B></H2>
 </CENTER>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Packages that use <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks">QueryResultsCallback</A></FONT></TH>
+Packages that use <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">QueryResultsCallback</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client"><B>org.usergrid.android.client</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client"><B>org.apache.usergrid.android.client</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks">QueryResultsCallback</A> in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A></FONT></TH>
+Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">QueryResultsCallback</A> in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -108,13 +108,13 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryRe
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks">QueryResultsCallback</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">QueryResultsCallback</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#queryActivityFeedForGroupAsync(java.lang.String, org.usergrid.android.client.callbacks.QueryResultsCallback)">queryActivityFeedForGroupAsync</A></B>(java.lang.String&nbsp;groupId,
-                               <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#queryActivityFeedForGroupAsync(java.lang.String, org.apache.usergrid.android.client.callbacks.QueryResultsCallback)">queryActivityFeedForGroupAsync</A></B>(java.lang.String&nbsp;groupId,
+                               <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get a group's activity feed.</TD>
@@ -122,8 +122,8 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryRe
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#queryActivityFeedForUserAsync(java.lang.String, org.usergrid.android.client.callbacks.QueryResultsCallback)">queryActivityFeedForUserAsync</A></B>(java.lang.String&nbsp;userId,
-                              <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#queryActivityFeedForUserAsync(java.lang.String, org.apache.usergrid.android.client.callbacks.QueryResultsCallback)">queryActivityFeedForUserAsync</A></B>(java.lang.String&nbsp;userId,
+                              <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get a user's activity feed.</TD>
@@ -131,7 +131,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryRe
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#queryEntitiesRequestAsync(org.usergrid.android.client.callbacks.QueryResultsCallback, org.springframework.http.HttpMethod, java.util.Map, java.lang.Object, java.lang.String...)">queryEntitiesRequestAsync</A></B>(<A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback,
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#queryEntitiesRequestAsync(org.apache.usergrid.android.client.callbacks.QueryResultsCallback, org.springframework.http.HttpMethod, java.util.Map, java.lang.Object, java.lang.String...)">queryEntitiesRequestAsync</A></B>(<A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback,
                           org.springframework.http.HttpMethod&nbsp;method,
                           java.util.Map&lt;java.lang.String,java.lang.Object&gt;&nbsp;params,
                           java.lang.Object&nbsp;data,
@@ -143,11 +143,11 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryRe
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#queryEntityConnectionsAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.QueryResultsCallback)">queryEntityConnectionsAsync</A></B>(java.lang.String&nbsp;connectingEntityType,
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#queryEntityConnectionsAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.QueryResultsCallback)">queryEntityConnectionsAsync</A></B>(java.lang.String&nbsp;connectingEntityType,
                             java.lang.String&nbsp;connectingEntityId,
                             java.lang.String&nbsp;connectionType,
                             java.lang.String&nbsp;ql,
-                            <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
+                            <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Query the connected entities.</TD>
@@ -155,13 +155,13 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryRe
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#queryEntityConnectionsWithinLocationAsync(java.lang.String, java.lang.String, java.lang.String, float, android.location.Location, java.lang.String, org.usergrid.android.client.callbacks.QueryResultsCallback)">queryEntityConnectionsWithinLocationAsync</A></B>(java.lang.String&nbsp;connectingEntityType,
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#queryEntityConnectionsWithinLocationAsync(java.lang.String, java.lang.String, java.lang.String, float, android.location.Location, java.lang.String, org.apache.usergrid.android.client.callbacks.QueryResultsCallback)">queryEntityConnectionsWithinLocationAsync</A></B>(java.lang.String&nbsp;connectingEntityType,
                                           java.lang.String&nbsp;connectingEntityId,
                                           java.lang.String&nbsp;connectionType,
                                           float&nbsp;distance,
                                           android.location.Location&nbsp;location,
                                           java.lang.String&nbsp;ql,
-                                          <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
+                                          <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Query the connected entities within distance of a specific point.</TD>
@@ -169,7 +169,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryRe
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#queryUsersAsync(org.usergrid.android.client.callbacks.QueryResultsCallback)">queryUsersAsync</A></B>(<A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#queryUsersAsync(org.apache.usergrid.android.client.callbacks.QueryResultsCallback)">queryUsersAsync</A></B>(<A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Perform a query of the users collection.</TD>
@@ -177,8 +177,8 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryRe
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#queryUsersAsync(java.lang.String, org.usergrid.android.client.callbacks.QueryResultsCallback)">queryUsersAsync</A></B>(java.lang.String&nbsp;ql,
-                <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#queryUsersAsync(java.lang.String, org.apache.usergrid.android.client.callbacks.QueryResultsCallback)">queryUsersAsync</A></B>(java.lang.String&nbsp;ql,
+                <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Perform a query of the users collection using the provided query command.</TD>
@@ -186,8 +186,8 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryRe
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#queryUsersForGroupAsync(java.lang.String, org.usergrid.android.client.callbacks.QueryResultsCallback)">queryUsersForGroupAsync</A></B>(java.lang.String&nbsp;groupId,
-                        <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#queryUsersForGroupAsync(java.lang.String, org.apache.usergrid.android.client.callbacks.QueryResultsCallback)">queryUsersForGroupAsync</A></B>(java.lang.String&nbsp;groupId,
+                        <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Queries the users for the specified group.</TD>
@@ -195,10 +195,10 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryRe
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#queryUsersNearLocation(float, android.location.Location, java.lang.String, org.usergrid.android.client.callbacks.QueryResultsCallback)">queryUsersNearLocation</A></B>(float&nbsp;distance,
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#queryUsersNearLocation(float, android.location.Location, java.lang.String, org.apache.usergrid.android.client.callbacks.QueryResultsCallback)">queryUsersNearLocation</A></B>(float&nbsp;distance,
                        android.location.Location&nbsp;location,
                        java.lang.String&nbsp;ql,
-                       <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
+                       <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Perform a query of the users collection within the specified distance of
@@ -221,7 +221,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryRe
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/callbacks/package-frame.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/callbacks/package-frame.html b/sdks/android/doc/org/usergrid/android/client/callbacks/package-frame.html
index bf0d2bd..eaf7446 100644
--- a/sdks/android/doc/org/usergrid/android/client/callbacks/package-frame.html
+++ b/sdks/android/doc/org/usergrid/android/client/callbacks/package-frame.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-org.usergrid.android.client.callbacks
+org.apache.usergrid.android.client.callbacks
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -16,22 +16,22 @@ org.usergrid.android.client.callbacks
 
 <BODY BGCOLOR="white">
 <FONT size="+1" CLASS="FrameTitleFont">
-<A HREF="../../../../../org/usergrid/android/client/callbacks/package-summary.html" target="classFrame">org.usergrid.android.client.callbacks</A></FONT>
+<A HREF="../../../../../org/usergrid/android/client/callbacks/package-summary.html" target="classFrame">org.apache.usergrid.android.client.callbacks</A></FONT>
 <TABLE BORDER="0" WIDTH="100%" SUMMARY="">
 <TR>
 <TD NOWRAP><FONT size="+1" CLASS="FrameHeadingFont">
 Interfaces</FONT>&nbsp;
 <FONT CLASS="FrameItemFont">
 <BR>
-<A HREF="ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks" target="classFrame"><I>ApiResponseCallback</I></A>
+<A HREF="ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks" target="classFrame"><I>ApiResponseCallback</I></A>
 <BR>
-<A HREF="ClientCallback.html" title="interface in org.usergrid.android.client.callbacks" target="classFrame"><I>ClientCallback</I></A>
+<A HREF="ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks" target="classFrame"><I>ClientCallback</I></A>
 <BR>
-<A HREF="DeviceRegistrationCallback.html" title="interface in org.usergrid.android.client.callbacks" target="classFrame"><I>DeviceRegistrationCallback</I></A>
+<A HREF="DeviceRegistrationCallback.html" title="interface in org.apache.usergrid.android.client.callbacks" target="classFrame"><I>DeviceRegistrationCallback</I></A>
 <BR>
-<A HREF="GroupsRetrievedCallback.html" title="interface in org.usergrid.android.client.callbacks" target="classFrame"><I>GroupsRetrievedCallback</I></A>
+<A HREF="GroupsRetrievedCallback.html" title="interface in org.apache.usergrid.android.client.callbacks" target="classFrame"><I>GroupsRetrievedCallback</I></A>
 <BR>
-<A HREF="QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks" target="classFrame"><I>QueryResultsCallback</I></A></FONT></TD>
+<A HREF="QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks" target="classFrame"><I>QueryResultsCallback</I></A></FONT></TD>
 </TR>
 </TABLE>
 
@@ -42,7 +42,7 @@ Interfaces</FONT>&nbsp;
 Classes</FONT>&nbsp;
 <FONT CLASS="FrameItemFont">
 <BR>
-<A HREF="ClientAsyncTask.html" title="class in org.usergrid.android.client.callbacks" target="classFrame">ClientAsyncTask</A></FONT></TD>
+<A HREF="ClientAsyncTask.html" title="class in org.apache.usergrid.android.client.callbacks" target="classFrame">ClientAsyncTask</A></FONT></TD>
 </TR>
 </TABLE>
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/callbacks/package-summary.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/callbacks/package-summary.html b/sdks/android/doc/org/usergrid/android/client/callbacks/package-summary.html
index 7401bd2..3db3926 100644
--- a/sdks/android/doc/org/usergrid/android/client/callbacks/package-summary.html
+++ b/sdks/android/doc/org/usergrid/android/client/callbacks/package-summary.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-org.usergrid.android.client.callbacks
+org.apache.usergrid.android.client.callbacks
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ org.usergrid.android.client.callbacks
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="org.usergrid.android.client.callbacks";
+        parent.document.title="org.apache.usergrid.android.client.callbacks";
     }
 }
 </SCRIPT>
@@ -80,7 +80,7 @@ function windowTitle()
 
 <HR>
 <H2>
-Package org.usergrid.android.client.callbacks
+Package org.apache.usergrid.android.client.callbacks
 </H2>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
@@ -89,23 +89,23 @@ Package org.usergrid.android.client.callbacks
 <B>Interface Summary</B></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks">ClientCallback&lt;T&gt;</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ClientCallback&lt;T&gt;</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.usergrid.android.client.callbacks">DeviceRegistrationCallback</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">DeviceRegistrationCallback</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.usergrid.android.client.callbacks">GroupsRetrievedCallback</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">GroupsRetrievedCallback</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks">QueryResultsCallback</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">QueryResultsCallback</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 </TABLE>
@@ -119,7 +119,7 @@ Package org.usergrid.android.client.callbacks
 <B>Class Summary</B></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.usergrid.android.client.callbacks">ClientAsyncTask&lt;T&gt;</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.apache.usergrid.android.client.callbacks">ClientAsyncTask&lt;T&gt;</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 </TABLE>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/callbacks/package-tree.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/callbacks/package-tree.html b/sdks/android/doc/org/usergrid/android/client/callbacks/package-tree.html
index 6bf1176..277ca12 100644
--- a/sdks/android/doc/org/usergrid/android/client/callbacks/package-tree.html
+++ b/sdks/android/doc/org/usergrid/android/client/callbacks/package-tree.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-org.usergrid.android.client.callbacks Class Hierarchy
+org.apache.usergrid.android.client.callbacks Class Hierarchy
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ org.usergrid.android.client.callbacks Class Hierarchy
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="org.usergrid.android.client.callbacks Class Hierarchy";
+        parent.document.title="org.apache.usergrid.android.client.callbacks Class Hierarchy";
     }
 }
 </SCRIPT>
@@ -81,7 +81,7 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-Hierarchy For Package org.usergrid.android.client.callbacks
+Hierarchy For Package org.apache.usergrid.android.client.callbacks
 </H2>
 </CENTER>
 <DL>
@@ -93,15 +93,15 @@ Class Hierarchy
 <UL>
 <LI TYPE="circle">java.lang.Object<UL>
 <LI TYPE="circle">android.os.AsyncTask&lt;Params,Progress,Result&gt;<UL>
-<LI TYPE="circle">org.usergrid.android.client.callbacks.<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.usergrid.android.client.callbacks"><B>ClientAsyncTask</B></A>&lt;T&gt;</UL>
+<LI TYPE="circle">org.apache.usergrid.android.client.callbacks.<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.apache.usergrid.android.client.callbacks"><B>ClientAsyncTask</B></A>&lt;T&gt;</UL>
 </UL>
 </UL>
 <H2>
 Interface Hierarchy
 </H2>
 <UL>
-<LI TYPE="circle">org.usergrid.android.client.callbacks.<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>ClientCallback</B></A>&lt;T&gt;<UL>
-<LI TYPE="circle">org.usergrid.android.client.callbacks.<A HREF="../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>ApiResponseCallback</B></A><LI TYPE="circle">org.usergrid.android.client.callbacks.<A HREF="../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>DeviceRegistrationCallback</B></A><LI TYPE="circle">org.usergrid.android.client.callbacks.<A HREF="../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>GroupsRetrievedCallback</B></A><LI TYPE="circle">org.usergrid.android.client.callbacks.<A HREF="../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>QueryResultsCallback</B></A></UL>
+<LI TYPE="circle">org.apache.usergrid.android.client.callbacks.<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>ClientCallback</B></A>&lt;T&gt;<UL>
+<LI TYPE="circle">org.apache.usergrid.android.client.callbacks.<A HREF="../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>ApiResponseCallback</B></A><LI TYPE="circle">org.apache.usergrid.android.client.callbacks.<A HREF="../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>DeviceRegistrationCallback</B></A><LI TYPE="circle">org.apache.usergrid.android.client.callbacks.<A HREF="../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>GroupsRetrievedCallback</B></A><LI TYPE="circle">org.apache.usergrid.android.client.callbacks.<A HREF="../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>QueryResultsC
 allback</B></A></UL>
 </UL>
 <HR>
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/callbacks/package-use.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/callbacks/package-use.html b/sdks/android/doc/org/usergrid/android/client/callbacks/package-use.html
index b4e8ad2..70ab906 100644
--- a/sdks/android/doc/org/usergrid/android/client/callbacks/package-use.html
+++ b/sdks/android/doc/org/usergrid/android/client/callbacks/package-use.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Package org.usergrid.android.client.callbacks
+Uses of Package org.apache.usergrid.android.client.callbacks
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Package org.usergrid.android.client.callbacks
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Package org.usergrid.android.client.callbacks";
+        parent.document.title="Uses of Package org.apache.usergrid.android.client.callbacks";
     }
 }
 </SCRIPT>
@@ -81,51 +81,51 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Package<br>org.usergrid.android.client.callbacks</B></H2>
+<B>Uses of Package<br>org.apache.usergrid.android.client.callbacks</B></H2>
 </CENTER>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Packages that use <A HREF="../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.usergrid.android.client.callbacks</A></FONT></TH>
+Packages that use <A HREF="../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.apache.usergrid.android.client.callbacks</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client"><B>org.usergrid.android.client</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client"><B>org.apache.usergrid.android.client</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client.callbacks"><B>org.usergrid.android.client.callbacks</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client.callbacks"><B>org.apache.usergrid.android.client.callbacks</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Classes in <A HREF="../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.usergrid.android.client.callbacks</A> used by <A HREF="../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A></FONT></TH>
+Classes in <A HREF="../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.apache.usergrid.android.client.callbacks</A> used by <A HREF="../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../../org/usergrid/android/client/callbacks/class-use/ApiResponseCallback.html#org.usergrid.android.client"><B>ApiResponseCallback</B></A></B>
+<TD><B><A HREF="../../../../../org/usergrid/android/client/callbacks/class-use/ApiResponseCallback.html#org.apache.usergrid.android.client"><B>ApiResponseCallback</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../../org/usergrid/android/client/callbacks/class-use/DeviceRegistrationCallback.html#org.usergrid.android.client"><B>DeviceRegistrationCallback</B></A></B>
+<TD><B><A HREF="../../../../../org/usergrid/android/client/callbacks/class-use/DeviceRegistrationCallback.html#org.apache.usergrid.android.client"><B>DeviceRegistrationCallback</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../../org/usergrid/android/client/callbacks/class-use/GroupsRetrievedCallback.html#org.usergrid.android.client"><B>GroupsRetrievedCallback</B></A></B>
+<TD><B><A HREF="../../../../../org/usergrid/android/client/callbacks/class-use/GroupsRetrievedCallback.html#org.apache.usergrid.android.client"><B>GroupsRetrievedCallback</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../../org/usergrid/android/client/callbacks/class-use/QueryResultsCallback.html#org.usergrid.android.client"><B>QueryResultsCallback</B></A></B>
+<TD><B><A HREF="../../../../../org/usergrid/android/client/callbacks/class-use/QueryResultsCallback.html#org.apache.usergrid.android.client"><B>QueryResultsCallback</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -133,14 +133,14 @@ Classes in <A HREF="../../../../../org/usergrid/android/client/callbacks/package
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client.callbacks"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client.callbacks"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Classes in <A HREF="../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.usergrid.android.client.callbacks</A> used by <A HREF="../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.usergrid.android.client.callbacks</A></FONT></TH>
+Classes in <A HREF="../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.apache.usergrid.android.client.callbacks</A> used by <A HREF="../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.apache.usergrid.android.client.callbacks</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../../org/usergrid/android/client/callbacks/class-use/ClientCallback.html#org.usergrid.android.client.callbacks"><B>ClientCallback</B></A></B>
+<TD><B><A HREF="../../../../../org/usergrid/android/client/callbacks/class-use/ClientCallback.html#org.apache.usergrid.android.client.callbacks"><B>ClientCallback</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/class-use/Client.Query.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/class-use/Client.Query.html b/sdks/android/doc/org/usergrid/android/client/class-use/Client.Query.html
index 4572371..1bf91e6 100644
--- a/sdks/android/doc/org/usergrid/android/client/class-use/Client.Query.html
+++ b/sdks/android/doc/org/usergrid/android/client/class-use/Client.Query.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Interface org.usergrid.android.client.Client.Query
+Uses of Interface org.apache.usergrid.android.client.Client.Query
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Interface org.usergrid.android.client.Client.Query
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Interface org.usergrid.android.client.Client.Query";
+        parent.document.title="Uses of Interface org.apache.usergrid.android.client.Client.Query";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,30 +81,30 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Interface<br>org.usergrid.android.client.Client.Query</B></H2>
+<B>Uses of Interface<br>org.apache.usergrid.android.client.Client.Query</B></H2>
 </CENTER>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Packages that use <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A></FONT></TH>
+Packages that use <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client"><B>org.usergrid.android.client</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client"><B>org.apache.usergrid.android.client</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client.callbacks"><B>org.usergrid.android.client.callbacks</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client.callbacks"><B>org.apache.usergrid.android.client.callbacks</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A> in <A HREF="../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A></FONT></TH>
+Uses of <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A> in <A HREF="../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -112,11 +112,11 @@ Uses of <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" t
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A> that return <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A> that return <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
 <TD><CODE><B>Client.Query.</B><B><A HREF="../../../../../org/usergrid/android/client/Client.Query.html#next()">next</A></B>()</CODE>
 
 <BR>
@@ -124,7 +124,7 @@ Uses of <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" t
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../org/usergrid/android/client/Client.html#queryActivityFeedForGroup(java.lang.String)">queryActivityFeedForGroup</A></B>(java.lang.String&nbsp;groupId)</CODE>
 
 <BR>
@@ -132,7 +132,7 @@ Uses of <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" t
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../org/usergrid/android/client/Client.html#queryActivityFeedForUser(java.lang.String)">queryActivityFeedForUser</A></B>(java.lang.String&nbsp;userId)</CODE>
 
 <BR>
@@ -140,7 +140,7 @@ Uses of <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" t
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../org/usergrid/android/client/Client.html#queryEntitiesRequest(org.springframework.http.HttpMethod, java.util.Map, java.lang.Object, java.lang.String...)">queryEntitiesRequest</A></B>(org.springframework.http.HttpMethod&nbsp;method,
                      java.util.Map&lt;java.lang.String,java.lang.Object&gt;&nbsp;params,
                      java.lang.Object&nbsp;data,
@@ -151,7 +151,7 @@ Uses of <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" t
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../org/usergrid/android/client/Client.html#queryEntityConnections(java.lang.String, java.lang.String, java.lang.String, java.lang.String)">queryEntityConnections</A></B>(java.lang.String&nbsp;connectingEntityType,
                        java.lang.String&nbsp;connectingEntityId,
                        java.lang.String&nbsp;connectionType,
@@ -162,7 +162,7 @@ Uses of <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" t
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../org/usergrid/android/client/Client.html#queryEntityConnectionsWithinLocation(java.lang.String, java.lang.String, java.lang.String, float, android.location.Location, java.lang.String)">queryEntityConnectionsWithinLocation</A></B>(java.lang.String&nbsp;connectingEntityType,
                                      java.lang.String&nbsp;connectingEntityId,
                                      java.lang.String&nbsp;connectionType,
@@ -175,7 +175,7 @@ Uses of <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" t
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../org/usergrid/android/client/Client.html#queryQueuesRequest(org.springframework.http.HttpMethod, java.util.Map, java.lang.Object, java.lang.String)">queryQueuesRequest</A></B>(org.springframework.http.HttpMethod&nbsp;method,
                    java.util.Map&lt;java.lang.String,java.lang.Object&gt;&nbsp;params,
                    java.lang.Object&nbsp;data,
@@ -186,7 +186,7 @@ Uses of <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" t
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../org/usergrid/android/client/Client.html#queryUsers()">queryUsers</A></B>()</CODE>
 
 <BR>
@@ -194,7 +194,7 @@ Uses of <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" t
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../org/usergrid/android/client/Client.html#queryUsers(java.lang.String)">queryUsers</A></B>(java.lang.String&nbsp;ql)</CODE>
 
 <BR>
@@ -202,7 +202,7 @@ Uses of <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" t
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../org/usergrid/android/client/Client.html#queryUsersForGroup(java.lang.String)">queryUsersForGroup</A></B>(java.lang.String&nbsp;groupId)</CODE>
 
 <BR>
@@ -210,7 +210,7 @@ Uses of <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" t
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../org/usergrid/android/client/Client.html#queryUsersWithinLocation(float, android.location.Location, java.lang.String)">queryUsersWithinLocation</A></B>(float&nbsp;distance,
                          android.location.Location&nbsp;location,
                          java.lang.String&nbsp;ql)</CODE>
@@ -222,11 +222,11 @@ Uses of <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" t
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client.callbacks"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client.callbacks"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A> in <A HREF="../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.usergrid.android.client.callbacks</A></FONT></TH>
+Uses of <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A> in <A HREF="../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.apache.usergrid.android.client.callbacks</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -234,12 +234,12 @@ Uses of <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" t
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.usergrid.android.client.callbacks</A> with parameters of type <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.apache.usergrid.android.client.callbacks</A> with parameters of type <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>QueryResultsCallback.</B><B><A HREF="../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html#onQueryResults(org.usergrid.android.client.Client.Query)">onQueryResults</A></B>(<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A>&nbsp;query)</CODE>
+<TD><CODE><B>QueryResultsCallback.</B><B><A HREF="../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html#onQueryResults(org.apache.usergrid.android.client.Client.Query)">onQueryResults</A></B>(<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A>&nbsp;query)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -261,7 +261,7 @@ Uses of <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" t
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/class-use/Client.QueuePosition.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/class-use/Client.QueuePosition.html b/sdks/android/doc/org/usergrid/android/client/class-use/Client.QueuePosition.html
index 4b81fd3..b790608 100644
--- a/sdks/android/doc/org/usergrid/android/client/class-use/Client.QueuePosition.html
+++ b/sdks/android/doc/org/usergrid/android/client/class-use/Client.QueuePosition.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Class org.usergrid.android.client.Client.QueuePosition
+Uses of Class org.apache.usergrid.android.client.Client.QueuePosition
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Class org.usergrid.android.client.Client.QueuePosition
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Class org.usergrid.android.client.Client.QueuePosition";
+        parent.document.title="Uses of Class org.apache.usergrid.android.client.Client.QueuePosition";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,26 +81,26 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Class<br>org.usergrid.android.client.Client.QueuePosition</B></H2>
+<B>Uses of Class<br>org.apache.usergrid.android.client.Client.QueuePosition</B></H2>
 </CENTER>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Packages that use <A HREF="../../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A></FONT></TH>
+Packages that use <A HREF="../../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client"><B>org.usergrid.android.client</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client"><B>org.apache.usergrid.android.client</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A> in <A HREF="../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A></FONT></TH>
+Uses of <A HREF="../../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A> in <A HREF="../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -108,11 +108,11 @@ Uses of <A HREF="../../../../../org/usergrid/android/client/Client.QueuePosition
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A> that return <A HREF="../../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A> that return <A HREF="../../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>static&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A></CODE></FONT></TD>
+<CODE>static&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A></CODE></FONT></TD>
 <TD><CODE><B>Client.QueuePosition.</B><B><A HREF="../../../../../org/usergrid/android/client/Client.QueuePosition.html#find(java.lang.String)">find</A></B>(java.lang.String&nbsp;s)</CODE>
 
 <BR>
@@ -120,7 +120,7 @@ Uses of <A HREF="../../../../../org/usergrid/android/client/Client.QueuePosition
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>static&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A></CODE></FONT></TD>
+<CODE>static&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A></CODE></FONT></TD>
 <TD><CODE><B>Client.QueuePosition.</B><B><A HREF="../../../../../org/usergrid/android/client/Client.QueuePosition.html#valueOf(java.lang.String)">valueOf</A></B>(java.lang.String&nbsp;name)</CODE>
 
 <BR>
@@ -128,7 +128,7 @@ Uses of <A HREF="../../../../../org/usergrid/android/client/Client.QueuePosition
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>static&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A>[]</CODE></FONT></TD>
+<CODE>static&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A>[]</CODE></FONT></TD>
 <TD><CODE><B>Client.QueuePosition.</B><B><A HREF="../../../../../org/usergrid/android/client/Client.QueuePosition.html#values()">values</A></B>()</CODE>
 
 <BR>
@@ -141,19 +141,19 @@ the order they are declared.</TD>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A> with parameters of type <A HREF="../../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A> with parameters of type <A HREF="../../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../org/usergrid/android/client/Client.html#getMessages(java.lang.String, java.lang.String, java.util.UUID, java.lang.Long, java.lang.Integer, java.lang.Integer, java.lang.Integer, org.usergrid.android.client.Client.QueuePosition, java.lang.Boolean, java.lang.Boolean)">getMessages</A></B>(java.lang.String&nbsp;path,
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../org/usergrid/android/client/Client.html#getMessages(java.lang.String, java.lang.String, java.util.UUID, java.lang.Long, java.lang.Integer, java.lang.Integer, java.lang.Integer, org.apache.usergrid.android.client.Client.QueuePosition, java.lang.Boolean, java.lang.Boolean)">getMessages</A></B>(java.lang.String&nbsp;path,
             java.lang.String&nbsp;consumer,
             java.util.UUID&nbsp;last,
             java.lang.Long&nbsp;time,
             java.lang.Integer&nbsp;prev,
             java.lang.Integer&nbsp;next,
             java.lang.Integer&nbsp;limit,
-            <A HREF="../../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A>&nbsp;pos,
+            <A HREF="../../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A>&nbsp;pos,
             java.lang.Boolean&nbsp;update,
             java.lang.Boolean&nbsp;sync)</CODE>
 
@@ -177,7 +177,7 @@ the order they are declared.</TD>
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>


[25/96] [abbrv] [partial] Change package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/locking/cassandra/HectorLockManagerImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/locking/cassandra/HectorLockManagerImpl.java b/stack/core/src/main/java/org/usergrid/locking/cassandra/HectorLockManagerImpl.java
deleted file mode 100644
index 9d8e9a7..0000000
--- a/stack/core/src/main/java/org/usergrid/locking/cassandra/HectorLockManagerImpl.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.locking.cassandra;
-
-
-import java.util.UUID;
-
-import javax.annotation.PostConstruct;
-
-import me.prettyprint.cassandra.locking.HLockManagerImpl;
-import me.prettyprint.hector.api.Cluster;
-import me.prettyprint.hector.api.ConsistencyLevelPolicy;
-import me.prettyprint.hector.api.locking.HLockManager;
-import me.prettyprint.hector.api.locking.HLockManagerConfigurator;
-
-import org.springframework.util.Assert;
-import org.usergrid.locking.Lock;
-import org.usergrid.locking.LockManager;
-import org.usergrid.locking.LockPathBuilder;
-
-
-/**
- * Uses the hector based locking implementation to obtain locks
- *
- * @author tnine
- */
-public class HectorLockManagerImpl implements LockManager {
-    private int replicationFactor = 1;
-    private int numberOfLockObserverThreads = 1;
-    private long lockTtl = 2000;
-    private String keyspaceName;
-    private Cluster cluster;
-    private HLockManager lm;
-    private ConsistencyLevelPolicy consistencyLevelPolicy;
-
-
-    /**
-     *
-     */
-    public HectorLockManagerImpl() {
-    }
-
-
-    @PostConstruct
-    public void init() {
-        HLockManagerConfigurator hlc = new HLockManagerConfigurator();
-        hlc.setReplicationFactor( replicationFactor );
-        hlc.setKeyspaceName( keyspaceName );
-        hlc.setNumberOfLockObserverThreads( numberOfLockObserverThreads );
-        hlc.setLocksTTLInMillis( lockTtl );
-        lm = new HLockManagerImpl( cluster, hlc );
-        if ( consistencyLevelPolicy != null ) {
-        	lm.getKeyspace().setConsistencyLevelPolicy(consistencyLevelPolicy);
-        }
-        // if consistencyLevelPolicy == null, use hector's default, which is QuorumAll, no need to explicitly set
-        lm.init();
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see org.usergrid.locking.LockManager#createLock(java.util.UUID,
-     * java.lang.String[])
-     */
-    @Override
-    public Lock createLock( UUID applicationId, String... path ) {
-
-        String lockPath = LockPathBuilder.buildPath( applicationId, path );
-
-        return new HectorLockImpl( lm.createLock( lockPath ), lm );
-    }
-
-
-    /**
-     * Note that in a real environment this MUST be an odd number. Locks are read and written at QUORUM. RF >= 3 is
-     * preferred for failure tolerance and replication.  Defaults to 1
-     *
-     * @param replicationFactor the replicationFactor to set
-     */
-    public void setReplicationFactor( int replicationFactor ) {
-
-        Assert.isTrue( numberOfLockObserverThreads % 2 != 0, "You must specify an odd number for replication factor" );
-
-        this.replicationFactor = replicationFactor;
-    }
-
-
-    /**
-     * Set the number of threads the lock heartbeat executor uses.  Must accommodate the total number of locks that may
-     * exist in the system.  Locks are always renewed at the ttl/2 time.
-     *
-     * @param numberOfLockObserverThreads the numberOfLockObserverThreads to set
-     */
-    public void setNumberOfLockObserverThreads( int numberOfLockObserverThreads ) {
-        this.numberOfLockObserverThreads = numberOfLockObserverThreads;
-    }
-
-
-    /**
-     * The amount of time a lock must not be renewed before it times out.  Set in milliseconds.  2000 is the default
-     *
-     * @param lockTtl the lockTtl to set
-     */
-    public void setLockTtl( long lockTtl ) {
-        this.lockTtl = lockTtl;
-    }
-
-
-    /** @param keyspaceName the keyspaceName to set */
-    public void setKeyspaceName( String keyspaceName ) {
-        this.keyspaceName = keyspaceName;
-    }
-
-
-    /** @param cluster the cluster to set */
-    public void setCluster( Cluster cluster ) {
-        this.cluster = cluster;
-    }
-
-
-	/**
-	 * @param consistencyLevelPolicy the consistencyLevelPolicy to set
-	 */
-	public void setConsistencyLevelPolicy(ConsistencyLevelPolicy consistencyLevelPolicy) {
-		this.consistencyLevelPolicy = consistencyLevelPolicy;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/locking/exception/UGLockException.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/locking/exception/UGLockException.java b/stack/core/src/main/java/org/usergrid/locking/exception/UGLockException.java
deleted file mode 100644
index 8b049ee..0000000
--- a/stack/core/src/main/java/org/usergrid/locking/exception/UGLockException.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.locking.exception;
-
-
-public class UGLockException extends Exception {
-
-    /**
-     *
-     */
-    private static final long serialVersionUID = -8902830935510966393L;
-
-
-    public UGLockException() {
-        super();
-        // TODO Auto-generated constructor stub
-    }
-
-
-    public UGLockException( String message, Throwable cause ) {
-        super( message, cause );
-        // TODO Auto-generated constructor stub
-    }
-
-
-    public UGLockException( String message ) {
-        super( message );
-        // TODO Auto-generated constructor stub
-    }
-
-
-    public UGLockException( Throwable cause ) {
-        super( cause );
-        // TODO Auto-generated constructor stub
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/locking/noop/NoOpLockImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/locking/noop/NoOpLockImpl.java b/stack/core/src/main/java/org/usergrid/locking/noop/NoOpLockImpl.java
deleted file mode 100644
index 4af8bd9..0000000
--- a/stack/core/src/main/java/org/usergrid/locking/noop/NoOpLockImpl.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.locking.noop;
-
-
-import java.util.concurrent.TimeUnit;
-
-import org.usergrid.locking.Lock;
-import org.usergrid.locking.exception.UGLockException;
-
-
-/** @author tnine */
-public class NoOpLockImpl implements Lock {
-
-    /**
-     *
-     */
-    public NoOpLockImpl() {
-    }
-
-
-    /* (non-Javadoc)
-     * @see org.usergrid.locking.Lock#acquire(long, java.util.concurrent.TimeUnit)
-     */
-    @Override
-    public boolean tryLock( long timeout, TimeUnit time ) throws UGLockException {
-        //no op
-        return true;
-    }
-
-
-    /* (non-Javadoc)
-     * @see org.usergrid.locking.Lock#lock()
-     */
-    @Override
-    public void lock() throws UGLockException {
-        //no op
-    }
-
-
-    /* (non-Javadoc)
-     * @see org.usergrid.locking.Lock#release()
-     */
-    @Override
-    public void unlock() throws UGLockException {
-        //no op
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/locking/noop/NoOpLockManagerImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/locking/noop/NoOpLockManagerImpl.java b/stack/core/src/main/java/org/usergrid/locking/noop/NoOpLockManagerImpl.java
deleted file mode 100644
index e451228..0000000
--- a/stack/core/src/main/java/org/usergrid/locking/noop/NoOpLockManagerImpl.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.locking.noop;
-
-
-import java.util.UUID;
-
-import org.usergrid.locking.Lock;
-import org.usergrid.locking.LockManager;
-
-
-/** This is a no-op manager used for testing. */
-public class NoOpLockManagerImpl implements LockManager {
-
-    public NoOpLockManagerImpl() {
-
-    }
-
-
-    /* (non-Javadoc)
-     * @see org.usergrid.locking.LockManager#createLock(java.util.UUID, java.lang.String[])
-     */
-    @Override
-    public Lock createLock( UUID applicationId, String... path ) {
-        return new NoOpLockImpl();
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/locking/singlenode/SingleNodeLockImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/locking/singlenode/SingleNodeLockImpl.java b/stack/core/src/main/java/org/usergrid/locking/singlenode/SingleNodeLockImpl.java
deleted file mode 100644
index 56e0f9f..0000000
--- a/stack/core/src/main/java/org/usergrid/locking/singlenode/SingleNodeLockImpl.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.locking.singlenode;
-
-
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.locks.ReentrantLock;
-
-import org.usergrid.locking.Lock;
-import org.usergrid.locking.exception.UGLockException;
-
-
-/** @author tnine */
-public class SingleNodeLockImpl implements Lock {
-
-    private final ReentrantLock lock;
-
-
-    /**
-     *
-     */
-    public SingleNodeLockImpl( ReentrantLock lock ) {
-        this.lock = lock;
-    }
-
-
-    /* (non-Javadoc)
-     * @see org.usergrid.locking.Lock#acquire(long)
-     */
-    @Override
-    public boolean tryLock( long timeout, TimeUnit time ) throws UGLockException {
-        try {
-            return this.lock.tryLock( timeout, time );
-        }
-        catch ( InterruptedException e ) {
-            throw new UGLockException( "Couldn't get the lock", e );
-        }
-    }
-
-
-    /* (non-Javadoc)
-     * @see org.usergrid.locking.Lock#lock()
-     */
-    @Override
-    public void lock() throws UGLockException {
-        this.lock.lock();
-    }
-
-
-    /* (non-Javadoc)
-     * @see org.usergrid.locking.Lock#release()
-     */
-    @Override
-    public void unlock() throws UGLockException {
-        this.lock.unlock();
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/locking/singlenode/SingleNodeLockManagerImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/locking/singlenode/SingleNodeLockManagerImpl.java b/stack/core/src/main/java/org/usergrid/locking/singlenode/SingleNodeLockManagerImpl.java
deleted file mode 100644
index acf53bb..0000000
--- a/stack/core/src/main/java/org/usergrid/locking/singlenode/SingleNodeLockManagerImpl.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.locking.singlenode;
-
-
-import java.util.UUID;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.locks.ReentrantLock;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.usergrid.locking.Lock;
-import org.usergrid.locking.LockManager;
-import org.usergrid.locking.LockPathBuilder;
-
-import com.google.common.cache.CacheBuilder;
-import com.google.common.cache.CacheLoader;
-import com.google.common.cache.LoadingCache;
-import com.google.common.cache.RemovalListener;
-import com.google.common.cache.RemovalNotification;
-
-
-/**
- * Single Node implementation for {@link LockManager} Note that this implementation has not been used in a production
- * environment.
- * <p/>
- * The hector based implementation is the preferred production locking system
- */
-public class SingleNodeLockManagerImpl implements LockManager {
-
-    private static final Logger logger = LoggerFactory.getLogger( SingleNodeLockManagerImpl.class );
-
-    public static final long MILLI_EXPIRATION = 5000;
-
-    /** Lock cache that sill expire after 5 seconds of no use for a lock path */
-    private LoadingCache<String, ReentrantLock> locks =
-            CacheBuilder.newBuilder().expireAfterWrite( MILLI_EXPIRATION, TimeUnit.MILLISECONDS )
-                    // use weakValues. We want want entries removed if they're not being
-                    // referenced by another
-                    // thread somewhere and GC occurs
-                    .weakValues().removalListener( new RemovalListener<String, ReentrantLock>() {
-
-                @Override
-                public void onRemoval( RemovalNotification<String, ReentrantLock> notification ) {
-                    logger.debug( "Evicting reentrant lock for {}", notification.getKey() );
-                }
-            } ).build( new CacheLoader<String, ReentrantLock>() {
-
-                @Override
-                public ReentrantLock load( String arg0 ) throws Exception {
-                    return new ReentrantLock( true );
-                }
-            } );
-
-
-    /** Default constructor. */
-    public SingleNodeLockManagerImpl() {
-    }
-
-
-    /*
-   * (non-Javadoc)
-   * 
-   * @see org.usergrid.locking.LockManager#createLock(java.util.UUID,
-   * java.lang.String[])
-   */
-    @Override
-    public Lock createLock( UUID applicationId, String... path ) {
-
-        String lockPath = LockPathBuilder.buildPath( applicationId, path );
-
-        try {
-            return new SingleNodeLockImpl( locks.get( lockPath ) );
-        }
-        catch ( ExecutionException e ) {
-            throw new RuntimeException( "Unable to create lock in cache", e );
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/locking/zookeeper/ZooKeeperLockManagerImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/locking/zookeeper/ZooKeeperLockManagerImpl.java b/stack/core/src/main/java/org/usergrid/locking/zookeeper/ZooKeeperLockManagerImpl.java
deleted file mode 100644
index 96b599f..0000000
--- a/stack/core/src/main/java/org/usergrid/locking/zookeeper/ZooKeeperLockManagerImpl.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.locking.zookeeper;
-
-
-import java.util.UUID;
-
-import javax.annotation.PostConstruct;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.usergrid.locking.Lock;
-import org.usergrid.locking.LockManager;
-import org.usergrid.locking.LockPathBuilder;
-
-import com.netflix.curator.RetryPolicy;
-import com.netflix.curator.framework.CuratorFramework;
-import com.netflix.curator.framework.CuratorFrameworkFactory;
-import com.netflix.curator.framework.recipes.locks.InterProcessMutex;
-import com.netflix.curator.retry.ExponentialBackoffRetry;
-
-
-/** Implementation for Zookeeper service that handles global locks. */
-public final class ZooKeeperLockManagerImpl implements LockManager {
-
-    private String hostPort;
-
-    private int sessionTimeout = 2000;
-
-    private int maxAttempts = 5;
-
-    private CuratorFramework client;
-
-
-    public ZooKeeperLockManagerImpl( String hostPort, int sessionTimeout, int maxAttemps ) {
-        this.hostPort = hostPort;
-        this.sessionTimeout = sessionTimeout;
-        this.maxAttempts = maxAttemps;
-        init();
-    }
-
-
-    public ZooKeeperLockManagerImpl() {
-    }
-
-
-    @PostConstruct
-    public void init() {
-        RetryPolicy retryPolicy = new ExponentialBackoffRetry( sessionTimeout, maxAttempts );
-        client = CuratorFrameworkFactory.newClient( hostPort, retryPolicy );
-        client.start();
-    }
-
-
-    protected static final Logger logger = LoggerFactory.getLogger( ZooKeeperLockManagerImpl.class );
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see org.usergrid.locking.LockManager#createLock(java.util.UUID,
-     * java.lang.String[])
-     */
-    @Override
-    public Lock createLock( UUID applicationId, String... path ) {
-        String lockPath = LockPathBuilder.buildPath( applicationId, path );
-
-
-        return new ZookeeperLockImpl( new InterProcessMutex( client, lockPath ) );
-    }
-
-
-    public String getHostPort() {
-        return hostPort;
-    }
-
-
-    public void setHostPort( String hostPort ) {
-        this.hostPort = hostPort;
-    }
-
-
-    public int getSessionTimeout() {
-        return sessionTimeout;
-    }
-
-
-    public void setSessionTimeout( int sessionTimeout ) {
-        this.sessionTimeout = sessionTimeout;
-    }
-
-
-    public int getMaxAttempts() {
-        return maxAttempts;
-    }
-
-
-    public void setMaxAttempts( int maxAttemps ) {
-        this.maxAttempts = maxAttemps;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/locking/zookeeper/ZookeeperLockImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/locking/zookeeper/ZookeeperLockImpl.java b/stack/core/src/main/java/org/usergrid/locking/zookeeper/ZookeeperLockImpl.java
deleted file mode 100644
index 1e33422..0000000
--- a/stack/core/src/main/java/org/usergrid/locking/zookeeper/ZookeeperLockImpl.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.locking.zookeeper;
-
-
-import java.util.concurrent.TimeUnit;
-
-import org.usergrid.locking.Lock;
-import org.usergrid.locking.exception.UGLockException;
-
-import com.netflix.curator.framework.recipes.locks.InterProcessMutex;
-
-
-/**
- * Wrapper for locks using curator
- *
- * @author tnine
- */
-public class ZookeeperLockImpl implements Lock {
-
-
-    private InterProcessMutex zkMutex;
-
-
-    /**
-     *
-     */
-    public ZookeeperLockImpl( InterProcessMutex zkMutex ) {
-        this.zkMutex = zkMutex;
-    }
-
-
-    /* (non-Javadoc)
-     * @see org.usergrid.locking.Lock#tryLock(long, java.util.concurrent.TimeUnit)
-     */
-    @Override
-    public boolean tryLock( long timeout, TimeUnit time ) throws UGLockException {
-
-        try {
-            return zkMutex.acquire( timeout, time );
-        }
-        catch ( Exception e ) {
-            throw new UGLockException( "Unable to obtain lock", e );
-        }
-    }
-
-
-    /* (non-Javadoc)
-     * @see org.usergrid.locking.Lock#lock()
-     */
-    @Override
-    public void lock() throws UGLockException {
-        try {
-            zkMutex.acquire();
-        }
-        catch ( Exception e ) {
-            throw new UGLockException( "Unable to obtain lock", e );
-        }
-    }
-
-
-    /* (non-Javadoc)
-     * @see org.usergrid.locking.Lock#unlock()
-     */
-    @Override
-    public void unlock() throws UGLockException {
-        try {
-            zkMutex.release();
-        }
-        catch ( Exception e ) {
-            throw new UGLockException( "Unable to obtain lock", e );
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/mq/CounterQuery.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/mq/CounterQuery.java b/stack/core/src/main/java/org/usergrid/mq/CounterQuery.java
deleted file mode 100644
index adb5cd1..0000000
--- a/stack/core/src/main/java/org/usergrid/mq/CounterQuery.java
+++ /dev/null
@@ -1,314 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.mq;
-
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.usergrid.mq.Query.CounterFilterPredicate;
-import org.usergrid.persistence.CounterResolution;
-import org.usergrid.utils.JsonUtils;
-
-import static org.usergrid.utils.ClassUtils.cast;
-import static org.usergrid.utils.ListUtils.firstBoolean;
-import static org.usergrid.utils.ListUtils.firstInteger;
-import static org.usergrid.utils.ListUtils.firstLong;
-import static org.usergrid.utils.ListUtils.isEmpty;
-import static org.usergrid.utils.MapUtils.toMapList;
-
-
-public class CounterQuery {
-
-    public static final Logger logger = LoggerFactory.getLogger( CounterQuery.class );
-
-    public static final int DEFAULT_MAX_RESULTS = 10;
-
-    private int limit = 0;
-    boolean limitSet = false;
-
-    private Long startTime;
-    private Long finishTime;
-    private boolean pad;
-    private CounterResolution resolution = CounterResolution.ALL;
-    private List<String> categories;
-    private List<CounterFilterPredicate> counterFilters;
-
-
-    public CounterQuery() {
-    }
-
-
-    public CounterQuery( CounterQuery q ) {
-        if ( q != null ) {
-            limit = q.limit;
-            limitSet = q.limitSet;
-            startTime = q.startTime;
-            finishTime = q.finishTime;
-            resolution = q.resolution;
-            pad = q.pad;
-            categories = q.categories != null ? new ArrayList<String>( q.categories ) : null;
-            counterFilters =
-                    q.counterFilters != null ? new ArrayList<CounterFilterPredicate>( q.counterFilters ) : null;
-        }
-    }
-
-
-    public static CounterQuery newQueryIfNull( CounterQuery query ) {
-        if ( query == null ) {
-            query = new CounterQuery();
-        }
-        return query;
-    }
-
-
-    public static CounterQuery fromJsonString( String json ) {
-        Object o = JsonUtils.parse( json );
-        if ( o instanceof Map ) {
-            @SuppressWarnings({ "unchecked", "rawtypes" }) Map<String, List<String>> params =
-                    cast( toMapList( ( Map ) o ) );
-            return fromQueryParams( params );
-        }
-        return null;
-    }
-
-
-    public static CounterQuery fromQueryParams( Map<String, List<String>> params ) {
-
-        CounterQuery q = null;
-        Integer limit = null;
-        Long startTime = null;
-        Long finishTime = null;
-        Boolean pad = null;
-        CounterResolution resolution = null;
-        List<CounterFilterPredicate> counterFilters = null;
-        List<String> categories = null;
-
-        List<String> l = null;
-
-        limit = firstInteger( params.get( "limit" ) );
-        startTime = firstLong( params.get( "start_time" ) );
-        finishTime = firstLong( params.get( "end_time" ) );
-
-        l = params.get( "resolution" );
-        if ( !isEmpty( l ) ) {
-            resolution = CounterResolution.fromString( l.get( 0 ) );
-        }
-
-        categories = params.get( "category" );
-
-        l = params.get( "counter" );
-        if ( !isEmpty( l ) ) {
-            counterFilters = CounterFilterPredicate.fromList( l );
-        }
-
-        pad = firstBoolean( params.get( "pad" ) );
-
-        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 ( categories != null ) {
-            q = newQueryIfNull( q );
-            q.setCategories( categories );
-        }
-
-        if ( counterFilters != null ) {
-            q = newQueryIfNull( q );
-            q.setCounterFilters( counterFilters );
-        }
-
-        if ( pad != null ) {
-            q = newQueryIfNull( q );
-            q.setPad( pad );
-        }
-
-        return q;
-    }
-
-
-    public int getLimit() {
-        return getLimit( DEFAULT_MAX_RESULTS );
-    }
-
-
-    public int getLimit( int defaultMax ) {
-        if ( limit <= 0 ) {
-            if ( defaultMax > 0 ) {
-                return defaultMax;
-            }
-            else {
-                return DEFAULT_MAX_RESULTS;
-            }
-        }
-        return limit;
-    }
-
-
-    public void setLimit( int limit ) {
-        limitSet = true;
-        this.limit = limit;
-    }
-
-
-    public CounterQuery withLimit( int limit ) {
-        limitSet = true;
-        this.limit = limit;
-        return this;
-    }
-
-
-    public boolean isLimitSet() {
-        return limitSet;
-    }
-
-
-    public Long getStartTime() {
-        return startTime;
-    }
-
-
-    public void setStartTime( Long startTime ) {
-        this.startTime = startTime;
-    }
-
-
-    public CounterQuery withStartTime( Long startTime ) {
-        this.startTime = startTime;
-        return this;
-    }
-
-
-    public Long getFinishTime() {
-        return finishTime;
-    }
-
-
-    public void setFinishTime( Long finishTime ) {
-        this.finishTime = finishTime;
-    }
-
-
-    public CounterQuery withFinishTime( Long finishTime ) {
-        this.finishTime = finishTime;
-        return this;
-    }
-
-
-    public boolean isPad() {
-        return pad;
-    }
-
-
-    public void setPad( boolean pad ) {
-        this.pad = pad;
-    }
-
-
-    public CounterQuery withPad( boolean pad ) {
-        this.pad = pad;
-        return this;
-    }
-
-
-    public void setResolution( CounterResolution resolution ) {
-        this.resolution = resolution;
-    }
-
-
-    public CounterResolution getResolution() {
-        return resolution;
-    }
-
-
-    public CounterQuery withResolution( CounterResolution resolution ) {
-        this.resolution = resolution;
-        return this;
-    }
-
-
-    public List<String> getCategories() {
-        return categories;
-    }
-
-
-    public CounterQuery addCategory( String category ) {
-        if ( categories == null ) {
-            categories = new ArrayList<String>();
-        }
-        categories.add( category );
-        return this;
-    }
-
-
-    public void setCategories( List<String> categories ) {
-        this.categories = categories;
-    }
-
-
-    public CounterQuery withCategories( List<String> categories ) {
-        this.categories = categories;
-        return this;
-    }
-
-
-    public List<CounterFilterPredicate> getCounterFilters() {
-        return counterFilters;
-    }
-
-
-    public CounterQuery addCounterFilter( String counter ) {
-        CounterFilterPredicate p = CounterFilterPredicate.fromString( counter );
-        if ( p == null ) {
-            return this;
-        }
-        if ( counterFilters == null ) {
-            counterFilters = new ArrayList<CounterFilterPredicate>();
-        }
-        counterFilters.add( p );
-        return this;
-    }
-
-
-    public void setCounterFilters( List<CounterFilterPredicate> counterFilters ) {
-        this.counterFilters = counterFilters;
-    }
-
-
-    public CounterQuery withCounterFilters( List<CounterFilterPredicate> counterFilters ) {
-        this.counterFilters = counterFilters;
-        return this;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/mq/Message.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/mq/Message.java b/stack/core/src/main/java/org/usergrid/mq/Message.java
deleted file mode 100644
index 644f9b4..0000000
--- a/stack/core/src/main/java/org/usergrid/mq/Message.java
+++ /dev/null
@@ -1,512 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.mq;
-
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.TreeMap;
-import java.util.UUID;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-import org.codehaus.jackson.annotate.JsonAnyGetter;
-import org.codehaus.jackson.annotate.JsonAnySetter;
-import org.codehaus.jackson.annotate.JsonIgnore;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
-import org.usergrid.utils.UUIDUtils;
-
-import com.fasterxml.uuid.UUIDComparator;
-
-import static org.apache.commons.collections.IteratorUtils.asEnumeration;
-import static org.apache.commons.collections.MapUtils.getBooleanValue;
-import static org.apache.commons.collections.MapUtils.getByteValue;
-import static org.apache.commons.collections.MapUtils.getDoubleValue;
-import static org.apache.commons.collections.MapUtils.getFloatValue;
-import static org.apache.commons.collections.MapUtils.getIntValue;
-import static org.apache.commons.collections.MapUtils.getLongValue;
-import static org.apache.commons.collections.MapUtils.getShortValue;
-import static org.apache.commons.collections.MapUtils.getString;
-import static org.usergrid.utils.ClassUtils.cast;
-import static org.usergrid.utils.ConversionUtils.bytes;
-import static org.usergrid.utils.ConversionUtils.coerceMap;
-import static org.usergrid.utils.ConversionUtils.getInt;
-import static org.usergrid.utils.ConversionUtils.uuid;
-import static org.usergrid.utils.MapUtils.hashMap;
-import static org.usergrid.utils.UUIDUtils.getTimestampInMillis;
-import static org.usergrid.utils.UUIDUtils.isTimeBased;
-import static org.usergrid.utils.UUIDUtils.newTimeUUID;
-
-
-@XmlRootElement
-public class Message {
-
-    public static final String MESSAGE_CORRELATION_ID = "correlation_id";
-    public static final String MESSAGE_DESTINATION = "destination";
-    public static final String MESSAGE_ID = "uuid";
-    public static final String MESSAGE_REPLY_TO = "reply_to";
-    public static final String MESSAGE_TIMESTAMP = "timestamp";
-    public static final String MESSAGE_TYPE = "type";
-    public static final String MESSAGE_CATEGORY = "category";
-    public static final String MESSAGE_INDEXED = "indexed";
-    public static final String MESSAGE_PERSISTENT = "persistent";
-    public static final String MESSAGE_TRANSACTION = "transaction";
-
-    @SuppressWarnings("rawtypes")
-    public static final Map<String, Class> MESSAGE_PROPERTIES =
-            hashMap( MESSAGE_CORRELATION_ID, ( Class ) String.class ).map( MESSAGE_DESTINATION, String.class )
-                    .map( MESSAGE_ID, UUID.class ).map( MESSAGE_REPLY_TO, String.class )
-                    .map( MESSAGE_TIMESTAMP, Long.class ).map( MESSAGE_TYPE, String.class )
-                    .map( MESSAGE_CATEGORY, String.class ).map( MESSAGE_INDEXED, Boolean.class )
-                    .map( MESSAGE_PERSISTENT, Boolean.class ).map( MESSAGE_TRANSACTION, UUID.class );
-
-
-    public static int compare( Message m1, Message m2 ) {
-        if ( ( m1 == null ) && ( m2 == null ) ) {
-            return 0;
-        }
-        else if ( m1 == null ) {
-            return -1;
-        }
-        else if ( m2 == null ) {
-            return 1;
-        }
-        return UUIDComparator.staticCompare( m1.getUuid(), m2.getUuid() );
-    }
-
-
-    public static List<Message> fromList( List<Map<String, Object>> l ) {
-        List<Message> messages = new ArrayList<Message>( l.size() );
-        for ( Map<String, Object> properties : l ) {
-            messages.add( new Message( properties ) );
-        }
-        return messages;
-    }
-
-
-    public static List<Message> sort( List<Message> messages ) {
-        Collections.sort( messages, new Comparator<Message>() {
-            @Override
-            public int compare( Message m1, Message m2 ) {
-                return Message.compare( m1, m2 );
-            }
-        } );
-        return messages;
-    }
-
-
-    public static List<Message> sortReversed( List<Message> messages ) {
-        Collections.sort( messages, new Comparator<Message>() {
-            @Override
-            public int compare( Message m1, Message m2 ) {
-                return Message.compare( m2, m1 );
-            }
-        } );
-        return messages;
-    }
-
-
-    protected Map<String, Object> properties = new TreeMap<String, Object>( String.CASE_INSENSITIVE_ORDER );
-
-
-    public Message() {
-    }
-
-
-    @SuppressWarnings("unchecked")
-    public Message( Map<String, Object> properties ) {
-        this.properties.putAll( coerceMap( ( Map<String, Class<?>> ) cast( MESSAGE_PROPERTIES ), properties ) );
-    }
-
-
-    @SuppressWarnings("unchecked")
-    public void addCounter( String name, int value ) {
-        Map<String, Integer> counters = null;
-        if ( properties.get( "counters" ) instanceof Map ) {
-            counters = ( Map<String, Integer> ) properties.get( "counters" );
-        }
-        else {
-            counters = new HashMap<String, Integer>();
-            properties.put( "counters", counters );
-        }
-        counters.put( name, value );
-    }
-
-
-    public void clearBody() {
-        properties.clear();
-    }
-
-
-    public void clearProperties() {
-        properties.clear();
-    }
-
-
-    public boolean getBooleanProperty( String name ) {
-        return getBooleanValue( properties, name );
-    }
-
-
-    public byte getByteProperty( String name ) {
-        return getByteValue( properties, name );
-    }
-
-
-    @JsonIgnore
-    public String getCategory() {
-        return getString( properties, MESSAGE_CATEGORY );
-    }
-
-
-    @JsonIgnore
-    public String getCorrelationID() {
-        return getString( properties, MESSAGE_CORRELATION_ID );
-    }
-
-
-    @JsonIgnore
-    public byte[] getCorrelationIDAsBytes() {
-        return bytes( properties.get( MESSAGE_CORRELATION_ID ) );
-    }
-
-
-    @JsonIgnore
-    public Map<String, Integer> getCounters() {
-        Map<String, Integer> counters = new HashMap<String, Integer>();
-        if ( properties.get( "counters" ) instanceof Map ) {
-            @SuppressWarnings("unchecked") Map<String, Object> c = ( Map<String, Object> ) properties.get( "counters" );
-            for ( Entry<String, Object> e : c.entrySet() ) {
-                counters.put( e.getKey(), getInt( e.getValue() ) );
-            }
-        }
-        return counters;
-    }
-
-
-    @JsonIgnore
-    public int getDeliveryMode() {
-        return 2;
-    }
-
-
-    @JsonIgnore
-    public Queue getDestination() {
-        return Queue.getDestination( getString( properties, MESSAGE_DESTINATION ) );
-    }
-
-
-    public double getDoubleProperty( String name ) {
-        return getDoubleValue( properties, name );
-    }
-
-
-    @JsonIgnore
-    public long getExpiration() {
-        return 0;
-    }
-
-
-    public float getFloatProperty( String name ) {
-        return getFloatValue( properties, name );
-    }
-
-
-    public int getIntProperty( String name ) {
-        return getIntValue( properties, name );
-    }
-
-
-    public long getLongProperty( String name ) {
-        return getLongValue( properties, name );
-    }
-
-
-    @JsonIgnore
-    public String getMessageID() {
-        return getUuid().toString();
-    }
-
-
-    public Object getObjectProperty( String name ) {
-        return properties.get( name );
-    }
-
-
-    @JsonIgnore
-    public int getPriority() {
-        return 0;
-    }
-
-
-    @JsonAnyGetter
-    public Map<String, Object> getProperties() {
-        sync();
-        return properties;
-    }
-
-
-    @JsonIgnore
-    @SuppressWarnings("unchecked")
-    public Enumeration<String> getPropertyNames() {
-        return asEnumeration( properties.keySet().iterator() );
-    }
-
-
-    @JsonIgnore
-    public boolean getRedelivered() {
-        return false;
-    }
-
-
-    @JsonIgnore
-    public Queue getReplyTo() {
-        return Queue.getDestination( getString( properties, MESSAGE_REPLY_TO ) );
-    }
-
-
-    public short getShortProperty( String name ) {
-        return getShortValue( properties, name );
-    }
-
-
-    public String getStringProperty( String name ) {
-        return getString( properties, name );
-    }
-
-
-    @JsonIgnore
-    public synchronized long getTimestamp() {
-        if ( properties.containsKey( MESSAGE_TIMESTAMP ) ) {
-            long ts = getLongValue( properties, MESSAGE_TIMESTAMP );
-            if ( ts != 0 ) {
-                return ts;
-            }
-        }
-        long timestamp = getTimestampInMillis( getUuid() );
-        properties.put( MESSAGE_TIMESTAMP, timestamp );
-        return timestamp;
-    }
-
-
-    @JsonIgnore
-    public String getType() {
-        return getString( properties, MESSAGE_TYPE );
-    }
-
-
-    @JsonIgnore
-    public synchronized UUID getUuid() {
-        UUID uuid = uuid( properties.get( MESSAGE_ID ), null );
-        if ( uuid == null ) {
-            if ( properties.containsKey( MESSAGE_TIMESTAMP ) ) {
-                long ts = getLongValue( properties, MESSAGE_TIMESTAMP );
-                uuid = newTimeUUID( ts );
-            }
-            else {
-                uuid = newTimeUUID();
-            }
-
-            properties.put( MESSAGE_ID, uuid );
-            properties.put( MESSAGE_TIMESTAMP, getTimestampInMillis( uuid ) );
-        }
-        return uuid;
-    }
-
-
-    @JsonIgnore
-    public boolean isIndexed() {
-        return getBooleanValue( properties, MESSAGE_INDEXED );
-    }
-
-
-    @JsonIgnore
-    public boolean isPersistent() {
-        return getBooleanValue( properties, MESSAGE_PERSISTENT );
-    }
-
-
-    public boolean propertyExists( String name ) {
-        return properties.containsKey( name );
-    }
-
-
-    public void setBooleanProperty( String name, boolean value ) {
-        properties.put( name, value );
-    }
-
-
-    public void setByteProperty( String name, byte value ) {
-        properties.put( name, value );
-    }
-
-
-    public void setCategory( String category ) {
-        if ( category != null ) {
-            properties.put( MESSAGE_CATEGORY, category.toLowerCase() );
-        }
-    }
-
-
-    public void setCorrelationID( String correlationId ) {
-        properties.put( MESSAGE_CORRELATION_ID, correlationId );
-    }
-
-
-    public void setCorrelationIDAsBytes( byte[] correlationId ) {
-        properties.put( MESSAGE_CORRELATION_ID, correlationId );
-    }
-
-
-    public void setCounters( Map<String, Integer> counters ) {
-        if ( counters == null ) {
-            counters = new HashMap<String, Integer>();
-        }
-        properties.put( "counters", counters );
-    }
-
-
-    public void setDeliveryMode( int arg0 ) {
-    }
-
-
-    public void setDestination( Queue destination ) {
-        properties.put( MESSAGE_CORRELATION_ID, destination.toString() );
-    }
-
-
-    public void setDoubleProperty( String name, double value ) {
-        properties.put( name, value );
-    }
-
-
-    public void setExpiration( long expiration ) {
-    }
-
-
-    public void setFloatProperty( String name, float value ) {
-        properties.put( name, value );
-    }
-
-
-    public void setIndexed( boolean indexed ) {
-        properties.put( MESSAGE_INDEXED, indexed );
-    }
-
-
-    public void setIntProperty( String name, int value ) {
-        properties.put( name, value );
-    }
-
-
-    public void setLongProperty( String name, long value ) {
-        properties.put( name, value );
-    }
-
-
-    public void setMessageID( String id ) {
-        if ( UUIDUtils.isUUID( id ) ) {
-            properties.put( MESSAGE_ID, UUIDUtils.tryGetUUID( id ) );
-        }
-        else {
-            throw new RuntimeException( "Not a UUID" );
-        }
-    }
-
-
-    public void setObjectProperty( String name, Object value ) {
-        properties.put( name, value );
-    }
-
-
-    public void setPersistent( boolean persistent ) {
-        properties.put( MESSAGE_PERSISTENT, persistent );
-    }
-
-
-    public void setPriority( int priority ) {
-    }
-
-
-    @JsonAnySetter
-    public void setProperty( String key, Object value ) {
-        properties.put( key, value );
-    }
-
-
-    public void setRedelivered( boolean redelivered ) {
-    }
-
-
-    public void setReplyTo( Queue destination ) {
-        properties.put( MESSAGE_REPLY_TO, destination.toString() );
-    }
-
-
-    public void setShortProperty( String name, short value ) {
-        properties.put( name, value );
-    }
-
-
-    public void setStringProperty( String name, String value ) {
-        properties.put( name, value );
-    }
-
-
-    public void setTimestamp( long timestamp ) {
-        properties.put( MESSAGE_TIMESTAMP, timestamp );
-    }
-
-
-    public void setType( String type ) {
-        properties.put( MESSAGE_TYPE, type );
-    }
-
-
-    public void setUuid( UUID uuid ) {
-        if ( isTimeBased( uuid ) ) {
-            properties.put( MESSAGE_ID, uuid );
-            properties.put( MESSAGE_TIMESTAMP, getTimestampInMillis( uuid ) );
-        }
-        else {
-            throw new IllegalArgumentException( "Not a time-based UUID" );
-        }
-    }
-
-
-    public void setTransaction( UUID transaction ) {
-        properties.put( MESSAGE_TRANSACTION, transaction );
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public UUID getTransaction() {
-        return ( UUID ) properties.get( MESSAGE_TRANSACTION );
-    }
-
-
-    public void sync() {
-        getUuid();
-        getTimestamp();
-    }
-}


[24/96] [abbrv] [partial] Change package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/mq/Query.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/mq/Query.java b/stack/core/src/main/java/org/usergrid/mq/Query.java
deleted file mode 100644
index f7e2530..0000000
--- a/stack/core/src/main/java/org/usergrid/mq/Query.java
+++ /dev/null
@@ -1,1857 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.mq;
-
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.EnumSet;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.ListIterator;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-import java.util.UUID;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.antlr.runtime.ANTLRStringStream;
-import org.antlr.runtime.CommonTokenStream;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.usergrid.persistence.CounterResolution;
-import org.usergrid.persistence.Entity;
-import org.usergrid.persistence.Identifier;
-import org.usergrid.persistence.Results;
-import org.usergrid.persistence.Results.Level;
-import org.usergrid.utils.JsonUtils;
-
-import org.apache.commons.lang.StringUtils;
-
-import static org.apache.commons.codec.binary.Base64.decodeBase64;
-import static org.apache.commons.lang.StringUtils.isBlank;
-import static org.apache.commons.lang.StringUtils.split;
-import static org.usergrid.persistence.Schema.PROPERTY_TYPE;
-import static org.usergrid.persistence.Schema.PROPERTY_UUID;
-import static org.usergrid.utils.ClassUtils.cast;
-import static org.usergrid.utils.ConversionUtils.uuid;
-import static org.usergrid.utils.ListUtils.first;
-import static org.usergrid.utils.ListUtils.firstBoolean;
-import static org.usergrid.utils.ListUtils.firstInteger;
-import static org.usergrid.utils.ListUtils.firstLong;
-import static org.usergrid.utils.ListUtils.firstUuid;
-import static org.usergrid.utils.ListUtils.isEmpty;
-import static org.usergrid.utils.MapUtils.toMapList;
-
-
-public class Query {
-
-    private static final Logger logger = LoggerFactory.getLogger( Query.class );
-
-    public static final int DEFAULT_LIMIT = 10;
-
-    protected String type;
-    protected List<SortPredicate> sortPredicates = new ArrayList<SortPredicate>();
-    protected List<FilterPredicate> filterPredicates = new ArrayList<FilterPredicate>();
-    protected UUID startResult;
-    protected String cursor;
-    protected int limit = 0;
-    protected boolean limitSet = false;
-
-    protected Map<String, String> selectSubjects = new LinkedHashMap<String, String>();
-    protected boolean mergeSelectResults = false;
-    protected Level level = Level.ALL_PROPERTIES;
-    protected String connection;
-    protected List<String> permissions;
-    protected boolean reversed;
-    protected boolean reversedSet = false;
-    protected Long startTime;
-    protected Long finishTime;
-    protected boolean pad;
-    protected CounterResolution resolution = CounterResolution.ALL;
-    protected List<Identifier> users;
-    protected List<Identifier> groups;
-    protected List<Identifier> identifiers;
-    protected List<String> categories;
-    protected List<CounterFilterPredicate> counterFilters;
-
-
-    public Query() {
-    }
-
-
-    public Query( String type ) {
-        this.type = type;
-    }
-
-
-    public Query( Query q ) {
-        if ( q != null ) {
-            type = q.type;
-            sortPredicates = q.sortPredicates != null ? new ArrayList<SortPredicate>( q.sortPredicates ) : null;
-            filterPredicates = q.filterPredicates != null ? new ArrayList<FilterPredicate>( q.filterPredicates ) : null;
-            startResult = q.startResult;
-            cursor = q.cursor;
-            limit = q.limit;
-            limitSet = q.limitSet;
-            selectSubjects = q.selectSubjects != null ? new LinkedHashMap<String, String>( q.selectSubjects ) : null;
-            mergeSelectResults = q.mergeSelectResults;
-            level = q.level;
-            connection = q.connection;
-            permissions = q.permissions != null ? new ArrayList<String>( q.permissions ) : null;
-            reversed = q.reversed;
-            reversedSet = q.reversedSet;
-            startTime = q.startTime;
-            finishTime = q.finishTime;
-            resolution = q.resolution;
-            pad = q.pad;
-            users = q.users != null ? new ArrayList<Identifier>( q.users ) : null;
-            groups = q.groups != null ? new ArrayList<Identifier>( q.groups ) : null;
-            identifiers = q.identifiers != null ? new ArrayList<Identifier>( q.identifiers ) : null;
-            categories = q.categories != null ? new ArrayList<String>( q.categories ) : null;
-            counterFilters =
-                    q.counterFilters != null ? new ArrayList<CounterFilterPredicate>( q.counterFilters ) : null;
-        }
-    }
-
-
-    public static Query fromQL( String ql ) {
-        if ( ql == null ) {
-            return null;
-        }
-        ql = ql.trim();
-
-        String qlt = ql.toLowerCase();
-        if ( !qlt.startsWith( "select" ) && !qlt.startsWith( "insert" ) && !qlt.startsWith( "update" ) && !qlt
-                .startsWith( "delete" ) ) {
-            if ( qlt.startsWith( "order by" ) ) {
-                ql = "select * " + ql;
-            }
-            else {
-                ql = "select * where " + ql;
-            }
-        }
-
-        try {
-            ANTLRStringStream in = new ANTLRStringStream( ql.trim() );
-            QueryFilterLexer lexer = new QueryFilterLexer( in );
-            CommonTokenStream tokens = new CommonTokenStream( lexer );
-            QueryFilterParser parser = new QueryFilterParser( tokens );
-            Query q = parser.ql();
-            return q;
-        }
-        catch ( Exception e ) {
-            logger.error( "Unable to parse \"" + ql + "\"", e );
-        }
-        return null;
-    }
-
-
-    public static Query newQueryIfNull( Query query ) {
-        if ( query == null ) {
-            query = new Query();
-        }
-        return query;
-    }
-
-
-    public static Query fromJsonString( String json ) {
-        Object o = JsonUtils.parse( json );
-        if ( o instanceof Map ) {
-            @SuppressWarnings({ "unchecked", "rawtypes" }) Map<String, List<String>> params =
-                    cast( toMapList( ( Map ) o ) );
-            return fromQueryParams( params );
-        }
-        return null;
-    }
-
-
-    public static Query fromQueryParams( Map<String, List<String>> params ) {
-        String type = null;
-        Query q = null;
-        String ql = null;
-        String connection = null;
-        UUID start = null;
-        String cursor = null;
-        Integer limit = null;
-        List<String> permissions = null;
-        Boolean reversed = null;
-        Long startTime = null;
-        Long finishTime = null;
-        Boolean pad = null;
-        CounterResolution resolution = null;
-        List<Identifier> users = null;
-        List<Identifier> groups = null;
-        List<Identifier> identifiers = null;
-        List<String> categories = null;
-        List<CounterFilterPredicate> counterFilters = null;
-
-        List<String> l = null;
-
-        ql = first( params.get( "ql" ) );
-        type = first( params.get( "type" ) );
-        reversed = firstBoolean( params.get( "reversed" ) );
-        connection = first( params.get( "connection" ) );
-        start = firstUuid( params.get( "start" ) );
-        cursor = first( params.get( "cursor" ) );
-        limit = firstInteger( params.get( "limit" ) );
-        permissions = params.get( "permission" );
-        startTime = firstLong( params.get( "start_time" ) );
-        finishTime = firstLong( params.get( "end_time" ) );
-
-        l = params.get( "resolution" );
-        if ( !isEmpty( l ) ) {
-            resolution = CounterResolution.fromString( l.get( 0 ) );
-        }
-
-        users = Identifier.fromList( params.get( "user" ) );
-        groups = Identifier.fromList( params.get( "group" ) );
-
-        categories = params.get( "category" );
-
-        l = params.get( "counter" );
-        if ( !isEmpty( l ) ) {
-            counterFilters = CounterFilterPredicate.fromList( l );
-        }
-
-        pad = firstBoolean( params.get( "pad" ) );
-
-        for ( Entry<String, List<String>> param : params.entrySet() ) {
-            if ( ( param.getValue() == null ) || ( param.getValue().size() == 0 ) ) {
-                Identifier identifier = Identifier.from( param.getKey() );
-                if ( identifier != null ) {
-                    if ( identifiers == null ) {
-                        identifiers = new ArrayList<Identifier>();
-                    }
-                    identifiers.add( identifier );
-                }
-            }
-        }
-
-        if ( ql != null ) {
-            q = Query.fromQL( ql );
-        }
-
-        l = params.get( "filter" );
-        if ( !isEmpty( l ) ) {
-            q = newQueryIfNull( q );
-            for ( String s : l ) {
-                q.addFilter( s );
-            }
-        }
-
-        l = params.get( "sort" );
-        if ( !isEmpty( l ) ) {
-            q = newQueryIfNull( q );
-            for ( String s : l ) {
-                q.addSort( s );
-            }
-        }
-
-        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 ( categories != null ) {
-            q = newQueryIfNull( q );
-            q.setCategories( categories );
-        }
-
-        if ( counterFilters != null ) {
-            q = newQueryIfNull( q );
-            q.setCounterFilters( counterFilters );
-        }
-
-        if ( pad != null ) {
-            q = newQueryIfNull( q );
-            q.setPad( pad );
-        }
-
-        if ( users != null ) {
-            q = newQueryIfNull( q );
-            q.setUsers( users );
-        }
-
-        if ( groups != null ) {
-            q = newQueryIfNull( q );
-            q.setGroups( groups );
-        }
-
-        if ( identifiers != null ) {
-            q = newQueryIfNull( q );
-            q.setIdentifiers( identifiers );
-        }
-
-        if ( reversed != null ) {
-            q = newQueryIfNull( q );
-            q.setReversed( reversed );
-        }
-
-        return q;
-    }
-
-
-    public static Query searchForProperty( String propertyName, Object propertyValue ) {
-        Query q = new Query();
-        q.addEqualityFilter( propertyName, propertyValue );
-        return q;
-    }
-
-
-    public static Query findForProperty( String propertyName, Object propertyValue ) {
-        Query q = new Query();
-        q.addEqualityFilter( propertyName, propertyValue );
-        q.setLimit( 1 );
-        return q;
-    }
-
-
-    public static Query fromUUID( UUID uuid ) {
-        Query q = new Query();
-        q.addIdentifier( Identifier.fromUUID( uuid ) );
-        return q;
-    }
-
-
-    public static Query fromName( String name ) {
-        Query q = new Query();
-        q.addIdentifier( Identifier.fromName( name ) );
-        return q;
-    }
-
-
-    public static Query fromEmail( String email ) {
-        Query q = new Query();
-        q.addIdentifier( Identifier.fromEmail( email ) );
-        return q;
-    }
-
-
-    public static Query fromIdentifier( Object id ) {
-        Query q = new Query();
-        q.addIdentifier( Identifier.from( id ) );
-        return q;
-    }
-
-
-    public boolean isIdsOnly() {
-        if ( ( selectSubjects.size() == 1 ) && selectSubjects.containsKey( PROPERTY_UUID ) ) {
-            level = Level.IDS;
-            return true;
-        }
-        return false;
-    }
-
-
-    public void setIdsOnly( boolean idsOnly ) {
-        if ( idsOnly ) {
-            selectSubjects = new LinkedHashMap<String, String>();
-            selectSubjects.put( PROPERTY_UUID, PROPERTY_UUID );
-            level = Level.IDS;
-        }
-        else if ( isIdsOnly() ) {
-            selectSubjects = new LinkedHashMap<String, String>();
-            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 String getEntityType() {
-        return type;
-    }
-
-
-    public void setEntityType( String type ) {
-        this.type = type;
-    }
-
-
-    public Query withEntityType( String type ) {
-        this.type = type;
-        return this;
-    }
-
-
-    public String getConnectionType() {
-        return connection;
-    }
-
-
-    public void setConnectionType( String connection ) {
-        this.connection = connection;
-    }
-
-
-    public Query withConnectionType( String connection ) {
-        this.connection = connection;
-        return this;
-    }
-
-
-    public List<String> getPermissions() {
-        return permissions;
-    }
-
-
-    public void setPermissions( List<String> permissions ) {
-        this.permissions = permissions;
-    }
-
-
-    public Query withPermissions( List<String> permissions ) {
-        this.permissions = permissions;
-        return this;
-    }
-
-
-    public Query addSelect( String select ) {
-
-        return addSelect( select, null );
-    }
-
-
-    public Query addSelect( String select, String output ) {
-        // be paranoid with the null checks because
-        // the query parser sometimes flakes out
-        if ( select == null ) {
-            return this;
-        }
-        select = select.trim();
-
-        if ( select.equals( "*" ) ) {
-            return this;
-        }
-
-        if ( StringUtils.isNotEmpty( output ) ) {
-            mergeSelectResults = true;
-        }
-        else {
-            mergeSelectResults = false;
-        }
-
-        if ( output == null ) {
-            output = "";
-        }
-
-        selectSubjects.put( select, output );
-
-        return this;
-    }
-
-
-    public boolean hasSelectSubjects() {
-        return !selectSubjects.isEmpty();
-    }
-
-
-    public Set<String> getSelectSubjects() {
-        return selectSubjects.keySet();
-    }
-
-
-    public Map<String, String> getSelectAssignments() {
-        return selectSubjects;
-    }
-
-
-    public void setMergeSelectResults( boolean mergeSelectResults ) {
-        this.mergeSelectResults = mergeSelectResults;
-    }
-
-
-    public Query withMergeSelectResults( boolean mergeSelectResults ) {
-        this.mergeSelectResults = mergeSelectResults;
-        return this;
-    }
-
-
-    public boolean isMergeSelectResults() {
-        return mergeSelectResults;
-    }
-
-
-    public Query addSort( String propertyName ) {
-        if ( isBlank( propertyName ) ) {
-            return this;
-        }
-        propertyName = propertyName.trim();
-        if ( propertyName.indexOf( ',' ) >= 0 ) {
-            String[] propertyNames = split( propertyName, ',' );
-            for ( String s : propertyNames ) {
-                addSort( s );
-            }
-            return this;
-        }
-
-        SortDirection direction = SortDirection.ASCENDING;
-        if ( propertyName.indexOf( ' ' ) >= 0 ) {
-            String[] parts = split( propertyName, ' ' );
-            if ( parts.length > 1 ) {
-                propertyName = parts[0];
-                direction = SortDirection.find( parts[1] );
-            }
-        }
-        else if ( propertyName.startsWith( "-" ) ) {
-            propertyName = propertyName.substring( 1 );
-            direction = SortDirection.DESCENDING;
-        }
-        else if ( propertyName.startsWith( "+" ) ) {
-            propertyName = propertyName.substring( 1 );
-            direction = SortDirection.ASCENDING;
-        }
-
-        return addSort( propertyName, direction );
-    }
-
-
-    public Query addSort( String propertyName, SortDirection direction ) {
-        if ( isBlank( propertyName ) ) {
-            return this;
-        }
-        propertyName = propertyName.trim();
-        for ( SortPredicate s : sortPredicates ) {
-            if ( s.getPropertyName().equals( propertyName ) ) {
-                logger.error(
-                        "Attempted to set sort order for " + s.getPropertyName() + " more than once, discardng..." );
-                return this;
-            }
-        }
-        sortPredicates.add( new SortPredicate( propertyName, direction ) );
-        return this;
-    }
-
-
-    public Query addSort( SortPredicate sort ) {
-        if ( sort == null ) {
-            return this;
-        }
-        for ( SortPredicate s : sortPredicates ) {
-            if ( s.getPropertyName().equals( sort.getPropertyName() ) ) {
-                logger.error(
-                        "Attempted to set sort order for " + s.getPropertyName() + " more than once, discardng..." );
-                return this;
-            }
-        }
-        sortPredicates.add( sort );
-        return this;
-    }
-
-
-    public List<SortPredicate> getSortPredicates() {
-        return sortPredicates;
-    }
-
-
-    public boolean hasSortPredicates() {
-        return !sortPredicates.isEmpty();
-    }
-
-
-    public Query addEqualityFilter( String propertyName, Object value ) {
-        return addFilter( propertyName, FilterOperator.EQUAL, value );
-    }
-
-
-    public Query addFilter( String propertyName, FilterOperator operator, Object value ) {
-        if ( ( propertyName == null ) || ( operator == null ) || ( value == null ) ) {
-            return this;
-        }
-        if ( PROPERTY_TYPE.equalsIgnoreCase( propertyName ) && ( value != null ) ) {
-            if ( operator == FilterOperator.EQUAL ) {
-                type = value.toString();
-            }
-        }
-        else if ( "connection".equalsIgnoreCase( propertyName ) && ( value != null ) ) {
-            if ( operator == FilterOperator.EQUAL ) {
-                connection = value.toString();
-            }
-        }
-        else {
-            for ( FilterPredicate f : filterPredicates ) {
-                if ( f.getPropertyName().equals( propertyName ) && f.getValue().equals( value ) && "*"
-                        .equals( value ) ) {
-                    logger.error( "Attempted to set wildcard wilder for " + f.getPropertyName()
-                            + " more than once, discardng..." );
-                    return this;
-                }
-            }
-            filterPredicates.add( FilterPredicate.normalize( new FilterPredicate( propertyName, operator, value ) ) );
-        }
-        return this;
-    }
-
-
-    public Query addFilter( String filterStr ) {
-        if ( filterStr == null ) {
-            return this;
-        }
-        FilterPredicate filter = FilterPredicate.valueOf( filterStr );
-        if ( ( filter != null ) && ( filter.propertyName != null ) && ( filter.operator != null ) && ( filter.value
-                != null ) ) {
-
-            if ( PROPERTY_TYPE.equalsIgnoreCase( filter.propertyName ) ) {
-                if ( filter.operator == FilterOperator.EQUAL ) {
-                    type = filter.value.toString();
-                }
-            }
-            else if ( "connection".equalsIgnoreCase( filter.propertyName ) ) {
-                if ( filter.operator == FilterOperator.EQUAL ) {
-                    connection = filter.value.toString();
-                }
-            }
-            else {
-                for ( FilterPredicate f : filterPredicates ) {
-                    if ( f.getPropertyName().equals( filter.getPropertyName() ) && f.getValue()
-                                                                                    .equals( filter.getValue() ) && "*"
-                            .equals( filter.getValue() ) ) {
-                        logger.error( "Attempted to set wildcard wilder for " + f.getPropertyName()
-                                + " more than once, discardng..." );
-                        return this;
-                    }
-                }
-                filterPredicates.add( filter );
-            }
-        }
-        else {
-            logger.error( "Unable to add filter to query: " + filterStr );
-        }
-        return this;
-    }
-
-
-    public Query addFilter( FilterPredicate filter ) {
-        filter = FilterPredicate.normalize( filter );
-        if ( ( filter != null ) && ( filter.propertyName != null ) && ( filter.operator != null ) && ( filter.value
-                != null ) ) {
-
-            if ( PROPERTY_TYPE.equalsIgnoreCase( filter.propertyName ) ) {
-                if ( filter.operator == FilterOperator.EQUAL ) {
-                    type = filter.value.toString();
-                }
-            }
-            else if ( "connection".equalsIgnoreCase( filter.propertyName ) ) {
-                if ( filter.operator == FilterOperator.EQUAL ) {
-                    connection = filter.value.toString();
-                }
-            }
-            else {
-                filterPredicates.add( filter );
-            }
-        }
-        return this;
-    }
-
-
-    public List<FilterPredicate> getFilterPredicates() {
-        return filterPredicates;
-    }
-
-
-    public boolean hasFilterPredicates() {
-        return !filterPredicates.isEmpty();
-    }
-
-
-    public Map<String, Object> getEqualityFilters() {
-        Map<String, Object> map = new LinkedHashMap<String, Object>();
-
-        for ( FilterPredicate f : filterPredicates ) {
-            if ( f.operator == FilterOperator.EQUAL ) {
-                Object val = f.getStartValue();
-                if ( val != null ) {
-                    map.put( f.getPropertyName(), val );
-                }
-            }
-        }
-        return map.size() > 0 ? map : null;
-    }
-
-
-    public boolean hasFiltersForProperty( String name ) {
-        return hasFiltersForProperty( FilterOperator.EQUAL, name );
-    }
-
-
-    public boolean hasFiltersForProperty( FilterOperator operator, String name ) {
-        return getFilterForProperty( operator, name ) != null;
-    }
-
-
-    public FilterPredicate getFilterForProperty( FilterOperator operator, String name ) {
-        if ( name == null ) {
-            return null;
-        }
-        ListIterator<FilterPredicate> iterator = filterPredicates.listIterator();
-        while ( iterator.hasNext() ) {
-            FilterPredicate f = iterator.next();
-            if ( f.propertyName.equalsIgnoreCase( name ) ) {
-                if ( operator != null ) {
-                    if ( operator == f.operator ) {
-                        return f;
-                    }
-                }
-                else {
-                    return f;
-                }
-            }
-        }
-        return null;
-    }
-
-
-    public void removeFiltersForProperty( String name ) {
-        if ( name == null ) {
-            return;
-        }
-        ListIterator<FilterPredicate> iterator = filterPredicates.listIterator();
-        while ( iterator.hasNext() ) {
-            FilterPredicate f = iterator.next();
-            if ( f.propertyName.equalsIgnoreCase( name ) ) {
-                iterator.remove();
-            }
-        }
-    }
-
-
-    public 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 = decodeBase64( cursor );
-            if ( ( cursorBytes != null ) && ( cursorBytes.length == 16 ) ) {
-                startResult = uuid( cursorBytes );
-            }
-        }
-        return startResult;
-    }
-
-
-    public String getCursor() {
-        return cursor;
-    }
-
-
-    public void setCursor( String cursor ) {
-        if ( cursor != null ) {
-            if ( cursor.length() == 22 ) {
-                byte[] cursorBytes = decodeBase64( cursor );
-                if ( ( cursorBytes != null ) && ( cursorBytes.length == 16 ) ) {
-                    startResult = uuid( cursorBytes );
-                    cursor = null;
-                }
-            }
-        }
-        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 ) {
-        limitSet = true;
-        this.limit = limit;
-    }
-
-
-    public Query withLimit( int limit ) {
-        limitSet = true;
-        this.limit = limit;
-        return this;
-    }
-
-
-    public boolean isLimitSet() {
-        return limitSet;
-    }
-
-
-    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 List<Identifier> getUsers() {
-        return users;
-    }
-
-
-    public void addUser( Identifier user ) {
-        if ( users == null ) {
-            users = new ArrayList<Identifier>();
-        }
-        users.add( user );
-    }
-
-
-    public void setUsers( List<Identifier> users ) {
-        this.users = users;
-    }
-
-
-    public List<Identifier> getGroups() {
-        return groups;
-    }
-
-
-    public void addGroup( Identifier group ) {
-        if ( groups == null ) {
-            groups = new ArrayList<Identifier>();
-        }
-        groups.add( group );
-    }
-
-
-    public void setGroups( List<Identifier> groups ) {
-        this.groups = groups;
-    }
-
-
-    public List<Identifier> getIdentifiers() {
-        return identifiers;
-    }
-
-
-    public void addIdentifier( Identifier identifier ) {
-        if ( identifiers == null ) {
-            identifiers = new ArrayList<Identifier>();
-        }
-        identifiers.add( identifier );
-    }
-
-
-    public void setIdentifiers( List<Identifier> identifiers ) {
-        this.identifiers = identifiers;
-    }
-
-
-    public boolean containsUuidIdentifersOnly() {
-        if ( hasFilterPredicates() ) {
-            return false;
-        }
-        if ( ( identifiers == null ) || identifiers.isEmpty() ) {
-            return false;
-        }
-        for ( Identifier identifier : identifiers ) {
-            if ( !identifier.isUUID() ) {
-                return false;
-            }
-        }
-        return true;
-    }
-
-
-    public boolean containsSingleUuidIdentifier() {
-        return containsUuidIdentifersOnly() && ( identifiers.size() == 1 );
-    }
-
-
-    public List<UUID> getUuidIdentifiers() {
-        if ( ( identifiers == null ) || identifiers.isEmpty() ) {
-            return null;
-        }
-        List<UUID> ids = new ArrayList<UUID>();
-        for ( Identifier identifier : identifiers ) {
-            if ( identifier.isUUID() ) {
-                ids.add( identifier.getUUID() );
-            }
-        }
-        return ids;
-    }
-
-
-    public UUID getSingleUuidIdentifier() {
-        if ( !containsSingleUuidIdentifier() ) {
-            return null;
-        }
-        return ( identifiers.get( 0 ).getUUID() );
-    }
-
-
-    public boolean containsNameIdentifiersOnly() {
-        if ( hasFilterPredicates() ) {
-            return false;
-        }
-        if ( ( identifiers == null ) || identifiers.isEmpty() ) {
-            return false;
-        }
-        for ( Identifier identifier : identifiers ) {
-            if ( !identifier.isName() ) {
-                return false;
-            }
-        }
-        return true;
-    }
-
-
-    public boolean containsSingleNameIdentifier() {
-        return containsNameIdentifiersOnly() && ( identifiers.size() == 1 );
-    }
-
-
-    public List<String> getNameIdentifiers() {
-        if ( ( identifiers == null ) || identifiers.isEmpty() ) {
-            return null;
-        }
-        List<String> names = new ArrayList<String>();
-        for ( Identifier identifier : identifiers ) {
-            if ( identifier.isName() ) {
-                names.add( identifier.getName() );
-            }
-        }
-        return names;
-    }
-
-
-    public String getSingleNameIdentifier() {
-        if ( !containsSingleNameIdentifier() ) {
-            return null;
-        }
-        return ( identifiers.get( 0 ).toString() );
-    }
-
-
-    public boolean containsEmailIdentifiersOnly() {
-        if ( hasFilterPredicates() ) {
-            return false;
-        }
-        if ( ( identifiers == null ) || identifiers.isEmpty() ) {
-            return false;
-        }
-        for ( Identifier identifier : identifiers ) {
-            if ( identifier.isEmail() ) {
-                return false;
-            }
-        }
-        return true;
-    }
-
-
-    public boolean containsSingleEmailIdentifier() {
-        return containsEmailIdentifiersOnly() && ( identifiers.size() == 1 );
-    }
-
-
-    public List<String> getEmailIdentifiers() {
-        if ( ( identifiers == null ) || identifiers.isEmpty() ) {
-            return null;
-        }
-        List<String> emails = new ArrayList<String>();
-        for ( Identifier identifier : identifiers ) {
-            if ( identifier.isEmail() ) {
-                emails.add( identifier.getEmail() );
-            }
-        }
-        return emails;
-    }
-
-
-    public String getSingleEmailIdentifier() {
-        if ( !containsSingleEmailIdentifier() ) {
-            return null;
-        }
-        return ( identifiers.get( 0 ).toString() );
-    }
-
-
-    public boolean containsNameOrEmailIdentifiersOnly() {
-        if ( hasFilterPredicates() ) {
-            return false;
-        }
-        if ( ( identifiers == null ) || identifiers.isEmpty() ) {
-            return false;
-        }
-        for ( Identifier identifier : identifiers ) {
-            if ( !identifier.isEmail() && !identifier.isName() ) {
-                return false;
-            }
-        }
-        return true;
-    }
-
-
-    public boolean containsSingleNameOrEmailIdentifier() {
-        return containsNameOrEmailIdentifiersOnly() && ( identifiers.size() == 1 );
-    }
-
-
-    public List<String> getNameAndEmailIdentifiers() {
-        if ( ( identifiers == null ) || identifiers.isEmpty() ) {
-            return null;
-        }
-        List<String> ids = new ArrayList<String>();
-        for ( Identifier identifier : identifiers ) {
-            if ( identifier.isEmail() ) {
-                ids.add( identifier.getEmail() );
-            }
-            else if ( identifier.isName() ) {
-                ids.add( identifier.getName() );
-            }
-        }
-        return ids;
-    }
-
-
-    public String getSingleNameOrEmailIdentifier() {
-        if ( !containsSingleNameOrEmailIdentifier() ) {
-            return null;
-        }
-        return ( identifiers.get( 0 ).toString() );
-    }
-
-
-    public List<String> getCategories() {
-        return categories;
-    }
-
-
-    public void addCategory( String category ) {
-        if ( categories == null ) {
-            categories = new ArrayList<String>();
-        }
-        categories.add( category );
-    }
-
-
-    public void setCategories( List<String> categories ) {
-        this.categories = categories;
-    }
-
-
-    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 );
-    }
-
-
-    public void setCounterFilters( List<CounterFilterPredicate> counterFilters ) {
-        this.counterFilters = counterFilters;
-    }
-
-
-    @Override
-    public String toString() {
-        if ( selectSubjects.isEmpty() && filterPredicates.isEmpty() ) {
-            return "";
-        }
-
-        StringBuilder s = new StringBuilder( "select " );
-        if ( type == null ) {
-            if ( selectSubjects.isEmpty() ) {
-                s.append( "*" );
-            }
-            else {
-                if ( mergeSelectResults ) {
-                    s.append( "{ " );
-                    boolean first = true;
-                    for ( Map.Entry<String, String> select : selectSubjects.entrySet() ) {
-                        if ( !first ) {
-                            s.append( ", " );
-                        }
-                        s.append( select.getValue() + " : " + select.getKey() );
-                        first = false;
-                    }
-                    s.append( " }" );
-                }
-                else {
-                    boolean first = true;
-                    for ( String select : selectSubjects.keySet() ) {
-                        if ( !first ) {
-                            s.append( ", " );
-                        }
-                        s.append( select );
-                        first = false;
-                    }
-                }
-            }
-        }
-        else {
-            s.append( type );
-        }
-        if ( !filterPredicates.isEmpty() ) {
-            s.append( " where " );
-            boolean first = true;
-            for ( FilterPredicate f : filterPredicates ) {
-                if ( !first ) {
-                    s.append( " and " );
-                }
-                s.append( f.toString() );
-                first = false;
-            }
-        }
-        return s.toString();
-    }
-
-
-    public static enum FilterOperator {
-        LESS_THAN( "<", "lt" ), LESS_THAN_OR_EQUAL( "<=", "lte" ), GREATER_THAN( ">", "gt" ),
-        GREATER_THAN_OR_EQUAL( ">=", "gte" ), EQUAL( "=", "eq" ), NOT_EQUAL( "!=", "ne" ), IN( "in", null ),
-        CONTAINS( "contains", null ), WITHIN( "within", null );
-
-        private final String shortName;
-        private final String textName;
-
-
-        FilterOperator( String shortName, String textName ) {
-            this.shortName = shortName;
-            this.textName = textName;
-        }
-
-
-        static Map<String, FilterOperator> nameMap = new ConcurrentHashMap<String, FilterOperator>();
-
-
-        static {
-            for ( FilterOperator op : EnumSet.allOf( FilterOperator.class ) ) {
-                if ( op.shortName != null ) {
-                    nameMap.put( op.shortName, op );
-                }
-                if ( op.textName != null ) {
-                    nameMap.put( op.textName, op );
-                }
-            }
-        }
-
-
-        public static FilterOperator find( String s ) {
-            if ( s == null ) {
-                return null;
-            }
-            return nameMap.get( s );
-        }
-
-
-        @Override
-        public String toString() {
-            return shortName;
-        }
-    }
-
-
-    public static enum SortDirection {
-        ASCENDING, DESCENDING;
-
-
-        public static SortDirection find( String s ) {
-            if ( s == null ) {
-                return ASCENDING;
-            }
-            s = s.toLowerCase();
-            if ( s.startsWith( "asc" ) ) {
-                return ASCENDING;
-            }
-            if ( s.startsWith( "des" ) ) {
-                return DESCENDING;
-            }
-            if ( s.equals( "+" ) ) {
-                return ASCENDING;
-            }
-            if ( s.equals( "-" ) ) {
-                return DESCENDING;
-            }
-            return ASCENDING;
-        }
-    }
-
-
-    public static final class SortPredicate implements Serializable {
-        private static final long serialVersionUID = 1L;
-        private final String propertyName;
-        private final Query.SortDirection direction;
-
-
-        public SortPredicate( String propertyName, Query.SortDirection direction ) {
-            if ( propertyName == null ) {
-                throw new NullPointerException( "Property name was null" );
-            }
-
-            if ( direction == null ) {
-                direction = SortDirection.ASCENDING;
-            }
-
-            this.propertyName = propertyName.trim();
-            this.direction = direction;
-        }
-
-
-        public SortPredicate( String propertyName, String direction ) {
-            this( propertyName, SortDirection.find( direction ) );
-        }
-
-
-        public String getPropertyName() {
-            return propertyName;
-        }
-
-
-        public Query.SortDirection getDirection() {
-            return direction;
-        }
-
-
-        public FilterPredicate toFilter() {
-            return new FilterPredicate( propertyName, FilterOperator.EQUAL, "*" );
-        }
-
-
-        @Override
-        public boolean equals( Object o ) {
-            if ( this == o ) {
-                return true;
-            }
-            if ( ( o == null ) || ( super.getClass() != o.getClass() ) ) {
-                return false;
-            }
-
-            SortPredicate that = ( SortPredicate ) o;
-
-            if ( direction != that.direction ) {
-                return false;
-            }
-
-            return ( propertyName.equals( that.propertyName ) );
-        }
-
-
-        @Override
-        public int hashCode() {
-            int result = propertyName.hashCode();
-            result = ( 31 * result ) + direction.hashCode();
-            return result;
-        }
-
-
-        @Override
-        public String toString() {
-            return propertyName + ( ( direction == Query.SortDirection.DESCENDING ) ? " DESC" : "" );
-        }
-    }
-
-
-    public static final class FilterPredicate implements Serializable {
-        private static final long serialVersionUID = 1L;
-        private final String propertyName;
-        private final Query.FilterOperator operator;
-        private final Object value;
-        private String cursor;
-
-
-        @SuppressWarnings({ "rawtypes", "unchecked" })
-        public FilterPredicate( String propertyName, Query.FilterOperator operator, Object value ) {
-            if ( propertyName == null ) {
-                throw new NullPointerException( "Property name was null" );
-            }
-            if ( operator == null ) {
-                throw new NullPointerException( "Operator was null" );
-            }
-            if ( ( operator == Query.FilterOperator.IN ) || ( operator == Query.FilterOperator.WITHIN ) ) {
-                if ( ( !( value instanceof Collection ) ) && ( value instanceof Iterable ) ) {
-                    List newValue = new ArrayList();
-                    for ( Iterator i$ = ( ( Iterable ) value ).iterator(); i$.hasNext(); ) {
-                        Object val = i$.next();
-                        newValue.add( val );
-                    }
-                    value = newValue;
-                }
-                // DataTypeUtils.checkSupportedValue(propertyName, value, true,
-                // true);
-            }
-            else {
-                // DataTypeUtils.checkSupportedValue(propertyName, value, false,
-                // false);
-            }
-            this.propertyName = propertyName;
-            this.operator = operator;
-            this.value = value;
-        }
-
-
-        public FilterPredicate( String propertyName, String operator, String value, String secondValue,
-                                String thirdValue ) {
-            this.propertyName = propertyName;
-            this.operator = FilterOperator.find( operator );
-            Object first_obj = parseValue( value, 0 );
-            Object second_obj = parseValue( secondValue, 0 );
-            Object third_obj = parseValue( thirdValue, 0 );
-            if ( second_obj != null ) {
-                if ( third_obj != null ) {
-                    this.value = Arrays.asList( first_obj, second_obj, third_obj );
-                }
-                else {
-                    this.value = Arrays.asList( first_obj, second_obj );
-                }
-            }
-            else {
-                this.value = first_obj;
-            }
-        }
-
-
-        public FilterPredicate( String propertyName, String operator, String value, int valueType, String secondValue,
-                                int secondValueType, String thirdValue, int thirdValueType ) {
-            this.propertyName = propertyName;
-            this.operator = FilterOperator.find( operator );
-            Object first_obj = parseValue( value, valueType );
-            Object second_obj = parseValue( secondValue, secondValueType );
-            Object third_obj = parseValue( thirdValue, thirdValueType );
-            if ( second_obj != null ) {
-                if ( third_obj != null ) {
-                    this.value = Arrays.asList( first_obj, second_obj, third_obj );
-                }
-                else {
-                    this.value = Arrays.asList( first_obj, second_obj );
-                }
-            }
-            else {
-                this.value = first_obj;
-            }
-        }
-
-
-        private static Object parseValue( String val, int valueType ) {
-            if ( val == null ) {
-                return null;
-            }
-
-            if ( val.startsWith( "'" ) && ( val.length() > 1 ) ) {
-                return val.substring( 1, val.length() - 1 );
-            }
-
-            if ( val.equalsIgnoreCase( "true" ) || val.equalsIgnoreCase( "false" ) ) {
-                return Boolean.valueOf( val );
-            }
-
-            if ( val.length() == 36 ) {
-                try {
-                    return UUID.fromString( val );
-                }
-                catch ( IllegalArgumentException e ) {
-                }
-            }
-
-            try {
-                return Long.valueOf( val );
-            }
-            catch ( NumberFormatException e ) {
-            }
-
-            try {
-                return Float.valueOf( val );
-            }
-            catch ( NumberFormatException e ) {
-
-            }
-
-            return null;
-        }
-
-
-        public static FilterPredicate valueOf( String str ) {
-            if ( str == null ) {
-                return null;
-            }
-            try {
-                ANTLRStringStream in = new ANTLRStringStream( str.trim() );
-                QueryFilterLexer lexer = new QueryFilterLexer( in );
-                CommonTokenStream tokens = new CommonTokenStream( lexer );
-                QueryFilterParser parser = new QueryFilterParser( tokens );
-                FilterPredicate filter = parser.filter();
-                return normalize( filter );
-            }
-            catch ( Exception e ) {
-                logger.error( "Unable to parse \"" + str + "\"", e );
-            }
-            return null;
-        }
-
-
-        public static FilterPredicate normalize( FilterPredicate p ) {
-            if ( p == null ) {
-                return null;
-            }
-            if ( p.operator == FilterOperator.CONTAINS ) {
-                String propertyName = appendSuffix( p.propertyName, "keywords" );
-                return new FilterPredicate( propertyName, FilterOperator.EQUAL, p.value );
-            }
-            else if ( p.operator == FilterOperator.WITHIN ) {
-                String propertyName = appendSuffix( p.propertyName, "coordinates" );
-                return new FilterPredicate( propertyName, FilterOperator.WITHIN, p.value );
-            }
-
-            return p;
-        }
-
-
-        private static String appendSuffix( String str, String suffix ) {
-            if ( StringUtils.isNotEmpty( str ) ) {
-                if ( !str.endsWith( "." + suffix ) ) {
-                    str += "." + suffix;
-                }
-            }
-            else {
-                str = suffix;
-            }
-            return str;
-        }
-
-
-        public String getPropertyName() {
-            return propertyName;
-        }
-
-
-        public Query.FilterOperator getOperator() {
-            return operator;
-        }
-
-
-        public Object getValue() {
-            return value;
-        }
-
-
-        @SuppressWarnings("unchecked")
-        public Object getStartValue() {
-            if ( value instanceof List ) {
-                List<Object> l = ( List<Object> ) value;
-                return l.get( 0 );
-            }
-            if ( ( operator == FilterOperator.GREATER_THAN ) || ( operator == FilterOperator.GREATER_THAN_OR_EQUAL )
-                    || ( operator == FilterOperator.EQUAL ) ) {
-                return value;
-            }
-            else {
-                return null;
-            }
-        }
-
-
-        @SuppressWarnings("unchecked")
-        public Object getFinishValue() {
-            if ( value instanceof List ) {
-                List<Object> l = ( List<Object> ) value;
-                if ( l.size() > 1 ) {
-                    return l.get( 1 );
-                }
-                return null;
-            }
-            if ( ( operator == FilterOperator.LESS_THAN ) || ( operator == FilterOperator.LESS_THAN_OR_EQUAL ) || (
-                    operator == FilterOperator.EQUAL ) ) {
-                return value;
-            }
-            else {
-                return null;
-            }
-        }
-
-
-        public void setCursor( String cursor ) {
-            this.cursor = cursor;
-        }
-
-
-        public String getCursor() {
-            return cursor;
-        }
-
-
-        @Override
-        public int hashCode() {
-            final int prime = 31;
-            int result = 1;
-            result = ( prime * result ) + ( ( operator == null ) ? 0 : operator.hashCode() );
-            result = ( prime * result ) + ( ( propertyName == null ) ? 0 : propertyName.hashCode() );
-            result = ( prime * result ) + ( ( value == null ) ? 0 : value.hashCode() );
-            return result;
-        }
-
-
-        @Override
-        public boolean equals( Object obj ) {
-            if ( this == obj ) {
-                return true;
-            }
-            if ( obj == null ) {
-                return false;
-            }
-            if ( getClass() != obj.getClass() ) {
-                return false;
-            }
-            FilterPredicate other = ( FilterPredicate ) obj;
-            if ( operator != other.operator ) {
-                return false;
-            }
-            if ( propertyName == null ) {
-                if ( other.propertyName != null ) {
-                    return false;
-                }
-            }
-            else if ( !propertyName.equals( other.propertyName ) ) {
-                return false;
-            }
-            if ( value == null ) {
-                if ( other.value != null ) {
-                    return false;
-                }
-            }
-            else if ( !value.equals( other.value ) ) {
-                return false;
-            }
-            return true;
-        }
-
-
-        @Override
-        public String toString() {
-            String valueStr = "\'\'";
-            if ( value != null ) {
-                if ( value instanceof String ) {
-                    valueStr = "\'" + value + "\'";
-                }
-                else {
-                    valueStr = value.toString();
-                }
-            }
-            return propertyName + " " + operator.toString() + " " + valueStr;
-        }
-    }
-
-
-    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 = 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.getKey(), false );
-                    if ( obj == null ) {
-                        obj = "";
-                    }
-                    else {
-                        include = true;
-                    }
-                    result.put( select.getValue(), 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 ) {
-                        obj = "";
-                    }
-                    else {
-                        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;
-    }
-}


[06/96] [abbrv] [partial] Change package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/OrderByIterator.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/OrderByIterator.java b/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/OrderByIterator.java
deleted file mode 100644
index 1c1bc31..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/OrderByIterator.java
+++ /dev/null
@@ -1,252 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.query.ir.result;
-
-
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeSet;
-import java.util.UUID;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.usergrid.persistence.Entity;
-import org.usergrid.persistence.EntityManager;
-import org.usergrid.persistence.EntityPropertyComparator;
-import org.usergrid.persistence.Query;
-import org.usergrid.persistence.Query.SortPredicate;
-import org.usergrid.persistence.cassandra.CursorCache;
-import org.usergrid.persistence.query.ir.QuerySlice;
-
-import org.apache.commons.collections.comparators.ComparatorChain;
-
-import me.prettyprint.cassandra.serializers.UUIDSerializer;
-
-
-/**
- * 1) Take a result set iterator as the child 2) Iterate only over candidates and create a cursor from the candidates
- *
- * @author tnine
- */
-
-public class OrderByIterator extends MergeIterator {
-
-    private static final UUIDSerializer UUID_SER = new UUIDSerializer();
-
-    private static final String NAME_UUID = "uuid";
-    private static final Logger logger = LoggerFactory.getLogger( OrderByIterator.class );
-    private final QuerySlice slice;
-    private final ResultIterator candidates;
-    private final ComparatorChain subSortCompare;
-    private final List<String> secondaryFields;
-    private final EntityManager em;
-
-    //our last result from in memory sorting
-    private SortedEntitySet entries;
-
-
-    /**
-     * @param pageSize
-     */
-    public OrderByIterator( QuerySlice slice, List<Query.SortPredicate> secondary, ResultIterator candidates,
-                            EntityManager em, int pageSize ) {
-        super( pageSize );
-        this.slice = slice;
-        this.em = em;
-        this.candidates = candidates;
-        this.subSortCompare = new ComparatorChain();
-        this.secondaryFields = new ArrayList<String>( 1 + secondary.size() );
-
-        //add the sort of the primary column
-        this.secondaryFields.add( slice.getPropertyName() );
-        this.subSortCompare
-                .addComparator( new EntityPropertyComparator( slice.getPropertyName(), slice.isReversed() ) );
-
-        for ( SortPredicate sort : secondary ) {
-            this.subSortCompare.addComparator( new EntityPropertyComparator( sort.getPropertyName(),
-                    sort.getDirection() == Query.SortDirection.DESCENDING ) );
-            this.secondaryFields.add( sort.getPropertyName() );
-        }
-
-        //do uuid sorting last, this way if all our previous sorts are equal, we'll have a reproducible sort order for
-        // paging
-        this.secondaryFields.add( NAME_UUID );
-        this.subSortCompare.addComparator( new EntityPropertyComparator( NAME_UUID, false ) );
-    }
-
-
-    @Override
-    protected Set<ScanColumn> advance() {
-
-        ByteBuffer cursor = slice.getCursor();
-
-        UUID minEntryId = null;
-
-        if ( cursor != null ) {
-            minEntryId = UUID_SER.fromByteBuffer( cursor );
-        }
-
-        entries = new SortedEntitySet( subSortCompare, em, secondaryFields, pageSize, minEntryId );
-
-        /**
-         *  keep looping through our peek iterator.  We need to inspect each forward page to ensure we have performed a
-         *  seek to the end of our primary range.  Otherwise we need to keep aggregating. I.E  if the value is a boolean
-         *  and we order by "true
-         *  asc, timestamp desc" we must load every entity that has the value "true" before sub sorting,
-         *  then drop all values that fall out of the sort.
-         */
-        while ( candidates.hasNext() ) {
-
-
-            for ( ScanColumn id : candidates.next() ) {
-                entries.add( id );
-            }
-
-            entries.load();
-        }
-
-
-        return entries.toIds();
-    }
-
-
-    @Override
-    protected void doReset() {
-        // no op
-    }
-
-
-    @Override
-    public void finalizeCursor( CursorCache cache, UUID lastValue ) {
-        int sliceHash = slice.hashCode();
-
-        ByteBuffer bytes = UUID_SER.toByteBuffer( lastValue );
-
-        if ( bytes == null ) {
-            return;
-        }
-
-        cache.setNextCursor( sliceHash, bytes );
-    }
-
-
-    /** A Sorted set with a max size. When a new entry is added, the max is removed */
-    public static final class SortedEntitySet extends TreeSet<Entity> {
-
-        private final int maxSize;
-        private final Map<UUID, ScanColumn> cursorVal = new HashMap<UUID, ScanColumn>();
-        private final EntityManager em;
-        private final List<String> fields;
-        private final Entity minEntity;
-        private final Comparator<Entity> comparator;
-
-
-        public SortedEntitySet( Comparator<Entity> comparator, EntityManager em, List<String> fields, int maxSize,
-                                UUID minEntityId ) {
-            super( comparator );
-            this.maxSize = maxSize;
-            this.em = em;
-            this.fields = fields;
-            this.comparator = comparator;
-            this.minEntity = getPartialEntity( minEntityId );
-        }
-
-
-        @Override
-        public boolean add( Entity entity ) {
-
-            // don't add this entity.  We get it in our scan range, but it's <= the minimum value that
-            //should be allowed in the result set
-            if ( minEntity != null && comparator.compare( entity, minEntity ) <= 0 ) {
-                return false;
-            }
-
-            boolean added = super.add( entity );
-
-            while ( size() > maxSize ) {
-                //remove our last element, we're over size
-                Entity e = this.pollLast();
-                //remove it from the cursors as well
-                cursorVal.remove( e.getUuid() );
-            }
-
-            return added;
-        }
-
-
-        /** add the id to be loaded, and the dynamiccomposite column that belongs with it */
-        public void add( ScanColumn col ) {
-            cursorVal.put( col.getUUID(), col );
-        }
-
-
-        private Entity getPartialEntity( UUID minEntityId ) {
-            List<Entity> entities;
-
-            try {
-                entities = em.getPartialEntities( Collections.singletonList( minEntityId ), fields );
-            }
-            catch ( Exception e ) {
-                logger.error( "Unable to load partial entities", e );
-                throw new RuntimeException( e );
-            }
-
-            if ( entities == null || entities.size() == 0 ) {
-                return null;
-            }
-
-            return entities.get( 0 );
-        }
-
-
-        public void load() {
-            try {
-                for ( Entity e : em.getPartialEntities( cursorVal.keySet(), fields ) ) {
-                    add( e );
-                }
-            }
-            catch ( Exception e ) {
-                logger.error( "Unable to load partial entities", e );
-                throw new RuntimeException( e );
-            }
-        }
-
-
-        /** Turn our sorted entities into a set of ids */
-        public Set<ScanColumn> toIds() {
-            Iterator<Entity> itr = iterator();
-
-            Set<ScanColumn> columns = new LinkedHashSet<ScanColumn>( this.size() );
-
-            while ( itr.hasNext() ) {
-
-                UUID id = itr.next().getUuid();
-
-                columns.add( cursorVal.get( id ) );
-            }
-
-            return columns;
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/ResultIterator.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/ResultIterator.java b/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/ResultIterator.java
deleted file mode 100644
index 5b3e666..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/ResultIterator.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.query.ir.result;
-
-
-import java.util.Iterator;
-import java.util.Set;
-import java.util.UUID;
-
-import org.usergrid.persistence.cassandra.CursorCache;
-
-
-/**
- * Interface for iterating slice results per node.  This is to be used to iterate and join or intersect values Each
- * iterator element is a set.  Each set size is determined by the underlying implementation.  When no sets of uuids are
- * left the iterator should fail the next statement.  Note that you should not rely on the returned set being exactly
- * the same size as the specified page size.  Valid sets can be returned with size >= that of the set value in the
- * underlying implementation
- *
- * @author tnine
- */
-public interface ResultIterator extends Iterable<Set<ScanColumn>>, Iterator<Set<ScanColumn>> {
-
-
-    /** Reset this iterator to the start to begin iterating again */
-    public void reset();
-
-    /** Finalize the cursor for this results.  Pass in the uuid of the last entity loaded. */
-    public void finalizeCursor( CursorCache cache, UUID lastValue );
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/ResultsLoader.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/ResultsLoader.java b/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/ResultsLoader.java
deleted file mode 100644
index d7a925a..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/ResultsLoader.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.query.ir.result;
-
-
-import java.util.List;
-
-import org.usergrid.persistence.Results;
-
-
-/** @author tnine */
-public interface ResultsLoader {
-
-    /** Load results from the list of uuids.  Should return a Results entity where the query cursor can be set */
-    public Results getResults( List<ScanColumn> entityIds ) throws Exception;
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/ResultsLoaderFactory.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/ResultsLoaderFactory.java b/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/ResultsLoaderFactory.java
deleted file mode 100644
index a6ab352..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/ResultsLoaderFactory.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package org.usergrid.persistence.query.ir.result;
-
-
-import org.usergrid.persistence.EntityManager;
-import org.usergrid.persistence.Query;
-import org.usergrid.persistence.Results;
-
-
-/**
- *
- * @author: tnine
- *
- */
-public interface ResultsLoaderFactory {
-
-    /**
-     * Get the results loaded that will load all Ids given the results level.  The original query and the entity manager
-     * may be needed to load these results
-     */
-    public ResultsLoader getResultsLoader( EntityManager em, Query query, Results.Level level );
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/ScanColumn.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/ScanColumn.java b/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/ScanColumn.java
deleted file mode 100644
index 6d20f92..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/ScanColumn.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package org.usergrid.persistence.query.ir.result;
-
-
-import java.nio.ByteBuffer;
-import java.util.UUID;
-
-
-/** An interface that represents a column */
-public interface ScanColumn {
-
-    /** Get the uuid from the column */
-    public UUID getUUID();
-
-    /** Get the cursor value of this column */
-    public ByteBuffer getCursorValue();
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/ScanColumnTransformer.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/ScanColumnTransformer.java b/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/ScanColumnTransformer.java
deleted file mode 100644
index fc9b529..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/ScanColumnTransformer.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package org.usergrid.persistence.query.ir.result;
-
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-import java.util.UUID;
-
-
-/** Simple utility to convert Scan Columns collections to lists */
-public class ScanColumnTransformer {
-
-    public static List<UUID> getIds( Collection<ScanColumn> cols ) {
-
-        List<UUID> ids = new ArrayList<UUID>( cols.size() );
-
-        for ( ScanColumn col : cols ) {
-            ids.add( col.getUUID() );
-        }
-
-        return ids;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/SecondaryIndexSliceParser.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/SecondaryIndexSliceParser.java b/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/SecondaryIndexSliceParser.java
deleted file mode 100644
index f003c96..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/SecondaryIndexSliceParser.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.query.ir.result;
-
-
-import java.nio.ByteBuffer;
-import java.util.UUID;
-
-import me.prettyprint.hector.api.beans.DynamicComposite;
-
-
-/**
- * Parser for reading and writing secondary index composites
- *
- * @author tnine
- */
-public class SecondaryIndexSliceParser implements SliceParser {
-
-
-    /* (non-Javadoc)
-     * @see org.usergrid.persistence.query.ir.result.SliceParser#parse(java.nio.ByteBuffer)
-     */
-    @Override
-    public ScanColumn parse( ByteBuffer buff ) {
-        DynamicComposite composite = DynamicComposite.fromByteBuffer( buff.duplicate() );
-
-        return new SecondaryIndexColumn( ( UUID ) composite.get( 2 ), composite.get( 1 ), buff );
-    }
-
-
-    public static class SecondaryIndexColumn extends AbstractScanColumn {
-
-        private final Object value;
-
-
-        public SecondaryIndexColumn( UUID uuid, Object value, ByteBuffer buff ) {
-            super( uuid, buff );
-            this.value = value;
-        }
-
-
-        /** Get the value from the node */
-        public Object getValue() {
-            return this.value;
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/SliceIterator.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/SliceIterator.java b/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/SliceIterator.java
deleted file mode 100644
index 6cc833d..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/SliceIterator.java
+++ /dev/null
@@ -1,251 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.query.ir.result;
-
-
-import java.nio.ByteBuffer;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.LinkedHashSet;
-import java.util.Set;
-import java.util.UUID;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.usergrid.persistence.cassandra.CursorCache;
-import org.usergrid.persistence.cassandra.index.IndexScanner;
-import org.usergrid.persistence.exceptions.QueryIterationException;
-import org.usergrid.persistence.query.ir.QuerySlice;
-
-import me.prettyprint.hector.api.beans.HColumn;
-
-
-/**
- * An iterator that will take all slices and order them correctly
- *
- * @author tnine
- */
-public class SliceIterator implements ResultIterator {
-
-    private static final Logger logger = LoggerFactory.getLogger( SliceIterator.class );
-
-    private final LinkedHashMap<UUID, ScanColumn> cols;
-    private final QuerySlice slice;
-    private final SliceParser parser;
-    private final IndexScanner scanner;
-    private final int pageSize;
-    private final boolean skipFirst;
-
-    /**
-     * Pointer to the uuid set until it's returned
-     */
-    private Set<ScanColumn> lastResult;
-
-    /**
-     * The pointer to the last set of parsed columns
-     */
-    private Set<ScanColumn> parsedCols;
-
-    /**
-     * counter that's incremented as we load pages. If pages loaded = 1 when reset, we don't have to reload from cass
-     */
-    private int pagesLoaded = 0;
-
-    /**
-     * Pointer to the last column we parsed
-     */
-    private ScanColumn last;
-
-
-    /**
-     * @param scanner The scanner to use to read the cols
-     * @param slice The slice used in the scanner
-     * @param parser The parser for the scanner results
-     * @param skipFirst True if the first record should be skipped, used with cursors
-     */
-    public SliceIterator( QuerySlice slice, IndexScanner scanner, SliceParser parser, boolean skipFirst ) {
-        this.slice = slice;
-        this.parser = parser;
-        this.scanner = scanner;
-        this.skipFirst = skipFirst;
-        this.pageSize = scanner.getPageSize();
-        this.cols = new LinkedHashMap<UUID, ScanColumn>( this.pageSize );
-        this.parsedCols = new LinkedHashSet<ScanColumn>( this.pageSize );
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see java.lang.Iterable#iterator()
-     */
-    @Override
-    public Iterator<Set<ScanColumn>> iterator() {
-        return this;
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see java.util.Iterator#hasNext()
-     */
-    @Override
-    public boolean hasNext() {
-        if ( lastResult == null ) {
-            return load();
-        }
-
-        return true;
-    }
-
-
-    private boolean load() {
-        if ( !scanner.hasNext() ) {
-            return false;
-        }
-
-        Iterator<HColumn<ByteBuffer, ByteBuffer>> results = scanner.next().iterator();
-
-        cols.clear();
-
-        /**
-         * Skip the first value, it's from the previous cursor
-         */
-        if ( skipFirst && pagesLoaded == 0 && results.hasNext() ) {
-            results.next();
-        }
-
-        parsedCols.clear();
-
-        while ( results.hasNext() ) {
-
-            ByteBuffer colName = results.next().getName().duplicate();
-
-            ScanColumn parsed = parser.parse( colName );
-
-            //skip this value, the parser has discarded it
-            if ( parsed == null ) {
-                continue;
-            }
-
-            last = parsed;
-            cols.put( parsed.getUUID(), parsed );
-            parsedCols.add( parsed );
-        }
-
-
-        pagesLoaded++;
-
-        lastResult = parsedCols;
-
-        return lastResult != null && lastResult.size() > 0;
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see java.util.Iterator#next()
-     */
-    @Override
-    public Set<ScanColumn> next() {
-        Set<ScanColumn> temp = lastResult;
-        lastResult = null;
-        return temp;
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see java.util.Iterator#remove()
-     */
-    @Override
-    public void remove() {
-        throw new UnsupportedOperationException( "Remove is not supported" );
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see org.usergrid.persistence.query.ir.result.ResultIterator#reset()
-     */
-    @Override
-    public void reset() {
-        // Do nothing, we'll just return the first page again
-        if ( pagesLoaded == 1 ) {
-            lastResult = parsedCols;
-            return;
-        }
-        scanner.reset();
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see
-     * org.usergrid.persistence.query.ir.result.ResultIterator#finalizeCursor()
-     */
-    @Override
-    public void finalizeCursor( CursorCache cache, UUID lastLoaded ) {
-        final int sliceHash = slice.hashCode();
-
-        ByteBuffer bytes = null;
-
-        ScanColumn col = cols.get( lastLoaded );
-
-
-        //the column came from the current page
-        if ( col != null ) {
-            bytes = col.getCursorValue();
-        }
-        else {
-
-            //check if we reached the end of our iterator.  If we did, set the last value into the cursor.  Otherwise
-            //this is a bug
-            if ( scanner.hasNext() ) {
-                logger.error(
-                        "An iterator attempted to access a slice that was not iterated over.  This will result in the" +
-                                " cursor construction failing" );
-                throw new QueryIterationException(
-                        "An iterator attempted to access a slice that was not iterated over.  This will result in the" +
-                                " cursor construction failing" );
-            }
-
-            final ByteBuffer sliceCursor = slice.getCursor();
-
-            //we've never loaded anything, just re-use the existing slice
-            if (last == null && sliceCursor != null ) {
-                bytes = sliceCursor;
-            }
-
-            //use the last column we loaded.  This way our scan returns nothing next time since start == finish
-            else if(last != null) {
-                bytes = last.getCursorValue();
-            }
-        }
-
-
-        if ( bytes == null ) {
-            return;
-        }
-
-        cache.setNextCursor( sliceHash, bytes );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/SliceParser.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/SliceParser.java b/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/SliceParser.java
deleted file mode 100644
index 9fd3c71..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/SliceParser.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.query.ir.result;
-
-
-import java.nio.ByteBuffer;
-
-
-/**
- * Interface to parse and compare range slices
- *
- * @author tnine
- */
-public interface SliceParser {
-
-    /** Parse the slice and return it's parse type.  If null is returned, the column should be considered discarded */
-    public ScanColumn parse( ByteBuffer buff );
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/StaticIdIterator.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/StaticIdIterator.java b/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/StaticIdIterator.java
deleted file mode 100644
index 6ca1e89..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/StaticIdIterator.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package org.usergrid.persistence.query.ir.result;
-
-
-import java.nio.ByteBuffer;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.Set;
-import java.util.UUID;
-
-import org.usergrid.persistence.cassandra.CursorCache;
-
-
-/** Simple iterator that just returns UUIDs that are set into it */
-public class StaticIdIterator implements ResultIterator {
-
-    private final Set<ScanColumn> ids;
-
-    private boolean returnedOnce = false;
-
-
-    /**
-     *
-     */
-    public StaticIdIterator( UUID id ) {
-        final ScanColumn col = new UUIDIndexSliceParser.UUIDColumn( id, ByteBuffer.allocate( 0 ) );
-
-        ids = Collections.singleton( col );
-    }
-
-
-    @Override
-    public void reset() {
-        //no op
-    }
-
-
-    @Override
-    public void finalizeCursor( CursorCache cache, UUID lastValue ) {
-        //no cursor, it's a static list
-    }
-
-
-    @Override
-    public Iterator<Set<ScanColumn>> iterator() {
-        return this;
-    }
-
-
-    @Override
-    public boolean hasNext() {
-        return !returnedOnce;
-    }
-
-
-    @Override
-    public Set<ScanColumn> next() {
-        returnedOnce = true;
-        return ids;
-    }
-
-
-    @Override
-    public void remove() {
-        throw new UnsupportedOperationException( "This iterator does not support remove" );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/SubtractionIterator.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/SubtractionIterator.java b/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/SubtractionIterator.java
deleted file mode 100644
index b654496..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/SubtractionIterator.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.query.ir.result;
-
-
-import java.util.LinkedHashSet;
-import java.util.Set;
-import java.util.UUID;
-
-import org.usergrid.persistence.cassandra.CursorCache;
-
-import com.google.common.collect.Sets;
-
-
-/**
- * Simple iterator to perform Unions
- *
- * @author tnine
- */
-public class SubtractionIterator extends MergeIterator {
-
-    private ResultIterator keepIterator;
-    private ResultIterator subtractIterator;
-
-
-    public SubtractionIterator( int pageSize ) {
-        super( pageSize );
-    }
-
-
-    /** @param subtractIterator the subtractIterator to set */
-    public void setSubtractIterator( ResultIterator subtractIterator ) {
-        this.subtractIterator = subtractIterator;
-    }
-
-
-    /** @param keepIterator the keepIterator to set */
-    public void setKeepIterator( ResultIterator keepIterator ) {
-        this.keepIterator = keepIterator;
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see org.usergrid.persistence.query.ir.result.ResultIterator#reset()
-     */
-    @Override
-    public void doReset() {
-        keepIterator.reset();
-        subtractIterator.reset();
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see org.usergrid.persistence.query.ir.result.MergeIterator#advance()
-     */
-    @Override
-    protected Set<ScanColumn> advance() {
-        if ( !keepIterator.hasNext() ) {
-            return null;
-        }
-
-        Set<ScanColumn> results = new LinkedHashSet<ScanColumn>( pageSize );
-
-        while ( keepIterator.hasNext() && results.size() < pageSize ) {
-
-            Set<ScanColumn> keepPage = keepIterator.next();
-
-            while ( subtractIterator.hasNext() && keepPage.size() > 0 ) {
-                keepPage = Sets.difference( keepPage, subtractIterator.next() );
-            }
-
-            subtractIterator.reset();
-
-            results.addAll( keepPage );
-        }
-
-        return results;
-    }
-
-
-    /* (non-Javadoc)
-     * @see org.usergrid.persistence.query.ir.result.ResultIterator#finalizeCursor(org.usergrid.persistence.cassandra
-     * .CursorCache)
-     */
-    @Override
-    public void finalizeCursor( CursorCache cache, UUID lastLoaded ) {
-        //we can only keep a cursor on our keep result set, we must subtract from every page of keep when loading
-        // results
-        keepIterator.finalizeCursor( cache, lastLoaded );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/UUIDIndexSliceParser.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/UUIDIndexSliceParser.java b/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/UUIDIndexSliceParser.java
deleted file mode 100644
index c3278de..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/UUIDIndexSliceParser.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.query.ir.result;
-
-
-import java.nio.ByteBuffer;
-import java.util.UUID;
-
-import me.prettyprint.cassandra.serializers.UUIDSerializer;
-
-
-/**
- * Parser for reading and writing secondary index composites
- *
- * @author tnine
- */
-public class UUIDIndexSliceParser implements SliceParser {
-
-    private static final UUIDSerializer SERIALIZER = UUIDSerializer.get();
-
-
-    /* (non-Javadoc)
-     * @see org.usergrid.persistence.query.ir.result.SliceParser#parse(java.nio.ByteBuffer)
-     */
-    @Override
-    public ScanColumn parse( ByteBuffer buff ) {
-        return new UUIDColumn( SERIALIZER.fromByteBuffer( buff.duplicate() ), buff );
-    }
-
-
-    public static class UUIDColumn extends AbstractScanColumn {
-
-        public UUIDColumn( UUID uuid, ByteBuffer buffer ) {
-            super( uuid, buffer );
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/UnionIterator.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/UnionIterator.java b/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/UnionIterator.java
deleted file mode 100644
index 00e90b8..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/ir/result/UnionIterator.java
+++ /dev/null
@@ -1,252 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.query.ir.result;
-
-
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.UUID;
-
-import org.usergrid.persistence.cassandra.CursorCache;
-import org.usergrid.utils.UUIDUtils;
-
-import me.prettyprint.cassandra.serializers.UUIDSerializer;
-
-
-/**
- * Simple iterator to perform Unions
- *
- * @author tnine
- */
-public class UnionIterator extends MultiIterator {
-
-    private static final ScanColumnComparator COMP = new ScanColumnComparator();
-
-    private static final UUIDSerializer UUID_SERIALIZER = UUIDSerializer.get();
-
-
-    private SortedColumnList list;
-
-    private final int id;
-
-
-    /**
-     * @param pageSize The page size to return
-     * @param id The id assigned to this node
-     * @param minUuid The minimum UUID to return
-     */
-    public UnionIterator( int pageSize, int id, ByteBuffer minUuid ) {
-        super( pageSize );
-
-        this.id = id;
-
-        UUID parseMinUuid = null;
-
-        if(minUuid != null)      {
-            parseMinUuid = UUID_SERIALIZER.fromByteBuffer( minUuid );
-        }
-
-        list = new SortedColumnList( pageSize, parseMinUuid );
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see org.usergrid.persistence.query.ir.result.MergeIterator#advance()
-     */
-    @Override
-    protected Set<ScanColumn> advance() {
-
-        int size = iterators.size();
-
-        if ( size == 0 ) {
-            return null;
-        }
-
-
-        list.clear();
-
-        for ( ResultIterator itr : iterators ) {
-
-            while ( itr.hasNext() ) {
-                list.addAll( itr.next() );
-            }
-
-            itr.reset();
-        }
-
-        //mark us for the next page
-        list.mark();
-
-
-        return list.asSet();
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see
-     * org.usergrid.persistence.query.ir.result.ResultIterator#finalizeCursor(
-     * org.usergrid.persistence.cassandra.CursorCache)
-     */
-    @Override
-    public void finalizeCursor( CursorCache cache, UUID lastLoaded ) {
-
-        ByteBuffer buff = UUIDSerializer.get().toByteBuffer( lastLoaded );
-        cache.setNextCursor( id, buff );
-        //get our scan column and put them in the cache
-        //we finalize the cursor of the min
-    }
-
-
-    /**
-     * A Sorted Set with a max size. When a new entry is added, the max is removed.  You can mark the next "min" by
-     * calling the mark method.  Values > min are accepted.  Values > min and that are over size are discarded
-     */
-    public static final class SortedColumnList {
-
-        private static final ScanColumnComparator COMP = new ScanColumnComparator();
-
-        private final int maxSize;
-
-        private final List<ScanColumn> list;
-
-
-        private ScanColumn min;
-
-
-        public SortedColumnList( final int maxSize, final UUID minUuid ) {
-            //we need to allocate the extra space if required
-            this.list = new ArrayList<ScanColumn>( maxSize );
-            this.maxSize = maxSize;
-
-            if ( minUuid != null ) {
-                min = new AbstractScanColumn( minUuid, null ) {};
-            }
-        }
-
-
-        /**
-         * Add the column to this list
-         */
-        public void add( ScanColumn col ) {
-            //less than our min, don't add
-            if ( COMP.compare( min, col ) >= 0 ) {
-                return;
-            }
-
-            int index = Collections.binarySearch( this.list, col, COMP );
-
-            //already present
-            if ( index > -1 ) {
-                return;
-            }
-
-            index = ( index * -1 ) - 1;
-
-            //outside the renage
-            if ( index >= maxSize ) {
-                return;
-            }
-
-            this.list.add( index, col );
-
-            final int size = this.list.size();
-
-            if ( size > maxSize ) {
-                this.list.subList( maxSize, size ).clear();
-            }
-        }
-
-
-        /**
-         * Add all the elements to this list
-         */
-        public void addAll( final Collection<? extends ScanColumn> cols ) {
-            for ( ScanColumn col : cols ) {
-                add( col );
-            }
-        }
-
-
-        /**
-         * Returns a new list.  If no elements are present, returns null
-         */
-        public Set<ScanColumn> asSet() {
-            if ( this.list.size() == 0 ) {
-                return null;
-            }
-
-            return new LinkedHashSet<ScanColumn>( this.list );
-        }
-
-
-        /**
-         * Mark our last element in the tree as the max
-         */
-        public void mark() {
-
-            final int size = this.list.size();
-
-            //we don't have any elements in the list, and we've never set a min
-            if ( size == 0 ) {
-                return;
-            }
-
-            min = this.list.get( size - 1 );
-        }
-
-
-        /**
-         * Clear the list
-         */
-        public void clear() {
-            this.list.clear();
-        }
-    }
-
-
-    /**
-     * Simple comparator for comparing scan columns.  Orders them by time uuid
-     */
-    private static class ScanColumnComparator implements Comparator<ScanColumn> {
-
-        @Override
-        public int compare( final ScanColumn o1, final ScanColumn o2 ) {
-            if ( o1 == null ) {
-                if ( o2 == null ) {
-                    return 0;
-                }
-
-                return -1;
-            }
-
-            else if ( o2 == null ) {
-                return 1;
-            }
-
-            return UUIDUtils.compare( o1.getUUID(), o2.getUUID() );
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/tree/.gitignore
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/tree/.gitignore b/stack/core/src/main/java/org/usergrid/persistence/query/tree/.gitignore
deleted file mode 100644
index 65eb766..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/tree/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/QueryFilterLexer.java
-/QueryFilterParser.java

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/tree/AndOperand.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/tree/AndOperand.java b/stack/core/src/main/java/org/usergrid/persistence/query/tree/AndOperand.java
deleted file mode 100644
index 5bcebe0..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/tree/AndOperand.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.query.tree;
-
-
-import org.antlr.runtime.CommonToken;
-import org.antlr.runtime.Token;
-import org.usergrid.persistence.exceptions.PersistenceException;
-
-
-/** @author tnine */
-public class AndOperand extends BooleanOperand {
-
-    public AndOperand() {
-        super( new CommonToken( 0, "and" ) );
-    }
-
-
-    public AndOperand( Token t ) {
-        super( t );
-    }
-
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see
-     * org.usergrid.persistence.query.tree.Operand#visit(org.usergrid.persistence
-     * .query.tree.QueryVisitor)
-     */
-    @Override
-    public void visit( QueryVisitor visitor ) throws PersistenceException {
-        visitor.visit( this );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/tree/BooleanLiteral.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/tree/BooleanLiteral.java b/stack/core/src/main/java/org/usergrid/persistence/query/tree/BooleanLiteral.java
deleted file mode 100644
index 6dbc936..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/tree/BooleanLiteral.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.query.tree;
-
-
-import org.antlr.runtime.ClassicToken;
-import org.antlr.runtime.Token;
-
-
-/** @author tnine */
-public class BooleanLiteral extends Literal<Boolean> {
-
-    private boolean value;
-
-
-    /**
-     * @param t
-     */
-    protected BooleanLiteral( Token t ) {
-        super( t );
-        value = Boolean.valueOf( t.getText() );
-    }
-
-
-    /** The boolean literal */
-    public BooleanLiteral( boolean value ) {
-        super( new ClassicToken( 0, String.valueOf( value ) ) );
-        this.value = value;
-    }
-
-
-    public Boolean getValue() {
-        return value;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/tree/BooleanOperand.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/tree/BooleanOperand.java b/stack/core/src/main/java/org/usergrid/persistence/query/tree/BooleanOperand.java
deleted file mode 100644
index 9bc4cdd..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/tree/BooleanOperand.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.query.tree;
-
-
-import org.antlr.runtime.Token;
-
-
-/**
- * A base class for any equality expression.  Expressions must have a property and a value. Examples are >=, >, =, <,
- * <=,
- *
- * @author tnine
- */
-public abstract class BooleanOperand extends Operand {
-
-
-    /**
-     * @param property
-     * @param literal
-     */
-    public BooleanOperand( Token t ) {
-        super( t );
-    }
-
-
-    public Operand getLeft() {
-        return ( Operand ) this.children.get( 0 );
-    }
-
-
-    public Operand getRight() {
-        return ( Operand ) this.children.get( 1 );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/tree/ContainsOperand.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/tree/ContainsOperand.java b/stack/core/src/main/java/org/usergrid/persistence/query/tree/ContainsOperand.java
deleted file mode 100644
index 1b9058e..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/tree/ContainsOperand.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.query.tree;
-
-
-import org.antlr.runtime.Token;
-import org.usergrid.persistence.exceptions.PersistenceException;
-
-
-/** @author tnine */
-public class ContainsOperand extends EqualityOperand {
-
-    /**
-     * @param property
-     * @param literal
-     */
-    public ContainsOperand( Token t ) {
-        super( t );
-    }
-
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see
-     * org.usergrid.persistence.query.tree.Operand#visit(org.usergrid.persistence
-     * .query.tree.QueryVisitor)
-     */
-    @Override
-    public void visit( QueryVisitor visitor ) throws PersistenceException {
-        visitor.visit( this );
-    }
-
-
-    public StringLiteral getString() {
-        return ( StringLiteral ) getLiteral();
-    }
-
-
-    /* (non-Javadoc)
-     * @see org.usergrid.persistence.query.tree.EqualityOperand#newProperty(java.lang.String)
-     */
-    @Override
-    protected Property newProperty( String name ) {
-        return new ContainsProperty( name );
-    }
-
-
-    /* (non-Javadoc)
-     * @see org.usergrid.persistence.query.tree.EqualityOperand#getProperty()
-     */
-    @Override
-    public ContainsProperty getProperty() {
-        return ( ContainsProperty ) this.children.get( 0 );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/tree/ContainsProperty.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/tree/ContainsProperty.java b/stack/core/src/main/java/org/usergrid/persistence/query/tree/ContainsProperty.java
deleted file mode 100644
index 2d13487..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/tree/ContainsProperty.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.query.tree;
-
-
-import org.antlr.runtime.ClassicToken;
-import org.antlr.runtime.Token;
-
-
-/**
- * A property for full text searching that requires special renaming
- *
- * @author tnine
- */
-public class ContainsProperty extends Property {
-
-    private String indexedName = null;
-
-
-    public ContainsProperty( Token t ) {
-        super( t );
-        this.indexedName = String.format( "%s.keywords", super.getValue() );
-    }
-
-
-    public ContainsProperty( String property ) {
-        this( new ClassicToken( 0, property ) );
-    }
-
-
-    /* (non-Javadoc)
-     * @see org.usergrid.persistence.query.tree.Property#getIndexedValue()
-     */
-    @Override
-    public String getIndexedValue() {
-        return this.indexedName;
-    }
-
-
-    /** @return the property */
-    public ContainsProperty getProperty() {
-        return ( ContainsProperty ) this.children.get( 0 );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/tree/Equal.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/tree/Equal.java b/stack/core/src/main/java/org/usergrid/persistence/query/tree/Equal.java
deleted file mode 100644
index d4d3a12..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/tree/Equal.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.query.tree;
-
-
-import org.antlr.runtime.ClassicToken;
-import org.antlr.runtime.Token;
-import org.usergrid.persistence.exceptions.NoIndexException;
-
-
-/** @author tnine */
-public class Equal extends EqualityOperand {
-
-    /**
-     * @param property
-     * @param literal
-     */
-    public Equal( Token t ) {
-        super( t );
-    }
-
-
-    public Equal() {
-        super( new ClassicToken( 0, "=" ) );
-    }
-
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see
-     * org.usergrid.persistence.query.tree.Operand#visit(org.usergrid.persistence
-     * .query.tree.QueryVisitor)
-     */
-    @Override
-    public void visit( QueryVisitor visitor ) throws NoIndexException {
-        visitor.visit( this );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/tree/EqualityOperand.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/tree/EqualityOperand.java b/stack/core/src/main/java/org/usergrid/persistence/query/tree/EqualityOperand.java
deleted file mode 100644
index 93e3c37..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/tree/EqualityOperand.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.query.tree;
-
-
-import org.antlr.runtime.Token;
-
-
-/**
- * A base class for any equality expression. Expressions must have a property and a value. Examples are >=, >, =, <,
- * <=,
- *
- * @author tnine
- */
-public abstract class EqualityOperand extends Operand {
-
-    /**
-     * @param property
-     * @param literal
-     */
-    public EqualityOperand( Token t ) {
-        super( t );
-    }
-
-
-    public EqualityOperand( String propName, Literal<?> value ) {
-        super( null );
-    }
-
-
-    /** Set the property on this operand */
-    public void setProperty( String name ) {
-        setAtIndex( 0, newProperty( name ) );
-    }
-
-
-    /** Get the property to set into the equality. Allows subclasses to override the type */
-    protected Property newProperty( String name ) {
-        return new Property( name );
-    }
-
-
-    /** Set the literal on this operand from the given value */
-    public void setLiteral( Object value ) {
-        setAtIndex( 1, LiteralFactory.getLiteral( value ) );
-    }
-
-
-    /** Set the child at the specified index. If it doesn't exist, it's added until it does */
-    @SuppressWarnings("unchecked")
-    private void setAtIndex( int index, Literal<?> value ) {
-
-        if ( children == null ) {
-            children = createChildrenList();
-        }
-
-        while ( children.size() - 1 < index ) {
-            children.add( null );
-        }
-
-        setChild( index, value );
-    }
-
-
-    /** @return the property */
-    public Property getProperty() {
-        return ( Property ) this.children.get( 0 );
-    }
-
-
-    /** @return the literal */
-    public Literal<?> getLiteral() {
-        return ( Literal<?> ) this.children.get( 1 );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/tree/FloatLiteral.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/tree/FloatLiteral.java b/stack/core/src/main/java/org/usergrid/persistence/query/tree/FloatLiteral.java
deleted file mode 100644
index a1a5954..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/tree/FloatLiteral.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.query.tree;
-
-
-import org.antlr.runtime.ClassicToken;
-import org.antlr.runtime.Token;
-
-
-/** @author tnine */
-public class FloatLiteral extends Literal<Float> implements NumericLiteral {
-
-    private float value;
-
-
-    /**
-     * @param t
-     */
-    public FloatLiteral( Token t ) {
-        super( t );
-        value = Float.valueOf( t.getText() );
-    }
-
-
-    public FloatLiteral( float f ) {
-        super( new ClassicToken( 0, String.valueOf( f ) ) );
-        value = f;
-    }
-
-
-    /** @return the value */
-    public Float getValue() {
-        return value;
-    }
-
-
-    /* (non-Javadoc)
-     * @see org.usergrid.persistence.query.tree.NumericLiteral#getFloatValue()
-     */
-    @Override
-    public float getFloatValue() {
-        return value;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/tree/GreaterThan.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/tree/GreaterThan.java b/stack/core/src/main/java/org/usergrid/persistence/query/tree/GreaterThan.java
deleted file mode 100644
index 16dea4f..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/tree/GreaterThan.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.query.tree;
-
-
-import org.antlr.runtime.CommonToken;
-import org.antlr.runtime.Token;
-import org.usergrid.persistence.exceptions.NoIndexException;
-
-
-/** @author tnine */
-public class GreaterThan extends EqualityOperand {
-
-    /**
-     * @param property
-     * @param literal
-     */
-    public GreaterThan( Token t ) {
-        super( t );
-    }
-
-
-    public GreaterThan() {
-        super( new CommonToken( 0, ">" ) );
-    }
-
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see
-     * org.usergrid.persistence.query.tree.Operand#visit(org.usergrid.persistence
-     * .query.tree.QueryVisitor)
-     */
-    @Override
-    public void visit( QueryVisitor visitor ) throws NoIndexException {
-        visitor.visit( this );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/tree/GreaterThanEqual.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/tree/GreaterThanEqual.java b/stack/core/src/main/java/org/usergrid/persistence/query/tree/GreaterThanEqual.java
deleted file mode 100644
index 176c639..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/tree/GreaterThanEqual.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.query.tree;
-
-
-import org.antlr.runtime.CommonToken;
-import org.antlr.runtime.Token;
-import org.usergrid.persistence.exceptions.NoIndexException;
-
-
-/** @author tnine */
-public class GreaterThanEqual extends EqualityOperand {
-
-    /**
-     * @param property
-     * @param literal
-     */
-    public GreaterThanEqual( Token t ) {
-        super( t );
-    }
-
-
-    /**
-     * @param property
-     * @param literal
-     */
-    public GreaterThanEqual() {
-        super( new CommonToken( 0, ">=" ) );
-    }
-
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see
-     * org.usergrid.persistence.query.tree.Operand#visit(org.usergrid.persistence
-     * .query.tree.QueryVisitor)
-     */
-    @Override
-    public void visit( QueryVisitor visitor ) throws NoIndexException {
-        visitor.visit( this );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/tree/LessThan.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/tree/LessThan.java b/stack/core/src/main/java/org/usergrid/persistence/query/tree/LessThan.java
deleted file mode 100644
index 2cfb45a..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/tree/LessThan.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.query.tree;
-
-
-import org.antlr.runtime.CommonToken;
-import org.antlr.runtime.Token;
-import org.usergrid.persistence.exceptions.NoIndexException;
-
-
-/** @author tnine */
-public class LessThan extends EqualityOperand {
-
-    /**
-     * @param property
-     * @param literal
-     */
-    public LessThan( Token t ) {
-        super( t );
-    }
-
-
-    public LessThan() {
-        super( new CommonToken( 0, "<" ) );
-    }
-
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see
-     * org.usergrid.persistence.query.tree.Operand#visit(org.usergrid.persistence
-     * .query.tree.QueryVisitor)
-     */
-    @Override
-    public void visit( QueryVisitor visitor ) throws NoIndexException {
-        visitor.visit( this );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/tree/LessThanEqual.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/tree/LessThanEqual.java b/stack/core/src/main/java/org/usergrid/persistence/query/tree/LessThanEqual.java
deleted file mode 100644
index 1767727..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/tree/LessThanEqual.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.query.tree;
-
-
-import org.antlr.runtime.CommonToken;
-import org.antlr.runtime.Token;
-import org.usergrid.persistence.exceptions.NoIndexException;
-
-
-/** @author tnine */
-public class LessThanEqual extends EqualityOperand {
-
-    /**
-     * @param property
-     * @param literal
-     */
-    public LessThanEqual( Token t ) {
-        super( t );
-    }
-
-
-    /**
-     */
-    public LessThanEqual() {
-        super( new CommonToken( 0, "<=" ) );
-    }
-
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see
-     * org.usergrid.persistence.query.tree.Operand#visit(org.usergrid.persistence
-     * .query.tree.QueryVisitor)
-     */
-    @Override
-    public void visit( QueryVisitor visitor ) throws NoIndexException {
-        visitor.visit( this );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/tree/Literal.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/tree/Literal.java b/stack/core/src/main/java/org/usergrid/persistence/query/tree/Literal.java
deleted file mode 100644
index e962a59..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/tree/Literal.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.query.tree;
-
-
-import org.antlr.runtime.Token;
-import org.antlr.runtime.tree.CommonTree;
-
-
-/**
- * Abstract class for literals
- *
- * @author tnine
- */
-public abstract class Literal<V> extends CommonTree {
-
-
-    protected Literal( Token t ) {
-        super( t );
-    }
-
-
-    /** Return the value of the literal the user has passed in */
-    public abstract V getValue();
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/tree/LiteralFactory.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/tree/LiteralFactory.java b/stack/core/src/main/java/org/usergrid/persistence/query/tree/LiteralFactory.java
deleted file mode 100644
index ed93315..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/tree/LiteralFactory.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.query.tree;
-
-
-import java.util.UUID;
-
-
-/**
- * Simple factory for generating literal instance based on the runtime value
- *
- * @author tnine
- */
-public class LiteralFactory {
-
-    /** Generate the correct literal subclass based on the runtime instance. */
-    public static final Literal<?> getLiteral( Object value ) {
-        if ( value instanceof Integer ) {
-            return new LongLiteral( ( Integer ) value );
-        }
-        if ( value instanceof Long ) {
-            return new LongLiteral( ( Long ) value );
-        }
-
-        if ( value instanceof String ) {
-            return new StringLiteral( ( String ) value );
-        }
-
-        if ( value instanceof Float ) {
-            return new FloatLiteral( ( Float ) value );
-        }
-
-        if ( value instanceof UUID ) {
-            return new UUIDLiteral( ( UUID ) value );
-        }
-
-        if ( value instanceof Boolean ) {
-            return new BooleanLiteral( ( Boolean ) value );
-        }
-
-        throw new UnsupportedOperationException(
-                String.format( "Unsupported type of %s was passed when trying to construct a literal",
-                        value.getClass() ) );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/tree/LongLiteral.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/tree/LongLiteral.java b/stack/core/src/main/java/org/usergrid/persistence/query/tree/LongLiteral.java
deleted file mode 100644
index 594c0c3..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/tree/LongLiteral.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.query.tree;
-
-
-import org.antlr.runtime.ClassicToken;
-import org.antlr.runtime.Token;
-
-
-/** @author tnine */
-public class LongLiteral extends Literal<Long> implements NumericLiteral {
-
-    private long value;
-
-
-    /**
-     * @param t
-     */
-    public LongLiteral( Token t ) {
-        super( t );
-        this.value = Long.valueOf( t.getText() );
-    }
-
-
-    /**
-     *
-     * @param value
-     */
-    public LongLiteral( long value ) {
-        super( new ClassicToken( 0, String.valueOf( value ) ) );
-        this.value = value;
-    }
-
-
-    /**
-     *
-     * @return
-     */
-    public Long getValue() {
-        return this.value;
-    }
-
-
-    /* (non-Javadoc)
-     * @see org.usergrid.persistence.query.tree.NumericLiteral#getFloatValue()
-     */
-    @Override
-    public float getFloatValue() {
-        return value;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/tree/NotOperand.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/tree/NotOperand.java b/stack/core/src/main/java/org/usergrid/persistence/query/tree/NotOperand.java
deleted file mode 100644
index 895455e..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/tree/NotOperand.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.query.tree;
-
-
-import org.antlr.runtime.Token;
-import org.usergrid.persistence.exceptions.PersistenceException;
-
-
-/** @author tnine */
-public class NotOperand extends Operand {
-
-
-    public NotOperand( Token t ) {
-        super( t );
-    }
-
-
-    /** get the only child operation */
-    public Operand getOperation() {
-        return ( Operand ) this.children.get( 0 );
-    }
-
-
-    /* (non-Javadoc)
-     * @see org.usergrid.persistence.query.tree.Operand#visit(org.usergrid.persistence.query.tree.QueryVisitor)
-     */
-    @Override
-    public void visit( QueryVisitor visitor ) throws PersistenceException {
-        visitor.visit( this );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/tree/NumericLiteral.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/tree/NumericLiteral.java b/stack/core/src/main/java/org/usergrid/persistence/query/tree/NumericLiteral.java
deleted file mode 100644
index 95b2e18..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/tree/NumericLiteral.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.query.tree;
-
-
-/** @author tnine */
-public interface NumericLiteral {
-
-    /** Return the value of this numeric literal as a float */
-    public float getFloatValue();
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/tree/Operand.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/tree/Operand.java b/stack/core/src/main/java/org/usergrid/persistence/query/tree/Operand.java
deleted file mode 100644
index 23a359a..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/tree/Operand.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.query.tree;
-
-
-import org.antlr.runtime.Token;
-import org.antlr.runtime.tree.CommonTree;
-import org.usergrid.persistence.exceptions.PersistenceException;
-
-
-/**
- * Any logical operation should subclass.  Boolean logic, equality, not, contains, within and others are examples of
- * operands
- *
- * @author tnine
- */
-public abstract class Operand extends CommonTree {
-
-
-    /** Default constructor to take a token */
-    public Operand( Token t ) {
-        super( t );
-    }
-
-
-    /** Get the pointer to the parent node */
-    public Operand getParent() {
-        return ( Operand ) super.getParent();
-    }
-
-
-    /** Visitor method */
-    public abstract void visit( QueryVisitor visitor ) throws PersistenceException;
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/tree/OrOperand.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/tree/OrOperand.java b/stack/core/src/main/java/org/usergrid/persistence/query/tree/OrOperand.java
deleted file mode 100644
index a3d6ce9..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/tree/OrOperand.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.query.tree;
-
-
-import org.antlr.runtime.CommonToken;
-import org.antlr.runtime.Token;
-import org.usergrid.persistence.exceptions.PersistenceException;
-
-
-/** @author tnine */
-public class OrOperand extends BooleanOperand {
-
-    /**
-     * @param left
-     * @param token
-     * @param right
-     */
-    public OrOperand( Token t ) {
-        super( t );
-    }
-
-
-    public OrOperand() {
-        super( new CommonToken( 0, "or" ) );
-    }
-
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see
-     * org.usergrid.persistence.query.tree.Operand#visit(org.usergrid.persistence
-     * .query.tree.QueryVisitor)
-     */
-    @Override
-    public void visit( QueryVisitor visitor ) throws PersistenceException {
-        visitor.visit( this );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/tree/Property.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/tree/Property.java b/stack/core/src/main/java/org/usergrid/persistence/query/tree/Property.java
deleted file mode 100644
index 5ca11b4..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/tree/Property.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.query.tree;
-
-
-import org.antlr.runtime.ClassicToken;
-import org.antlr.runtime.Token;
-
-
-/**
- * A property
- *
- * @author tnine
- */
-public class Property extends Literal<String> {
-
-    private String property;
-
-
-    public Property( Token t ) {
-        super( t );
-        this.property = t.getText();
-    }
-
-
-    public Property( String property ) {
-        this( new ClassicToken( 0, property ) );
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see org.usergrid.persistence.query.tree.Literal#getValue()
-     */
-    @Override
-    public String getValue() {
-        return this.property;
-    }
-
-
-    /**
-     * Subclasses an override.  Indexed value could be different when stored internally.  By default returns the same
-     * property
-     */
-    public String getIndexedValue() {
-        return this.property;
-    }
-}


[89/96] [abbrv] USERGRID-2 package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/Client.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/Client.html b/sdks/android/doc/org/usergrid/android/client/Client.html
index beeba0c..eae458e 100644
--- a/sdks/android/doc/org/usergrid/android/client/Client.html
+++ b/sdks/android/doc/org/usergrid/android/client/Client.html
@@ -56,7 +56,7 @@ function windowTitle()
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 &nbsp;PREV CLASS&nbsp;
-&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../index.html?org/usergrid/android/client/Client.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="Client.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
@@ -88,12 +88,12 @@ DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client</FONT>
+org.apache.usergrid.android.client</FONT>
 <BR>
 Class Client</H2>
 <PRE>
 java.lang.Object
-  <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.usergrid.android.client.Client</B>
+  <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.usergrid.android.client.Client</B>
 </PRE>
 <HR>
 <DL>
@@ -120,7 +120,7 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>static&nbsp;interface</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A></B></CODE>
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A></B></CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -128,7 +128,7 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>static&nbsp;class</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A></B></CODE>
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A></B></CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -216,7 +216,7 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#addSubscriber(java.lang.String, java.lang.String)">addSubscriber</A></B>(java.lang.String&nbsp;publisherQueue,
               java.lang.String&nbsp;subscriberQueue)</CODE>
 
@@ -225,7 +225,7 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#addUserToGroup(java.lang.String, java.lang.String)">addUserToGroup</A></B>(java.lang.String&nbsp;userId,
                java.lang.String&nbsp;groupId)</CODE>
 
@@ -235,16 +235,16 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#addUserToGroupAsync(java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">addUserToGroupAsync</A></B>(java.lang.String&nbsp;userId,
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#addUserToGroupAsync(java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">addUserToGroupAsync</A></B>(java.lang.String&nbsp;userId,
                     java.lang.String&nbsp;groupId,
-                    <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+                    <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a user to the specified groups.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#apiRequest(org.springframework.http.HttpMethod, java.util.Map, java.lang.Object, java.lang.String...)">apiRequest</A></B>(org.springframework.http.HttpMethod&nbsp;method,
            java.util.Map&lt;java.lang.String,java.lang.Object&gt;&nbsp;params,
            java.lang.Object&nbsp;data,
@@ -255,7 +255,7 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#authorizeAppClient(java.lang.String, java.lang.String)">authorizeAppClient</A></B>(java.lang.String&nbsp;clientId,
                    java.lang.String&nbsp;clientSecret)</CODE>
 
@@ -265,16 +265,16 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#authorizeAppClientAsync(java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">authorizeAppClientAsync</A></B>(java.lang.String&nbsp;clientId,
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#authorizeAppClientAsync(java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">authorizeAppClientAsync</A></B>(java.lang.String&nbsp;clientId,
                         java.lang.String&nbsp;clientSecret,
-                        <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+                        <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Log the app in with it's client id and client secret key.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#authorizeAppUser(java.lang.String, java.lang.String)">authorizeAppUser</A></B>(java.lang.String&nbsp;email,
                  java.lang.String&nbsp;password)</CODE>
 
@@ -284,16 +284,16 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#authorizeAppUserAsync(java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">authorizeAppUserAsync</A></B>(java.lang.String&nbsp;email,
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#authorizeAppUserAsync(java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">authorizeAppUserAsync</A></B>(java.lang.String&nbsp;email,
                       java.lang.String&nbsp;password,
-                      <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+                      <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Log the user in and get a valid access token.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#authorizeAppUserViaFacebook(java.lang.String)">authorizeAppUserViaFacebook</A></B>(java.lang.String&nbsp;fb_access_token)</CODE>
 
 <BR>
@@ -303,15 +303,15 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#authorizeAppUserViaFacebookAsync(java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">authorizeAppUserViaFacebookAsync</A></B>(java.lang.String&nbsp;fb_access_token,
-                                 <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#authorizeAppUserViaFacebookAsync(java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">authorizeAppUserViaFacebookAsync</A></B>(java.lang.String&nbsp;fb_access_token,
+                                 <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Log the user in with their numeric pin-code and get a valid access token.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#authorizeAppUserViaPin(java.lang.String, java.lang.String)">authorizeAppUserViaPin</A></B>(java.lang.String&nbsp;email,
                        java.lang.String&nbsp;pin)</CODE>
 
@@ -321,16 +321,16 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#authorizeAppUserViaPinAsync(java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">authorizeAppUserViaPinAsync</A></B>(java.lang.String&nbsp;email,
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#authorizeAppUserViaPinAsync(java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">authorizeAppUserViaPinAsync</A></B>(java.lang.String&nbsp;email,
                             java.lang.String&nbsp;pin,
-                            <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+                            <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Log the user in with their numeric pin-code and get a valid access token.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#connectEntities(java.lang.String, java.lang.String, java.lang.String, java.lang.String)">connectEntities</A></B>(java.lang.String&nbsp;connectingEntityType,
                 java.lang.String&nbsp;connectingEntityId,
                 java.lang.String&nbsp;connectionType,
@@ -342,26 +342,26 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#connectEntitiesAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">connectEntitiesAsync</A></B>(java.lang.String&nbsp;connectingEntityType,
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#connectEntitiesAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">connectEntitiesAsync</A></B>(java.lang.String&nbsp;connectingEntityType,
                      java.lang.String&nbsp;connectingEntityId,
                      java.lang.String&nbsp;connectionType,
                      java.lang.String&nbsp;connectedEntityId,
-                     <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+                     <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Connect two entities together.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#createEntity(org.usergrid.android.client.entities.Entity)">createEntity</A></B>(<A HREF="../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;entity)</CODE>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#createEntity(org.apache.usergrid.android.client.entities.Entity)">createEntity</A></B>(<A HREF="../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;entity)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a new entity on the server.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#createEntity(java.util.Map)">createEntity</A></B>(java.util.Map&lt;java.lang.String,java.lang.Object&gt;&nbsp;properties)</CODE>
 
 <BR>
@@ -370,8 +370,8 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#createEntityAsync(org.usergrid.android.client.entities.Entity, org.usergrid.android.client.callbacks.ApiResponseCallback)">createEntityAsync</A></B>(<A HREF="../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;entity,
-                  <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#createEntityAsync(org.apache.usergrid.android.client.entities.Entity, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">createEntityAsync</A></B>(<A HREF="../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;entity,
+                  <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a new entity on the server.</TD>
@@ -379,15 +379,15 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#createEntityAsync(java.util.Map, org.usergrid.android.client.callbacks.ApiResponseCallback)">createEntityAsync</A></B>(java.util.Map&lt;java.lang.String,java.lang.Object&gt;&nbsp;properties,
-                  <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#createEntityAsync(java.util.Map, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">createEntityAsync</A></B>(java.util.Map&lt;java.lang.String,java.lang.Object&gt;&nbsp;properties,
+                  <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a new entity on the server from a set of properties.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#createGroup(java.lang.String)">createGroup</A></B>(java.lang.String&nbsp;groupPath)</CODE>
 
 <BR>
@@ -395,7 +395,7 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#createGroup(java.lang.String, java.lang.String)">createGroup</A></B>(java.lang.String&nbsp;groupPath,
             java.lang.String&nbsp;groupTitle)</CODE>
 
@@ -405,8 +405,8 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#createGroupAsync(java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">createGroupAsync</A></B>(java.lang.String&nbsp;groupPath,
-                 <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#createGroupAsync(java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">createGroupAsync</A></B>(java.lang.String&nbsp;groupPath,
+                 <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a group with the specified group path.</TD>
@@ -414,16 +414,16 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#createGroupAsync(java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">createGroupAsync</A></B>(java.lang.String&nbsp;groupPath,
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#createGroupAsync(java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">createGroupAsync</A></B>(java.lang.String&nbsp;groupPath,
                  java.lang.String&nbsp;groupTitle,
-                 <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+                 <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a group with the specified group path and group title.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#createUser(java.lang.String, java.lang.String, java.lang.String, java.lang.String)">createUser</A></B>(java.lang.String&nbsp;username,
            java.lang.String&nbsp;name,
            java.lang.String&nbsp;email,
@@ -435,18 +435,18 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#createUserAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">createUserAsync</A></B>(java.lang.String&nbsp;username,
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#createUserAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">createUserAsync</A></B>(java.lang.String&nbsp;username,
                 java.lang.String&nbsp;name,
                 java.lang.String&nbsp;email,
                 java.lang.String&nbsp;password,
-                <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+                <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a user.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#disconnectEntities(java.lang.String, java.lang.String, java.lang.String, java.lang.String)">disconnectEntities</A></B>(java.lang.String&nbsp;connectingEntityType,
                    java.lang.String&nbsp;connectingEntityId,
                    java.lang.String&nbsp;connectionType,
@@ -458,11 +458,11 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#disconnectEntitiesAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">disconnectEntitiesAsync</A></B>(java.lang.String&nbsp;connectingEntityType,
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#disconnectEntitiesAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">disconnectEntitiesAsync</A></B>(java.lang.String&nbsp;connectingEntityType,
                         java.lang.String&nbsp;connectingEntityId,
                         java.lang.String&nbsp;connectionType,
                         java.lang.String&nbsp;connectedEntityId,
-                        <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+                        <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Disconnect two entities.</TD>
@@ -517,7 +517,7 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;java.util.Map&lt;java.lang.String,<A HREF="../../../../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A>&gt;</CODE></FONT></TD>
+<CODE>&nbsp;java.util.Map&lt;java.lang.String,<A HREF="../../../../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A>&gt;</CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#getGroupsForUser(java.lang.String)">getGroupsForUser</A></B>(java.lang.String&nbsp;userId)</CODE>
 
 <BR>
@@ -526,15 +526,15 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#getGroupsForUserAsync(java.lang.String, org.usergrid.android.client.callbacks.GroupsRetrievedCallback)">getGroupsForUserAsync</A></B>(java.lang.String&nbsp;userId,
-                      <A HREF="../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.usergrid.android.client.callbacks">GroupsRetrievedCallback</A>&nbsp;callback)</CODE>
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#getGroupsForUserAsync(java.lang.String, org.apache.usergrid.android.client.callbacks.GroupsRetrievedCallback)">getGroupsForUserAsync</A></B>(java.lang.String&nbsp;userId,
+                      <A HREF="../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">GroupsRetrievedCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the groups for the user.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#getLoggedInUser()">getLoggedInUser</A></B>()</CODE>
 
 <BR>
@@ -542,15 +542,15 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#getMessages(java.lang.String, java.lang.String, java.util.UUID, java.lang.Long, java.lang.Integer, java.lang.Integer, java.lang.Integer, org.usergrid.android.client.Client.QueuePosition, java.lang.Boolean, java.lang.Boolean)">getMessages</A></B>(java.lang.String&nbsp;path,
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#getMessages(java.lang.String, java.lang.String, java.util.UUID, java.lang.Long, java.lang.Integer, java.lang.Integer, java.lang.Integer, org.apache.usergrid.android.client.Client.QueuePosition, java.lang.Boolean, java.lang.Boolean)">getMessages</A></B>(java.lang.String&nbsp;path,
             java.lang.String&nbsp;consumer,
             java.util.UUID&nbsp;last,
             java.lang.Long&nbsp;time,
             java.lang.Integer&nbsp;prev,
             java.lang.Integer&nbsp;next,
             java.lang.Integer&nbsp;limit,
-            <A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A>&nbsp;pos,
+            <A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A>&nbsp;pos,
             java.lang.Boolean&nbsp;update,
             java.lang.Boolean&nbsp;sync)</CODE>
 
@@ -586,22 +586,22 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#postGroupActivity(java.lang.String, org.usergrid.android.client.entities.Activity)">postGroupActivity</A></B>(java.lang.String&nbsp;groupId,
-                  <A HREF="../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>&nbsp;activity)</CODE>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#postGroupActivity(java.lang.String, org.apache.usergrid.android.client.entities.Activity)">postGroupActivity</A></B>(java.lang.String&nbsp;groupId,
+                  <A HREF="../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>&nbsp;activity)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Posts an activity to a group.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#postGroupActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.entities.User, org.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)">postGroupActivity</A></B>(java.lang.String&nbsp;verb,
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#postGroupActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.entities.User, org.apache.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)">postGroupActivity</A></B>(java.lang.String&nbsp;verb,
                   java.lang.String&nbsp;title,
                   java.lang.String&nbsp;content,
                   java.lang.String&nbsp;category,
-                  <A HREF="../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>&nbsp;user,
-                  <A HREF="../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;object,
+                  <A HREF="../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>&nbsp;user,
+                  <A HREF="../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;object,
                   java.lang.String&nbsp;objectType,
                   java.lang.String&nbsp;objectName,
                   java.lang.String&nbsp;objectContent)</CODE>
@@ -612,23 +612,23 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#postGroupActivityAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.entities.User, org.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">postGroupActivityAsync</A></B>(java.lang.String&nbsp;verb,
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#postGroupActivityAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.entities.User, org.apache.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">postGroupActivityAsync</A></B>(java.lang.String&nbsp;verb,
                        java.lang.String&nbsp;title,
                        java.lang.String&nbsp;content,
                        java.lang.String&nbsp;category,
-                       <A HREF="../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>&nbsp;user,
-                       <A HREF="../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;object,
+                       <A HREF="../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>&nbsp;user,
+                       <A HREF="../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;object,
                        java.lang.String&nbsp;objectType,
                        java.lang.String&nbsp;objectName,
                        java.lang.String&nbsp;objectContent,
-                       <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+                       <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates and posts an activity to a group.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#postMessage(java.lang.String, java.util.List)">postMessage</A></B>(java.lang.String&nbsp;path,
             java.util.List&lt;java.util.Map&lt;java.lang.String,java.lang.Object&gt;&gt;&nbsp;messages)</CODE>
 
@@ -637,7 +637,7 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#postMessage(java.lang.String, java.util.Map)">postMessage</A></B>(java.lang.String&nbsp;path,
             java.util.Map&lt;java.lang.String,java.lang.Object&gt;&nbsp;message)</CODE>
 
@@ -646,22 +646,22 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#postUserActivity(java.lang.String, org.usergrid.android.client.entities.Activity)">postUserActivity</A></B>(java.lang.String&nbsp;userId,
-                 <A HREF="../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>&nbsp;activity)</CODE>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#postUserActivity(java.lang.String, org.apache.usergrid.android.client.entities.Activity)">postUserActivity</A></B>(java.lang.String&nbsp;userId,
+                 <A HREF="../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>&nbsp;activity)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Posts an activity to a user.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#postUserActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.entities.User, org.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)">postUserActivity</A></B>(java.lang.String&nbsp;verb,
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#postUserActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.entities.User, org.apache.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)">postUserActivity</A></B>(java.lang.String&nbsp;verb,
                  java.lang.String&nbsp;title,
                  java.lang.String&nbsp;content,
                  java.lang.String&nbsp;category,
-                 <A HREF="../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>&nbsp;user,
-                 <A HREF="../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;object,
+                 <A HREF="../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>&nbsp;user,
+                 <A HREF="../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;object,
                  java.lang.String&nbsp;objectType,
                  java.lang.String&nbsp;objectName,
                  java.lang.String&nbsp;objectContent)</CODE>
@@ -672,23 +672,23 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#postUserActivityAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.entities.User, org.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">postUserActivityAsync</A></B>(java.lang.String&nbsp;verb,
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#postUserActivityAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.entities.User, org.apache.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">postUserActivityAsync</A></B>(java.lang.String&nbsp;verb,
                       java.lang.String&nbsp;title,
                       java.lang.String&nbsp;content,
                       java.lang.String&nbsp;category,
-                      <A HREF="../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>&nbsp;user,
-                      <A HREF="../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;object,
+                      <A HREF="../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>&nbsp;user,
+                      <A HREF="../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;object,
                       java.lang.String&nbsp;objectType,
                       java.lang.String&nbsp;objectName,
                       java.lang.String&nbsp;objectContent,
-                      <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+                      <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates and posts an activity to a user.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryActivityFeedForGroup(java.lang.String)">queryActivityFeedForGroup</A></B>(java.lang.String&nbsp;groupId)</CODE>
 
 <BR>
@@ -697,15 +697,15 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryActivityFeedForGroupAsync(java.lang.String, org.usergrid.android.client.callbacks.QueryResultsCallback)">queryActivityFeedForGroupAsync</A></B>(java.lang.String&nbsp;groupId,
-                               <A HREF="../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryActivityFeedForGroupAsync(java.lang.String, org.apache.usergrid.android.client.callbacks.QueryResultsCallback)">queryActivityFeedForGroupAsync</A></B>(java.lang.String&nbsp;groupId,
+                               <A HREF="../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get a group's activity feed.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryActivityFeedForUser(java.lang.String)">queryActivityFeedForUser</A></B>(java.lang.String&nbsp;userId)</CODE>
 
 <BR>
@@ -714,15 +714,15 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryActivityFeedForUserAsync(java.lang.String, org.usergrid.android.client.callbacks.QueryResultsCallback)">queryActivityFeedForUserAsync</A></B>(java.lang.String&nbsp;userId,
-                              <A HREF="../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryActivityFeedForUserAsync(java.lang.String, org.apache.usergrid.android.client.callbacks.QueryResultsCallback)">queryActivityFeedForUserAsync</A></B>(java.lang.String&nbsp;userId,
+                              <A HREF="../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get a user's activity feed.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryEntitiesRequest(org.springframework.http.HttpMethod, java.util.Map, java.lang.Object, java.lang.String...)">queryEntitiesRequest</A></B>(org.springframework.http.HttpMethod&nbsp;method,
                      java.util.Map&lt;java.lang.String,java.lang.Object&gt;&nbsp;params,
                      java.lang.Object&nbsp;data,
@@ -734,7 +734,7 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryEntitiesRequestAsync(org.usergrid.android.client.callbacks.QueryResultsCallback, org.springframework.http.HttpMethod, java.util.Map, java.lang.Object, java.lang.String...)">queryEntitiesRequestAsync</A></B>(<A HREF="../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback,
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryEntitiesRequestAsync(org.apache.usergrid.android.client.callbacks.QueryResultsCallback, org.springframework.http.HttpMethod, java.util.Map, java.lang.Object, java.lang.String...)">queryEntitiesRequestAsync</A></B>(<A HREF="../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback,
                           org.springframework.http.HttpMethod&nbsp;method,
                           java.util.Map&lt;java.lang.String,java.lang.Object&gt;&nbsp;params,
                           java.lang.Object&nbsp;data,
@@ -745,7 +745,7 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryEntityConnections(java.lang.String, java.lang.String, java.lang.String, java.lang.String)">queryEntityConnections</A></B>(java.lang.String&nbsp;connectingEntityType,
                        java.lang.String&nbsp;connectingEntityId,
                        java.lang.String&nbsp;connectionType,
@@ -757,18 +757,18 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryEntityConnectionsAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.QueryResultsCallback)">queryEntityConnectionsAsync</A></B>(java.lang.String&nbsp;connectingEntityType,
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryEntityConnectionsAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.QueryResultsCallback)">queryEntityConnectionsAsync</A></B>(java.lang.String&nbsp;connectingEntityType,
                             java.lang.String&nbsp;connectingEntityId,
                             java.lang.String&nbsp;connectionType,
                             java.lang.String&nbsp;ql,
-                            <A HREF="../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
+                            <A HREF="../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Query the connected entities.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryEntityConnectionsWithinLocation(java.lang.String, java.lang.String, java.lang.String, float, android.location.Location, java.lang.String)">queryEntityConnectionsWithinLocation</A></B>(java.lang.String&nbsp;connectingEntityType,
                                      java.lang.String&nbsp;connectingEntityId,
                                      java.lang.String&nbsp;connectionType,
@@ -782,20 +782,20 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryEntityConnectionsWithinLocationAsync(java.lang.String, java.lang.String, java.lang.String, float, android.location.Location, java.lang.String, org.usergrid.android.client.callbacks.QueryResultsCallback)">queryEntityConnectionsWithinLocationAsync</A></B>(java.lang.String&nbsp;connectingEntityType,
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryEntityConnectionsWithinLocationAsync(java.lang.String, java.lang.String, java.lang.String, float, android.location.Location, java.lang.String, org.apache.usergrid.android.client.callbacks.QueryResultsCallback)">queryEntityConnectionsWithinLocationAsync</A></B>(java.lang.String&nbsp;connectingEntityType,
                                           java.lang.String&nbsp;connectingEntityId,
                                           java.lang.String&nbsp;connectionType,
                                           float&nbsp;distance,
                                           android.location.Location&nbsp;location,
                                           java.lang.String&nbsp;ql,
-                                          <A HREF="../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
+                                          <A HREF="../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Query the connected entities within distance of a specific point.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryQueuesRequest(org.springframework.http.HttpMethod, java.util.Map, java.lang.Object, java.lang.String)">queryQueuesRequest</A></B>(org.springframework.http.HttpMethod&nbsp;method,
                    java.util.Map&lt;java.lang.String,java.lang.Object&gt;&nbsp;params,
                    java.lang.Object&nbsp;data,
@@ -806,7 +806,7 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryUsers()">queryUsers</A></B>()</CODE>
 
 <BR>
@@ -814,7 +814,7 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryUsers(java.lang.String)">queryUsers</A></B>(java.lang.String&nbsp;ql)</CODE>
 
 <BR>
@@ -823,7 +823,7 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryUsersAsync(org.usergrid.android.client.callbacks.QueryResultsCallback)">queryUsersAsync</A></B>(<A HREF="../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryUsersAsync(org.apache.usergrid.android.client.callbacks.QueryResultsCallback)">queryUsersAsync</A></B>(<A HREF="../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Perform a query of the users collection.</TD>
@@ -831,15 +831,15 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryUsersAsync(java.lang.String, org.usergrid.android.client.callbacks.QueryResultsCallback)">queryUsersAsync</A></B>(java.lang.String&nbsp;ql,
-                <A HREF="../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryUsersAsync(java.lang.String, org.apache.usergrid.android.client.callbacks.QueryResultsCallback)">queryUsersAsync</A></B>(java.lang.String&nbsp;ql,
+                <A HREF="../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Perform a query of the users collection using the provided query command.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryUsersForGroup(java.lang.String)">queryUsersForGroup</A></B>(java.lang.String&nbsp;groupId)</CODE>
 
 <BR>
@@ -848,8 +848,8 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryUsersForGroupAsync(java.lang.String, org.usergrid.android.client.callbacks.QueryResultsCallback)">queryUsersForGroupAsync</A></B>(java.lang.String&nbsp;groupId,
-                        <A HREF="../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryUsersForGroupAsync(java.lang.String, org.apache.usergrid.android.client.callbacks.QueryResultsCallback)">queryUsersForGroupAsync</A></B>(java.lang.String&nbsp;groupId,
+                        <A HREF="../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Queries the users for the specified group.</TD>
@@ -857,10 +857,10 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryUsersNearLocation(float, android.location.Location, java.lang.String, org.usergrid.android.client.callbacks.QueryResultsCallback)">queryUsersNearLocation</A></B>(float&nbsp;distance,
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryUsersNearLocation(float, android.location.Location, java.lang.String, org.apache.usergrid.android.client.callbacks.QueryResultsCallback)">queryUsersNearLocation</A></B>(float&nbsp;distance,
                        android.location.Location&nbsp;location,
                        java.lang.String&nbsp;ql,
-                       <A HREF="../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
+                       <A HREF="../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">QueryResultsCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Perform a query of the users collection within the specified distance of
@@ -868,7 +868,7 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#queryUsersWithinLocation(float, android.location.Location, java.lang.String)">queryUsersWithinLocation</A></B>(float&nbsp;distance,
                          android.location.Location&nbsp;location,
                          java.lang.String&nbsp;ql)</CODE>
@@ -879,7 +879,7 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities">Device</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities">Device</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#registerDevice(android.content.Context, java.util.Map)">registerDevice</A></B>(android.content.Context&nbsp;context,
                java.util.Map&lt;java.lang.String,java.lang.Object&gt;&nbsp;properties)</CODE>
 
@@ -889,16 +889,16 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#registerDeviceAsync(android.content.Context, java.util.Map, org.usergrid.android.client.callbacks.DeviceRegistrationCallback)">registerDeviceAsync</A></B>(android.content.Context&nbsp;context,
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#registerDeviceAsync(android.content.Context, java.util.Map, org.apache.usergrid.android.client.callbacks.DeviceRegistrationCallback)">registerDeviceAsync</A></B>(android.content.Context&nbsp;context,
                     java.util.Map&lt;java.lang.String,java.lang.Object&gt;&nbsp;properties,
-                    <A HREF="../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.usergrid.android.client.callbacks">DeviceRegistrationCallback</A>&nbsp;callback)</CODE>
+                    <A HREF="../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">DeviceRegistrationCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Registers a device using the device's unique device ID.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#removeSubscriber(java.lang.String, java.lang.String)">removeSubscriber</A></B>(java.lang.String&nbsp;publisherQueue,
                  java.lang.String&nbsp;subscriberQueue)</CODE>
 
@@ -956,14 +956,14 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#setLoggedInUser(org.usergrid.android.client.entities.User)">setLoggedInUser</A></B>(<A HREF="../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>&nbsp;loggedInUser)</CODE>
+<TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#setLoggedInUser(org.apache.usergrid.android.client.entities.User)">setLoggedInUser</A></B>(<A HREF="../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>&nbsp;loggedInUser)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#withApiUrl(java.lang.String)">withApiUrl</A></B>(java.lang.String&nbsp;apiUrl)</CODE>
 
 <BR>
@@ -971,7 +971,7 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#withApplicationId(java.lang.String)">withApplicationId</A></B>(java.lang.String&nbsp;applicationId)</CODE>
 
 <BR>
@@ -979,7 +979,7 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#withClientId(java.lang.String)">withClientId</A></B>(java.lang.String&nbsp;clientId)</CODE>
 
 <BR>
@@ -987,7 +987,7 @@ The Client class for accessing the Usergrid API. Start by instantiating this
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../org/usergrid/android/client/Client.html#withClientSecret(java.lang.String)">withClientSecret</A></B>(java.lang.String&nbsp;clientSecret)</CODE>
 
 <BR>
@@ -1143,7 +1143,7 @@ public void <B>setApiUrl</B>(java.lang.String&nbsp;apiUrl)</PRE>
 <A NAME="withApiUrl(java.lang.String)"><!-- --></A><H3>
 withApiUrl</H3>
 <PRE>
-public <A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A> <B>withApiUrl</B>(java.lang.String&nbsp;apiUrl)</PRE>
+public <A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A> <B>withApiUrl</B>(java.lang.String&nbsp;apiUrl)</PRE>
 <DL>
 <DD><DL>
 <DT><B>Parameters:</B><DD><CODE>apiUrl</CODE> - the Usergrid API url (default: http://api.usergrid.com)
@@ -1178,7 +1178,7 @@ public void <B>setApplicationId</B>(java.lang.String&nbsp;applicationId)</PRE>
 <A NAME="withApplicationId(java.lang.String)"><!-- --></A><H3>
 withApplicationId</H3>
 <PRE>
-public <A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A> <B>withApplicationId</B>(java.lang.String&nbsp;applicationId)</PRE>
+public <A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A> <B>withApplicationId</B>(java.lang.String&nbsp;applicationId)</PRE>
 <DL>
 <DD><DL>
 <DT><B>Parameters:</B><DD><CODE>applicationId</CODE> - the application id or name
@@ -1215,7 +1215,7 @@ public void <B>setClientId</B>(java.lang.String&nbsp;clientId)</PRE>
 <A NAME="withClientId(java.lang.String)"><!-- --></A><H3>
 withClientId</H3>
 <PRE>
-public <A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A> <B>withClientId</B>(java.lang.String&nbsp;clientId)</PRE>
+public <A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A> <B>withClientId</B>(java.lang.String&nbsp;clientId)</PRE>
 <DL>
 <DD><DL>
 <DT><B>Parameters:</B><DD><CODE>clientId</CODE> - the client key id for making calls as the application-owner.
@@ -1253,7 +1253,7 @@ public void <B>setClientSecret</B>(java.lang.String&nbsp;clientSecret)</PRE>
 <A NAME="withClientSecret(java.lang.String)"><!-- --></A><H3>
 withClientSecret</H3>
 <PRE>
-public <A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A> <B>withClientSecret</B>(java.lang.String&nbsp;clientSecret)</PRE>
+public <A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A> <B>withClientSecret</B>(java.lang.String&nbsp;clientSecret)</PRE>
 <DL>
 <DD><DL>
 <DT><B>Parameters:</B><DD><CODE>clientSecret</CODE> - the client key id for making calls as the application-owner.
@@ -1266,7 +1266,7 @@ public <A HREF="../../../../org/usergrid/android/client/Client.html" title="clas
 <A NAME="getLoggedInUser()"><!-- --></A><H3>
 getLoggedInUser</H3>
 <PRE>
-public <A HREF="../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A> <B>getLoggedInUser</B>()</PRE>
+public <A HREF="../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A> <B>getLoggedInUser</B>()</PRE>
 <DL>
 <DD><DL>
 
@@ -1275,10 +1275,10 @@ public <A HREF="../../../../org/usergrid/android/client/entities/User.html" titl
 </DL>
 <HR>
 
-<A NAME="setLoggedInUser(org.usergrid.android.client.entities.User)"><!-- --></A><H3>
+<A NAME="setLoggedInUser(org.apache.usergrid.android.client.entities.User)"><!-- --></A><H3>
 setLoggedInUser</H3>
 <PRE>
-public void <B>setLoggedInUser</B>(<A HREF="../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>&nbsp;loggedInUser)</PRE>
+public void <B>setLoggedInUser</B>(<A HREF="../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>&nbsp;loggedInUser)</PRE>
 <DL>
 <DD><DL>
 <DT><B>Parameters:</B><DD><CODE>loggedInUser</CODE> - the logged-in user, usually not set by host application</DL>
@@ -1354,7 +1354,7 @@ public &lt;T&gt; T <B>httpRequest</B>(org.springframework.http.HttpMethod&nbsp;m
 <A NAME="apiRequest(org.springframework.http.HttpMethod, java.util.Map, java.lang.Object, java.lang.String...)"><!-- --></A><H3>
 apiRequest</H3>
 <PRE>
-public <A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A> <B>apiRequest</B>(org.springframework.http.HttpMethod&nbsp;method,
+public <A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A> <B>apiRequest</B>(org.springframework.http.HttpMethod&nbsp;method,
                               java.util.Map&lt;java.lang.String,java.lang.Object&gt;&nbsp;params,
                               java.lang.Object&nbsp;data,
                               java.lang.String...&nbsp;segments)</PRE>
@@ -1371,7 +1371,7 @@ public <A HREF="../../../../org/usergrid/android/client/response/ApiResponse.htm
 <A NAME="authorizeAppUser(java.lang.String, java.lang.String)"><!-- --></A><H3>
 authorizeAppUser</H3>
 <PRE>
-public <A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A> <B>authorizeAppUser</B>(java.lang.String&nbsp;email,
+public <A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A> <B>authorizeAppUser</B>(java.lang.String&nbsp;email,
                                     java.lang.String&nbsp;password)</PRE>
 <DL>
 <DD>Log the user in and get a valid access token.
@@ -1384,12 +1384,12 @@ public <A HREF="../../../../org/usergrid/android/client/response/ApiResponse.htm
 </DL>
 <HR>
 
-<A NAME="authorizeAppUserAsync(java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)"><!-- --></A><H3>
+<A NAME="authorizeAppUserAsync(java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)"><!-- --></A><H3>
 authorizeAppUserAsync</H3>
 <PRE>
 public void <B>authorizeAppUserAsync</B>(java.lang.String&nbsp;email,
                                   java.lang.String&nbsp;password,
-                                  <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</PRE>
+                                  <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</PRE>
 <DL>
 <DD>Log the user in and get a valid access token. Executes asynchronously in
  background and the callbacks are called in the UI thread.
@@ -1403,7 +1403,7 @@ public void <B>authorizeAppUserAsync</B>(java.lang.String&nbsp;email,
 <A NAME="authorizeAppUserViaPin(java.lang.String, java.lang.String)"><!-- --></A><H3>
 authorizeAppUserViaPin</H3>
 <PRE>
-public <A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A> <B>authorizeAppUserViaPin</B>(java.lang.String&nbsp;email,
+public <A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A> <B>authorizeAppUserViaPin</B>(java.lang.String&nbsp;email,
                                           java.lang.String&nbsp;pin)</PRE>
 <DL>
 <DD>Log the user in with their numeric pin-code and get a valid access token.
@@ -1416,12 +1416,12 @@ public <A HREF="../../../../org/usergrid/android/client/response/ApiResponse.htm
 </DL>
 <HR>
 
-<A NAME="authorizeAppUserViaPinAsync(java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)"><!-- --></A><H3>
+<A NAME="authorizeAppUserViaPinAsync(java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)"><!-- --></A><H3>
 authorizeAppUserViaPinAsync</H3>
 <PRE>
 public void <B>authorizeAppUserViaPinAsync</B>(java.lang.String&nbsp;email,
                                         java.lang.String&nbsp;pin,
-                                        <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</PRE>
+                                        <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</PRE>
 <DL>
 <DD>Log the user in with their numeric pin-code and get a valid access token.
  Executes asynchronously in background and the callbacks are called in the
@@ -1436,7 +1436,7 @@ public void <B>authorizeAppUserViaPinAsync</B>(java.lang.String&nbsp;email,
 <A NAME="authorizeAppUserViaFacebook(java.lang.String)"><!-- --></A><H3>
 authorizeAppUserViaFacebook</H3>
 <PRE>
-public <A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A> <B>authorizeAppUserViaFacebook</B>(java.lang.String&nbsp;fb_access_token)</PRE>
+public <A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A> <B>authorizeAppUserViaFacebook</B>(java.lang.String&nbsp;fb_access_token)</PRE>
 <DL>
 <DD>Log the user in with their Facebook access token retrived via Facebook
  OAuth.
@@ -1449,11 +1449,11 @@ public <A HREF="../../../../org/usergrid/android/client/response/ApiResponse.htm
 </DL>
 <HR>
 
-<A NAME="authorizeAppUserViaFacebookAsync(java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)"><!-- --></A><H3>
+<A NAME="authorizeAppUserViaFacebookAsync(java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)"><!-- --></A><H3>
 authorizeAppUserViaFacebookAsync</H3>
 <PRE>
 public void <B>authorizeAppUserViaFacebookAsync</B>(java.lang.String&nbsp;fb_access_token,
-                                             <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</PRE>
+                                             <A HREF="../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</PRE>
 <DL>
 <DD>Log the user in with their numeric pin-code and get a valid access token.
  Executes asynchronously in background and the callbacks are called in the
@@ -1468,7 +1468,7 @@ public void <B>authorizeAppUserViaFacebookAsync</B>(java.lang.String&nbsp;fb_acc
 <A NAME="authorizeAppClient(java.lang.String, java.lang.String)"><!-- --></A><H3>
 authorizeAppClient</H3>
 <PRE>
-public <A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A> <B>authorizeAppClient</B>(java.lang.String&nbsp;clientId,
+public <A HREF="../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A> <B>authorizeAppClient</B>(java.lang.String&nbsp;clientId,
                                       java.lang.String&nbsp;clientSecret)</PRE>
 <DL>
 <DD>Log the app in with it's client id and client secret key. Not recommended
@@ -1482,12 +1482,12 @@ public <A HREF="../../../../org/usergrid/android/client/response/ApiResponse.htm
 </DL>
 <HR>
 
-<A NAME="authorizeAppClientAsync(java.lang.String, java.lang.String, org.usergrid

<TRUNCATED>

[16/96] [abbrv] [partial] Change package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/Schema.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/Schema.java b/stack/core/src/main/java/org/usergrid/persistence/Schema.java
deleted file mode 100644
index 587a65f..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/Schema.java
+++ /dev/null
@@ -1,1788 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence;
-
-
-import java.beans.PropertyDescriptor;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Field;
-import java.nio.ByteBuffer;
-import java.security.SecureRandom;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-import java.util.TreeMap;
-import java.util.UUID;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.TimeUnit;
-
-import javax.crypto.Cipher;
-import javax.crypto.KeyGenerator;
-import javax.crypto.SecretKey;
-import javax.crypto.spec.SecretKeySpec;
-
-import org.codehaus.jackson.JsonNode;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.map.SerializationConfig;
-import org.codehaus.jackson.node.ObjectNode;
-import org.codehaus.jackson.smile.SmileFactory;
-import org.codehaus.jackson.type.TypeReference;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.config.BeanDefinition;
-import org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider;
-import org.springframework.core.type.filter.AssignableTypeFilter;
-import org.usergrid.persistence.annotations.EntityCollection;
-import org.usergrid.persistence.annotations.EntityDictionary;
-import org.usergrid.persistence.annotations.EntityProperty;
-import org.usergrid.persistence.cassandra.CassandraPersistenceUtils;
-import org.usergrid.persistence.entities.Application;
-import org.usergrid.persistence.exceptions.PropertyTypeConversionException;
-import org.usergrid.persistence.schema.CollectionInfo;
-import org.usergrid.persistence.schema.DictionaryInfo;
-import org.usergrid.persistence.schema.EntityInfo;
-import org.usergrid.persistence.schema.PropertyInfo;
-import org.usergrid.utils.InflectionUtils;
-import org.usergrid.utils.JsonUtils;
-import org.usergrid.utils.MapUtils;
-
-import org.apache.commons.beanutils.PropertyUtils;
-import org.apache.commons.lang.reflect.FieldUtils;
-
-import com.google.common.cache.CacheBuilder;
-import com.google.common.cache.CacheLoader;
-import com.google.common.cache.LoadingCache;
-
-import me.prettyprint.hector.api.beans.ColumnSlice;
-import me.prettyprint.hector.api.beans.HColumn;
-import me.prettyprint.hector.api.beans.Row;
-
-import static org.apache.commons.lang.StringUtils.isNotBlank;
-import static org.usergrid.utils.ConversionUtils.bytebuffer;
-import static org.usergrid.utils.ConversionUtils.string;
-import static org.usergrid.utils.ConversionUtils.uuid;
-import static org.usergrid.utils.InflectionUtils.pluralize;
-import static org.usergrid.utils.InflectionUtils.singularize;
-import static org.usergrid.utils.JsonUtils.toJsonNode;
-import static org.usergrid.utils.MapUtils.hashMap;
-import static org.usergrid.utils.StringUtils.stringOrSubstringAfterLast;
-
-
-/**
- * The controller class for determining Entity relationships as well as properties types. This class loads the entity
- * schema definition from a YAML file called usergrid-schema.yaml at the root of the classpath.
- *
- * @author edanuff
- */
-public class Schema {
-
-    private static final Logger logger = LoggerFactory.getLogger( Schema.class );
-
-    public static final String DEFAULT_ENTITIES_PACKAGE = "org.usergrid.persistence.entities";
-
-    public static final String TYPE_APPLICATION = "application";
-    public static final String TYPE_ENTITY = "entity";
-    public static final String TYPE_ROLE = "role";
-    public static final String TYPE_CONNECTION = "connection";
-    public static final String TYPE_MEMBER = "member";
-
-    public static final String PROPERTY_ACTIVATED = "activated";
-    public static final String PROPERTY_COLLECTION_NAME = "collectionName";
-    public static final String PROPERTY_CREATED = "created";
-    public static final String PROPERTY_CONFIRMED = "confirmed";
-    public static final String PROPERTY_DISABLED = "disabled";
-    public static final String PROPERTY_UUID = "uuid";
-    public static final String PROPERTY_EMAIL = "email";
-    public static final String PROPERTY_ITEM = "item";
-    public static final String PROPERTY_ITEM_TYPE = "itemType";
-    public static final String PROPERTY_MEMBERSHIP = "membership";
-    public static final String PROPERTY_METADATA = "metadata";
-    public static final String PROPERTY_MODIFIED = "modified";
-    public static final String PROPERTY_NAME = "name";
-    public static final String PROPERTY_OWNER = "owner";
-    public static final String PROPERTY_OWNER_TYPE = "ownerType";
-    public static final String PROPERTY_PATH = "path";
-    public static final String PROPERTY_PICTURE = "picture";
-    public static final String PROPERTY_PUBLISHED = "published";
-    public static final String PROPERTY_SECRET = "secret";
-    public static final String PROPERTY_TIMESTAMP = "timestamp";
-    public static final String PROPERTY_TITLE = "title";
-    public static final String PROPERTY_TYPE = "type";
-    public static final String PROPERTY_URI = "uri";
-    public static final String PROPERTY_USERNAME = "username";
-    public static final String PROPERTY_INACTIVITY = "inactivity";
-
-    public static final String PROPERTY_CONNECTION = "connection";
-    public static final String PROPERTY_ASSOCIATED = "associated";
-    public static final String PROPERTY_CURSOR = "cursor";
-
-    public static final String COLLECTION_ROLES = "roles";
-    public static final String COLLECTION_USERS = "users";
-    public static final String COLLECTION_GROUPS = "groups";
-
-    public static final String INDEX_COLLECTIONS = "collections";
-    public static final String INDEX_CONNECTIONS = "connections";
-
-    public static final String DICTIONARY_PROPERTIES = "properties";
-    public static final String DICTIONARY_SETS = "sets";
-    public static final String DICTIONARY_COLLECTIONS = "collections";
-    public static final String DICTIONARY_CONNECTIONS = "connections";
-    public static final String DICTIONARY_INDEXES = "indexes";
-    public static final String DICTIONARY_CONNECTING_TYPES = "connecting_types";
-    public static final String DICTIONARY_CONNECTING_ENTITIES = "connecting_entities";
-    public static final String DICTIONARY_CONNECTED_TYPES = "connected_types";
-    public static final String DICTIONARY_CONNECTED_ENTITIES = "connected_entities";
-    public static final String DICTIONARY_CONTAINER_ENTITIES = "container_entities";
-    public static final String DICTIONARY_CREDENTIALS = "credentials";
-    public static final String DICTIONARY_ROLENAMES = "rolenames";
-    public static final String DICTIONARY_ROLETIMES = "roletimes";
-    public static final String DICTIONARY_PERMISSIONS = "permissions";
-    public static final String DICTIONARY_ID_SETS = "id_sets";
-    public static final String DICTIONARY_COUNTERS = "counters";
-    public static final String DICTIONARY_GEOCELL = "geocell";
-
-    private static List<String> entitiesPackage = new ArrayList<String>();
-    private static List<String> entitiesScanPath = new ArrayList<String>();
-
-    @SuppressWarnings("rawtypes")
-    public static Map<String, Class> DEFAULT_DICTIONARIES =
-            hashMap( DICTIONARY_PROPERTIES, ( Class ) String.class ).map( DICTIONARY_SETS, String.class )
-                    .map( DICTIONARY_INDEXES, String.class ).map( DICTIONARY_COLLECTIONS, String.class )
-                    .map( DICTIONARY_CONNECTIONS, String.class ).map( DICTIONARY_CONNECTING_TYPES, String.class )
-                    .map( DICTIONARY_CONNECTING_ENTITIES, String.class ).map( DICTIONARY_CONNECTED_TYPES, String.class )
-                    .map( DICTIONARY_CONNECTED_ENTITIES, String.class )
-                    .map( DICTIONARY_CONTAINER_ENTITIES, String.class )
-                    .map( DICTIONARY_CREDENTIALS, CredentialsInfo.class ).map( DICTIONARY_ROLENAMES, String.class )
-                    .map( DICTIONARY_ROLETIMES, Long.class ).map( DICTIONARY_PERMISSIONS, String.class )
-                    .map( DICTIONARY_ID_SETS, String.class );
-
-    private static LoadingCache<String, String> baseEntityTypes =
-            CacheBuilder.newBuilder().expireAfterAccess( 10, TimeUnit.MINUTES )
-                        .build( new CacheLoader<String, String>() {
-                            public String load( String key ) { // no checked exception
-                                return createNormalizedEntityType( key, true );
-                            }
-                        } );
-
-    private static LoadingCache<String, String> nonbaseEntityTypes =
-            CacheBuilder.newBuilder().expireAfterAccess( 10, TimeUnit.MINUTES )
-                        .build( new CacheLoader<String, String>() {
-                            public String load( String key ) { // no checked exception
-                                return createNormalizedEntityType( key, false );
-                            }
-                        } );
-
-    private static LoadingCache<String, String> collectionNameCache =
-            CacheBuilder.newBuilder().maximumSize( 1000 ).build( new CacheLoader<String, String>() {
-                public String load( String key ) { // no checked exception
-                    return _defaultCollectionName( key );
-                }
-            } );
-
-    private final ObjectMapper mapper = new ObjectMapper();
-
-    @SuppressWarnings("unused")
-    private final SmileFactory smile = new SmileFactory();
-
-    private final Map<String, Class<? extends Entity>> typeToEntityClass =
-            new ConcurrentHashMap<String, Class<? extends Entity>>();
-
-    private final Map<Class<? extends Entity>, String> entityClassToType =
-            new ConcurrentHashMap<Class<? extends Entity>, String>();
-
-    private final Map<Class<? extends Entity>, Map<String, PropertyDescriptor>> entityClassPropertyToDescriptor =
-            new ConcurrentHashMap<Class<? extends Entity>, Map<String, PropertyDescriptor>>();
-
-    private final Map<Class<? extends Entity>, EntityInfo> registeredEntityClasses =
-            new ConcurrentHashMap<Class<? extends Entity>, EntityInfo>();
-
-    Map<String, EntityInfo> entityMap = new TreeMap<String, EntityInfo>( String.CASE_INSENSITIVE_ORDER );
-    ;
-
-    Map<String, Map<String, Set<CollectionInfo>>> entityContainerCollections =
-            new TreeMap<String, Map<String, Set<CollectionInfo>>>( String.CASE_INSENSITIVE_ORDER );
-
-    Map<String, Map<String, Set<CollectionInfo>>> entityContainerCollectionsIndexingProperties =
-            new TreeMap<String, Map<String, Set<CollectionInfo>>>( String.CASE_INSENSITIVE_ORDER );
-    Map<String, Map<String, Set<CollectionInfo>>> entityContainerCollectionsIndexingDictionaries =
-            new TreeMap<String, Map<String, Set<CollectionInfo>>>( String.CASE_INSENSITIVE_ORDER );
-    Map<String, Map<String, Set<CollectionInfo>>> entityContainerCollectionsIndexingDynamicDictionaries =
-            new TreeMap<String, Map<String, Set<CollectionInfo>>>( String.CASE_INSENSITIVE_ORDER );
-
-    Map<String, Map<String, Map<String, Set<CollectionInfo>>>> entityPropertyContainerCollectionsIndexingProperty =
-            new TreeMap<String, Map<String, Map<String, Set<CollectionInfo>>>>( String.CASE_INSENSITIVE_ORDER );
-
-    Map<String, Map<String, Map<String, Set<CollectionInfo>>>> entityDictionaryContainerCollectionsIndexingDictionary =
-            new TreeMap<String, Map<String, Map<String, Set<CollectionInfo>>>>( String.CASE_INSENSITIVE_ORDER );
-
-    Map<String, PropertyInfo> allIndexedProperties = new TreeMap<String, PropertyInfo>( String.CASE_INSENSITIVE_ORDER );
-
-    Map<String, PropertyInfo> allProperties = new TreeMap<String, PropertyInfo>( String.CASE_INSENSITIVE_ORDER );
-
-    private static Schema instance;
-
-    boolean initialized = false;
-
-
-    public Schema() {
-        setDefaultSchema( this );
-
-        mapper.configure( SerializationConfig.Feature.WRITE_DATES_AS_TIMESTAMPS, false );
-    }
-
-
-    public static final Object initLock = new Object();
-
-
-    public static void setDefaultSchema( Schema instance ) {
-        synchronized ( initLock ) {
-            if ( Schema.instance == null ) {
-                Schema.instance = instance;
-            }
-        }
-    }
-
-
-    public static Schema getDefaultSchema() {
-        if ( instance == null ) {
-            synchronized ( initLock ) {
-                if ( instance == null ) {
-                    logger.info( "Initializing schema..." );
-                    instance = new Schema();
-                    instance.init();
-                    logger.info( "Schema initialized" );
-                }
-            }
-        }
-        return instance;
-    }
-
-
-    public void mapCollector( String entityType, String containerType, String collectionName,
-                              CollectionInfo collection ) {
-
-        MapUtils.addMapMapSet( entityContainerCollections, true, entityType, containerType, collection );
-
-        if ( !collection.getPropertiesIndexed().isEmpty() ) {
-            MapUtils.addMapMapSet( entityContainerCollectionsIndexingProperties, true, entityType, containerType,
-                    collection );
-            for ( String propertyName : collection.getPropertiesIndexed() ) {
-                MapUtils.addMapMapMapSet( entityPropertyContainerCollectionsIndexingProperty, true, entityType,
-                        propertyName, containerType, collection );
-            }
-        }
-
-        if ( !collection.getDictionariesIndexed().isEmpty() ) {
-            MapUtils.addMapMapSet( entityContainerCollectionsIndexingDictionaries, true, entityType, containerType,
-                    collection );
-            for ( String dictionaryName : collection.getDictionariesIndexed() ) {
-                MapUtils.addMapMapMapSet( entityDictionaryContainerCollectionsIndexingDictionary, true, entityType,
-                        dictionaryName, containerType, collection );
-            }
-        }
-
-        if ( collection.isIndexingDynamicDictionaries() ) {
-            MapUtils.addMapMapSet( entityContainerCollectionsIndexingDynamicDictionaries, true, entityType,
-                    containerType, collection );
-        }
-    }
-
-
-    private <T extends Annotation> T getAnnotation( Class<? extends Entity> entityClass, PropertyDescriptor descriptor,
-                                                    Class<T> annotationClass ) {
-        try {
-            if ( ( descriptor.getReadMethod() != null ) && descriptor.getReadMethod()
-                                                                     .isAnnotationPresent( annotationClass ) ) {
-                return descriptor.getReadMethod().getAnnotation( annotationClass );
-            }
-            if ( ( descriptor.getWriteMethod() != null ) && descriptor.getWriteMethod()
-                                                                      .isAnnotationPresent( annotationClass ) ) {
-                return descriptor.getWriteMethod().getAnnotation( annotationClass );
-            }
-            Field field = FieldUtils.getField( entityClass, descriptor.getName(), true );
-            if ( field != null ) {
-                if ( field.isAnnotationPresent( annotationClass ) ) {
-                    return field.getAnnotation( annotationClass );
-                }
-            }
-        }
-        catch ( Exception e ) {
-            logger.error( "Could not retrieve the annotations", e );
-        }
-        return null;
-    }
-
-
-    public synchronized void registerEntity( Class<? extends Entity> entityClass ) {
-        logger.info( "Registering {}", entityClass );
-        EntityInfo e = registeredEntityClasses.get( entityClass );
-        if ( e != null ) {
-            return;
-        }
-
-        Map<String, PropertyDescriptor> propertyDescriptors = entityClassPropertyToDescriptor.get( entityClass );
-        if ( propertyDescriptors == null ) {
-            EntityInfo entity = new EntityInfo();
-
-            String type = getEntityType( entityClass );
-
-            propertyDescriptors = new LinkedHashMap<String, PropertyDescriptor>();
-            Map<String, PropertyInfo> properties = new TreeMap<String, PropertyInfo>( String.CASE_INSENSITIVE_ORDER );
-            Map<String, CollectionInfo> collections =
-                    new TreeMap<String, CollectionInfo>( String.CASE_INSENSITIVE_ORDER );
-            Map<String, DictionaryInfo> sets = new TreeMap<String, DictionaryInfo>( String.CASE_INSENSITIVE_ORDER );
-
-            PropertyDescriptor[] descriptors = PropertyUtils.getPropertyDescriptors( entityClass );
-
-            for ( PropertyDescriptor descriptor : descriptors ) {
-                String name = descriptor.getName();
-
-                EntityProperty propertyAnnotation = getAnnotation( entityClass, descriptor, EntityProperty.class );
-                if ( propertyAnnotation != null ) {
-                    if ( isNotBlank( propertyAnnotation.name() ) ) {
-                        name = propertyAnnotation.name();
-                    }
-                    propertyDescriptors.put( name, descriptor );
-
-                    PropertyInfo propertyInfo = new PropertyInfo( propertyAnnotation );
-                    propertyInfo.setName( name );
-                    propertyInfo.setType( descriptor.getPropertyType() );
-
-                    properties.put( name, propertyInfo );
-                    // logger.info(propertyInfo);
-                }
-
-                EntityCollection collectionAnnotation =
-                        getAnnotation( entityClass, descriptor, EntityCollection.class );
-                if ( collectionAnnotation != null ) {
-                    CollectionInfo collectionInfo = new CollectionInfo( collectionAnnotation );
-                    collectionInfo.setName( name );
-                    collectionInfo.setContainer( entity );
-
-                    collections.put( name, collectionInfo );
-                    // logger.info(collectionInfo);
-                }
-
-                EntityDictionary setAnnotation = getAnnotation( entityClass, descriptor, EntityDictionary.class );
-                if ( setAnnotation != null ) {
-                    DictionaryInfo setInfo = new DictionaryInfo( setAnnotation );
-                    setInfo.setName( name );
-                    // setInfo.setType(descriptor.getPropertyType());
-                    sets.put( name, setInfo );
-                    // logger.info(setInfo);
-                }
-            }
-
-            if ( !DynamicEntity.class.isAssignableFrom( entityClass ) ) {
-                entity.setProperties( properties );
-                entity.setCollections( collections );
-                entity.setDictionaries( sets );
-                entity.mapCollectors( this, type );
-
-                entityMap.put( type, entity );
-
-                allProperties.putAll( entity.getProperties() );
-
-                Set<String> propertyNames = entity.getIndexedProperties();
-                for ( String propertyName : propertyNames ) {
-                    PropertyInfo property = entity.getProperty( propertyName );
-                    if ( ( property != null ) && !allIndexedProperties.containsKey( propertyName ) ) {
-                        allIndexedProperties.put( propertyName, property );
-                    }
-                }
-            }
-
-            entityClassPropertyToDescriptor.put( entityClass, propertyDescriptors );
-
-            registeredEntityClasses.put( entityClass, entity );
-        }
-    }
-
-
-    public synchronized void init() {
-        if ( !initialized ) {
-            initialized = true;
-            addEntitiesPackage( DEFAULT_ENTITIES_PACKAGE );
-            scanEntities();
-        }
-    }
-
-
-    @SuppressWarnings("unchecked")
-    public void scanEntities() {
-        synchronized ( entitiesScanPath ) {
-            for ( String path : entitiesScanPath ) {
-                ClassPathScanningCandidateComponentProvider provider =
-                        new ClassPathScanningCandidateComponentProvider( true );
-                provider.addIncludeFilter( new AssignableTypeFilter( TypedEntity.class ) );
-
-                Set<BeanDefinition> components = provider.findCandidateComponents( path );
-                for ( BeanDefinition component : components ) {
-                    try {
-                        Class<?> cls = Class.forName( component.getBeanClassName() );
-                        if ( Entity.class.isAssignableFrom( cls ) ) {
-                            registerEntity( ( Class<? extends Entity> ) cls );
-                        }
-                    }
-                    catch ( ClassNotFoundException e ) {
-                        logger.error( "Unable to get entity class ", e );
-                    }
-                }
-                registerEntity( DynamicEntity.class );
-            }
-        }
-    }
-
-
-    public void addEntitiesPackage( String entityPackage ) {
-        if ( !entitiesPackage.contains( entityPackage ) ) {
-            entitiesPackage.add( entityPackage );
-            String path = entityPackage.replaceAll( "\\.", "/" );
-            synchronized ( entitiesScanPath ) {
-                entitiesScanPath.add( path );
-            }
-        }
-    }
-
-
-    public void removeEntitiesPackage( String entityPackage ) {
-        entitiesPackage.remove( entityPackage );
-        String path = entityPackage.replaceAll( "\\.", "/" );
-        synchronized ( entitiesScanPath ) {
-            entitiesScanPath.remove( path );
-        }
-    }
-
-
-    @SuppressWarnings("unchecked")
-    public List<String> getEntitiesPackage() {
-        return ( List<String> ) ( ( ArrayList<String> ) entitiesPackage ).clone();
-    }
-
-
-    /** @return value */
-    public Map<String, PropertyInfo> getAllIndexedProperties() {
-
-        return allIndexedProperties;
-    }
-
-
-    public Set<String> getAllIndexedPropertyNames() {
-
-        return allIndexedProperties.keySet();
-    }
-
-
-    public Set<String> getAllPropertyNames() {
-
-        return allProperties.keySet();
-    }
-
-
-    public String[] getAllPropertyNamesAsArray() {
-
-        return allProperties.keySet().toArray( new String[0] );
-    }
-
-
-    /** @return value */
-    public EntityInfo getEntityInfo( String entityType ) {
-
-        if ( entityType == null ) {
-            return null;
-        }
-
-        entityType = normalizeEntityType( entityType );
-
-        if ( "dynamicentity".equalsIgnoreCase( entityType ) ) {
-            throw new IllegalArgumentException( entityType + " is not a valid entity type" );
-        }
-
-        EntityInfo entity = entityMap.get( entityType );
-        if ( entity == null ) {
-            return getDynamicEntityInfo( entityType );
-        }
-        return entity;
-    }
-
-
-    public JsonNode getEntityJsonSchema( String entityType ) {
-        Class<?> cls = getEntityClass( entityType );
-        if ( cls == null ) {
-            cls = DynamicEntity.class;
-        }
-        try {
-            JsonNode schemaNode = mapper.generateJsonSchema( cls ).getSchemaNode();
-            if ( schemaNode != null ) {
-                JsonNode properties = schemaNode.get( "properties" );
-                if ( properties instanceof ObjectNode ) {
-                    Set<String> fieldsToRemove = new LinkedHashSet<String>();
-                    Iterator<String> i = properties.getFieldNames();
-                    while ( i.hasNext() ) {
-                        String propertyName = i.next();
-                        if ( !hasProperty( entityType, propertyName ) ) {
-                            fieldsToRemove.add( propertyName );
-                        }
-                        else {
-                            ObjectNode property = ( ObjectNode ) properties.get( propertyName );
-                            if ( isRequiredProperty( entityType, propertyName ) ) {
-                                property.put( "optional", false );
-                            }
-                        }
-                    }
-                    ( ( ObjectNode ) properties ).remove( fieldsToRemove );
-                }
-            }
-            return schemaNode;
-        }
-        catch ( Exception e ) {
-            logger.error( "Unable to get schema for entity type " + entityType, e );
-        }
-        return null;
-    }
-
-
-    public String getEntityType( Class<? extends Entity> cls ) {
-        String type = entityClassToType.get( cls );
-        if ( type != null ) {
-            return type;
-        }
-
-        String className = cls.getName();
-        boolean finded = false;
-        for ( String entityPackage : entitiesPackage ) {
-            String entityPackagePrefix = entityPackage + ".";
-            if ( className.startsWith( entityPackagePrefix ) ) {
-                type = className.substring( entityPackagePrefix.length() );
-                type = InflectionUtils.underscore( type );
-                finded = true;
-            }
-        }
-
-        if ( !finded ) {
-            type = className;
-        }
-
-        typeToEntityClass.put( type, cls );
-        entityClassToType.put( cls, type );
-        return type;
-    }
-
-
-    @SuppressWarnings("unchecked")
-    private Class<? extends Entity> entityClassForName( String className ) {
-        try {
-            @SuppressWarnings("rawtypes") Class cls = Class.forName( className );
-            if ( Entity.class.isAssignableFrom( cls ) ) {
-                return cls;
-            }
-        }
-        catch ( ClassNotFoundException e ) {
-        }
-        return null;
-    }
-
-
-    public Class<? extends Entity> getEntityClass( String type ) {
-        type = getAssociatedEntityType( type );
-        Class<? extends Entity> cls = typeToEntityClass.get( type );
-        if ( cls != null ) {
-            return cls;
-        }
-
-        for ( String entityPackage : entitiesPackage ) {
-            String entityPackagePrefix = entityPackage + ".";
-            cls = entityClassForName( entityPackagePrefix + InflectionUtils.camelCase( type, true ) );
-            if ( cls == null ) {
-                cls = entityClassForName( entityPackagePrefix + type );
-            }
-
-            if ( cls == null ) {
-                cls = entityClassForName( type );
-            }
-
-            if ( cls != null ) {
-                break;
-            }
-        }
-
-        if ( cls == null ) {
-            cls = DynamicEntity.class;
-        }
-
-        typeToEntityClass.put( type, cls );
-        entityClassToType.put( cls, type );
-        return cls;
-    }
-
-
-    /** @return value */
-    public boolean hasProperties( String entityType ) {
-
-        EntityInfo entity = getEntityInfo( entityType );
-        if ( entity == null ) {
-            return false;
-        }
-
-        return entity.hasProperties();
-    }
-
-
-    /** @return value */
-    public Set<String> getPropertyNames( String entityType ) {
-
-        EntityInfo entity = getEntityInfo( entityType );
-        if ( entity == null ) {
-            return null;
-        }
-
-        return entity.getProperties().keySet();
-    }
-
-
-    /** @return value */
-    public String[] getPropertyNamesAsArray( String entityType ) {
-
-        EntityInfo entity = getEntityInfo( entityType );
-        if ( entity == null ) {
-            return new String[0];
-        }
-
-        return entity.getProperties().keySet().toArray( new String[0] );
-    }
-
-
-    /** @return value */
-    public boolean hasProperty( String entityType, String propertyName ) {
-
-        if ( propertyName.equals( PROPERTY_UUID ) || propertyName.equals( PROPERTY_TYPE ) ) {
-            return true;
-        }
-
-        EntityInfo entity = getEntityInfo( entityType );
-        if ( entity == null ) {
-            return false;
-        }
-
-        return entity.hasProperty( propertyName );
-    }
-
-
-    public String aliasProperty( String entityType ) {
-
-        EntityInfo entity = getEntityInfo( entityType );
-        if ( entity == null ) {
-            return null;
-        }
-
-        return entity.getAliasProperty();
-    }
-
-
-    /** @return value */
-    public boolean isPropertyMutable( String entityType, String propertyName ) {
-
-        EntityInfo entity = getEntityInfo( entityType );
-        if ( entity == null ) {
-            return false;
-        }
-
-        return entity.isPropertyMutable( propertyName );
-    }
-
-
-    public boolean isPropertyUnique( String entityType, String propertyName ) {
-
-        EntityInfo entity = getEntityInfo( entityType );
-        if ( entity == null ) {
-            return false;
-        }
-
-        return entity.isPropertyUnique( propertyName );
-    }
-
-
-    public boolean isPropertyIndexed( String entityType, String propertyName ) {
-
-        EntityInfo entity = getEntityInfo( entityType );
-        if ( entity == null ) {
-            return true;
-        }
-
-        if ( entity.hasProperty( propertyName ) ) {
-            return entity.isPropertyIndexed( propertyName );
-        }
-
-        return true;
-    }
-
-
-    public boolean isPropertyFulltextIndexed( String entityType, String propertyName ) {
-
-        EntityInfo entity = getEntityInfo( entityType );
-        if ( entity == null ) {
-            return true;
-        }
-
-        if ( entity.hasProperty( propertyName ) ) {
-            return entity.isPropertyFulltextIndexed( propertyName );
-        }
-
-        return true;
-    }
-
-
-    public boolean isPropertyTimestamp( String entityType, String propertyName ) {
-
-        EntityInfo entity = getEntityInfo( entityType );
-        if ( entity == null ) {
-            return false;
-        }
-
-        return entity.isPropertyTimestamp( propertyName );
-    }
-
-
-    /** @return value */
-    public Set<String> getRequiredProperties( String entityType ) {
-
-        EntityInfo entity = getEntityInfo( entityType );
-        if ( entity == null ) {
-            return null;
-        }
-
-        return entity.getRequiredProperties();
-    }
-
-
-    /** @return value */
-    public boolean isRequiredProperty( String entityType, String propertyName ) {
-
-        if ( propertyName.equals( PROPERTY_UUID ) || propertyName.equals( PROPERTY_TYPE ) ) {
-            return true;
-        }
-
-        EntityInfo entity = getEntityInfo( entityType );
-        if ( entity == null ) {
-            return false;
-        }
-
-        return entity.isPropertyRequired( propertyName );
-    }
-
-
-    /** @return value */
-    public Class<?> getPropertyType( String entityType, String propertyName ) {
-
-        EntityInfo entity = getEntityInfo( entityType );
-        if ( entity == null ) {
-            return null;
-        }
-
-        PropertyInfo property = entity.getProperty( propertyName );
-        if ( property == null ) {
-            return null;
-        }
-
-        return property.getType();
-    }
-
-
-    /** @return value */
-    public boolean isPropertyIndexedInCollection( String containerType, String collectionName, String propertyName ) {
-
-        CollectionInfo collection = getCollection( containerType, collectionName );
-        if ( collection == null ) {
-            return false;
-        }
-
-        return collection.isPropertyIndexed( propertyName );
-    }
-
-
-    /** @return value */
-    public boolean hasDictionaries( String entityType ) {
-
-        EntityInfo entity = getEntityInfo( entityType );
-        if ( entity == null ) {
-            return false;
-        }
-
-        return entity.hasDictionaries();
-    }
-
-
-    /** @return value */
-    public Set<String> getDictionaryNames( String entityType ) {
-
-        EntityInfo entity = getEntityInfo( entityType );
-        if ( entity == null ) {
-            return null;
-        }
-
-        return entity.getDictionaries().keySet();
-    }
-
-
-    /** @return value */
-    public boolean hasDictionary( String entityType, String dictionaryName ) {
-
-        EntityInfo entity = getEntityInfo( entityType );
-        if ( entity == null ) {
-            return false;
-        }
-
-        return entity.hasDictionary( dictionaryName );
-    }
-
-
-    /** @return value */
-    public Class<?> getDictionaryKeyType( String entityType, String dictionaryName ) {
-
-        EntityInfo entity = getEntityInfo( entityType );
-        if ( entity == null ) {
-            return null;
-        }
-
-        DictionaryInfo set = entity.getDictionary( dictionaryName );
-        if ( set == null ) {
-            return null;
-        }
-
-        return set.getKeyType();
-    }
-
-
-    public Class<?> getDictionaryValueType( String entityType, String dictionaryName ) {
-
-        EntityInfo entity = getEntityInfo( entityType );
-        if ( entity == null ) {
-            return null;
-        }
-
-        DictionaryInfo dictionary = entity.getDictionary( dictionaryName );
-        if ( dictionary == null ) {
-            return null;
-        }
-
-        return dictionary.getValueType();
-    }
-
-
-    /** @return value */
-    public boolean isDictionaryIndexedInConnections( String entityType, String dictionaryName ) {
-
-        EntityInfo entity = getEntityInfo( entityType );
-        if ( entity == null ) {
-            return false;
-        }
-
-        DictionaryInfo dictionary = entity.getDictionary( dictionaryName );
-        if ( dictionary == null ) {
-            return false;
-        }
-
-        return dictionary.isKeysIndexedInConnections();
-    }
-
-
-    /** @return value */
-    public boolean isDictionaryIndexedInCollection( String containerType, String collectionName,
-                                                    String dictionaryName ) {
-
-        CollectionInfo collection = getCollection( containerType, collectionName );
-        if ( collection == null ) {
-            return false;
-        }
-
-        return collection.isDictionaryIndexed( dictionaryName );
-    }
-
-
-    /** @return value */
-    public boolean hasCollection( String containerType, String collectionName ) {
-
-        return getCollection( containerType, collectionName ) != null;
-    }
-
-
-    public boolean isCollectionPathBased( String containerType, String collectionName ) {
-
-        CollectionInfo collection = getCollection( containerType, collectionName );
-        if ( collection == null ) {
-            return false;
-        }
-
-        EntityInfo item = getEntityInfo( collection.getType() );
-        if ( item == null ) {
-            return false;
-        }
-
-        PropertyInfo property = item.getAliasPropertyObject();
-        if ( property == null ) {
-            return false;
-        }
-
-        return property.isPathBasedName();
-    }
-
-
-    public boolean isCollectionReversed( String containerType, String collectionName ) {
-
-        CollectionInfo collection = getCollection( containerType, collectionName );
-        if ( collection == null ) {
-            return false;
-        }
-
-        return collection.isReversed();
-    }
-
-
-    public String getCollectionSort( String containerType, String collectionName ) {
-
-        CollectionInfo collection = getCollection( containerType, collectionName );
-        if ( collection == null ) {
-            return null;
-        }
-
-        return collection.getSort();
-    }
-
-
-    /** @return value */
-    public CollectionInfo getCollection( String containerType, String collectionName ) {
-
-        containerType = normalizeEntityType( containerType, true );
-
-        EntityInfo entity = getEntityInfo( containerType );
-        if ( entity == null ) {
-            return null;
-        }
-
-        CollectionInfo collection = entity.getCollection( collectionName );
-
-        if ( ( collection == null ) && ( Application.ENTITY_TYPE.equalsIgnoreCase( containerType ) ) ) {
-            collection = getDynamicApplicationCollection( collectionName );
-        }
-
-        return collection;
-    }
-
-
-    private CollectionInfo getDynamicApplicationCollection( String collectionName ) {
-        EntityInfo entity = getEntityInfo( Application.ENTITY_TYPE );
-        if ( entity == null ) {
-            return null;
-        }
-
-        CollectionInfo collection = entity.getCollection( collectionName );
-
-        if ( collection != null ) {
-            return collection;
-        }
-
-        collection = new CollectionInfo();
-        collection.setName( collectionName );
-        collection.setContainer( entity );
-        collection.setType( normalizeEntityType( collectionName ) );
-        Set<String> properties = new LinkedHashSet<String>();
-        properties.add( PROPERTY_NAME );
-        properties.add( PROPERTY_CREATED );
-        properties.add( PROPERTY_MODIFIED );
-        collection.setPropertiesIndexed( properties );
-        // entity.getCollections().put(collectionName, collection);
-        // mapCollector(collection.getType(), Application.ENTITY_TYPE,
-        // collectionName, collection);
-
-        return collection;
-    }
-
-
-    public String getCollectionType( String containerType, String collectionName ) {
-
-        containerType = normalizeEntityType( containerType );
-
-        CollectionInfo collection = getCollection( containerType, collectionName );
-
-        if ( collection == null ) {
-
-            if ( Application.ENTITY_TYPE.equalsIgnoreCase( containerType ) ) {
-                return normalizeEntityType( collectionName );
-            }
-            return null;
-        }
-
-        return collection.getType();
-    }
-
-
-    /** @return value */
-    public Map<String, CollectionInfo> getCollections( String entityType ) {
-
-        EntityInfo entity = getEntityInfo( normalizeEntityType( entityType, true ) );
-        if ( entity == null ) {
-            return null;
-        }
-
-        return entity.getCollections();
-    }
-
-
-    public Set<String> getCollectionNames( String entityType ) {
-
-        EntityInfo entity = getEntityInfo( normalizeEntityType( entityType, true ) );
-        if ( entity == null ) {
-            return null;
-        }
-
-        Map<String, CollectionInfo> map = entity.getCollections();
-
-        if ( map != null ) {
-            return map.keySet();
-        }
-
-        return null;
-    }
-
-
-    public java.util.List<String> getCollectionNamesAsList( String entityType ) {
-        Set<String> set = getCollectionNames( normalizeEntityType( entityType, true ) );
-        if ( set != null ) {
-            return new ArrayList<String>( set );
-        }
-        return null;
-    }
-
-
-    private Map<String, Set<CollectionInfo>> addDynamicApplicationCollectionAsContainer(
-            Map<String, Set<CollectionInfo>> containers, String entityType ) {
-
-        Map<String, Set<CollectionInfo>> copy =
-                new TreeMap<String, Set<CollectionInfo>>( String.CASE_INSENSITIVE_ORDER );
-        if ( containers != null ) {
-            copy.putAll( containers );
-        }
-        containers = copy;
-
-        if ( !containers.containsKey( Application.ENTITY_TYPE ) ) {
-            MapUtils.addMapSet( containers, true, Application.ENTITY_TYPE,
-                    getCollection( Application.ENTITY_TYPE, defaultCollectionName( entityType ) ) );
-        }
-
-        return containers;
-    }
-
-
-    /** @return value */
-    public Map<String, Set<CollectionInfo>> getContainers( String entityType ) {
-
-        entityType = normalizeEntityType( entityType );
-
-        // Add the application as a container to all entities
-        return addDynamicApplicationCollectionAsContainer( entityContainerCollections.get( entityType ), entityType );
-    }
-
-
-    /** @return value */
-    public CollectionInfo getContainerCollectionLinkedToCollection( String containerType, String collectionName ) {
-
-        CollectionInfo collection = getCollection( containerType, collectionName );
-        if ( collection == null ) {
-            return null;
-        }
-
-        String linkedCollection = collection.getLinkedCollection();
-        if ( linkedCollection == null ) {
-            return null;
-        }
-
-        return getCollection( collection.getType(), linkedCollection );
-    }
-
-
-    /** @return value */
-    public Map<String, Set<CollectionInfo>> getContainersIndexingProperties( String entityType ) {
-
-        entityType = normalizeEntityType( entityType );
-
-        // Add the application as a container indexing some properties by
-        // default
-        return addDynamicApplicationCollectionAsContainer(
-                entityContainerCollectionsIndexingProperties.get( entityType ), entityType );
-    }
-
-
-    /** @return value */
-    public Map<String, Set<CollectionInfo>> getContainersIndexingDictionaries( String entityType ) {
-
-        entityType = normalizeEntityType( entityType );
-
-        // Application does index any sets by default
-        return entityContainerCollectionsIndexingDictionaries.get( entityType );
-    }
-
-
-    /** @return value */
-    public Map<String, Set<CollectionInfo>> getContainersIndexingDynamicSetInfos( String entityType ) {
-
-        entityType = normalizeEntityType( entityType );
-
-        // Application does index dynamic sets by default
-        return entityContainerCollectionsIndexingDynamicDictionaries.get( entityType );
-    }
-
-
-    /** @return value */
-    public Map<String, Set<CollectionInfo>> getContainersIndexingProperty( String entityType, String propertyName ) {
-
-        entityType = normalizeEntityType( entityType );
-
-        Map<String, Map<String, Set<CollectionInfo>>> propertyContainerCollectionsIndexingPropertyInfo =
-                entityPropertyContainerCollectionsIndexingProperty.get( entityType );
-
-        // Application indexes name property by default
-        if ( propertyName.equalsIgnoreCase( PROPERTY_NAME ) || propertyName.equalsIgnoreCase( PROPERTY_CREATED )
-                || propertyName.equalsIgnoreCase( PROPERTY_MODIFIED ) ) {
-            return addDynamicApplicationCollectionAsContainer(
-                    propertyContainerCollectionsIndexingPropertyInfo != null ?
-                    propertyContainerCollectionsIndexingPropertyInfo.get( propertyName ) : null, entityType );
-        }
-
-        if ( propertyContainerCollectionsIndexingPropertyInfo == null ) {
-            return null;
-        }
-
-        return propertyContainerCollectionsIndexingPropertyInfo.get( propertyName );
-    }
-
-
-    /** @return value */
-    public Map<String, Set<CollectionInfo>> getContainersIndexingDictionary( String entityType,
-                                                                             String dictionaryName ) {
-
-        entityType = normalizeEntityType( entityType );
-
-        /*
-         * if (entityType == null) { return null; }
-         */
-
-        Map<String, Map<String, Set<CollectionInfo>>> dictionaryContainerCollectionsIndexingDictionary =
-                entityDictionaryContainerCollectionsIndexingDictionary.get( entityType );
-
-        if ( dictionaryContainerCollectionsIndexingDictionary == null ) {
-            return null;
-        }
-
-        // Application does index any set by default
-        return dictionaryContainerCollectionsIndexingDictionary.get( dictionaryName );
-    }
-
-
-    public static String defaultCollectionName( String entityType ) {
-        try {
-            return collectionNameCache.get( entityType );
-        }
-        catch ( ExecutionException ex ) {
-            ex.printStackTrace();
-        }
-        return _defaultCollectionName( entityType );
-    }
-
-
-    private static String _defaultCollectionName( String entityType ) {
-        entityType = normalizeEntityType( entityType );
-        return pluralize( entityType );
-    }
-
-
-    public static String normalizeEntityType( String entityType ) {
-        return normalizeEntityType( entityType, false );
-    }
-
-
-    public static String getAssociatedEntityType( String entityType ) {
-        if ( entityType == null ) {
-            return null;
-        }
-        entityType = stringOrSubstringAfterLast( entityType, ':' );
-        return normalizeEntityType( entityType, false );
-    }
-
-
-    public static String normalizeEntityType( String entityType, boolean baseType ) {
-        if ( entityType == null ) {
-            return null;
-        }
-        return baseType ? baseEntityTypes.getUnchecked( entityType ) : nonbaseEntityTypes.getUnchecked( entityType );
-    }
-
-
-    /** uncached - use normalizeEntityType() */
-    private static String createNormalizedEntityType( String entityType, boolean baseType ) {
-        if ( baseType ) {
-            int i = entityType.indexOf( ':' );
-            if ( i >= 0 ) {
-                entityType = entityType.substring( 0, i );
-            }
-        }
-        entityType = entityType.toLowerCase();
-        if ( entityType.startsWith( "org.usergrid.persistence" ) ) {
-            entityType = stringOrSubstringAfterLast( entityType, '.' );
-        }
-        entityType = singularize( entityType );
-
-        if ( "dynamicentity".equalsIgnoreCase( entityType ) ) {
-            throw new IllegalArgumentException( entityType + " is not a valid entity type" );
-        }
-
-        // entityType = capitalizeDelimiter(entityType, '.', '_');
-        return entityType;
-    }
-
-
-    public static boolean isAssociatedEntityType( String entityType ) {
-        if ( entityType == null ) {
-            return false;
-        }
-        return entityType.indexOf( ':' ) != -1;
-    }
-
-
-    /** @return value */
-    public EntityInfo getDynamicEntityInfo( String entityType ) {
-
-        entityType = normalizeEntityType( entityType );
-
-        EntityInfo entity = new EntityInfo();
-        entity.setType( entityType );
-
-        Map<String, PropertyInfo> properties = new LinkedHashMap<String, PropertyInfo>();
-        PropertyInfo property = new PropertyInfo();
-        property.setName( PROPERTY_UUID );
-        property.setRequired( true );
-        property.setType( UUID.class );
-        property.setMutable( false );
-        property.setBasic( true );
-        properties.put( PROPERTY_UUID, property );
-
-        property = new PropertyInfo();
-        property.setName( PROPERTY_TYPE );
-        property.setRequired( true );
-        property.setType( String.class );
-        property.setMutable( false );
-        property.setBasic( true );
-        properties.put( PROPERTY_TYPE, property );
-
-        property = new PropertyInfo();
-        property.setName( PROPERTY_NAME );
-        property.setRequired( false );
-        property.setType( String.class );
-        property.setMutable( false );
-        property.setAliasProperty( true );
-        property.setIndexed( true );
-        property.setBasic( true );
-        property.setUnique( true );
-        properties.put( PROPERTY_NAME, property );
-
-        property = new PropertyInfo();
-        property.setName( PROPERTY_CREATED );
-        property.setRequired( true );
-        property.setType( Long.class );
-        property.setMutable( false );
-        property.setIndexed( true );
-        properties.put( PROPERTY_CREATED, property );
-
-        property = new PropertyInfo();
-        property.setName( PROPERTY_MODIFIED );
-        property.setRequired( true );
-        property.setType( Long.class );
-        property.setIndexed( true );
-        properties.put( PROPERTY_MODIFIED, property );
-
-        property = new PropertyInfo();
-        property.setName( PROPERTY_ITEM );
-        property.setRequired( false );
-        property.setType( UUID.class );
-        property.setMutable( false );
-        property.setAliasProperty( false );
-        property.setIndexed( false );
-        properties.put( PROPERTY_ITEM, property );
-
-        property = new PropertyInfo();
-        property.setName( PROPERTY_ITEM_TYPE );
-        property.setRequired( false );
-        property.setType( String.class );
-        property.setMutable( false );
-        property.setAliasProperty( false );
-        property.setIndexed( false );
-        properties.put( PROPERTY_ITEM_TYPE, property );
-
-        property = new PropertyInfo();
-        property.setName( PROPERTY_COLLECTION_NAME );
-        property.setRequired( false );
-        property.setType( String.class );
-        property.setMutable( false );
-        property.setAliasProperty( false );
-        property.setIndexed( false );
-        properties.put( PROPERTY_COLLECTION_NAME, property );
-
-        entity.setProperties( properties );
-
-        Map<String, DictionaryInfo> sets = new LinkedHashMap<String, DictionaryInfo>();
-
-        DictionaryInfo set = new DictionaryInfo();
-        set.setName( DICTIONARY_CONNECTIONS );
-        set.setKeyType( String.class );
-        sets.put( DICTIONARY_CONNECTIONS, set );
-
-        entity.setDictionaries( sets );
-
-        return entity;
-    }
-
-
-    public Map<String, Object> cleanUpdatedProperties( String entityType, Map<String, Object> properties ) {
-        return cleanUpdatedProperties( entityType, properties, false );
-    }
-
-
-    public Map<String, Object> cleanUpdatedProperties( String entityType, Map<String, Object> properties,
-                                                       boolean create ) {
-
-        if ( properties == null ) {
-            return null;
-        }
-
-        entityType = normalizeEntityType( entityType );
-
-        properties.remove( PROPERTY_UUID );
-        properties.remove( PROPERTY_TYPE );
-        properties.remove( PROPERTY_METADATA );
-        properties.remove( PROPERTY_MEMBERSHIP );
-        properties.remove( PROPERTY_CONNECTION );
-
-        Iterator<Entry<String, Object>> iterator = properties.entrySet().iterator();
-        while ( iterator.hasNext() ) {
-            Entry<String, Object> entry = iterator.next();
-            if ( hasProperty( entityType, entry.getKey() ) ) {
-                if ( !create && !isPropertyMutable( entityType, entry.getKey() ) ) {
-                    iterator.remove();
-                    continue;
-                }
-                Object propertyValue = entry.getValue();
-                if ( ( propertyValue instanceof String ) && ( ( ( String ) propertyValue ) == "" ) ) {
-                    propertyValue = null;
-                }
-                if ( ( propertyValue == null ) && isRequiredProperty( entityType, entry.getKey() ) ) {
-                    iterator.remove();
-                }
-            }
-        }
-        return properties;
-    }
-
-
-    public Object validateEntityPropertyValue( String entityType, String propertyName, Object propertyValue )
-            throws PropertyTypeConversionException {
-
-        entityType = normalizeEntityType( entityType );
-
-        if ( ( propertyValue instanceof String ) && ( ( String ) propertyValue ).equals( "" ) ) {
-            propertyValue = null;
-        }
-
-        if ( !hasProperty( entityType, propertyName ) ) {
-            return propertyValue;
-        }
-
-        /*
-         * if (PROPERTY_TYPE.equals(propertyName)) { return
-         * string(propertyValue); } else if (PROPERTY_ID.equals(propertyName)) {
-         * return uuid(propertyValue); }
-         */
-
-        Class<?> type = getPropertyType( entityType, propertyName );
-        if ( type != null ) {
-            // propertyValue = coerce(type, propertyValue);
-            try {
-                propertyValue = mapper.convertValue( propertyValue, type );
-            }
-            catch ( Exception e ) {
-                throw new PropertyTypeConversionException( entityType, propertyName, propertyValue, type, e );
-            }
-        }
-
-        return propertyValue;
-    }
-
-
-    public Object validateEntitySetValue( String entityType, String dictionaryName, Object elementValue ) {
-
-        entityType = normalizeEntityType( entityType );
-
-        if ( ( elementValue instanceof String ) && ( ( String ) elementValue ).equals( "" ) ) {
-            elementValue = null;
-        }
-
-        if ( !hasDictionary( entityType, dictionaryName ) ) {
-            return elementValue;
-        }
-
-        Class<?> type = getDictionaryKeyType( entityType, dictionaryName );
-        if ( type != null ) {
-            // elementValue = coerce(type, elementValue);
-            elementValue = mapper.convertValue( elementValue, type );
-        }
-
-        return elementValue;
-    }
-
-
-    public Entity toEntity( Map<String, Object> map ) {
-        Class<? extends Entity> entityClass = DynamicEntity.class;
-        String type = ( String ) map.get( PROPERTY_TYPE );
-        if ( type != null ) {
-            entityClass = getEntityClass( type );
-        }
-        if ( entityClass == null ) {
-            entityClass = DynamicEntity.class;
-        }
-        Entity entity = mapper.convertValue( map, entityClass );
-        return entity;
-    }
-
-    /*
-     * public Entity toEntity(Reader reader) { Entity entity =
-     * mapper.convertValue(reader, Entity.class); return entity; }
-     * 
-     * public Entity toEntity(InputStream input) { Entity entity =
-     * mapper.convertValue(input, Entity.class); return entity; }
-     * 
-     * public Entity toEntity(String string) { Entity entity =
-     * mapper.convertValue(string, Entity.class); return entity; }
-     */
-
-
-    public Map<String, Object> toMap( Entity entity ) {
-        Map<String, Object> map = mapper.convertValue( entity, new TypeReference<Map<String, Object>>() {} );
-        return map;
-    }
-
-
-    public Object convertToPropertyType( Class<? extends Entity> entityClass, String property, Object value ) {
-        Class<?> cls = getPropertyType( getEntityType( entityClass ), property );
-        if ( cls != null ) {
-            return mapper.convertValue( value, cls );
-        }
-        return value;
-    }
-
-
-    public Object convertToPropertyType( String type, String property, Object value ) {
-        Class<?> cls = getPropertyType( type, property );
-        if ( cls != null ) {
-            return mapper.convertValue( value, cls );
-        }
-        return value;
-    }
-
-
-    public PropertyDescriptor getDescriptorForEntityProperty( Class<? extends Entity> entityClass, String property ) {
-        Map<String, PropertyDescriptor> propertyDescriptors = entityClassPropertyToDescriptor.get( entityClass );
-        if ( propertyDescriptors == null ) {
-            return null;
-        }
-        return propertyDescriptors.get( property );
-    }
-
-
-    public void setEntityProperty( Entity entity, String property, Object value ) {
-        PropertyDescriptor descriptor = getDescriptorForEntityProperty( entity.getClass(), property );
-        if ( descriptor != null ) {
-            Class<?> cls = descriptor.getPropertyType();
-            if ( cls != null ) {
-                if ( ( value == null ) || ( cls.isAssignableFrom( value.getClass() ) ) ) {
-                    try {
-                        descriptor.getWriteMethod().invoke( entity, value );
-                        return;
-                    }
-                    catch ( Exception e ) {
-                        logger.error( "Unable to set entity property " + property, e );
-                    }
-                }
-                try {
-                    descriptor.getWriteMethod().invoke( entity, mapper.convertValue( value, cls ) );
-                    return;
-                }
-                catch ( Exception e ) {
-                    logger.error( "Unable to set entity property " + property, e );
-                }
-            }
-        }
-        entity.setDynamicProperty( property, value );
-    }
-
-
-    public Object getEntityProperty( Entity entity, String property ) {
-        PropertyDescriptor descriptor = getDescriptorForEntityProperty( entity.getClass(), property );
-        if ( descriptor != null ) {
-            try {
-                return descriptor.getReadMethod().invoke( entity );
-            }
-            catch ( Exception e ) {
-                logger.error( "Unable to get entity property " + property, e );
-            }
-            return null;
-        }
-        Map<String, Object> properties = entity.getDynamicProperties();
-        if ( properties != null ) {
-            return properties.get( property );
-        }
-        return null;
-    }
-
-
-    public Map<String, Object> getEntityProperties( Entity entity ) {
-        Map<String, Object> properties = new LinkedHashMap<String, Object>();
-        Map<String, PropertyDescriptor> propertyDescriptors = entityClassPropertyToDescriptor.get( entity.getClass() );
-
-        if ( propertyDescriptors == null ) {
-            registerEntity( entity.getClass() );
-            propertyDescriptors = entityClassPropertyToDescriptor.get( entity.getClass() );
-        }
-
-        for ( Entry<String, PropertyDescriptor> propertyEntry : propertyDescriptors.entrySet() ) {
-            String property = propertyEntry.getKey();
-            PropertyDescriptor descriptor = propertyEntry.getValue();
-            if ( descriptor != null ) {
-                try {
-                    Object value = descriptor.getReadMethod().invoke( entity );
-                    if ( value != null ) {
-                        properties.put( property, value );
-                    }
-                }
-                catch ( Exception e ) {
-                    logger.error( "Unable to get entity property " + property, e );
-                }
-            }
-        }
-        Map<String, Object> dynamicProperties = entity.getDynamicProperties();
-        if ( dynamicProperties != null ) {
-            properties.putAll( dynamicProperties );
-        }
-        return properties;
-    }
-
-
-    public static Map<String, Object> deserializeEntityProperties( Row<UUID, String, ByteBuffer> row ) {
-        if ( row == null ) {
-            return null;
-        }
-        ColumnSlice<String, ByteBuffer> slice = row.getColumnSlice();
-        if ( slice == null ) {
-            return null;
-        }
-        return deserializeEntityProperties( slice.getColumns(), true, false );
-    }
-
-
-    /** @return entity properties from columns as a map */
-    public static Map<String, Object> deserializeEntityProperties( List<HColumn<String, ByteBuffer>> columns ) {
-        return deserializeEntityProperties( CassandraPersistenceUtils.asMap( columns ), true, false );
-    }
-
-
-    public static Map<String, Object> deserializeEntityProperties( Map<String, ByteBuffer> columns ) {
-        return deserializeEntityProperties( columns, true, false );
-    }
-
-
-    public static Map<String, Object> deserializeEntityProperties( List<HColumn<String, ByteBuffer>> columns,
-                                                                   boolean checkId, boolean checkRequired ) {
-        return deserializeEntityProperties( CassandraPersistenceUtils.asMap( columns ), checkId, checkRequired );
-    }
-
-
-    /** @return entity properties from columns as a map */
-    public static Map<String, Object> deserializeEntityProperties( Map<String, ByteBuffer> columns, boolean checkId,
-                                                                   boolean checkRequired ) {
-
-        if ( columns == null ) {
-            return null;
-        }
-
-        String entityType = string( columns.get( PROPERTY_TYPE ) );
-        if ( entityType == null ) {
-            logger.debug( "deserializeEntityProperties(): No type for entity found, entity probably doesn't exist" );
-            return null;
-        }
-        if ( checkId && !columns.containsKey( PROPERTY_UUID ) ) {
-            logger.error( "No id for entity ( {} ) found!", entityType );
-            return null;
-        }
-
-        if ( checkRequired ) {
-            Set<String> required_properties = Schema.getDefaultSchema().getRequiredProperties( entityType );
-            if ( required_properties != null ) {
-                for ( String property_name : required_properties ) {
-                    if ( !columns.containsKey( property_name ) ) {
-                        logger.error( "Entity (" + entityType + ") missing required property: " + property_name,
-                                new Throwable() );
-                        return null;
-                    }
-                }
-            }
-        }
-
-        Map<String, Object> properties_map = new TreeMap<String, Object>( String.CASE_INSENSITIVE_ORDER );
-        for ( Entry<String, ByteBuffer> column : columns.entrySet() ) {
-            String propertyName = column.getKey();
-            Object propertyValue = deserializeEntityProperty( entityType, propertyName, column.getValue() );
-            properties_map.put( propertyName, propertyValue );
-        }
-        return properties_map;
-    }
-
-
-    /** @return object of correct type deserialize from column bytes */
-    public static Object deserializeEntityProperty( String entityType, String propertyName, ByteBuffer bytes ) {
-        Object propertyValue = null;
-        if ( PROPERTY_UUID.equals( propertyName ) ) {
-            propertyValue = uuid( bytes );
-        }
-        else if ( PROPERTY_TYPE.equals( propertyName ) ) {
-            propertyValue = string( bytes );
-        }
-        else {
-            if ( Schema.getDefaultSchema().isPropertyEncrypted( entityType, propertyName ) ) {
-                bytes = decrypt( bytes );
-            }
-            propertyValue = Schema.deserializePropertyValueFromJsonBinary( bytes );
-        }
-        return propertyValue;
-    }
-
-
-    public static ByteBuffer serializeEntityProperty( String entityType, String propertyName, Object propertyValue ) {
-        ByteBuffer bytes = null;
-        if ( PROPERTY_UUID.equals( propertyName ) ) {
-            bytes = bytebuffer( uuid( propertyValue ) );
-        }
-        else if ( PROPERTY_TYPE.equals( propertyName ) ) {
-            bytes = bytebuffer( string( propertyValue ) );
-        }
-        else {
-            bytes = Schema.serializePropertyValueToJsonBinary( toJsonNode( propertyValue ) );
-            if ( Schema.getDefaultSchema().isPropertyEncrypted( entityType, propertyName ) ) {
-                bytes.rewind();
-                bytes = encrypt( bytes );
-            }
-        }
-        return bytes;
-    }
-
-
-    public static ByteBuffer serializePropertyValueToJsonBinary( Object obj ) {
-        return JsonUtils.toByteBuffer( obj );
-    }
-
-
-    public static Object deserializePropertyValueFromJsonBinary( ByteBuffer bytes ) {
-        return JsonUtils.normalizeJsonTree( JsonUtils.fromByteBuffer( bytes ) );
-    }
-
-
-    public static Object deserializePropertyValueFromJsonBinary( ByteBuffer bytes, Class<?> classType ) {
-        return JsonUtils.normalizeJsonTree( JsonUtils.fromByteBuffer( bytes, classType ) );
-    }
-
-
-    public boolean isPropertyEncrypted( String entityType, String propertyName ) {
-
-        EntityInfo entity = getEntityInfo( entityType );
-        if ( entity == null ) {
-            return false;
-        }
-
-        PropertyInfo property = entity.getProperty( propertyName );
-        if ( property == null ) {
-            return false;
-        }
-
-        return property.isEncrypted();
-    }
-
-
-    private static final byte[] DEFAULT_ENCRYPTION_SEED =
-            "oWyWX?I2kZAhkKb_jQ8SZvjmgkiF4eGSjsfIkhnRetD4Dvtx2J".getBytes();
-    private static byte[] encryptionSeed =
-            ( System.getProperty( "encryptionSeed" ) != null ) ? System.getProperty( "encryptionSeed" ).getBytes() :
-            DEFAULT_ENCRYPTION_SEED;
-
-
-    public static ByteBuffer encrypt( ByteBuffer clear ) {
-        if ( clear == null || !clear.hasRemaining() ) {
-            return clear;
-        }
-        try {
-            SecretKeySpec sKeySpec = new SecretKeySpec( getRawKey( encryptionSeed ), "AES" );
-            Cipher cipher = Cipher.getInstance( "AES" );
-            cipher.init( Cipher.ENCRYPT_MODE, sKeySpec );
-            ByteBuffer encrypted = ByteBuffer.allocate( cipher.getOutputSize( clear.remaining() ) );
-            cipher.doFinal( clear, encrypted );
-            encrypted.rewind();
-            return encrypted;
-        }
-        catch ( Exception e ) {
-            throw new IllegalStateException( e );
-        }
-    }
-
-
-    public static ByteBuffer decrypt( ByteBuffer encrypted ) {
-        if ( encrypted == null || !encrypted.hasRemaining() ) {
-            return encrypted;
-        }
-        try {
-            SecretKeySpec sKeySpec = new SecretKeySpec( getRawKey( encryptionSeed ), "AES" );
-            Cipher cipher = Cipher.getInstance( "AES" );
-            cipher.init( Cipher.DECRYPT_MODE, sKeySpec );
-            ByteBuffer decrypted = ByteBuffer.allocate( cipher.getOutputSize( encrypted.remaining() ) );
-            cipher.doFinal( encrypted, decrypted );
-            decrypted.rewind();
-            return decrypted;
-        }
-        catch ( Exception e ) {
-            throw new IllegalStateException( e );
-        }
-    }
-
-
-    private static byte[] getRawKey( byte[] seed ) throws Exception {
-        KeyGenerator keyGenerator = KeyGenerator.getInstance( "AES" );
-        SecureRandom sr = SecureRandom.getInstance( "SHA1PRNG" );
-        sr.setSeed( seed );
-        keyGenerator.init( 128, sr ); // 192 and 256 bits may not be available
-        SecretKey secretKey = keyGenerator.generateKey();
-        return secretKey.getEncoded();
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/SimpleCollectionRef.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/SimpleCollectionRef.java b/stack/core/src/main/java/org/usergrid/persistence/SimpleCollectionRef.java
deleted file mode 100644
index dab819b..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/SimpleCollectionRef.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence;
-
-
-import java.util.UUID;
-
-import org.usergrid.persistence.cassandra.CassandraPersistenceUtils;
-
-
-public class SimpleCollectionRef implements CollectionRef {
-
-    public static final String MEMBER_ENTITY_TYPE = "member";
-
-    protected final EntityRef ownerRef;
-    protected final String collectionName;
-    protected final EntityRef itemRef;
-    protected final String type;
-    protected final UUID id;
-
-
-    public SimpleCollectionRef( EntityRef ownerRef, String collectionName, EntityRef itemRef ) {
-        this.ownerRef = ownerRef;
-        this.collectionName = collectionName;
-        this.itemRef = itemRef;
-        type = itemRef.getType() + ":" + MEMBER_ENTITY_TYPE;
-        id = CassandraPersistenceUtils.keyID( ownerRef.getUuid(), collectionName, itemRef.getUuid() );
-    }
-
-
-    @Override
-    public EntityRef getOwnerEntity() {
-        return ownerRef;
-    }
-
-
-    @Override
-    public String getCollectionName() {
-        return collectionName;
-    }
-
-
-    @Override
-    public EntityRef getItemRef() {
-        return itemRef;
-    }
-
-
-    @Override
-    public UUID getUuid() {
-        return id;
-    }
-
-
-    @Override
-    public String getType() {
-        return type;
-    }
-
-
-    @Override
-    public String toString() {
-        if ( ( type == null ) && ( id == null ) ) {
-            return "CollectionRef(" + SimpleEntityRef.NULL_ID.toString() + ")";
-        }
-        if ( type == null ) {
-            return "CollectionRef(" + id.toString() + ")";
-        }
-        return type + "(" + id + "," + ownerRef + "," + collectionName + "," + itemRef + ")";
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/SimpleEntityRef.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/SimpleEntityRef.java b/stack/core/src/main/java/org/usergrid/persistence/SimpleEntityRef.java
deleted file mode 100644
index 524bc5e..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/SimpleEntityRef.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence;
-
-
-import java.util.UUID;
-
-
-public class SimpleEntityRef implements EntityRef {
-
-    public static final UUID NULL_ID = new UUID( 0, 0 );
-
-    protected final String type;
-
-    protected final UUID id;
-
-
-    public SimpleEntityRef( UUID id ) {
-        this.id = id;
-        type = null;
-    }
-
-
-    public SimpleEntityRef( String type, UUID id ) {
-        this.type = type;
-        this.id = id;
-    }
-
-
-    public SimpleEntityRef( EntityRef entityRef ) {
-        type = entityRef.getType();
-        id = entityRef.getUuid();
-    }
-
-
-    public static EntityRef ref() {
-        return new SimpleEntityRef( null, null );
-    }
-
-
-    @Override
-    public UUID getUuid() {
-        return id;
-    }
-
-
-    @Override
-    public String getType() {
-        return type;
-    }
-
-
-    public static EntityRef ref( String entityType, UUID entityId ) {
-        return new SimpleEntityRef( entityType, entityId );
-    }
-
-
-    public static EntityRef ref( UUID entityId ) {
-        return new SimpleEntityRef( null, entityId );
-    }
-
-
-    public static EntityRef ref( EntityRef ref ) {
-        return new SimpleEntityRef( ref );
-    }
-
-
-    @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + ( ( id == null ) ? 0 : id.hashCode() );
-        result = prime * result + ( ( type == null ) ? 0 : type.hashCode() );
-        return result;
-    }
-
-
-    @Override
-    public boolean equals( Object obj ) {
-        if ( this == obj ) {
-            return true;
-        }
-        if ( obj == null ) {
-            return false;
-        }
-        if ( getClass() != obj.getClass() ) {
-            return false;
-        }
-        SimpleEntityRef other = ( SimpleEntityRef ) obj;
-        if ( id == null ) {
-            if ( other.id != null ) {
-                return false;
-            }
-        }
-        else if ( !id.equals( other.id ) ) {
-            return false;
-        }
-        if ( type == null ) {
-            if ( other.type != null ) {
-                return false;
-            }
-        }
-        else if ( !type.equals( other.type ) ) {
-            return false;
-        }
-        return true;
-    }
-
-
-    @Override
-    public String toString() {
-        if ( ( type == null ) && ( id == null ) ) {
-            return "EntityRef(" + NULL_ID.toString() + ")";
-        }
-        if ( type == null ) {
-            return "EntityRef(" + id.toString() + ")";
-        }
-        return type + "(" + id + ")";
-    }
-
-
-    public static UUID getUuid( EntityRef ref ) {
-        if ( ref == null ) {
-            return null;
-        }
-        return ref.getUuid();
-    }
-
-
-    public static String getType( EntityRef ref ) {
-        if ( ref == null ) {
-            return null;
-        }
-        return ref.getType();
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/SimpleRoleRef.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/SimpleRoleRef.java b/stack/core/src/main/java/org/usergrid/persistence/SimpleRoleRef.java
deleted file mode 100644
index d77b23c..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/SimpleRoleRef.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence;
-
-
-import java.util.UUID;
-
-import org.springframework.util.Assert;
-import org.usergrid.persistence.cassandra.CassandraPersistenceUtils;
-import org.usergrid.persistence.entities.Group;
-import org.usergrid.utils.StringUtils;
-import org.usergrid.utils.UUIDUtils;
-
-
-public class SimpleRoleRef implements RoleRef {
-
-    protected final UUID groupId;
-    protected final String roleName;
-    protected final UUID id;
-
-
-    public SimpleRoleRef( String roleName ) {
-        this( null, roleName );
-    }
-
-
-    public SimpleRoleRef( UUID groupId, String roleName ) {
-        Assert.notNull( roleName );
-        if ( groupId != null ) {
-            this.groupId = groupId;
-        }
-        else {
-            this.groupId = UUIDUtils.tryExtractUUID( roleName );
-        }
-        this.roleName = StringUtils.stringOrSubstringAfterLast( roleName.toLowerCase(), ':' );
-        if ( groupId == null ) {
-            id = CassandraPersistenceUtils.keyID( "role", this.groupId, this.roleName );
-        }
-        else {
-            id = CassandraPersistenceUtils.keyID( "role", this.roleName );
-        }
-    }
-
-
-    public static SimpleRoleRef forRoleEntity( Entity role ) {
-        if ( role == null ) {
-            return null;
-        }
-        UUID groupId = ( UUID ) role.getProperty( "group" );
-        String name = role.getName();
-        return new SimpleRoleRef( groupId, name );
-    }
-
-
-    public static SimpleRoleRef forRoleName( String roleName ) {
-        return new SimpleRoleRef( null, roleName );
-    }
-
-
-    public static SimpleRoleRef forGroupIdAndRoleName( UUID groupId, String roleName ) {
-        return new SimpleRoleRef( groupId, roleName );
-    }
-
-
-    public static UUID getIdForRoleName( String roleName ) {
-        return forRoleName( roleName ).getUuid();
-    }
-
-
-    public static UUID getIdForGroupIdAndRoleName( UUID groupId, String roleName ) {
-        return forGroupIdAndRoleName( groupId, roleName ).getUuid();
-    }
-
-
-    @Override
-    public UUID getUuid() {
-        return id;
-    }
-
-
-    @Override
-    public String getType() {
-        return "role";
-    }
-
-
-    @Override
-    public EntityRef getGroupRef() {
-        return new SimpleEntityRef( Group.ENTITY_TYPE, groupId );
-    }
-
-
-    @Override
-    public String getRoleName() {
-        return roleName;
-    }
-
-
-    @Override
-    public UUID getGroupId() {
-        return groupId;
-    }
-
-
-    @Override
-    public String getApplicationRoleName() {
-        if ( groupId == null ) {
-            return roleName;
-        }
-        return groupId + ":" + roleName;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/TypedEntity.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/TypedEntity.java b/stack/core/src/main/java/org/usergrid/persistence/TypedEntity.java
deleted file mode 100644
index 6fdb409..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/TypedEntity.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence;
-
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-
-/**
- * TypedEntity is the abstract superclass for all typed entities. A typed entity refers to an entity that has a concrete
- * Java class mapped to it. Entities do not need to have concrete typed classes, the service interacts with entities in
- * an entirely dynamic fashion and uses the Schema class to determine relationships and property types, however using
- * the typed entity classes can be more convenient.
- *
- * @author edanuff
- */
-@XmlRootElement
-public abstract class TypedEntity extends AbstractEntity {
-
-    @Override
-    public Entity toTypedEntity() {
-        return this;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/Update.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/Update.java b/stack/core/src/main/java/org/usergrid/persistence/Update.java
deleted file mode 100644
index 0f5d018..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/Update.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence;
-
-
-import java.util.ArrayList;
-import java.util.List;
-
-
-public class Update {
-
-    private List<UpdateOperation> operationList = new ArrayList<UpdateOperation>();
-
-
-    public class UpdateOperation {
-        String propertyName;
-        UpdateOperator operator;
-        Object value;
-
-
-        UpdateOperation( String propertyName, UpdateOperator operator, Object value ) {
-            this.propertyName = propertyName;
-            this.operator = operator;
-            this.value = value;
-        }
-
-
-        public String getPropertyName() {
-            return propertyName;
-        }
-
-
-        public UpdateOperator getOperator() {
-            return operator;
-        }
-
-
-        public Object getValue() {
-            return value;
-        }
-    }
-
-
-    public static enum UpdateOperator {
-        UPDATE, DELETE, ADD_TO_LIST, REMOVE_FROM_LIST;
-    }
-
-
-    public Update() {
-    }
-
-
-    public void add( String propertyName, UpdateOperator operator, Object value ) {
-        UpdateOperation operation = new UpdateOperation( propertyName, operator, value );
-        operationList.add( operation );
-    }
-
-
-    public void clear() {
-        operationList = new ArrayList<UpdateOperation>();
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/annotations/EntityCollection.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/annotations/EntityCollection.java b/stack/core/src/main/java/org/usergrid/persistence/annotations/EntityCollection.java
deleted file mode 100644
index 339a99a..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/annotations/EntityCollection.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.annotations;
-
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-
-@Target(value = { ElementType.METHOD, ElementType.FIELD })
-@Retention(RetentionPolicy.RUNTIME)
-public @interface EntityCollection {
-    String type();
-
-    String[] dictionariesIndexed() default { };
-
-    boolean indexingDynamicDictionaries() default false;
-
-    String linkedCollection() default "";
-
-    boolean publicVisible() default true;
-
-    boolean reversed() default false;
-
-    boolean includedInExport() default true;
-
-    String sort() default "";
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/annotations/EntityDictionary.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/annotations/EntityDictionary.java b/stack/core/src/main/java/org/usergrid/persistence/annotations/EntityDictionary.java
deleted file mode 100644
index 51f9ddb..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/annotations/EntityDictionary.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.annotations;
-
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-
-@Target(value = { ElementType.METHOD, ElementType.FIELD })
-@Retention(RetentionPolicy.RUNTIME)
-public @interface EntityDictionary {
-
-    Class<?> keyType();
-
-    boolean keysIndexedInConnections() default false;
-
-    Class<?> valueType() default Object.class;
-
-    boolean publicVisible() default true;
-
-    boolean includedInExport() default true;
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/annotations/EntityProperty.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/annotations/EntityProperty.java b/stack/core/src/main/java/org/usergrid/persistence/annotations/EntityProperty.java
deleted file mode 100644
index b38ced5..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/annotations/EntityProperty.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.annotations;
-
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-
-@Target(value = { ElementType.METHOD, ElementType.FIELD })
-@Retention(RetentionPolicy.RUNTIME)
-public @interface EntityProperty {
-
-    String name() default "";
-
-    boolean indexed() default true;
-
-    boolean basic() default false;
-
-    boolean required() default false;
-
-    boolean mutable() default true;
-
-    boolean unique() default false;
-
-    boolean aliasProperty() default false;
-
-    boolean pathBasedName() default false;
-
-    boolean fulltextIndexed() default false;
-
-    boolean publicVisible() default false;
-
-    boolean includedInExport() default true;
-
-    boolean timestamp() default false;
-
-    boolean encrypted() default false;
-}


[59/96] [abbrv] USERGRID-2 package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/response/class-use/ApiResponse.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/response/class-use/ApiResponse.html b/sdks/android/doc/org/usergrid/android/client/response/class-use/ApiResponse.html
index 62328c9..2f479cc 100644
--- a/sdks/android/doc/org/usergrid/android/client/response/class-use/ApiResponse.html
+++ b/sdks/android/doc/org/usergrid/android/client/response/class-use/ApiResponse.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Class org.usergrid.android.client.response.ApiResponse
+Uses of Class org.apache.usergrid.android.client.response.ApiResponse
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Class org.usergrid.android.client.response.ApiResponse
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Class org.usergrid.android.client.response.ApiResponse";
+        parent.document.title="Uses of Class org.apache.usergrid.android.client.response.ApiResponse";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,30 +81,30 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Class<br>org.usergrid.android.client.response.ApiResponse</B></H2>
+<B>Uses of Class<br>org.apache.usergrid.android.client.response.ApiResponse</B></H2>
 </CENTER>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Packages that use <A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></FONT></TH>
+Packages that use <A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client"><B>org.usergrid.android.client</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client"><B>org.apache.usergrid.android.client</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client.callbacks"><B>org.usergrid.android.client.callbacks</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client.callbacks"><B>org.apache.usergrid.android.client.callbacks</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A> in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A></FONT></TH>
+Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A> in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -112,11 +112,11 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ApiRespo
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A> that return <A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A> that return <A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#addSubscriber(java.lang.String, java.lang.String)">addSubscriber</A></B>(java.lang.String&nbsp;publisherQueue,
               java.lang.String&nbsp;subscriberQueue)</CODE>
 
@@ -125,7 +125,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ApiRespo
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#addUserToGroup(java.lang.String, java.lang.String)">addUserToGroup</A></B>(java.lang.String&nbsp;userId,
                java.lang.String&nbsp;groupId)</CODE>
 
@@ -134,7 +134,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ApiRespo
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#apiRequest(org.springframework.http.HttpMethod, java.util.Map, java.lang.Object, java.lang.String...)">apiRequest</A></B>(org.springframework.http.HttpMethod&nbsp;method,
            java.util.Map&lt;java.lang.String,java.lang.Object&gt;&nbsp;params,
            java.lang.Object&nbsp;data,
@@ -145,7 +145,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ApiRespo
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#authorizeAppClient(java.lang.String, java.lang.String)">authorizeAppClient</A></B>(java.lang.String&nbsp;clientId,
                    java.lang.String&nbsp;clientSecret)</CODE>
 
@@ -154,7 +154,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ApiRespo
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#authorizeAppUser(java.lang.String, java.lang.String)">authorizeAppUser</A></B>(java.lang.String&nbsp;email,
                  java.lang.String&nbsp;password)</CODE>
 
@@ -163,7 +163,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ApiRespo
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#authorizeAppUserViaFacebook(java.lang.String)">authorizeAppUserViaFacebook</A></B>(java.lang.String&nbsp;fb_access_token)</CODE>
 
 <BR>
@@ -172,7 +172,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ApiRespo
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#authorizeAppUserViaPin(java.lang.String, java.lang.String)">authorizeAppUserViaPin</A></B>(java.lang.String&nbsp;email,
                        java.lang.String&nbsp;pin)</CODE>
 
@@ -181,7 +181,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ApiRespo
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#connectEntities(java.lang.String, java.lang.String, java.lang.String, java.lang.String)">connectEntities</A></B>(java.lang.String&nbsp;connectingEntityType,
                 java.lang.String&nbsp;connectingEntityId,
                 java.lang.String&nbsp;connectionType,
@@ -192,15 +192,15 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ApiRespo
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#createEntity(org.usergrid.android.client.entities.Entity)">createEntity</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;entity)</CODE>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#createEntity(org.apache.usergrid.android.client.entities.Entity)">createEntity</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;entity)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a new entity on the server.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#createEntity(java.util.Map)">createEntity</A></B>(java.util.Map&lt;java.lang.String,java.lang.Object&gt;&nbsp;properties)</CODE>
 
 <BR>
@@ -208,7 +208,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ApiRespo
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#createGroup(java.lang.String)">createGroup</A></B>(java.lang.String&nbsp;groupPath)</CODE>
 
 <BR>
@@ -216,7 +216,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ApiRespo
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#createGroup(java.lang.String, java.lang.String)">createGroup</A></B>(java.lang.String&nbsp;groupPath,
             java.lang.String&nbsp;groupTitle)</CODE>
 
@@ -225,7 +225,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ApiRespo
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#createUser(java.lang.String, java.lang.String, java.lang.String, java.lang.String)">createUser</A></B>(java.lang.String&nbsp;username,
            java.lang.String&nbsp;name,
            java.lang.String&nbsp;email,
@@ -236,7 +236,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ApiRespo
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#disconnectEntities(java.lang.String, java.lang.String, java.lang.String, java.lang.String)">disconnectEntities</A></B>(java.lang.String&nbsp;connectingEntityType,
                    java.lang.String&nbsp;connectingEntityId,
                    java.lang.String&nbsp;connectionType,
@@ -247,15 +247,15 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ApiRespo
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#getMessages(java.lang.String, java.lang.String, java.util.UUID, java.lang.Long, java.lang.Integer, java.lang.Integer, java.lang.Integer, org.usergrid.android.client.Client.QueuePosition, java.lang.Boolean, java.lang.Boolean)">getMessages</A></B>(java.lang.String&nbsp;path,
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#getMessages(java.lang.String, java.lang.String, java.util.UUID, java.lang.Long, java.lang.Integer, java.lang.Integer, java.lang.Integer, org.apache.usergrid.android.client.Client.QueuePosition, java.lang.Boolean, java.lang.Boolean)">getMessages</A></B>(java.lang.String&nbsp;path,
             java.lang.String&nbsp;consumer,
             java.util.UUID&nbsp;last,
             java.lang.Long&nbsp;time,
             java.lang.Integer&nbsp;prev,
             java.lang.Integer&nbsp;next,
             java.lang.Integer&nbsp;limit,
-            <A HREF="../../../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A>&nbsp;pos,
+            <A HREF="../../../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A>&nbsp;pos,
             java.lang.Boolean&nbsp;update,
             java.lang.Boolean&nbsp;sync)</CODE>
 
@@ -264,7 +264,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ApiRespo
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B>Client.Query.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.Query.html#getResponse()">getResponse</A></B>()</CODE>
 
 <BR>
@@ -272,22 +272,22 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ApiRespo
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postGroupActivity(java.lang.String, org.usergrid.android.client.entities.Activity)">postGroupActivity</A></B>(java.lang.String&nbsp;groupId,
-                  <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>&nbsp;activity)</CODE>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postGroupActivity(java.lang.String, org.apache.usergrid.android.client.entities.Activity)">postGroupActivity</A></B>(java.lang.String&nbsp;groupId,
+                  <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>&nbsp;activity)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Posts an activity to a group.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postGroupActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.entities.User, org.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)">postGroupActivity</A></B>(java.lang.String&nbsp;verb,
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postGroupActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.entities.User, org.apache.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)">postGroupActivity</A></B>(java.lang.String&nbsp;verb,
                   java.lang.String&nbsp;title,
                   java.lang.String&nbsp;content,
                   java.lang.String&nbsp;category,
-                  <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>&nbsp;user,
-                  <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;object,
+                  <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>&nbsp;user,
+                  <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;object,
                   java.lang.String&nbsp;objectType,
                   java.lang.String&nbsp;objectName,
                   java.lang.String&nbsp;objectContent)</CODE>
@@ -297,7 +297,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ApiRespo
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postMessage(java.lang.String, java.util.List)">postMessage</A></B>(java.lang.String&nbsp;path,
             java.util.List&lt;java.util.Map&lt;java.lang.String,java.lang.Object&gt;&gt;&nbsp;messages)</CODE>
 
@@ -306,7 +306,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ApiRespo
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postMessage(java.lang.String, java.util.Map)">postMessage</A></B>(java.lang.String&nbsp;path,
             java.util.Map&lt;java.lang.String,java.lang.Object&gt;&nbsp;message)</CODE>
 
@@ -315,22 +315,22 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ApiRespo
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postUserActivity(java.lang.String, org.usergrid.android.client.entities.Activity)">postUserActivity</A></B>(java.lang.String&nbsp;userId,
-                 <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>&nbsp;activity)</CODE>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postUserActivity(java.lang.String, org.apache.usergrid.android.client.entities.Activity)">postUserActivity</A></B>(java.lang.String&nbsp;userId,
+                 <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>&nbsp;activity)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Posts an activity to a user.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postUserActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.entities.User, org.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)">postUserActivity</A></B>(java.lang.String&nbsp;verb,
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postUserActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.entities.User, org.apache.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)">postUserActivity</A></B>(java.lang.String&nbsp;verb,
                  java.lang.String&nbsp;title,
                  java.lang.String&nbsp;content,
                  java.lang.String&nbsp;category,
-                 <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>&nbsp;user,
-                 <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;object,
+                 <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>&nbsp;user,
+                 <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;object,
                  java.lang.String&nbsp;objectType,
                  java.lang.String&nbsp;objectName,
                  java.lang.String&nbsp;objectContent)</CODE>
@@ -340,7 +340,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ApiRespo
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#removeSubscriber(java.lang.String, java.lang.String)">removeSubscriber</A></B>(java.lang.String&nbsp;publisherQueue,
                  java.lang.String&nbsp;subscriberQueue)</CODE>
 
@@ -350,11 +350,11 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ApiRespo
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client.callbacks"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client.callbacks"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A> in <A HREF="../../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.usergrid.android.client.callbacks</A></FONT></TH>
+Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A> in <A HREF="../../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.apache.usergrid.android.client.callbacks</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -362,12 +362,12 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ApiRespo
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.usergrid.android.client.callbacks</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.apache.usergrid.android.client.callbacks</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>ApiResponseCallback.</B><B><A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html#onResponse(org.usergrid.android.client.response.ApiResponse)">onResponse</A></B>(<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>&nbsp;response)</CODE>
+<TD><CODE><B>ApiResponseCallback.</B><B><A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html#onResponse(org.apache.usergrid.android.client.response.ApiResponse)">onResponse</A></B>(<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>&nbsp;response)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -389,7 +389,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ApiRespo
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/response/class-use/ClientCredentialsInfo.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/response/class-use/ClientCredentialsInfo.html b/sdks/android/doc/org/usergrid/android/client/response/class-use/ClientCredentialsInfo.html
index db03b16..114c374 100644
--- a/sdks/android/doc/org/usergrid/android/client/response/class-use/ClientCredentialsInfo.html
+++ b/sdks/android/doc/org/usergrid/android/client/response/class-use/ClientCredentialsInfo.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Class org.usergrid.android.client.response.ClientCredentialsInfo
+Uses of Class org.apache.usergrid.android.client.response.ClientCredentialsInfo
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Class org.usergrid.android.client.response.ClientCredentialsInfo
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Class org.usergrid.android.client.response.ClientCredentialsInfo";
+        parent.document.title="Uses of Class org.apache.usergrid.android.client.response.ClientCredentialsInfo";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,26 +81,26 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Class<br>org.usergrid.android.client.response.ClientCredentialsInfo</B></H2>
+<B>Uses of Class<br>org.apache.usergrid.android.client.response.ClientCredentialsInfo</B></H2>
 </CENTER>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Packages that use <A HREF="../../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response">ClientCredentialsInfo</A></FONT></TH>
+Packages that use <A HREF="../../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response">ClientCredentialsInfo</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client.response"><B>org.usergrid.android.client.response</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client.response"><B>org.apache.usergrid.android.client.response</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client.response"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client.response"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response">ClientCredentialsInfo</A> in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A></FONT></TH>
+Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response">ClientCredentialsInfo</A> in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -108,11 +108,11 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ClientCr
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A> that return <A HREF="../../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response">ClientCredentialsInfo</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A> that return <A HREF="../../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response">ClientCredentialsInfo</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response">ClientCredentialsInfo</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response">ClientCredentialsInfo</A></CODE></FONT></TD>
 <TD><CODE><B>ApiResponse.</B><B><A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html#getCredentials()">getCredentials</A></B>()</CODE>
 
 <BR>
@@ -124,12 +124,12 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ClientCr
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response">ClientCredentialsInfo</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response">ClientCredentialsInfo</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>ApiResponse.</B><B><A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html#setCredentials(org.usergrid.android.client.response.ClientCredentialsInfo)">setCredentials</A></B>(<A HREF="../../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response">ClientCredentialsInfo</A>&nbsp;credentials)</CODE>
+<TD><CODE><B>ApiResponse.</B><B><A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html#setCredentials(org.apache.usergrid.android.client.response.ClientCredentialsInfo)">setCredentials</A></B>(<A HREF="../../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response">ClientCredentialsInfo</A>&nbsp;credentials)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -151,7 +151,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ClientCr
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/response/class-use/QueueInfo.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/response/class-use/QueueInfo.html b/sdks/android/doc/org/usergrid/android/client/response/class-use/QueueInfo.html
index 91798c0..c97939a 100644
--- a/sdks/android/doc/org/usergrid/android/client/response/class-use/QueueInfo.html
+++ b/sdks/android/doc/org/usergrid/android/client/response/class-use/QueueInfo.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Class org.usergrid.android.client.response.QueueInfo
+Uses of Class org.apache.usergrid.android.client.response.QueueInfo
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Class org.usergrid.android.client.response.QueueInfo
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Class org.usergrid.android.client.response.QueueInfo";
+        parent.document.title="Uses of Class org.apache.usergrid.android.client.response.QueueInfo";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,26 +81,26 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Class<br>org.usergrid.android.client.response.QueueInfo</B></H2>
+<B>Uses of Class<br>org.apache.usergrid.android.client.response.QueueInfo</B></H2>
 </CENTER>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Packages that use <A HREF="../../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response">QueueInfo</A></FONT></TH>
+Packages that use <A HREF="../../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response">QueueInfo</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client.response"><B>org.usergrid.android.client.response</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client.response"><B>org.apache.usergrid.android.client.response</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client.response"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client.response"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response">QueueInfo</A> in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A></FONT></TH>
+Uses of <A HREF="../../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response">QueueInfo</A> in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -108,11 +108,11 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/QueueInf
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A> that return <A HREF="../../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response">QueueInfo</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A> that return <A HREF="../../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response">QueueInfo</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response">QueueInfo</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response">QueueInfo</A></CODE></FONT></TD>
 <TD><CODE><B>ApiResponse.</B><B><A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html#getFirstQueue()">getFirstQueue</A></B>()</CODE>
 
 <BR>
@@ -120,7 +120,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/QueueInf
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response">QueueInfo</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response">QueueInfo</A></CODE></FONT></TD>
 <TD><CODE><B>ApiResponse.</B><B><A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html#getLastQueue()">getLastQueue</A></B>()</CODE>
 
 <BR>
@@ -132,11 +132,11 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/QueueInf
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A> that return types with arguments of type <A HREF="../../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response">QueueInfo</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A> that return types with arguments of type <A HREF="../../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response">QueueInfo</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response">QueueInfo</A>&gt;</CODE></FONT></TD>
+<CODE>&nbsp;java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response">QueueInfo</A>&gt;</CODE></FONT></TD>
 <TD><CODE><B>ApiResponse.</B><B><A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html#getQueues()">getQueues</A></B>()</CODE>
 
 <BR>
@@ -148,12 +148,12 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/QueueInf
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Method parameters in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A> with type arguments of type <A HREF="../../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response">QueueInfo</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Method parameters in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A> with type arguments of type <A HREF="../../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response">QueueInfo</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>ApiResponse.</B><B><A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html#setQueues(java.util.List)">setQueues</A></B>(java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response">QueueInfo</A>&gt;&nbsp;queues)</CODE>
+<TD><CODE><B>ApiResponse.</B><B><A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html#setQueues(java.util.List)">setQueues</A></B>(java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response">QueueInfo</A>&gt;&nbsp;queues)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -175,7 +175,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/QueueInf
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/response/package-frame.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/response/package-frame.html b/sdks/android/doc/org/usergrid/android/client/response/package-frame.html
index 2ddf18e..6b64314 100644
--- a/sdks/android/doc/org/usergrid/android/client/response/package-frame.html
+++ b/sdks/android/doc/org/usergrid/android/client/response/package-frame.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-org.usergrid.android.client.response
+org.apache.usergrid.android.client.response
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -16,22 +16,22 @@ org.usergrid.android.client.response
 
 <BODY BGCOLOR="white">
 <FONT size="+1" CLASS="FrameTitleFont">
-<A HREF="../../../../../org/usergrid/android/client/response/package-summary.html" target="classFrame">org.usergrid.android.client.response</A></FONT>
+<A HREF="../../../../../org/usergrid/android/client/response/package-summary.html" target="classFrame">org.apache.usergrid.android.client.response</A></FONT>
 <TABLE BORDER="0" WIDTH="100%" SUMMARY="">
 <TR>
 <TD NOWRAP><FONT size="+1" CLASS="FrameHeadingFont">
 Classes</FONT>&nbsp;
 <FONT CLASS="FrameItemFont">
 <BR>
-<A HREF="AggregateCounter.html" title="class in org.usergrid.android.client.response" target="classFrame">AggregateCounter</A>
+<A HREF="AggregateCounter.html" title="class in org.apache.usergrid.android.client.response" target="classFrame">AggregateCounter</A>
 <BR>
-<A HREF="AggregateCounterSet.html" title="class in org.usergrid.android.client.response" target="classFrame">AggregateCounterSet</A>
+<A HREF="AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response" target="classFrame">AggregateCounterSet</A>
 <BR>
-<A HREF="ApiResponse.html" title="class in org.usergrid.android.client.response" target="classFrame">ApiResponse</A>
+<A HREF="ApiResponse.html" title="class in org.apache.usergrid.android.client.response" target="classFrame">ApiResponse</A>
 <BR>
-<A HREF="ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response" target="classFrame">ClientCredentialsInfo</A>
+<A HREF="ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response" target="classFrame">ClientCredentialsInfo</A>
 <BR>
-<A HREF="QueueInfo.html" title="class in org.usergrid.android.client.response" target="classFrame">QueueInfo</A></FONT></TD>
+<A HREF="QueueInfo.html" title="class in org.apache.usergrid.android.client.response" target="classFrame">QueueInfo</A></FONT></TD>
 </TR>
 </TABLE>
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/response/package-summary.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/response/package-summary.html b/sdks/android/doc/org/usergrid/android/client/response/package-summary.html
index 8aa0fa8..9ae6c1c 100644
--- a/sdks/android/doc/org/usergrid/android/client/response/package-summary.html
+++ b/sdks/android/doc/org/usergrid/android/client/response/package-summary.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-org.usergrid.android.client.response
+org.apache.usergrid.android.client.response
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ org.usergrid.android.client.response
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="org.usergrid.android.client.response";
+        parent.document.title="org.apache.usergrid.android.client.response";
     }
 }
 </SCRIPT>
@@ -80,7 +80,7 @@ function windowTitle()
 
 <HR>
 <H2>
-Package org.usergrid.android.client.response
+Package org.apache.usergrid.android.client.response
 </H2>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
@@ -89,23 +89,23 @@ Package org.usergrid.android.client.response
 <B>Class Summary</B></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response">AggregateCounter</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response">AggregateCounter</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response">AggregateCounterSet</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response">AggregateCounterSet</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response">ClientCredentialsInfo</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response">ClientCredentialsInfo</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response">QueueInfo</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response">QueueInfo</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 </TABLE>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/response/package-tree.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/response/package-tree.html b/sdks/android/doc/org/usergrid/android/client/response/package-tree.html
index b539912..69c40bd 100644
--- a/sdks/android/doc/org/usergrid/android/client/response/package-tree.html
+++ b/sdks/android/doc/org/usergrid/android/client/response/package-tree.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-org.usergrid.android.client.response Class Hierarchy
+org.apache.usergrid.android.client.response Class Hierarchy
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ org.usergrid.android.client.response Class Hierarchy
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="org.usergrid.android.client.response Class Hierarchy";
+        parent.document.title="org.apache.usergrid.android.client.response Class Hierarchy";
     }
 }
 </SCRIPT>
@@ -81,7 +81,7 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-Hierarchy For Package org.usergrid.android.client.response
+Hierarchy For Package org.apache.usergrid.android.client.response
 </H2>
 </CENTER>
 <DL>
@@ -92,7 +92,7 @@ Class Hierarchy
 </H2>
 <UL>
 <LI TYPE="circle">java.lang.Object<UL>
-<LI TYPE="circle">org.usergrid.android.client.response.<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response"><B>AggregateCounter</B></A><LI TYPE="circle">org.usergrid.android.client.response.<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response"><B>AggregateCounterSet</B></A><LI TYPE="circle">org.usergrid.android.client.response.<A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response"><B>ApiResponse</B></A><LI TYPE="circle">org.usergrid.android.client.response.<A HREF="../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response"><B>ClientCredentialsInfo</B></A><LI TYPE="circle">org.usergrid.android.client.response.<A HREF="../../../../../org/usergrid/android/client/resp
 onse/QueueInfo.html" title="class in org.usergrid.android.client.response"><B>QueueInfo</B></A></UL>
+<LI TYPE="circle">org.apache.usergrid.android.client.response.<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response"><B>AggregateCounter</B></A><LI TYPE="circle">org.apache.usergrid.android.client.response.<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response"><B>AggregateCounterSet</B></A><LI TYPE="circle">org.apache.usergrid.android.client.response.<A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response"><B>ApiResponse</B></A><LI TYPE="circle">org.apache.usergrid.android.client.response.<A HREF="../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response"><B>ClientCredentialsInfo</B></A><LI TYPE="circle">org.apache.usergrid.android.client.re
 sponse.<A HREF="../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response"><B>QueueInfo</B></A></UL>
 </UL>
 <HR>
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/response/package-use.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/response/package-use.html b/sdks/android/doc/org/usergrid/android/client/response/package-use.html
index c777bd3..0fdb799 100644
--- a/sdks/android/doc/org/usergrid/android/client/response/package-use.html
+++ b/sdks/android/doc/org/usergrid/android/client/response/package-use.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Package org.usergrid.android.client.response
+Uses of Package org.apache.usergrid.android.client.response
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Package org.usergrid.android.client.response
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Package org.usergrid.android.client.response";
+        parent.document.title="Uses of Package org.apache.usergrid.android.client.response";
     }
 }
 </SCRIPT>
@@ -81,37 +81,37 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Package<br>org.usergrid.android.client.response</B></H2>
+<B>Uses of Package<br>org.apache.usergrid.android.client.response</B></H2>
 </CENTER>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Packages that use <A HREF="../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A></FONT></TH>
+Packages that use <A HREF="../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client"><B>org.usergrid.android.client</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client"><B>org.apache.usergrid.android.client</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client.callbacks"><B>org.usergrid.android.client.callbacks</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client.callbacks"><B>org.apache.usergrid.android.client.callbacks</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client.response"><B>org.usergrid.android.client.response</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client.response"><B>org.apache.usergrid.android.client.response</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Classes in <A HREF="../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A> used by <A HREF="../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A></FONT></TH>
+Classes in <A HREF="../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A> used by <A HREF="../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../../org/usergrid/android/client/response/class-use/ApiResponse.html#org.usergrid.android.client"><B>ApiResponse</B></A></B>
+<TD><B><A HREF="../../../../../org/usergrid/android/client/response/class-use/ApiResponse.html#org.apache.usergrid.android.client"><B>ApiResponse</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -119,14 +119,14 @@ Classes in <A HREF="../../../../../org/usergrid/android/client/response/package-
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client.callbacks"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client.callbacks"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Classes in <A HREF="../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A> used by <A HREF="../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.usergrid.android.client.callbacks</A></FONT></TH>
+Classes in <A HREF="../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A> used by <A HREF="../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.apache.usergrid.android.client.callbacks</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../../org/usergrid/android/client/response/class-use/ApiResponse.html#org.usergrid.android.client.callbacks"><B>ApiResponse</B></A></B>
+<TD><B><A HREF="../../../../../org/usergrid/android/client/response/class-use/ApiResponse.html#org.apache.usergrid.android.client.callbacks"><B>ApiResponse</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -134,32 +134,32 @@ Classes in <A HREF="../../../../../org/usergrid/android/client/response/package-
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client.response"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client.response"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Classes in <A HREF="../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A> used by <A HREF="../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A></FONT></TH>
+Classes in <A HREF="../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A> used by <A HREF="../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../../org/usergrid/android/client/response/class-use/AggregateCounter.html#org.usergrid.android.client.response"><B>AggregateCounter</B></A></B>
+<TD><B><A HREF="../../../../../org/usergrid/android/client/response/class-use/AggregateCounter.html#org.apache.usergrid.android.client.response"><B>AggregateCounter</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../../org/usergrid/android/client/response/class-use/AggregateCounterSet.html#org.usergrid.android.client.response"><B>AggregateCounterSet</B></A></B>
+<TD><B><A HREF="../../../../../org/usergrid/android/client/response/class-use/AggregateCounterSet.html#org.apache.usergrid.android.client.response"><B>AggregateCounterSet</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../../org/usergrid/android/client/response/class-use/ClientCredentialsInfo.html#org.usergrid.android.client.response"><B>ClientCredentialsInfo</B></A></B>
+<TD><B><A HREF="../../../../../org/usergrid/android/client/response/class-use/ClientCredentialsInfo.html#org.apache.usergrid.android.client.response"><B>ClientCredentialsInfo</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../../org/usergrid/android/client/response/class-use/QueueInfo.html#org.usergrid.android.client.response"><B>QueueInfo</B></A></B>
+<TD><B><A HREF="../../../../../org/usergrid/android/client/response/class-use/QueueInfo.html#org.apache.usergrid.android.client.response"><B>QueueInfo</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/utils/DeviceUuidFactory.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/utils/DeviceUuidFactory.html b/sdks/android/doc/org/usergrid/android/client/utils/DeviceUuidFactory.html
index ee499d6..40b5d83 100644
--- a/sdks/android/doc/org/usergrid/android/client/utils/DeviceUuidFactory.html
+++ b/sdks/android/doc/org/usergrid/android/client/utils/DeviceUuidFactory.html
@@ -56,7 +56,7 @@ function windowTitle()
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 &nbsp;PREV CLASS&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.usergrid.android.client.utils"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.apache.usergrid.android.client.utils"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/utils/DeviceUuidFactory.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="DeviceUuidFactory.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
@@ -88,12 +88,12 @@ DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&n
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client.utils</FONT>
+org.apache.usergrid.android.client.utils</FONT>
 <BR>
 Class DeviceUuidFactory</H2>
 <PRE>
 java.lang.Object
-  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.usergrid.android.client.utils.DeviceUuidFactory</B>
+  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.usergrid.android.client.utils.DeviceUuidFactory</B>
 </PRE>
 <HR>
 <DL>
@@ -251,7 +251,7 @@ public java.util.UUID <B>getDeviceUuid</B>()</PRE>
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 &nbsp;PREV CLASS&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.usergrid.android.client.utils"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.apache.usergrid.android.client.utils"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/utils/DeviceUuidFactory.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="DeviceUuidFactory.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/utils/JsonUtils.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/utils/JsonUtils.html b/sdks/android/doc/org/usergrid/android/client/utils/JsonUtils.html
index b3249b8..20b8e5b 100644
--- a/sdks/android/doc/org/usergrid/android/client/utils/JsonUtils.html
+++ b/sdks/android/doc/org/usergrid/android/client/utils/JsonUtils.html
@@ -55,8 +55,8 @@ function windowTitle()
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/DeviceUuidFactory.html" title="class in org.usergrid.android.client.utils"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/MapUtils.html" title="class in org.usergrid.android.client.utils"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/DeviceUuidFactory.html" title="class in org.apache.usergrid.android.client.utils"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/MapUtils.html" title="class in org.apache.usergrid.android.client.utils"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/utils/JsonUtils.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="JsonUtils.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
@@ -88,12 +88,12 @@ DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&n
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client.utils</FONT>
+org.apache.usergrid.android.client.utils</FONT>
 <BR>
 Class JsonUtils</H2>
 <PRE>
 java.lang.Object
-  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.usergrid.android.client.utils.JsonUtils</B>
+  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.usergrid.android.client.utils.JsonUtils</B>
 </PRE>
 <HR>
 <DL>
@@ -521,8 +521,8 @@ public static void <B>setObjectProperty</B>(java.util.Map&lt;java.lang.String,or
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/DeviceUuidFactory.html" title="class in org.usergrid.android.client.utils"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/MapUtils.html" title="class in org.usergrid.android.client.utils"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/DeviceUuidFactory.html" title="class in org.apache.usergrid.android.client.utils"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/MapUtils.html" title="class in org.apache.usergrid.android.client.utils"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/utils/JsonUtils.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="JsonUtils.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/utils/MapUtils.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/utils/MapUtils.html b/sdks/android/doc/org/usergrid/android/client/utils/MapUtils.html
index f1ccae2..8734258 100644
--- a/sdks/android/doc/org/usergrid/android/client/utils/MapUtils.html
+++ b/sdks/android/doc/org/usergrid/android/client/utils/MapUtils.html
@@ -55,8 +55,8 @@ function windowTitle()
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.usergrid.android.client.utils"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.usergrid.android.client.utils"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.apache.usergrid.android.client.utils"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.apache.usergrid.android.client.utils"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/utils/MapUtils.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="MapUtils.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
@@ -88,12 +88,12 @@ DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&n
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client.utils</FONT>
+org.apache.usergrid.android.client.utils</FONT>
 <BR>
 Class MapUtils</H2>
 <PRE>
 java.lang.Object
-  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.usergrid.android.client.utils.MapUtils</B>
+  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.usergrid.android.client.utils.MapUtils</B>
 </PRE>
 <HR>
 <DL>
@@ -226,8 +226,8 @@ public static &lt;T&gt; java.util.Map&lt;java.lang.String,T&gt; <B>newMapWithout
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.usergrid.android.client.utils"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.usergrid.android.client.utils"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.apache.usergrid.android.client.utils"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.apache.usergrid.android.client.utils"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/utils/MapUtils.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="MapUtils.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/utils/ObjectUtils.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/utils/ObjectUtils.html b/sdks/android/doc/org/usergrid/android/client/utils/ObjectUtils.html
index f4f63c0..588063e 100644
--- a/sdks/android/doc/org/usergrid/android/client/utils/ObjectUtils.html
+++ b/sdks/android/doc/org/usergrid/android/client/utils/ObjectUtils.html
@@ -55,8 +55,8 @@ function windowTitle()
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/MapUtils.html" title="class in org.usergrid.android.client.utils"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/UrlUtils.html" title="class in org.usergrid.android.client.utils"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/MapUtils.html" title="class in org.apache.usergrid.android.client.utils"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/UrlUtils.html" title="class in org.apache.usergrid.android.client.utils"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/utils/ObjectUtils.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="ObjectUtils.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
@@ -88,12 +88,12 @@ DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&n
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client.utils</FONT>
+org.apache.usergrid.android.client.utils</FONT>
 <BR>
 Class ObjectUtils</H2>
 <PRE>
 java.lang.Object
-  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.usergrid.android.client.utils.ObjectUtils</B>
+  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.usergrid.android.client.utils.ObjectUtils</B>
 </PRE>
 <HR>
 <DL>
@@ -217,8 +217,8 @@ public static boolean <B>isEmpty</B>(java.lang.Object&nbsp;s)</PRE>
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/MapUtils.html" title="class in org.usergrid.android.client.utils"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/UrlUtils.html" title="class in org.usergrid.android.client.utils"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/MapUtils.html" title="class in org.apache.usergrid.android.client.utils"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/UrlUtils.html" title="class in org.apache.usergrid.android.client.utils"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/utils/ObjectUtils.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="ObjectUtils.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;


[88/96] [abbrv] USERGRID-2 package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/callbacks/ApiResponseCallback.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/callbacks/ApiResponseCallback.html b/sdks/android/doc/org/usergrid/android/client/callbacks/ApiResponseCallback.html
index 25cc622..5122c6d 100644
--- a/sdks/android/doc/org/usergrid/android/client/callbacks/ApiResponseCallback.html
+++ b/sdks/android/doc/org/usergrid/android/client/callbacks/ApiResponseCallback.html
@@ -56,7 +56,7 @@ function windowTitle()
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 &nbsp;PREV CLASS&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.usergrid.android.client.callbacks"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.apache.usergrid.android.client.callbacks"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/callbacks/ApiResponseCallback.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="ApiResponseCallback.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
@@ -88,15 +88,15 @@ DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHO
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client.callbacks</FONT>
+org.apache.usergrid.android.client.callbacks</FONT>
 <BR>
 Interface ApiResponseCallback</H2>
 <DL>
-<DT><B>All Superinterfaces:</B> <DD><A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks">ClientCallback</A>&lt;<A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>&gt;</DD>
+<DT><B>All Superinterfaces:</B> <DD><A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ClientCallback</A>&lt;<A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>&gt;</DD>
 </DL>
 <HR>
 <DL>
-<DT><PRE>public interface <B>ApiResponseCallback</B><DT>extends <A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks">ClientCallback</A>&lt;<A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>&gt;</DL>
+<DT><PRE>public interface <B>ApiResponseCallback</B><DT>extends <A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ClientCallback</A>&lt;<A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>&gt;</DL>
 </PRE>
 
 <P>
@@ -115,7 +115,7 @@ Interface ApiResponseCallback</H2>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html#onResponse(org.usergrid.android.client.response.ApiResponse)">onResponse</A></B>(<A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>&nbsp;response)</CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html#onResponse(org.apache.usergrid.android.client.response.ApiResponse)">onResponse</A></B>(<A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>&nbsp;response)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -124,7 +124,7 @@ Interface ApiResponseCallback</H2>
 &nbsp;<A NAME="methods_inherited_from_class_org.usergrid.android.client.callbacks.ClientCallback"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left"><B>Methods inherited from interface org.usergrid.android.client.callbacks.<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks">ClientCallback</A></B></TH>
+<TH ALIGN="left"><B>Methods inherited from interface org.apache.usergrid.android.client.callbacks.<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ClientCallback</A></B></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD><CODE><A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html#onException(java.lang.Exception)">onException</A></CODE></TD>
@@ -143,13 +143,13 @@ Interface ApiResponseCallback</H2>
 </TR>
 </TABLE>
 
-<A NAME="onResponse(org.usergrid.android.client.response.ApiResponse)"><!-- --></A><H3>
+<A NAME="onResponse(org.apache.usergrid.android.client.response.ApiResponse)"><!-- --></A><H3>
 onResponse</H3>
 <PRE>
-void <B>onResponse</B>(<A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>&nbsp;response)</PRE>
+void <B>onResponse</B>(<A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>&nbsp;response)</PRE>
 <DL>
 <DD><DL>
-<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html#onResponse(T)">onResponse</A></CODE> in interface <CODE><A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks">ClientCallback</A>&lt;<A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>&gt;</CODE></DL>
+<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html#onResponse(T)">onResponse</A></CODE> in interface <CODE><A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ClientCallback</A>&lt;<A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>&gt;</CODE></DL>
 </DD>
 <DD><DL>
 </DL>
@@ -187,7 +187,7 @@ void <B>onResponse</B>(<A HREF="../../../../../org/usergrid/android/client/respo
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 &nbsp;PREV CLASS&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.usergrid.android.client.callbacks"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.apache.usergrid.android.client.callbacks"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/callbacks/ApiResponseCallback.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="ApiResponseCallback.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/callbacks/ClientAsyncTask.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/callbacks/ClientAsyncTask.html b/sdks/android/doc/org/usergrid/android/client/callbacks/ClientAsyncTask.html
index 480f46a..0f662d0 100644
--- a/sdks/android/doc/org/usergrid/android/client/callbacks/ClientAsyncTask.html
+++ b/sdks/android/doc/org/usergrid/android/client/callbacks/ClientAsyncTask.html
@@ -55,8 +55,8 @@ function windowTitle()
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/callbacks/ClientAsyncTask.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="ClientAsyncTask.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
@@ -88,13 +88,13 @@ DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&n
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client.callbacks</FONT>
+org.apache.usergrid.android.client.callbacks</FONT>
 <BR>
 Class ClientAsyncTask&lt;T&gt;</H2>
 <PRE>
 java.lang.Object
   <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by ">android.os.AsyncTask&lt;java.lang.Void,java.lang.Exception,T&gt;
-      <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.usergrid.android.client.callbacks.ClientAsyncTask&lt;T&gt;</B>
+      <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.usergrid.android.client.callbacks.ClientAsyncTask&lt;T&gt;</B>
 </PRE>
 <HR>
 <DL>
@@ -134,7 +134,7 @@ java.lang.Object
 <B>Constructor Summary</B></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/callbacks/ClientAsyncTask.html#ClientAsyncTask(org.usergrid.android.client.callbacks.ClientCallback)">ClientAsyncTask</A></B>(<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks">ClientCallback</A>&lt;<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="type parameter in ClientAsyncTask">T</A>&gt;&nbsp;callback)</CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/callbacks/ClientAsyncTask.html#ClientAsyncTask(org.apache.usergrid.android.client.callbacks.ClientCallback)">ClientAsyncTask</A></B>(<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ClientCallback</A>&lt;<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="type parameter in ClientAsyncTask">T</A>&gt;&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -189,10 +189,10 @@ java.lang.Object
 </TR>
 </TABLE>
 
-<A NAME="ClientAsyncTask(org.usergrid.android.client.callbacks.ClientCallback)"><!-- --></A><H3>
+<A NAME="ClientAsyncTask(org.apache.usergrid.android.client.callbacks.ClientCallback)"><!-- --></A><H3>
 ClientAsyncTask</H3>
 <PRE>
-public <B>ClientAsyncTask</B>(<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks">ClientCallback</A>&lt;<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="type parameter in ClientAsyncTask">T</A>&gt;&nbsp;callback)</PRE>
+public <B>ClientAsyncTask</B>(<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ClientCallback</A>&lt;<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="type parameter in ClientAsyncTask">T</A>&gt;&nbsp;callback)</PRE>
 <DL>
 </DL>
 
@@ -246,8 +246,8 @@ public abstract <A HREF="../../../../../org/usergrid/android/client/callbacks/Cl
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/callbacks/ClientAsyncTask.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="ClientAsyncTask.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/callbacks/ClientCallback.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/callbacks/ClientCallback.html b/sdks/android/doc/org/usergrid/android/client/callbacks/ClientCallback.html
index 8826b25..49bf79e 100644
--- a/sdks/android/doc/org/usergrid/android/client/callbacks/ClientCallback.html
+++ b/sdks/android/doc/org/usergrid/android/client/callbacks/ClientCallback.html
@@ -55,8 +55,8 @@ function windowTitle()
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.usergrid.android.client.callbacks"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.apache.usergrid.android.client.callbacks"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/callbacks/ClientCallback.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="ClientCallback.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
@@ -88,11 +88,11 @@ DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHO
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client.callbacks</FONT>
+org.apache.usergrid.android.client.callbacks</FONT>
 <BR>
 Interface ClientCallback&lt;T&gt;</H2>
 <DL>
-<DT><B>All Known Subinterfaces:</B> <DD><A HREF="../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>, <A HREF="../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.usergrid.android.client.callbacks">DeviceRegistrationCallback</A>, <A HREF="../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.usergrid.android.client.callbacks">GroupsRetrievedCallback</A>, <A HREF="../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks">QueryResultsCallback</A></DD>
+<DT><B>All Known Subinterfaces:</B> <DD><A HREF="../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>, <A HREF="../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">DeviceRegistrationCallback</A>, <A HREF="../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">GroupsRetrievedCallback</A>, <A HREF="../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">QueryResultsCallback</A></DD>
 </DL>
 <HR>
 <DL>
@@ -193,8 +193,8 @@ void <B>onException</B>(java.lang.Exception&nbsp;e)</PRE>
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.usergrid.android.client.callbacks"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.apache.usergrid.android.client.callbacks"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/callbacks/ClientCallback.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="ClientCallback.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html b/sdks/android/doc/org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html
index ae96890..5f93d99 100644
--- a/sdks/android/doc/org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html
+++ b/sdks/android/doc/org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html
@@ -55,8 +55,8 @@ function windowTitle()
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="DeviceRegistrationCallback.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
@@ -88,15 +88,15 @@ DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHO
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client.callbacks</FONT>
+org.apache.usergrid.android.client.callbacks</FONT>
 <BR>
 Interface DeviceRegistrationCallback</H2>
 <DL>
-<DT><B>All Superinterfaces:</B> <DD><A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks">ClientCallback</A>&lt;<A HREF="../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities">Device</A>&gt;</DD>
+<DT><B>All Superinterfaces:</B> <DD><A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ClientCallback</A>&lt;<A HREF="../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities">Device</A>&gt;</DD>
 </DL>
 <HR>
 <DL>
-<DT><PRE>public interface <B>DeviceRegistrationCallback</B><DT>extends <A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks">ClientCallback</A>&lt;<A HREF="../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities">Device</A>&gt;</DL>
+<DT><PRE>public interface <B>DeviceRegistrationCallback</B><DT>extends <A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ClientCallback</A>&lt;<A HREF="../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities">Device</A>&gt;</DL>
 </PRE>
 
 <P>
@@ -115,7 +115,7 @@ Interface DeviceRegistrationCallback</H2>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html#onDeviceRegistration(org.usergrid.android.client.entities.Device)">onDeviceRegistration</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities">Device</A>&nbsp;device)</CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html#onDeviceRegistration(org.apache.usergrid.android.client.entities.Device)">onDeviceRegistration</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities">Device</A>&nbsp;device)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -124,7 +124,7 @@ Interface DeviceRegistrationCallback</H2>
 &nbsp;<A NAME="methods_inherited_from_class_org.usergrid.android.client.callbacks.ClientCallback"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left"><B>Methods inherited from interface org.usergrid.android.client.callbacks.<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks">ClientCallback</A></B></TH>
+<TH ALIGN="left"><B>Methods inherited from interface org.apache.usergrid.android.client.callbacks.<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ClientCallback</A></B></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD><CODE><A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html#onException(java.lang.Exception)">onException</A>, <A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html#onResponse(T)">onResponse</A></CODE></TD>
@@ -143,10 +143,10 @@ Interface DeviceRegistrationCallback</H2>
 </TR>
 </TABLE>
 
-<A NAME="onDeviceRegistration(org.usergrid.android.client.entities.Device)"><!-- --></A><H3>
+<A NAME="onDeviceRegistration(org.apache.usergrid.android.client.entities.Device)"><!-- --></A><H3>
 onDeviceRegistration</H3>
 <PRE>
-void <B>onDeviceRegistration</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities">Device</A>&nbsp;device)</PRE>
+void <B>onDeviceRegistration</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities">Device</A>&nbsp;device)</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -186,8 +186,8 @@ void <B>onDeviceRegistration</B>(<A HREF="../../../../../org/usergrid/android/cl
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="DeviceRegistrationCallback.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html b/sdks/android/doc/org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html
index 20bf35f..8e6bede 100644
--- a/sdks/android/doc/org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html
+++ b/sdks/android/doc/org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html
@@ -55,8 +55,8 @@ function windowTitle()
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="GroupsRetrievedCallback.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
@@ -88,15 +88,15 @@ DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHO
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client.callbacks</FONT>
+org.apache.usergrid.android.client.callbacks</FONT>
 <BR>
 Interface GroupsRetrievedCallback</H2>
 <DL>
-<DT><B>All Superinterfaces:</B> <DD><A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks">ClientCallback</A>&lt;java.util.Map&lt;java.lang.String,<A HREF="../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A>&gt;&gt;</DD>
+<DT><B>All Superinterfaces:</B> <DD><A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ClientCallback</A>&lt;java.util.Map&lt;java.lang.String,<A HREF="../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A>&gt;&gt;</DD>
 </DL>
 <HR>
 <DL>
-<DT><PRE>public interface <B>GroupsRetrievedCallback</B><DT>extends <A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks">ClientCallback</A>&lt;java.util.Map&lt;java.lang.String,<A HREF="../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A>&gt;&gt;</DL>
+<DT><PRE>public interface <B>GroupsRetrievedCallback</B><DT>extends <A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ClientCallback</A>&lt;java.util.Map&lt;java.lang.String,<A HREF="../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A>&gt;&gt;</DL>
 </PRE>
 
 <P>
@@ -115,7 +115,7 @@ Interface GroupsRetrievedCallback</H2>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html#onGroupsRetrieved(java.util.Map)">onGroupsRetrieved</A></B>(java.util.Map&lt;java.lang.String,<A HREF="../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A>&gt;&nbsp;groups)</CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html#onGroupsRetrieved(java.util.Map)">onGroupsRetrieved</A></B>(java.util.Map&lt;java.lang.String,<A HREF="../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A>&gt;&nbsp;groups)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -124,7 +124,7 @@ Interface GroupsRetrievedCallback</H2>
 &nbsp;<A NAME="methods_inherited_from_class_org.usergrid.android.client.callbacks.ClientCallback"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left"><B>Methods inherited from interface org.usergrid.android.client.callbacks.<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks">ClientCallback</A></B></TH>
+<TH ALIGN="left"><B>Methods inherited from interface org.apache.usergrid.android.client.callbacks.<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ClientCallback</A></B></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD><CODE><A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html#onException(java.lang.Exception)">onException</A>, <A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html#onResponse(T)">onResponse</A></CODE></TD>
@@ -146,7 +146,7 @@ Interface GroupsRetrievedCallback</H2>
 <A NAME="onGroupsRetrieved(java.util.Map)"><!-- --></A><H3>
 onGroupsRetrieved</H3>
 <PRE>
-void <B>onGroupsRetrieved</B>(java.util.Map&lt;java.lang.String,<A HREF="../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A>&gt;&nbsp;groups)</PRE>
+void <B>onGroupsRetrieved</B>(java.util.Map&lt;java.lang.String,<A HREF="../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A>&gt;&nbsp;groups)</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -186,8 +186,8 @@ void <B>onGroupsRetrieved</B>(java.util.Map&lt;java.lang.String,<A HREF="../../.
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="GroupsRetrievedCallback.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/callbacks/QueryResultsCallback.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/callbacks/QueryResultsCallback.html b/sdks/android/doc/org/usergrid/android/client/callbacks/QueryResultsCallback.html
index 800bc6e..8a9abdd 100644
--- a/sdks/android/doc/org/usergrid/android/client/callbacks/QueryResultsCallback.html
+++ b/sdks/android/doc/org/usergrid/android/client/callbacks/QueryResultsCallback.html
@@ -55,7 +55,7 @@ function windowTitle()
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>PREV CLASS</B></A>&nbsp;
 &nbsp;NEXT CLASS</FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/callbacks/QueryResultsCallback.html" target="_top"><B>FRAMES</B></A>  &nbsp;
@@ -88,15 +88,15 @@ DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHO
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client.callbacks</FONT>
+org.apache.usergrid.android.client.callbacks</FONT>
 <BR>
 Interface QueryResultsCallback</H2>
 <DL>
-<DT><B>All Superinterfaces:</B> <DD><A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks">ClientCallback</A>&lt;<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A>&gt;</DD>
+<DT><B>All Superinterfaces:</B> <DD><A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ClientCallback</A>&lt;<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A>&gt;</DD>
 </DL>
 <HR>
 <DL>
-<DT><PRE>public interface <B>QueryResultsCallback</B><DT>extends <A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks">ClientCallback</A>&lt;<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A>&gt;</DL>
+<DT><PRE>public interface <B>QueryResultsCallback</B><DT>extends <A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ClientCallback</A>&lt;<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A>&gt;</DL>
 </PRE>
 
 <P>
@@ -115,7 +115,7 @@ Interface QueryResultsCallback</H2>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html#onQueryResults(org.usergrid.android.client.Client.Query)">onQueryResults</A></B>(<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A>&nbsp;query)</CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html#onQueryResults(org.apache.usergrid.android.client.Client.Query)">onQueryResults</A></B>(<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A>&nbsp;query)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -124,7 +124,7 @@ Interface QueryResultsCallback</H2>
 &nbsp;<A NAME="methods_inherited_from_class_org.usergrid.android.client.callbacks.ClientCallback"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left"><B>Methods inherited from interface org.usergrid.android.client.callbacks.<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks">ClientCallback</A></B></TH>
+<TH ALIGN="left"><B>Methods inherited from interface org.apache.usergrid.android.client.callbacks.<A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ClientCallback</A></B></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD><CODE><A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html#onException(java.lang.Exception)">onException</A>, <A HREF="../../../../../org/usergrid/android/client/callbacks/ClientCallback.html#onResponse(T)">onResponse</A></CODE></TD>
@@ -143,10 +143,10 @@ Interface QueryResultsCallback</H2>
 </TR>
 </TABLE>
 
-<A NAME="onQueryResults(org.usergrid.android.client.Client.Query)"><!-- --></A><H3>
+<A NAME="onQueryResults(org.apache.usergrid.android.client.Client.Query)"><!-- --></A><H3>
 onQueryResults</H3>
 <PRE>
-void <B>onQueryResults</B>(<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A>&nbsp;query)</PRE>
+void <B>onQueryResults</B>(<A HREF="../../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A>&nbsp;query)</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -186,7 +186,7 @@ void <B>onQueryResults</B>(<A HREF="../../../../../org/usergrid/android/client/C
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>PREV CLASS</B></A>&nbsp;
 &nbsp;NEXT CLASS</FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/callbacks/QueryResultsCallback.html" target="_top"><B>FRAMES</B></A>  &nbsp;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/ApiResponseCallback.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/ApiResponseCallback.html b/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/ApiResponseCallback.html
index 4a6de9e..56c40c8 100644
--- a/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/ApiResponseCallback.html
+++ b/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/ApiResponseCallback.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Interface org.usergrid.android.client.callbacks.ApiResponseCallback
+Uses of Interface org.apache.usergrid.android.client.callbacks.ApiResponseCallback
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Interface org.usergrid.android.client.callbacks.ApiResponseCallback
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Interface org.usergrid.android.client.callbacks.ApiResponseCallback";
+        parent.document.title="Uses of Interface org.apache.usergrid.android.client.callbacks.ApiResponseCallback";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,26 +81,26 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Interface<br>org.usergrid.android.client.callbacks.ApiResponseCallback</B></H2>
+<B>Uses of Interface<br>org.apache.usergrid.android.client.callbacks.ApiResponseCallback</B></H2>
 </CENTER>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Packages that use <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A></FONT></TH>
+Packages that use <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client"><B>org.usergrid.android.client</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client"><B>org.apache.usergrid.android.client</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A> in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A></FONT></TH>
+Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A> in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -108,14 +108,14 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResp
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#addUserToGroupAsync(java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">addUserToGroupAsync</A></B>(java.lang.String&nbsp;userId,
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#addUserToGroupAsync(java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">addUserToGroupAsync</A></B>(java.lang.String&nbsp;userId,
                     java.lang.String&nbsp;groupId,
-                    <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+                    <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a user to the specified groups.</TD>
@@ -123,9 +123,9 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResp
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#authorizeAppClientAsync(java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">authorizeAppClientAsync</A></B>(java.lang.String&nbsp;clientId,
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#authorizeAppClientAsync(java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">authorizeAppClientAsync</A></B>(java.lang.String&nbsp;clientId,
                         java.lang.String&nbsp;clientSecret,
-                        <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+                        <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Log the app in with it's client id and client secret key.</TD>
@@ -133,9 +133,9 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResp
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#authorizeAppUserAsync(java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">authorizeAppUserAsync</A></B>(java.lang.String&nbsp;email,
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#authorizeAppUserAsync(java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">authorizeAppUserAsync</A></B>(java.lang.String&nbsp;email,
                       java.lang.String&nbsp;password,
-                      <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+                      <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Log the user in and get a valid access token.</TD>
@@ -143,8 +143,8 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResp
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#authorizeAppUserViaFacebookAsync(java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">authorizeAppUserViaFacebookAsync</A></B>(java.lang.String&nbsp;fb_access_token,
-                                 <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#authorizeAppUserViaFacebookAsync(java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">authorizeAppUserViaFacebookAsync</A></B>(java.lang.String&nbsp;fb_access_token,
+                                 <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Log the user in with their numeric pin-code and get a valid access token.</TD>
@@ -152,9 +152,9 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResp
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#authorizeAppUserViaPinAsync(java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">authorizeAppUserViaPinAsync</A></B>(java.lang.String&nbsp;email,
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#authorizeAppUserViaPinAsync(java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">authorizeAppUserViaPinAsync</A></B>(java.lang.String&nbsp;email,
                             java.lang.String&nbsp;pin,
-                            <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+                            <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Log the user in with their numeric pin-code and get a valid access token.</TD>
@@ -162,11 +162,11 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResp
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#connectEntitiesAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">connectEntitiesAsync</A></B>(java.lang.String&nbsp;connectingEntityType,
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#connectEntitiesAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">connectEntitiesAsync</A></B>(java.lang.String&nbsp;connectingEntityType,
                      java.lang.String&nbsp;connectingEntityId,
                      java.lang.String&nbsp;connectionType,
                      java.lang.String&nbsp;connectedEntityId,
-                     <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+                     <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Connect two entities together.</TD>
@@ -174,8 +174,8 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResp
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#createEntityAsync(org.usergrid.android.client.entities.Entity, org.usergrid.android.client.callbacks.ApiResponseCallback)">createEntityAsync</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;entity,
-                  <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#createEntityAsync(org.apache.usergrid.android.client.entities.Entity, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">createEntityAsync</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;entity,
+                  <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a new entity on the server.</TD>
@@ -183,8 +183,8 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResp
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#createEntityAsync(java.util.Map, org.usergrid.android.client.callbacks.ApiResponseCallback)">createEntityAsync</A></B>(java.util.Map&lt;java.lang.String,java.lang.Object&gt;&nbsp;properties,
-                  <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#createEntityAsync(java.util.Map, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">createEntityAsync</A></B>(java.util.Map&lt;java.lang.String,java.lang.Object&gt;&nbsp;properties,
+                  <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a new entity on the server from a set of properties.</TD>
@@ -192,8 +192,8 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResp
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#createGroupAsync(java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">createGroupAsync</A></B>(java.lang.String&nbsp;groupPath,
-                 <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#createGroupAsync(java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">createGroupAsync</A></B>(java.lang.String&nbsp;groupPath,
+                 <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a group with the specified group path.</TD>
@@ -201,9 +201,9 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResp
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#createGroupAsync(java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">createGroupAsync</A></B>(java.lang.String&nbsp;groupPath,
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#createGroupAsync(java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">createGroupAsync</A></B>(java.lang.String&nbsp;groupPath,
                  java.lang.String&nbsp;groupTitle,
-                 <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+                 <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a group with the specified group path and group title.</TD>
@@ -211,11 +211,11 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResp
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#createUserAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">createUserAsync</A></B>(java.lang.String&nbsp;username,
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#createUserAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">createUserAsync</A></B>(java.lang.String&nbsp;username,
                 java.lang.String&nbsp;name,
                 java.lang.String&nbsp;email,
                 java.lang.String&nbsp;password,
-                <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+                <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a user.</TD>
@@ -223,11 +223,11 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResp
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#disconnectEntitiesAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">disconnectEntitiesAsync</A></B>(java.lang.String&nbsp;connectingEntityType,
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#disconnectEntitiesAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">disconnectEntitiesAsync</A></B>(java.lang.String&nbsp;connectingEntityType,
                         java.lang.String&nbsp;connectingEntityId,
                         java.lang.String&nbsp;connectionType,
                         java.lang.String&nbsp;connectedEntityId,
-                        <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+                        <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Disconnect two entities.</TD>
@@ -235,16 +235,16 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResp
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postGroupActivityAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.entities.User, org.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">postGroupActivityAsync</A></B>(java.lang.String&nbsp;verb,
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postGroupActivityAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.entities.User, org.apache.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">postGroupActivityAsync</A></B>(java.lang.String&nbsp;verb,
                        java.lang.String&nbsp;title,
                        java.lang.String&nbsp;content,
                        java.lang.String&nbsp;category,
-                       <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>&nbsp;user,
-                       <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;object,
+                       <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>&nbsp;user,
+                       <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;object,
                        java.lang.String&nbsp;objectType,
                        java.lang.String&nbsp;objectName,
                        java.lang.String&nbsp;objectContent,
-                       <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+                       <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates and posts an activity to a group.</TD>
@@ -252,16 +252,16 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResp
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postUserActivityAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.entities.User, org.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">postUserActivityAsync</A></B>(java.lang.String&nbsp;verb,
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postUserActivityAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.entities.User, org.apache.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">postUserActivityAsync</A></B>(java.lang.String&nbsp;verb,
                       java.lang.String&nbsp;title,
                       java.lang.String&nbsp;content,
                       java.lang.String&nbsp;category,
-                      <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>&nbsp;user,
-                      <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;object,
+                      <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>&nbsp;user,
+                      <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;object,
                       java.lang.String&nbsp;objectType,
                       java.lang.String&nbsp;objectName,
                       java.lang.String&nbsp;objectContent,
-                      <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+                      <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates and posts an activity to a user.</TD>
@@ -283,7 +283,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResp
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/ClientAsyncTask.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/ClientAsyncTask.html b/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/ClientAsyncTask.html
index fc35304..36368ed 100644
--- a/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/ClientAsyncTask.html
+++ b/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/ClientAsyncTask.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Class org.usergrid.android.client.callbacks.ClientAsyncTask
+Uses of Class org.apache.usergrid.android.client.callbacks.ClientAsyncTask
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Class org.usergrid.android.client.callbacks.ClientAsyncTask
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Class org.usergrid.android.client.callbacks.ClientAsyncTask";
+        parent.document.title="Uses of Class org.apache.usergrid.android.client.callbacks.ClientAsyncTask";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.usergrid.android.client.callbacks"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.apache.usergrid.android.client.callbacks"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,9 +81,9 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Class<br>org.usergrid.android.client.callbacks.ClientAsyncTask</B></H2>
+<B>Uses of Class<br>org.apache.usergrid.android.client.callbacks.ClientAsyncTask</B></H2>
 </CENTER>
-No usage of org.usergrid.android.client.callbacks.ClientAsyncTask
+No usage of org.apache.usergrid.android.client.callbacks.ClientAsyncTask
 <P>
 <HR>
 
@@ -99,7 +99,7 @@ No usage of org.usergrid.android.client.callbacks.ClientAsyncTask
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.usergrid.android.client.callbacks"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.apache.usergrid.android.client.callbacks"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/ClientCallback.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/ClientCallback.html b/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/ClientCallback.html
index 555d8ba..76ca0f0 100644
--- a/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/ClientCallback.html
+++ b/sdks/android/doc/org/usergrid/android/client/callbacks/class-use/ClientCallback.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Interface org.usergrid.android.client.callbacks.ClientCallback
+Uses of Interface org.apache.usergrid.android.client.callbacks.ClientCallback
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Interface org.usergrid.android.client.callbacks.ClientCallback
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Interface org.usergrid.android.client.callbacks.ClientCallback";
+        parent.document.title="Uses of Interface org.apache.usergrid.android.client.callbacks.ClientCallback";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,26 +81,26 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Interface<br>org.usergrid.android.client.callbacks.ClientCallback</B></H2>
+<B>Uses of Interface<br>org.apache.usergrid.android.client.callbacks.ClientCallback</B></H2>
 </CENTER>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Packages that use <A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks">ClientCallback</A></FONT></TH>
+Packages that use <A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ClientCallback</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client.callbacks"><B>org.usergrid.android.client.callbacks</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client.callbacks"><B>org.apache.usergrid.android.client.callbacks</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client.callbacks"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client.callbacks"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks">ClientCallback</A> in <A HREF="../../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.usergrid.android.client.callbacks</A></FONT></TH>
+Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ClientCallback</A> in <A HREF="../../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.apache.usergrid.android.client.callbacks</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -108,12 +108,12 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientC
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Subinterfaces of <A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks">ClientCallback</A> in <A HREF="../../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.usergrid.android.client.callbacks</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Subinterfaces of <A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ClientCallback</A> in <A HREF="../../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.apache.usergrid.android.client.callbacks</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;interface</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A></B></CODE>
+<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A></B></CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -121,7 +121,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientC
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;interface</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.usergrid.android.client.callbacks">DeviceRegistrationCallback</A></B></CODE>
+<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">DeviceRegistrationCallback</A></B></CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -129,7 +129,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientC
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;interface</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.usergrid.android.client.callbacks">GroupsRetrievedCallback</A></B></CODE>
+<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">GroupsRetrievedCallback</A></B></CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -137,7 +137,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientC
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;interface</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks">QueryResultsCallback</A></B></CODE>
+<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">QueryResultsCallback</A></B></CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -148,10 +148,10 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientC
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Constructors in <A HREF="../../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.usergrid.android.client.callbacks</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks">ClientCallback</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Constructors in <A HREF="../../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.apache.usergrid.android.client.callbacks</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ClientCallback</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientAsyncTask.html#ClientAsyncTask(org.usergrid.android.client.callbacks.ClientCallback)">ClientAsyncTask</A></B>(<A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks">ClientCallback</A>&lt;<A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="type parameter in ClientAsyncTask">T</A>&gt;&nbsp;callback)</CODE>
+<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientAsyncTask.html#ClientAsyncTask(org.apache.usergrid.android.client.callbacks.ClientCallback)">ClientAsyncTask</A></B>(<A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ClientCallback</A>&lt;<A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="type parameter in ClientAsyncTask">T</A>&gt;&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -173,7 +173,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientC
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>


[73/96] [abbrv] USERGRID-2 package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/index-files/index-1.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/index-files/index-1.html b/sdks/android/doc/index-files/index-1.html
index 2aa919f..fcbad8c 100644
--- a/sdks/android/doc/index-files/index-1.html
+++ b/sdks/android/doc/index-files/index-1.html
@@ -82,72 +82,72 @@ function windowTitle()
 <A NAME="_A_"><!-- --></A><H2>
 <B>A</B></H2>
 <DL>
-<DT><A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities"><B>Activity</B></A> - Class in <A HREF="../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A><DD>An entity type for representing activity stream actions.<DT><A HREF="../org/usergrid/android/client/entities/Activity.html#Activity()"><B>Activity()</B></A> - 
-Constructor for class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+<DT><A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities"><B>Activity</B></A> - Class in <A HREF="../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A><DD>An entity type for representing activity stream actions.<DT><A HREF="../org/usergrid/android/client/entities/Activity.html#Activity()"><B>Activity()</B></A> - 
+Constructor for class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/entities/Activity.html#Activity(org.usergrid.android.client.entities.Entity)"><B>Activity(Entity)</B></A> - 
-Constructor for class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+<DT><A HREF="../org/usergrid/android/client/entities/Activity.html#Activity(org.apache.usergrid.android.client.entities.Entity)"><B>Activity(Entity)</B></A> - 
+Constructor for class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.usergrid.android.client.entities"><B>Activity.ActivityCollection</B></A> - Class in <A HREF="../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html#Activity.ActivityCollection()"><B>Activity.ActivityCollection()</B></A> - 
-Constructor for class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.usergrid.android.client.entities">Activity.ActivityCollection</A>
+<DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.apache.usergrid.android.client.entities"><B>Activity.ActivityCollection</B></A> - Class in <A HREF="../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html#Activity.ActivityCollection()"><B>Activity.ActivityCollection()</B></A> - 
+Constructor for class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityCollection</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities"><B>Activity.ActivityObject</B></A> - Class in <A HREF="../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#Activity.ActivityObject()"><B>Activity.ActivityObject()</B></A> - 
-Constructor for class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>
+<DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities"><B>Activity.ActivityObject</B></A> - Class in <A HREF="../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html#Activity.ActivityObject()"><B>Activity.ActivityObject()</B></A> - 
+Constructor for class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities"><B>Activity.MediaLink</B></A> - Class in <A HREF="../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html#Activity.MediaLink()"><B>Activity.MediaLink()</B></A> - 
-Constructor for class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A>
+<DT><A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities"><B>Activity.MediaLink</B></A> - Class in <A HREF="../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html#Activity.MediaLink()"><B>Activity.MediaLink()</B></A> - 
+Constructor for class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/utils/UrlUtils.html#addQueryParams(java.lang.String, java.util.Map)"><B>addQueryParams(String, Map&lt;String, Object&gt;)</B></A> - 
-Static method in class org.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/UrlUtils.html" title="class in org.usergrid.android.client.utils">UrlUtils</A>
+Static method in class org.apache.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/UrlUtils.html" title="class in org.apache.usergrid.android.client.utils">UrlUtils</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.html#addSubscriber(java.lang.String, java.lang.String)"><B>addSubscriber(String, String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.html#addUserToGroup(java.lang.String, java.lang.String)"><B>addUserToGroup(String, String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Adds a user to the specified groups.
-<DT><A HREF="../org/usergrid/android/client/Client.html#addUserToGroupAsync(java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)"><B>addUserToGroupAsync(String, String, ApiResponseCallback)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#addUserToGroupAsync(java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)"><B>addUserToGroupAsync(String, String, ApiResponseCallback)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Adds a user to the specified groups.
-<DT><A HREF="../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response"><B>AggregateCounter</B></A> - Class in <A HREF="../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/response/AggregateCounter.html#AggregateCounter(long, long)"><B>AggregateCounter(long, long)</B></A> - 
-Constructor for class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response">AggregateCounter</A>
+<DT><A HREF="../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response"><B>AggregateCounter</B></A> - Class in <A HREF="../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/response/AggregateCounter.html#AggregateCounter(long, long)"><B>AggregateCounter(long, long)</B></A> - 
+Constructor for class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response">AggregateCounter</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response"><B>AggregateCounterSet</B></A> - Class in <A HREF="../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html#AggregateCounterSet(java.lang.String, java.util.UUID, java.util.UUID, java.lang.String, java.util.List)"><B>AggregateCounterSet(String, UUID, UUID, String, List&lt;AggregateCounter&gt;)</B></A> - 
-Constructor for class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response">AggregateCounterSet</A>
+<DT><A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response"><B>AggregateCounterSet</B></A> - Class in <A HREF="../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html#AggregateCounterSet(java.lang.String, java.util.UUID, java.util.UUID, java.lang.String, java.util.List)"><B>AggregateCounterSet(String, UUID, UUID, String, List&lt;AggregateCounter&gt;)</B></A> - 
+Constructor for class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response">AggregateCounterSet</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html#AggregateCounterSet(java.lang.String, java.util.UUID, java.lang.String, java.util.List)"><B>AggregateCounterSet(String, UUID, String, List&lt;AggregateCounter&gt;)</B></A> - 
-Constructor for class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response">AggregateCounterSet</A>
+Constructor for class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response">AggregateCounterSet</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.html#apiRequest(org.springframework.http.HttpMethod, java.util.Map, java.lang.Object, java.lang.String...)"><B>apiRequest(HttpMethod, Map&lt;String, Object&gt;, Object, String...)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>High-level Usergrid API request.
-<DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response"><B>ApiResponse</B></A> - Class in <A HREF="../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#ApiResponse()"><B>ApiResponse()</B></A> - 
-Constructor for class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>
+<DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response"><B>ApiResponse</B></A> - Class in <A HREF="../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/response/ApiResponse.html#ApiResponse()"><B>ApiResponse()</B></A> - 
+Constructor for class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>ApiResponseCallback</B></A> - Interface in <A HREF="../org/usergrid/android/client/callbacks/package-summary.html">org.usergrid.android.client.callbacks</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/Client.html#authorizeAppClient(java.lang.String, java.lang.String)"><B>authorizeAppClient(String, String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>ApiResponseCallback</B></A> - Interface in <A HREF="../org/usergrid/android/client/callbacks/package-summary.html">org.apache.usergrid.android.client.callbacks</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/Client.html#authorizeAppClient(java.lang.String, java.lang.String)"><B>authorizeAppClient(String, String)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Log the app in with it's client id and client secret key.
-<DT><A HREF="../org/usergrid/android/client/Client.html#authorizeAppClientAsync(java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)"><B>authorizeAppClientAsync(String, String, ApiResponseCallback)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#authorizeAppClientAsync(java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)"><B>authorizeAppClientAsync(String, String, ApiResponseCallback)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Log the app in with it's client id and client secret key.
 <DT><A HREF="../org/usergrid/android/client/Client.html#authorizeAppUser(java.lang.String, java.lang.String)"><B>authorizeAppUser(String, String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Log the user in and get a valid access token.
-<DT><A HREF="../org/usergrid/android/client/Client.html#authorizeAppUserAsync(java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)"><B>authorizeAppUserAsync(String, String, ApiResponseCallback)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#authorizeAppUserAsync(java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)"><B>authorizeAppUserAsync(String, String, ApiResponseCallback)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Log the user in and get a valid access token.
 <DT><A HREF="../org/usergrid/android/client/Client.html#authorizeAppUserViaFacebook(java.lang.String)"><B>authorizeAppUserViaFacebook(String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Log the user in with their Facebook access token retrived via Facebook
  OAuth.
-<DT><A HREF="../org/usergrid/android/client/Client.html#authorizeAppUserViaFacebookAsync(java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)"><B>authorizeAppUserViaFacebookAsync(String, ApiResponseCallback)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#authorizeAppUserViaFacebookAsync(java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)"><B>authorizeAppUserViaFacebookAsync(String, ApiResponseCallback)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Log the user in with their numeric pin-code and get a valid access token.
 <DT><A HREF="../org/usergrid/android/client/Client.html#authorizeAppUserViaPin(java.lang.String, java.lang.String)"><B>authorizeAppUserViaPin(String, String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Log the user in with their numeric pin-code and get a valid access token.
-<DT><A HREF="../org/usergrid/android/client/Client.html#authorizeAppUserViaPinAsync(java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)"><B>authorizeAppUserViaPinAsync(String, String, ApiResponseCallback)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#authorizeAppUserViaPinAsync(java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)"><B>authorizeAppUserViaPinAsync(String, String, ApiResponseCallback)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Log the user in with their numeric pin-code and get a valid access token.
 </DL>
 <HR>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/index-files/index-10.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/index-files/index-10.html b/sdks/android/doc/index-files/index-10.html
index c8fb554..49ef5b3 100644
--- a/sdks/android/doc/index-files/index-10.html
+++ b/sdks/android/doc/index-files/index-10.html
@@ -83,13 +83,13 @@ function windowTitle()
 <B>L</B></H2>
 <DL>
 <DT><A HREF="../org/usergrid/android/client/Client.html#LOCAL_API_URL"><B>LOCAL_API_URL</B></A> - 
-Static variable in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Static variable in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.html#LOCAL_STANDALONE_API_URL"><B>LOCAL_STANDALONE_API_URL</B></A> - 
-Static variable in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Static variable in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.html#LOCAL_TOMCAT_API_URL"><B>LOCAL_TOMCAT_API_URL</B></A> - 
-Static variable in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Static variable in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 </DL>
 <HR>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/index-files/index-11.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/index-files/index-11.html b/sdks/android/doc/index-files/index-11.html
index 4298dc4..7ba20cf 100644
--- a/sdks/android/doc/index-files/index-11.html
+++ b/sdks/android/doc/index-files/index-11.html
@@ -82,17 +82,17 @@ function windowTitle()
 <A NAME="_M_"><!-- --></A><H2>
 <B>M</B></H2>
 <DL>
-<DT><A HREF="../org/usergrid/android/client/utils/MapUtils.html" title="class in org.usergrid.android.client.utils"><B>MapUtils</B></A> - Class in <A HREF="../org/usergrid/android/client/utils/package-summary.html">org.usergrid.android.client.utils</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/utils/MapUtils.html#MapUtils()"><B>MapUtils()</B></A> - 
-Constructor for class org.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/MapUtils.html" title="class in org.usergrid.android.client.utils">MapUtils</A>
+<DT><A HREF="../org/usergrid/android/client/utils/MapUtils.html" title="class in org.apache.usergrid.android.client.utils"><B>MapUtils</B></A> - Class in <A HREF="../org/usergrid/android/client/utils/package-summary.html">org.apache.usergrid.android.client.utils</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/utils/MapUtils.html#MapUtils()"><B>MapUtils()</B></A> - 
+Constructor for class org.apache.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/MapUtils.html" title="class in org.apache.usergrid.android.client.utils">MapUtils</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities"><B>Message</B></A> - Class in <A HREF="../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/entities/Message.html#Message()"><B>Message()</B></A> - 
-Constructor for class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+<DT><A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities"><B>Message</B></A> - Class in <A HREF="../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/entities/Message.html#Message()"><B>Message()</B></A> - 
+Constructor for class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/entities/Message.html#Message(org.usergrid.android.client.entities.Entity)"><B>Message(Entity)</B></A> - 
-Constructor for class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+<DT><A HREF="../org/usergrid/android/client/entities/Message.html#Message(org.apache.usergrid.android.client.entities.Entity)"><B>Message(Entity)</B></A> - 
+Constructor for class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.Query.html#more()"><B>more()</B></A> - 
-Method in interface org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A>
+Method in interface org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A>
 <DD>&nbsp;
 </DL>
 <HR>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/index-files/index-12.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/index-files/index-12.html b/sdks/android/doc/index-files/index-12.html
index b161ee8..0d0d14f 100644
--- a/sdks/android/doc/index-files/index-12.html
+++ b/sdks/android/doc/index-files/index-12.html
@@ -82,14 +82,14 @@ function windowTitle()
 <A NAME="_N_"><!-- --></A><H2>
 <B>N</B></H2>
 <DL>
-<DT><A HREF="../org/usergrid/android/client/entities/Activity.html#newActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.entities.User, org.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)"><B>newActivity(String, String, String, String, User, Entity, String, String, String)</B></A> - 
-Static method in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+<DT><A HREF="../org/usergrid/android/client/entities/Activity.html#newActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.entities.User, org.apache.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)"><B>newActivity(String, String, String, String, User, Entity, String, String, String)</B></A> - 
+Static method in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/utils/MapUtils.html#newMapWithoutKeys(java.util.Map, java.util.List)"><B>newMapWithoutKeys(Map&lt;String, T&gt;, List&lt;String&gt;)</B></A> - 
-Static method in class org.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/MapUtils.html" title="class in org.usergrid.android.client.utils">MapUtils</A>
+Static method in class org.apache.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/MapUtils.html" title="class in org.apache.usergrid.android.client.utils">MapUtils</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.Query.html#next()"><B>next()</B></A> - 
-Method in interface org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A>
+Method in interface org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A>
 <DD>&nbsp;
 </DL>
 <HR>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/index-files/index-13.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/index-files/index-13.html b/sdks/android/doc/index-files/index-13.html
index c7644d5..3589824 100644
--- a/sdks/android/doc/index-files/index-13.html
+++ b/sdks/android/doc/index-files/index-13.html
@@ -83,81 +83,81 @@ function windowTitle()
 <B>O</B></H2>
 <DL>
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_ARTICLE"><B>OBJECT_TYPE_ARTICLE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_AUDIO"><B>OBJECT_TYPE_AUDIO</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_BADGE"><B>OBJECT_TYPE_BADGE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_BOOKMARK"><B>OBJECT_TYPE_BOOKMARK</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_COLLECTION"><B>OBJECT_TYPE_COLLECTION</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_COMMENT"><B>OBJECT_TYPE_COMMENT</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_EVENT"><B>OBJECT_TYPE_EVENT</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_FILE"><B>OBJECT_TYPE_FILE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_GROUP"><B>OBJECT_TYPE_GROUP</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_IMAGE"><B>OBJECT_TYPE_IMAGE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_NOTE"><B>OBJECT_TYPE_NOTE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_PERSON"><B>OBJECT_TYPE_PERSON</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_PLACE"><B>OBJECT_TYPE_PLACE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_PRODUCT"><B>OBJECT_TYPE_PRODUCT</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_QUESTION"><B>OBJECT_TYPE_QUESTION</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_REVIEW"><B>OBJECT_TYPE_REVIEW</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_SERVICE"><B>OBJECT_TYPE_SERVICE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#OBJECT_TYPE_VIDEO"><B>OBJECT_TYPE_VIDEO</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.usergrid.android.client.utils"><B>ObjectUtils</B></A> - Class in <A HREF="../org/usergrid/android/client/utils/package-summary.html">org.usergrid.android.client.utils</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/utils/ObjectUtils.html#ObjectUtils()"><B>ObjectUtils()</B></A> - 
-Constructor for class org.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.usergrid.android.client.utils">ObjectUtils</A>
+<DT><A HREF="../org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.apache.usergrid.android.client.utils"><B>ObjectUtils</B></A> - Class in <A HREF="../org/usergrid/android/client/utils/package-summary.html">org.apache.usergrid.android.client.utils</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/utils/ObjectUtils.html#ObjectUtils()"><B>ObjectUtils()</B></A> - 
+Constructor for class org.apache.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.apache.usergrid.android.client.utils">ObjectUtils</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html#onDeviceRegistration(org.usergrid.android.client.entities.Device)"><B>onDeviceRegistration(Device)</B></A> - 
-Method in interface org.usergrid.android.client.callbacks.<A HREF="../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.usergrid.android.client.callbacks">DeviceRegistrationCallback</A>
+<DT><A HREF="../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html#onDeviceRegistration(org.apache.usergrid.android.client.entities.Device)"><B>onDeviceRegistration(Device)</B></A> - 
+Method in interface org.apache.usergrid.android.client.callbacks.<A HREF="../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">DeviceRegistrationCallback</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/callbacks/ClientCallback.html#onException(java.lang.Exception)"><B>onException(Exception)</B></A> - 
-Method in interface org.usergrid.android.client.callbacks.<A HREF="../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks">ClientCallback</A>
+Method in interface org.apache.usergrid.android.client.callbacks.<A HREF="../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ClientCallback</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html#onGroupsRetrieved(java.util.Map)"><B>onGroupsRetrieved(Map&lt;String, Group&gt;)</B></A> - 
-Method in interface org.usergrid.android.client.callbacks.<A HREF="../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.usergrid.android.client.callbacks">GroupsRetrievedCallback</A>
+Method in interface org.apache.usergrid.android.client.callbacks.<A HREF="../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">GroupsRetrievedCallback</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/callbacks/QueryResultsCallback.html#onQueryResults(org.usergrid.android.client.Client.Query)"><B>onQueryResults(Client.Query)</B></A> - 
-Method in interface org.usergrid.android.client.callbacks.<A HREF="../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks">QueryResultsCallback</A>
+<DT><A HREF="../org/usergrid/android/client/callbacks/QueryResultsCallback.html#onQueryResults(org.apache.usergrid.android.client.Client.Query)"><B>onQueryResults(Client.Query)</B></A> - 
+Method in interface org.apache.usergrid.android.client.callbacks.<A HREF="../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">QueryResultsCallback</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/callbacks/ApiResponseCallback.html#onResponse(org.usergrid.android.client.response.ApiResponse)"><B>onResponse(ApiResponse)</B></A> - 
-Method in interface org.usergrid.android.client.callbacks.<A HREF="../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>
+<DT><A HREF="../org/usergrid/android/client/callbacks/ApiResponseCallback.html#onResponse(org.apache.usergrid.android.client.response.ApiResponse)"><B>onResponse(ApiResponse)</B></A> - 
+Method in interface org.apache.usergrid.android.client.callbacks.<A HREF="../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/callbacks/ClientCallback.html#onResponse(T)"><B>onResponse(T)</B></A> - 
-Method in interface org.usergrid.android.client.callbacks.<A HREF="../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks">ClientCallback</A>
+Method in interface org.apache.usergrid.android.client.callbacks.<A HREF="../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ClientCallback</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/package-summary.html"><B>org.usergrid.android.client</B></A> - package org.usergrid.android.client<DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/callbacks/package-summary.html"><B>org.usergrid.android.client.callbacks</B></A> - package org.usergrid.android.client.callbacks<DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/entities/package-summary.html"><B>org.usergrid.android.client.entities</B></A> - package org.usergrid.android.client.entities<DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/response/package-summary.html"><B>org.usergrid.android.client.response</B></A> - package org.usergrid.android.client.response<DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/utils/package-summary.html"><B>org.usergrid.android.client.utils</B></A> - package org.usergrid.android.client.utils<DD>&nbsp;</DL>
+<DT><A HREF="../org/usergrid/android/client/package-summary.html"><B>org.apache.usergrid.android.client</B></A> - package org.apache.usergrid.android.client<DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/callbacks/package-summary.html"><B>org.apache.usergrid.android.client.callbacks</B></A> - package org.apache.usergrid.android.client.callbacks<DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/entities/package-summary.html"><B>org.apache.usergrid.android.client.entities</B></A> - package org.apache.usergrid.android.client.entities<DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/response/package-summary.html"><B>org.apache.usergrid.android.client.response</B></A> - package org.apache.usergrid.android.client.response<DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/utils/package-summary.html"><B>org.apache.usergrid.android.client.utils</B></A> - package org.apache.usergrid.android.client.utils<DD>&nbsp;</DL>
 <HR>
 
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/index-files/index-14.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/index-files/index-14.html b/sdks/android/doc/index-files/index-14.html
index eabda2e..7b77a87 100644
--- a/sdks/android/doc/index-files/index-14.html
+++ b/sdks/android/doc/index-files/index-14.html
@@ -83,130 +83,130 @@ function windowTitle()
 <B>P</B></H2>
 <DL>
 <DT><A HREF="../org/usergrid/android/client/utils/JsonUtils.html#parse(java.lang.String, java.lang.Class)"><B>parse(String, Class&lt;T&gt;)</B></A> - 
-Static method in class org.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.usergrid.android.client.utils">JsonUtils</A>
+Static method in class org.apache.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.apache.usergrid.android.client.utils">JsonUtils</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/utils/UrlUtils.html#path(java.lang.Object...)"><B>path(Object...)</B></A> - 
-Static method in class org.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/UrlUtils.html" title="class in org.usergrid.android.client.utils">UrlUtils</A>
+Static method in class org.apache.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/UrlUtils.html" title="class in org.apache.usergrid.android.client.utils">UrlUtils</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/Client.html#postGroupActivity(java.lang.String, org.usergrid.android.client.entities.Activity)"><B>postGroupActivity(String, Activity)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#postGroupActivity(java.lang.String, org.apache.usergrid.android.client.entities.Activity)"><B>postGroupActivity(String, Activity)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Posts an activity to a group.
-<DT><A HREF="../org/usergrid/android/client/Client.html#postGroupActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.entities.User, org.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)"><B>postGroupActivity(String, String, String, String, User, Entity, String, String, String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#postGroupActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.entities.User, org.apache.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)"><B>postGroupActivity(String, String, String, String, User, Entity, String, String, String)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Creates and posts an activity to a group.
-<DT><A HREF="../org/usergrid/android/client/Client.html#postGroupActivityAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.entities.User, org.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)"><B>postGroupActivityAsync(String, String, String, String, User, Entity, String, String, String, ApiResponseCallback)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#postGroupActivityAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.entities.User, org.apache.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)"><B>postGroupActivityAsync(String, String, String, String, User, Entity, String, String, String, ApiResponseCallback)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Creates and posts an activity to a group.
 <DT><A HREF="../org/usergrid/android/client/Client.html#postMessage(java.lang.String, java.util.Map)"><B>postMessage(String, Map&lt;String, Object&gt;)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.html#postMessage(java.lang.String, java.util.List)"><B>postMessage(String, List&lt;Map&lt;String, Object&gt;&gt;)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/Client.html#postUserActivity(java.lang.String, org.usergrid.android.client.entities.Activity)"><B>postUserActivity(String, Activity)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#postUserActivity(java.lang.String, org.apache.usergrid.android.client.entities.Activity)"><B>postUserActivity(String, Activity)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Posts an activity to a user.
-<DT><A HREF="../org/usergrid/android/client/Client.html#postUserActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.entities.User, org.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)"><B>postUserActivity(String, String, String, String, User, Entity, String, String, String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#postUserActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.entities.User, org.apache.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)"><B>postUserActivity(String, String, String, String, User, Entity, String, String, String)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Creates and posts an activity to a user.
-<DT><A HREF="../org/usergrid/android/client/Client.html#postUserActivityAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.entities.User, org.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)"><B>postUserActivityAsync(String, String, String, String, User, Entity, String, String, String, ApiResponseCallback)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#postUserActivityAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.entities.User, org.apache.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)"><B>postUserActivityAsync(String, String, String, String, User, Entity, String, String, String, ApiResponseCallback)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Creates and posts an activity to a user.
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#PROPERTY_ACTIVATED"><B>PROPERTY_ACTIVATED</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#PROPERTY_ACTOR"><B>PROPERTY_ACTOR</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#PROPERTY_CATEGORY"><B>PROPERTY_CATEGORY</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Message.html#PROPERTY_CATEGORY"><B>PROPERTY_CATEGORY</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#PROPERTY_CONTENT"><B>PROPERTY_CONTENT</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Message.html#PROPERTY_CORRELATION_ID"><B>PROPERTY_CORRELATION_ID</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Message.html#PROPERTY_DESTINATION"><B>PROPERTY_DESTINATION</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#PROPERTY_DISABLED"><B>PROPERTY_DISABLED</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#PROPERTY_EMAIL"><B>PROPERTY_EMAIL</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#PROPERTY_FIRSTNAME"><B>PROPERTY_FIRSTNAME</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#PROPERTY_GENERATOR"><B>PROPERTY_GENERATOR</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#PROPERTY_ICON"><B>PROPERTY_ICON</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Message.html#PROPERTY_INDEXED"><B>PROPERTY_INDEXED</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#PROPERTY_LASTNAME"><B>PROPERTY_LASTNAME</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#PROPERTY_MIDDLENAME"><B>PROPERTY_MIDDLENAME</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Device.html#PROPERTY_NAME"><B>PROPERTY_NAME</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities">Device</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities">Device</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#PROPERTY_NAME"><B>PROPERTY_NAME</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#PROPERTY_OBJECT"><B>PROPERTY_OBJECT</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Group.html#PROPERTY_PATH"><B>PROPERTY_PATH</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Message.html#PROPERTY_PERSISTENT"><B>PROPERTY_PERSISTENT</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#PROPERTY_PICTURE"><B>PROPERTY_PICTURE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#PROPERTY_PUBLISHED"><B>PROPERTY_PUBLISHED</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Message.html#PROPERTY_REPLY_TO"><B>PROPERTY_REPLY_TO</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Message.html#PROPERTY_TIMESTAMP"><B>PROPERTY_TIMESTAMP</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#PROPERTY_TITLE"><B>PROPERTY_TITLE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Group.html#PROPERTY_TITLE"><B>PROPERTY_TITLE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Entity.html#PROPERTY_TYPE"><B>PROPERTY_TYPE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Message.html#PROPERTY_TYPE"><B>PROPERTY_TYPE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#PROPERTY_USERNAME"><B>PROPERTY_USERNAME</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Entity.html#PROPERTY_UUID"><B>PROPERTY_UUID</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#PROPERTY_VERB"><B>PROPERTY_VERB</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.html#PUBLIC_API_URL"><B>PUBLIC_API_URL</B></A> - 
-Static variable in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Static variable in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 </DL>
 <HR>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/index-files/index-15.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/index-files/index-15.html b/sdks/android/doc/index-files/index-15.html
index f0a1fb7..3ab3375 100644
--- a/sdks/android/doc/index-files/index-15.html
+++ b/sdks/android/doc/index-files/index-15.html
@@ -83,66 +83,66 @@ function windowTitle()
 <B>Q</B></H2>
 <DL>
 <DT><A HREF="../org/usergrid/android/client/Client.html#queryActivityFeedForGroup(java.lang.String)"><B>queryActivityFeedForGroup(String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Get a group's activity feed.
-<DT><A HREF="../org/usergrid/android/client/Client.html#queryActivityFeedForGroupAsync(java.lang.String, org.usergrid.android.client.callbacks.QueryResultsCallback)"><B>queryActivityFeedForGroupAsync(String, QueryResultsCallback)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#queryActivityFeedForGroupAsync(java.lang.String, org.apache.usergrid.android.client.callbacks.QueryResultsCallback)"><B>queryActivityFeedForGroupAsync(String, QueryResultsCallback)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Get a group's activity feed.
 <DT><A HREF="../org/usergrid/android/client/Client.html#queryActivityFeedForUser(java.lang.String)"><B>queryActivityFeedForUser(String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Get a user's activity feed.
-<DT><A HREF="../org/usergrid/android/client/Client.html#queryActivityFeedForUserAsync(java.lang.String, org.usergrid.android.client.callbacks.QueryResultsCallback)"><B>queryActivityFeedForUserAsync(String, QueryResultsCallback)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#queryActivityFeedForUserAsync(java.lang.String, org.apache.usergrid.android.client.callbacks.QueryResultsCallback)"><B>queryActivityFeedForUserAsync(String, QueryResultsCallback)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Get a user's activity feed.
 <DT><A HREF="../org/usergrid/android/client/Client.html#queryEntitiesRequest(org.springframework.http.HttpMethod, java.util.Map, java.lang.Object, java.lang.String...)"><B>queryEntitiesRequest(HttpMethod, Map&lt;String, Object&gt;, Object, String...)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Perform a query request and return a query object.
-<DT><A HREF="../org/usergrid/android/client/Client.html#queryEntitiesRequestAsync(org.usergrid.android.client.callbacks.QueryResultsCallback, org.springframework.http.HttpMethod, java.util.Map, java.lang.Object, java.lang.String...)"><B>queryEntitiesRequestAsync(QueryResultsCallback, HttpMethod, Map&lt;String, Object&gt;, Object, String...)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#queryEntitiesRequestAsync(org.apache.usergrid.android.client.callbacks.QueryResultsCallback, org.springframework.http.HttpMethod, java.util.Map, java.lang.Object, java.lang.String...)"><B>queryEntitiesRequestAsync(QueryResultsCallback, HttpMethod, Map&lt;String, Object&gt;, Object, String...)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Perform a query request and return a query object.
 <DT><A HREF="../org/usergrid/android/client/Client.html#queryEntityConnections(java.lang.String, java.lang.String, java.lang.String, java.lang.String)"><B>queryEntityConnections(String, String, String, String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Query the connected entities.
-<DT><A HREF="../org/usergrid/android/client/Client.html#queryEntityConnectionsAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.QueryResultsCallback)"><B>queryEntityConnectionsAsync(String, String, String, String, QueryResultsCallback)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#queryEntityConnectionsAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.QueryResultsCallback)"><B>queryEntityConnectionsAsync(String, String, String, String, QueryResultsCallback)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Query the connected entities.
 <DT><A HREF="../org/usergrid/android/client/Client.html#queryEntityConnectionsWithinLocation(java.lang.String, java.lang.String, java.lang.String, float, android.location.Location, java.lang.String)"><B>queryEntityConnectionsWithinLocation(String, String, String, float, Location, String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Query the connected entities within distance of a specific point.
-<DT><A HREF="../org/usergrid/android/client/Client.html#queryEntityConnectionsWithinLocationAsync(java.lang.String, java.lang.String, java.lang.String, float, android.location.Location, java.lang.String, org.usergrid.android.client.callbacks.QueryResultsCallback)"><B>queryEntityConnectionsWithinLocationAsync(String, String, String, float, Location, String, QueryResultsCallback)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#queryEntityConnectionsWithinLocationAsync(java.lang.String, java.lang.String, java.lang.String, float, android.location.Location, java.lang.String, org.apache.usergrid.android.client.callbacks.QueryResultsCallback)"><B>queryEntityConnectionsWithinLocationAsync(String, String, String, float, Location, String, QueryResultsCallback)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Query the connected entities within distance of a specific point.
 <DT><A HREF="../org/usergrid/android/client/Client.html#queryQueuesRequest(org.springframework.http.HttpMethod, java.util.Map, java.lang.Object, java.lang.String)"><B>queryQueuesRequest(HttpMethod, Map&lt;String, Object&gt;, Object, String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>QueryResultsCallback</B></A> - Interface in <A HREF="../org/usergrid/android/client/callbacks/package-summary.html">org.usergrid.android.client.callbacks</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/Client.html#queryUsers()"><B>queryUsers()</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>QueryResultsCallback</B></A> - Interface in <A HREF="../org/usergrid/android/client/callbacks/package-summary.html">org.apache.usergrid.android.client.callbacks</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/Client.html#queryUsers()"><B>queryUsers()</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Perform a query of the users collection.
 <DT><A HREF="../org/usergrid/android/client/Client.html#queryUsers(java.lang.String)"><B>queryUsers(String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Perform a query of the users collection using the provided query command.
-<DT><A HREF="../org/usergrid/android/client/Client.html#queryUsersAsync(org.usergrid.android.client.callbacks.QueryResultsCallback)"><B>queryUsersAsync(QueryResultsCallback)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#queryUsersAsync(org.apache.usergrid.android.client.callbacks.QueryResultsCallback)"><B>queryUsersAsync(QueryResultsCallback)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Perform a query of the users collection.
-<DT><A HREF="../org/usergrid/android/client/Client.html#queryUsersAsync(java.lang.String, org.usergrid.android.client.callbacks.QueryResultsCallback)"><B>queryUsersAsync(String, QueryResultsCallback)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#queryUsersAsync(java.lang.String, org.apache.usergrid.android.client.callbacks.QueryResultsCallback)"><B>queryUsersAsync(String, QueryResultsCallback)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Perform a query of the users collection using the provided query command.
 <DT><A HREF="../org/usergrid/android/client/Client.html#queryUsersForGroup(java.lang.String)"><B>queryUsersForGroup(String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Queries the users for the specified group.
-<DT><A HREF="../org/usergrid/android/client/Client.html#queryUsersForGroupAsync(java.lang.String, org.usergrid.android.client.callbacks.QueryResultsCallback)"><B>queryUsersForGroupAsync(String, QueryResultsCallback)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#queryUsersForGroupAsync(java.lang.String, org.apache.usergrid.android.client.callbacks.QueryResultsCallback)"><B>queryUsersForGroupAsync(String, QueryResultsCallback)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Queries the users for the specified group.
-<DT><A HREF="../org/usergrid/android/client/Client.html#queryUsersNearLocation(float, android.location.Location, java.lang.String, org.usergrid.android.client.callbacks.QueryResultsCallback)"><B>queryUsersNearLocation(float, Location, String, QueryResultsCallback)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#queryUsersNearLocation(float, android.location.Location, java.lang.String, org.apache.usergrid.android.client.callbacks.QueryResultsCallback)"><B>queryUsersNearLocation(float, Location, String, QueryResultsCallback)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Perform a query of the users collection within the specified distance of
  the specified location and optionally using the provided query command.
 <DT><A HREF="../org/usergrid/android/client/Client.html#queryUsersWithinLocation(float, android.location.Location, java.lang.String)"><B>queryUsersWithinLocation(float, Location, String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Perform a query of the users collection within the specified distance of
  the specified location and optionally using the provided query command.
-<DT><A HREF="../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response"><B>QueueInfo</B></A> - Class in <A HREF="../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/response/QueueInfo.html#QueueInfo()"><B>QueueInfo()</B></A> - 
-Constructor for class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response">QueueInfo</A>
+<DT><A HREF="../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response"><B>QueueInfo</B></A> - Class in <A HREF="../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/response/QueueInfo.html#QueueInfo()"><B>QueueInfo()</B></A> - 
+Constructor for class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response">QueueInfo</A>
 <DD>&nbsp;
 </DL>
 <HR>


[28/96] [abbrv] [partial] Change package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/utils/ConversionUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/utils/ConversionUtils.java b/stack/core/src/main/java/org/apache/usergrid/utils/ConversionUtils.java
new file mode 100644
index 0000000..567a713
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/utils/ConversionUtils.java
@@ -0,0 +1,765 @@
+/*
+ * 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.utils;
+
+
+import java.io.UnsupportedEncodingException;
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.commons.lang.math.NumberUtils;
+
+
+/** Convenience methods for converting to and from formats, primarily between byte arrays and UUIDs, Strings,
+ * and Longs. */
+public class ConversionUtils {
+
+    private static final Logger logger = LoggerFactory.getLogger( ConversionUtils.class );
+
+    /**
+     *
+     */
+    public static final String UTF8_ENCODING = "UTF-8";
+
+    /**
+     *
+     */
+    public static final String ASCII_ENCODING = "US-ASCII";
+
+    public static final ByteBuffer HOLDER = ByteBuffer.wrap( new byte[] { 0 } );
+
+
+    /**
+     * @param uuid
+     * @return
+     */
+    public static UUID uuid( byte[] uuid ) {
+        return uuid( uuid, 0 );
+    }
+
+
+    /**
+     * @param uuid
+     * @param offset
+     * @return
+     */
+    public static UUID uuid( byte[] uuid, int offset ) {
+        ByteBuffer bb = ByteBuffer.wrap( uuid, offset, 16 );
+        return new UUID( bb.getLong(), bb.getLong() );
+    }
+
+
+    public static UUID uuid( ByteBuffer bb ) {
+        if ( bb == null ) {
+            return null;
+        }
+        if ( bb.remaining() < 16 ) {
+            return null;
+        }
+        bb = bb.slice();
+        return new UUID( bb.getLong(), bb.getLong() );
+    }
+
+
+    /**
+     * @param uuid
+     * @return
+     */
+    public static UUID uuid( String uuid ) {
+        try {
+            return UUID.fromString( uuid );
+        }
+        catch ( Exception e ) {
+            logger.error( "Bad UUID", e );
+        }
+        return UUIDUtils.ZERO_UUID;
+    }
+
+
+    /**
+     * @param obj
+     * @return
+     */
+    public static UUID uuid( Object obj ) {
+        return uuid( obj, UUIDUtils.ZERO_UUID );
+    }
+
+
+    public static UUID uuid( Object obj, UUID defaultValue ) {
+        if ( obj instanceof UUID ) {
+            return ( UUID ) obj;
+        }
+        else if ( obj instanceof byte[] ) {
+            return uuid( ( byte[] ) obj );
+        }
+        else if ( obj instanceof ByteBuffer ) {
+            return uuid( ( ByteBuffer ) obj );
+        }
+        else if ( obj instanceof String ) {
+            return uuid( ( String ) obj );
+        }
+        return defaultValue;
+    }
+
+
+    /**
+     * @param uuid
+     * @return
+     */
+    public static byte[] bytes( UUID uuid ) {
+        if ( uuid == null ) {
+            return null;
+        }
+        long msb = uuid.getMostSignificantBits();
+        long lsb = uuid.getLeastSignificantBits();
+        byte[] buffer = new byte[16];
+
+        for ( int i = 0; i < 8; i++ ) {
+            buffer[i] = ( byte ) ( msb >>> ( 8 * ( 7 - i ) ) );
+        }
+        for ( int i = 8; i < 16; i++ ) {
+            buffer[i] = ( byte ) ( lsb >>> ( 8 * ( 7 - i ) ) );
+        }
+
+        return buffer;
+    }
+
+
+    public static ByteBuffer bytebuffer( UUID uuid ) {
+        if ( uuid == null ) {
+            return null;
+        }
+        return ByteBuffer.wrap( bytes( uuid ) );
+    }
+
+
+    /**
+     * @param uuid
+     * @return
+     */
+    public static byte[] uuidToBytesNullOk( UUID uuid ) {
+        if ( uuid != null ) {
+            return bytes( uuid );
+        }
+        return new byte[16];
+    }
+
+
+    /**
+     * @param s
+     * @return
+     */
+    public static byte[] bytes( String s ) {
+        return bytes( s, UTF8_ENCODING );
+    }
+
+
+    public static ByteBuffer bytebuffer( String s ) {
+        return ByteBuffer.wrap( bytes( s ) );
+    }
+
+
+    /**
+     * @param s
+     * @return
+     */
+    public static byte[] ascii( String s ) {
+        if ( s == null ) {
+            return new byte[0];
+        }
+        return bytes( s, ASCII_ENCODING );
+    }
+
+
+    public ByteBuffer asciibuffer( String s ) {
+        return ByteBuffer.wrap( ascii( s ) );
+    }
+
+
+    /**
+     * @param s
+     * @param encoding
+     * @return
+     */
+    public static byte[] bytes( String s, String encoding ) {
+        try {
+            return s.getBytes( encoding );
+        }
+        catch ( UnsupportedEncodingException e ) {
+            // logger.log(Level.SEVERE, "UnsupportedEncodingException ", e);
+            throw new RuntimeException( e );
+        }
+    }
+
+
+    public static byte[] bytes( ByteBuffer bb ) {
+        byte[] b = new byte[bb.remaining()];
+        bb.duplicate().get( b );
+        return b;
+    }
+
+
+    public static ByteBuffer bytebuffer( String s, String encoding ) {
+        return ByteBuffer.wrap( bytes( s, encoding ) );
+    }
+
+
+    /**
+     * @param b
+     * @return
+     */
+    public static byte[] bytes( Boolean b ) {
+        byte[] bytes = new byte[1];
+        bytes[0] = b ? ( byte ) 1 : 0;
+        return bytes;
+    }
+
+
+    public static ByteBuffer bytebuffer( Boolean b ) {
+        return ByteBuffer.wrap( bytes( b ) );
+    }
+
+
+    /**
+     * @param val
+     * @return
+     */
+    public static byte[] bytes( Long val ) {
+        ByteBuffer buf = ByteBuffer.allocate( 8 );
+        buf.order( ByteOrder.BIG_ENDIAN );
+        buf.putLong( val );
+        return buf.array();
+    }
+
+
+    public static ByteBuffer bytebuffer( Long val ) {
+        ByteBuffer buf = ByteBuffer.allocate( 8 );
+        buf.order( ByteOrder.BIG_ENDIAN );
+        buf.putLong( val );
+        return ( ByteBuffer ) buf.rewind();
+    }
+
+
+    /**
+     * @param obj
+     * @return
+     */
+    public static byte[] bytes( Object obj ) {
+        if ( obj == null ) {
+            return new byte[0];
+        }
+        else if ( obj instanceof byte[] ) {
+            return ( byte[] ) obj;
+        }
+        else if ( obj instanceof Long ) {
+            return bytes( ( Long ) obj );
+        }
+        else if ( obj instanceof String ) {
+            return bytes( ( String ) obj );
+        }
+        else if ( obj instanceof UUID ) {
+            return bytes( ( UUID ) obj );
+        }
+        else if ( obj instanceof Boolean ) {
+            return bytes( ( Boolean ) obj );
+        }
+        else if ( obj instanceof Date ) {
+            return bytes( ( ( Date ) obj ).getTime() );
+        }
+        else {
+            return bytes( obj.toString() );
+        }
+    }
+
+
+    public static ByteBuffer bytebuffer( byte[] bytes ) {
+        return ByteBuffer.wrap( bytes );
+    }
+
+
+    public static ByteBuffer bytebuffer( ByteBuffer bytes ) {
+        return bytes.duplicate();
+    }
+
+
+    public static ByteBuffer bytebuffer( Object obj ) {
+        if ( obj instanceof ByteBuffer ) {
+            return ( ( ByteBuffer ) obj ).duplicate();
+        }
+        return ByteBuffer.wrap( bytes( obj ) );
+    }
+
+
+    public static List<ByteBuffer> bytebuffers( List<?> l ) {
+        List<ByteBuffer> results = new ArrayList<ByteBuffer>( l.size() );
+        for ( Object o : l ) {
+            results.add( bytebuffer( o ) );
+        }
+        return results;
+    }
+
+
+    /**
+     * @param bytes
+     * @return
+     */
+    public static boolean getBoolean( byte[] bytes ) {
+        return bytes[0] != 0;
+    }
+
+
+    public static boolean getBoolean( ByteBuffer bytes ) {
+        return bytes.slice().get() != 0;
+    }
+
+
+    /**
+     * @param bytes
+     * @param offset
+     * @return
+     */
+    public static boolean getBoolean( byte[] bytes, int offset ) {
+        return bytes[offset] != 0;
+    }
+
+
+    public static boolean getBoolean( Object obj ) {
+        if ( obj instanceof Boolean ) {
+            return ( Boolean ) obj;
+        }
+        else if ( obj instanceof String ) {
+            return Boolean.parseBoolean( ( String ) obj );
+        }
+        else if ( obj instanceof Number ) {
+            return ( ( Number ) obj ).longValue() > 0;
+        }
+
+        return false;
+    }
+
+
+    /**
+     * @param obj
+     * @return
+     */
+    public static String string( Object obj ) {
+        if ( obj instanceof String ) {
+            return ( String ) obj;
+        }
+        else if ( obj instanceof byte[] ) {
+            return string( ( byte[] ) obj );
+        }
+        else if ( obj instanceof ByteBuffer ) {
+            return string( ( ByteBuffer ) obj );
+        }
+        else if ( obj != null ) {
+            return obj.toString();
+        }
+        return null;
+    }
+
+
+    /**
+     * @param bytes
+     * @return
+     */
+    public static String string( byte[] bytes ) {
+        if ( bytes == null ) {
+            return null;
+        }
+        return string( bytes, 0, bytes.length, UTF8_ENCODING );
+    }
+
+
+    public static String string( ByteBuffer bytes ) {
+        if ( bytes == null ) {
+            return null;
+        }
+        return string( bytes.array(), bytes.arrayOffset() + bytes.position(), bytes.remaining(), UTF8_ENCODING );
+    }
+
+
+    /**
+     * @param bytes
+     * @param offset
+     * @param length
+     * @return
+     */
+    public static String string( byte[] bytes, int offset, int length ) {
+        return string( bytes, offset, length, UTF8_ENCODING );
+    }
+
+
+    /**
+     * @param bytes
+     * @param offset
+     * @param length
+     * @param encoding
+     * @return
+     */
+    public static String string( byte[] bytes, int offset, int length, String encoding ) {
+
+        if ( length <= 0 ) {
+            return "";
+        }
+
+        if ( bytes == null ) {
+            return "";
+        }
+
+        try {
+            return new String( bytes, offset, length, encoding );
+        }
+        catch ( UnsupportedEncodingException e ) {
+            // logger.log(Level.SEVERE, "UnsupportedEncodingException ", e);
+            throw new RuntimeException( e );
+        }
+    }
+
+
+    public static <T> List<String> strings( Collection<T> items ) {
+        List<String> strings = new ArrayList<String>();
+        for ( T item : items ) {
+            strings.add( string( item ) );
+        }
+        return strings;
+    }
+
+
+    /**
+     * @param bytes
+     * @param offset
+     * @return
+     */
+    public static String stringFromLong( byte[] bytes, int offset ) {
+        if ( bytes.length == 0 ) {
+            return "";
+        }
+        if ( ( bytes.length - offset ) < 8 ) {
+            throw new IllegalArgumentException( "A long is at least 8 bytes" );
+        }
+        return String.valueOf( ByteBuffer.wrap( bytes, offset, 8 ).getLong() );
+    }
+
+
+    /**
+     * @param bytes
+     * @return
+     */
+    public static long getLong( byte[] bytes ) {
+        return ByteBuffer.wrap( bytes, 0, 8 ).getLong();
+    }
+
+
+    public static long getLong( ByteBuffer bytes ) {
+        return bytes.slice().getLong();
+    }
+
+
+    public static long getLong( Object obj ) {
+        if ( obj instanceof Long ) {
+            return ( Long ) obj;
+        }
+        if ( obj instanceof Number ) {
+            return ( ( Number ) obj ).longValue();
+        }
+        if ( obj instanceof String ) {
+            return NumberUtils.toLong( ( String ) obj );
+        }
+        if ( obj instanceof Date ) {
+            return ( ( Date ) obj ).getTime();
+        }
+        if ( obj instanceof byte[] ) {
+            return getLong( ( byte[] ) obj );
+        }
+        if ( obj instanceof ByteBuffer ) {
+            return getLong( ( ByteBuffer ) obj );
+        }
+        return 0;
+    }
+
+
+    /**
+     * @param bytes
+     * @return
+     */
+    public static int getInt( byte[] bytes ) {
+        return ByteBuffer.wrap( bytes, 0, 4 ).getInt();
+    }
+
+
+    public static int getInt( ByteBuffer bytes ) {
+        return bytes.slice().getInt();
+    }
+
+
+    public static int getInt( Object obj ) {
+        if ( obj instanceof Integer ) {
+            return ( Integer ) obj;
+        }
+        if ( obj instanceof Number ) {
+            return ( ( Number ) obj ).intValue();
+        }
+        if ( obj instanceof String ) {
+            return NumberUtils.toInt( ( String ) obj );
+        }
+        if ( obj instanceof Date ) {
+            return ( int ) ( ( Date ) obj ).getTime();
+        }
+        if ( obj instanceof byte[] ) {
+            return getInt( ( byte[] ) obj );
+        }
+        if ( obj instanceof ByteBuffer ) {
+            return getInt( ( ByteBuffer ) obj );
+        }
+        return 0;
+    }
+
+
+    /**
+     * @param bytes
+     * @return
+     */
+    public static float getFloat( byte[] bytes ) {
+        return ByteBuffer.wrap( bytes, 0, 4 ).getFloat();
+    }
+
+
+    public static float getFloat( ByteBuffer bytes ) {
+        return bytes.slice().getFloat();
+    }
+
+
+    public static float getFloat( Object obj ) {
+        if ( obj instanceof Float ) {
+            return ( Float ) obj;
+        }
+        if ( obj instanceof Number ) {
+            return ( ( Number ) obj ).floatValue();
+        }
+        if ( obj instanceof String ) {
+            return NumberUtils.toFloat( ( String ) obj );
+        }
+        if ( obj instanceof Date ) {
+            return ( ( Date ) obj ).getTime();
+        }
+        if ( obj instanceof byte[] ) {
+            return getFloat( ( byte[] ) obj );
+        }
+        if ( obj instanceof ByteBuffer ) {
+            return getFloat( ( ByteBuffer ) obj );
+        }
+        return 0;
+    }
+
+
+    public static double getDouble( byte[] bytes ) {
+        return ByteBuffer.wrap( bytes, 0, 8 ).getDouble();
+    }
+
+
+    public static double getDouble( ByteBuffer bytes ) {
+        return bytes.slice().getDouble();
+    }
+
+
+    public static double getDouble( Object obj ) {
+        if ( obj instanceof Double ) {
+            return ( Double ) obj;
+        }
+        if ( obj instanceof Number ) {
+            return ( ( Number ) obj ).doubleValue();
+        }
+        if ( obj instanceof String ) {
+            return NumberUtils.toDouble( ( String ) obj );
+        }
+        if ( obj instanceof Date ) {
+            return ( ( Date ) obj ).getTime();
+        }
+        if ( obj instanceof byte[] ) {
+            return getDouble( ( byte[] ) obj );
+        }
+        if ( obj instanceof ByteBuffer ) {
+            return getDouble( ( ByteBuffer ) obj );
+        }
+        return 0;
+    }
+
+
+    /**
+     * @param type
+     * @param bytes
+     * @return
+     */
+    public static Object object( Class<?> type, byte[] bytes ) {
+
+        try {
+            if ( Long.class.isAssignableFrom( type ) ) {
+                return getLong( bytes );
+            }
+            else if ( UUID.class.isAssignableFrom( type ) ) {
+                return uuid( bytes );
+            }
+            else if ( String.class.isAssignableFrom( type ) ) {
+                return string( bytes );
+            }
+            else if ( Boolean.class.isAssignableFrom( type ) ) {
+                return getBoolean( bytes );
+            }
+            else if ( Integer.class.isAssignableFrom( type ) ) {
+                return getInt( bytes );
+            }
+            else if ( Double.class.isAssignableFrom( type ) ) {
+                return getDouble( bytes );
+            }
+            else if ( Float.class.isAssignableFrom( type ) ) {
+                return getFloat( bytes );
+            }
+            else if ( byte[].class.isAssignableFrom( type ) ) {
+                return bytes;
+            }
+        }
+        catch ( Exception e ) {
+            logger.error( "Unable to get object from bytes for type " + type.getName(), e );
+        }
+        return null;
+    }
+
+
+    public static Object object( Class<?> type, ByteBuffer bytes ) {
+
+        try {
+            if ( Long.class.isAssignableFrom( type ) ) {
+                return bytes.slice().getLong();
+            }
+            else if ( UUID.class.isAssignableFrom( type ) ) {
+                return uuid( bytes );
+            }
+            else if ( String.class.isAssignableFrom( type ) ) {
+                return string( bytes );
+            }
+            else if ( Boolean.class.isAssignableFrom( type ) ) {
+                return bytes.slice().get() != 0;
+            }
+            else if ( Integer.class.isAssignableFrom( type ) ) {
+                return bytes.slice().getInt();
+            }
+            else if ( Double.class.isAssignableFrom( type ) ) {
+                return bytes.slice().getDouble();
+            }
+            else if ( Float.class.isAssignableFrom( type ) ) {
+                return bytes.slice().getFloat();
+            }
+            else if ( ByteBuffer.class.isAssignableFrom( type ) ) {
+                return bytes.duplicate();
+            }
+            else if ( byte[].class.isAssignableFrom( type ) ) {
+                byte[] b = new byte[bytes.remaining()];
+                bytes.slice().get( b );
+                return b;
+            }
+        }
+        catch ( Exception e ) {
+            logger.error( "Unable to get object from bytes for type " + type.getName(), e );
+        }
+        return null;
+    }
+
+
+    /**
+     * @param bb
+     * @param bytes
+     * @param len
+     * @return
+     */
+    public static ByteBuffer appendToByteBuffer( ByteBuffer bb, byte[] bytes, int len ) {
+        if ( len > bytes.length ) {
+            int pos = bb.position();
+            bb.put( bytes );
+            bb.position( pos + len );
+        }
+        else {
+            bb.put( bytes, 0, len );
+        }
+        return bb;
+    }
+
+
+    public static Object coerce( Class<?> type, Object obj ) {
+
+        if ( obj == null ) {
+            return null;
+        }
+
+        if ( type == null ) {
+            return obj;
+        }
+
+        try {
+            if ( Long.class.isAssignableFrom( type ) ) {
+                return getLong( obj );
+            }
+            else if ( UUID.class.isAssignableFrom( type ) ) {
+                return uuid( obj );
+            }
+            else if ( String.class.isAssignableFrom( type ) ) {
+                return string( obj );
+            }
+            else if ( Boolean.class.isAssignableFrom( type ) ) {
+                return getBoolean( obj );
+            }
+            else if ( Integer.class.isAssignableFrom( type ) ) {
+                return getInt( obj );
+            }
+            else if ( Double.class.isAssignableFrom( type ) ) {
+                return getDouble( obj );
+            }
+            else if ( Float.class.isAssignableFrom( type ) ) {
+                return getFloat( obj );
+            }
+            else if ( byte[].class.isAssignableFrom( type ) ) {
+                return bytes( obj );
+            }
+            else if ( ByteBuffer.class.isAssignableFrom( type ) ) {
+                return bytebuffer( obj );
+            }
+        }
+        catch ( Exception e ) {
+            logger.error( "Unable to get object from bytes for type " + type.getName(), e );
+        }
+        return null;
+    }
+
+
+    public static Map<String, Object> coerceMap( Map<String, Class<?>> types, Map<String, Object> values ) {
+        for ( Map.Entry<String, Object> entry : values.entrySet() ) {
+            if ( types.containsKey( entry.getKey() ) ) {
+                values.put( entry.getKey(), coerce( types.get( entry.getKey() ), entry.getValue() ) );
+            }
+        }
+        return values;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/utils/DateUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/utils/DateUtils.java b/stack/core/src/main/java/org/apache/usergrid/utils/DateUtils.java
new file mode 100644
index 0000000..257722b
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/utils/DateUtils.java
@@ -0,0 +1,88 @@
+/*
+ * 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.
+ */
+
+// Copyright 2010-2011 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+//
+// Portions copyright 2006-2009 James Murty. Please see LICENSE.txt
+// for applicable license terms and NOTICE.txt for applicable notices.
+//
+// Licensed under the Apache License, Version 2.0 (the "License").
+// You may not use this file except in compliance with the License.
+// A copy of the License is located at
+//  http://aws.amazon.com/apache2.0
+// or in the "license" file accompanying this file. This file 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.utils;
+
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.Locale;
+import java.util.SimpleTimeZone;
+
+
+/**
+ * Utilities for parsing and formatting dates.
+ * <p/>
+ * Note that this class doesn't use static methods because of the synchronization issues with SimpleDateFormat. This
+ * lets synchronization be done on a per-object level, instead of on a per-class level.
+ */
+public class DateUtils {
+
+    /** ISO 8601 parser */
+    protected final SimpleDateFormat iso8601DateParser = new SimpleDateFormat( "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'" );
+
+    /** Alternate ISO 8601 parser without fractional seconds */
+    protected final SimpleDateFormat alternateIo8601DateParser = new SimpleDateFormat( "yyyy-MM-dd'T'HH:mm:ss'Z'" );
+
+    /** RFC 822 parser */
+    protected final SimpleDateFormat rfc822DateParser =
+            new SimpleDateFormat( "EEE, dd MMM yyyy HH:mm:ss z", Locale.US );
+
+
+    /** Constructs a new DateUtils object, ready to parse/format dates. */
+    public DateUtils() {
+        iso8601DateParser.setTimeZone( new SimpleTimeZone( 0, "GMT" ) );
+        rfc822DateParser.setTimeZone( new SimpleTimeZone( 0, "GMT" ) );
+        alternateIo8601DateParser.setTimeZone( new SimpleTimeZone( 0, "GMT" ) );
+    }
+
+
+    public static DateUtils instance = new DateUtils();
+
+
+    /**
+     * Formats the specified date as an ISO 8601 string.
+     *
+     * @param date The date to format.
+     *
+     * @return The ISO 8601 string representing the specified date.
+     */
+    public String formatIso8601Date( Date date ) {
+        synchronized ( iso8601DateParser ) {
+            return iso8601DateParser.format( date );
+        }
+    }
+
+
+    public String iso8601DateNow() {
+        return formatIso8601Date( new Date() );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/utils/HttpUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/utils/HttpUtils.java b/stack/core/src/main/java/org/apache/usergrid/utils/HttpUtils.java
new file mode 100644
index 0000000..314def0
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/utils/HttpUtils.java
@@ -0,0 +1,51 @@
+/*
+ * 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.utils;
+
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.http.NameValuePair;
+import org.apache.http.client.utils.URLEncodedUtils;
+
+
+public class HttpUtils {
+
+    public static Map<String, List<String>> parseQueryString( String queryString ) {
+        Map<String, List<String>> mapOfLists = new HashMap<String, List<String>>();
+        if ( ( queryString == null ) || ( queryString.length() == 0 ) ) {
+            return mapOfLists;
+        }
+        List<NameValuePair> list = URLEncodedUtils.parse( URI.create( "http://localhost/?" + queryString ), "UTF-8" );
+        for ( NameValuePair pair : list ) {
+            List<String> values = mapOfLists.get( pair.getName() );
+            if ( values == null ) {
+                values = new ArrayList<String>();
+                mapOfLists.put( pair.getName(), values );
+            }
+            if ( pair.getValue() != null ) {
+                values.add( pair.getValue() );
+            }
+        }
+
+        return mapOfLists;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/utils/IndexUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/utils/IndexUtils.java b/stack/core/src/main/java/org/apache/usergrid/utils/IndexUtils.java
new file mode 100644
index 0000000..ffc2ba7
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/utils/IndexUtils.java
@@ -0,0 +1,218 @@
+/*
+ * 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.utils;
+
+
+import java.io.IOException;
+import java.io.StringReader;
+import java.util.AbstractMap;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.UUID;
+
+import org.apache.lucene.analysis.Analyzer;
+import org.apache.lucene.analysis.TokenStream;
+import org.apache.lucene.analysis.standard.StandardAnalyzer;
+import org.apache.lucene.analysis.tokenattributes.TermAttribute;
+import org.apache.lucene.util.Version;
+
+import static org.apache.usergrid.utils.ClassUtils.cast;
+import static org.apache.usergrid.utils.ClassUtils.isBasicType;
+import static org.apache.usergrid.utils.JsonUtils.quoteString;
+import static org.apache.usergrid.utils.JsonUtils.toJsonNode;
+
+import org.codehaus.jackson.JsonNode;
+import org.codehaus.jackson.node.ArrayNode;
+import org.codehaus.jackson.node.ObjectNode;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+public class IndexUtils {
+
+    private static final Logger LOG = LoggerFactory.getLogger( IndexUtils.class );
+
+    static Analyzer analyzer = new StandardAnalyzer( Version.LUCENE_30 );
+
+
+    private static void buildKeyValueSet( Object node, Map<String, List<Object>> keyValues, String path,
+                                          boolean fulltextIndex, Object... history ) {
+
+        if ( node == null ) {
+            return;
+        }
+
+        if ( node instanceof Collection ) {
+            Object[] newHistory = Arrays.copyOf( history, history.length + 1 );
+            newHistory[history.length] = node;
+            @SuppressWarnings("unchecked") Collection<Object> c = ( Collection<Object> ) node;
+            for ( Object o : c ) {
+                buildKeyValueSet( o, keyValues, path, fulltextIndex, newHistory );
+            }
+        }
+        else if ( node instanceof Map ) {
+            Object[] newHistory = Arrays.copyOf( history, history.length + 1 );
+            newHistory[history.length] = node;
+            @SuppressWarnings("unchecked") Map<Object, Object> m = ( Map<Object, Object> ) node;
+            for ( Entry<Object, Object> e : m.entrySet() ) {
+                String newPath;
+                String key = e.getKey().toString();
+                key = quoteString( key );
+                if ( key.indexOf( '\\' ) == -1 ) {
+                    if ( path != null ) {
+                        newPath = path + "." + key;
+                    }
+                    else {
+                        newPath = "" + key;
+                    }
+                }
+                else {
+                    if ( path != null ) {
+                        newPath = path + "[\"" + key + "\"]";
+                    }
+                    else {
+                        newPath = "" + "[\"" + key + "\"]";
+                    }
+                }
+                buildKeyValueSet( e.getValue(), keyValues, newPath, fulltextIndex, newHistory );
+            }
+        }
+        else if ( node instanceof ArrayNode ) {
+            Object[] newHistory = Arrays.copyOf( history, history.length + 1 );
+            newHistory[history.length] = node;
+            ArrayNode c = ( ArrayNode ) node;
+            for ( JsonNode o : c ) {
+                buildKeyValueSet( o, keyValues, path, fulltextIndex, newHistory );
+            }
+        }
+        else if ( node instanceof ObjectNode ) {
+            Object[] newHistory = Arrays.copyOf( history, history.length + 1 );
+            newHistory[history.length] = node;
+            ObjectNode c = ( ObjectNode ) node;
+            Iterator<Entry<String, JsonNode>> i = c.getFields();
+            while ( i.hasNext() ) {
+                Entry<String, JsonNode> e = i.next();
+                String newPath;
+                String key = e.getKey();
+                key = quoteString( key );
+                if ( key.indexOf( '\\' ) == -1 ) {
+                    if ( path != null ) {
+                        newPath = path + "." + key;
+                    }
+                    else {
+                        newPath = "" + key;
+                    }
+                }
+                else {
+                    if ( path != null ) {
+                        newPath = path + "[\"" + key + "\"]";
+                    }
+                    else {
+                        newPath = "" + "[\"" + key + "\"]";
+                    }
+                }
+                buildKeyValueSet( e.getValue(), keyValues, newPath, fulltextIndex, newHistory );
+            }
+        }
+        else if ( !isBasicType( node.getClass() ) && ( !( node instanceof JsonNode ) ) ) {
+            buildKeyValueSet( toJsonNode( node ), keyValues, path, fulltextIndex, history );
+        }
+        else {
+
+            if ( node instanceof JsonNode ) {
+                if ( ( ( JsonNode ) node ).isTextual() ) {
+                    node = ( ( JsonNode ) node ).getTextValue();
+                    UUID uuid = UUIDUtils.tryGetUUID( ( String ) node );
+                    if ( uuid != null ) {
+                        node = uuid;
+                    }
+                }
+                else if ( ( ( JsonNode ) node ).isNumber() ) {
+                    node = ( ( JsonNode ) node ).getNumberValue();
+                }
+                else {
+                    return;
+                }
+            }
+
+            if ( path == null ) {
+                path = "";
+            }
+            List<Object> l = keyValues.get( path );
+            if ( l == null ) {
+                l = new ArrayList<Object>();
+                keyValues.put( path, l );
+            }
+
+            l.add( node );
+
+            if ( ( node instanceof String ) && fulltextIndex ) {
+                String keywordsPath = ( path.length() > 0 ) ? path + ".keywords" : "keywords";
+                List<Object> keywords = cast( keywords( ( String ) node ) );
+
+                if ( keywords.size() > 0 ) {
+                    keyValues.put( keywordsPath, keywords );
+                }
+            }
+        }
+    }
+
+
+    public static Map<String, List<Object>> getKeyValues( String path, Object obj, boolean fulltextIndex ) {
+        Map<String, List<Object>> keys = new LinkedHashMap<String, List<Object>>();
+        buildKeyValueSet( obj, keys, path, fulltextIndex );
+        return keys;
+    }
+
+
+    public static List<Map.Entry<String, Object>> getKeyValueList( String path, Object obj, boolean fulltextIndex ) {
+        Map<String, List<Object>> map = getKeyValues( path, obj, fulltextIndex );
+        List<Map.Entry<String, Object>> list = new ArrayList<Map.Entry<String, Object>>();
+        for ( Entry<String, List<Object>> entry : map.entrySet() ) {
+            for ( Object value : entry.getValue() ) {
+                list.add( new AbstractMap.SimpleEntry<String, Object>( entry.getKey(), value ) );
+            }
+        }
+        return list;
+    }
+
+
+    public static List<Entry<String, Object>> getKeyValueList( Object obj, boolean fulltextIndex ) {
+        return getKeyValueList( null, obj, fulltextIndex );
+    }
+
+
+    public static List<String> keywords( String source ) {
+        TokenStream ts = analyzer.tokenStream( "keywords", new StringReader( source ) );
+        List<String> keywords = new ArrayList<String>();
+        try {
+            while ( ts.incrementToken() ) {
+                keywords.add( ts.getAttribute( TermAttribute.class ).term() );
+            }
+        }
+        catch ( IOException e ) {
+            LOG.error( "Error getting keywords ", e );
+        }
+        return keywords;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/utils/InflectionUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/utils/InflectionUtils.java b/stack/core/src/main/java/org/apache/usergrid/utils/InflectionUtils.java
new file mode 100644
index 0000000..72b9207
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/utils/InflectionUtils.java
@@ -0,0 +1,51 @@
+/*
+ * 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.utils;
+
+
+public class InflectionUtils {
+
+    public static String pluralize( Object word ) {
+        return Inflector.INSTANCE.pluralize( word );
+    }
+
+
+    public static String singularize( Object word ) {
+        return Inflector.INSTANCE.singularize( word );
+    }
+
+
+    public static boolean isPlural( Object word ) {
+        return Inflector.INSTANCE.isPlural( word );
+    }
+
+
+    public static boolean isSingular( Object word ) {
+        return Inflector.INSTANCE.isSingular( word );
+    }
+
+
+    public static String underscore( String s ) {
+        return Inflector.INSTANCE.underscore( s );
+    }
+
+
+    public static String camelCase( String lowerCaseAndUnderscoredWord, boolean uppercaseFirstLetter,
+                                    char... delimiterChars ) {
+        return Inflector.INSTANCE.camelCase( lowerCaseAndUnderscoredWord, uppercaseFirstLetter, delimiterChars );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/utils/Inflector.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/utils/Inflector.java b/stack/core/src/main/java/org/apache/usergrid/utils/Inflector.java
new file mode 100644
index 0000000..e0bfb84
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/utils/Inflector.java
@@ -0,0 +1,553 @@
+/*
+ * 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.
+ */
+
+// TODO - This Class needs to go - it's LGPL Source !!!
+// ModeShape (http://www.modeshape.org)
+// See the COPYRIGHT.txt file distributed with this work for information
+// regarding copyright ownership.  Some portions may be licensed
+// to Red Hat, Inc. under one or more contributor license agreements.
+// See the AUTHORS.txt file in the distribution for a full listing of
+// individual contributors.
+//
+// ModeShape is free software. Unless otherwise indicated, all code in ModeShape
+// is licensed to you under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation; either version 2.1 of
+// the License, or (at your option) any later version.
+//
+// ModeShape is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this software; if not, write to the Free
+// Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+// 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+//
+
+package org.apache.usergrid.utils;
+
+
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.Set;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+
+/**
+ * Transforms words to singular, plural, humanized (human readable), underscore, camel case, or ordinal form. This is
+ * inspired by the <a href="http://api.rubyonrails.org/classes/Inflector.html">Inflector</a> class in <a
+ * href="http://www.rubyonrails.org">Ruby on Rails</a>, which is distributed under the <a
+ * href="http://wiki.rubyonrails.org/rails/pages/License">Rails license</a>.
+ */
+public class Inflector {
+
+    protected static final Inflector INSTANCE = new Inflector();
+
+
+    public static Inflector getInstance() {
+        return INSTANCE;
+    }
+
+
+    protected class Rule {
+
+        protected final String expression;
+        protected final Pattern expressionPattern;
+        protected final String replacement;
+
+
+        protected Rule( String expression, String replacement ) {
+            this.expression = expression;
+            this.replacement = replacement != null ? replacement : "";
+            expressionPattern = Pattern.compile( this.expression, Pattern.CASE_INSENSITIVE );
+        }
+
+
+        /**
+         * Apply the rule against the input string, returning the modified string or null if the rule didn't apply (and
+         * no modifications were made)
+         *
+         * @param input the input string
+         *
+         * @return the modified string if this rule applied, or null if the input was not modified by this rule
+         */
+        protected String apply( String input ) {
+            Matcher matcher = expressionPattern.matcher( input );
+            if ( !matcher.find() ) {
+                return null;
+            }
+            return matcher.replaceAll( replacement );
+        }
+
+
+        @Override
+        public int hashCode() {
+            return expression.hashCode();
+        }
+
+
+        @Override
+        public boolean equals( Object obj ) {
+            if ( obj == this ) {
+                return true;
+            }
+            if ( ( obj != null ) && ( obj.getClass() == this.getClass() ) ) {
+                final Rule that = ( Rule ) obj;
+                if ( expression.equalsIgnoreCase( that.expression ) ) {
+                    return true;
+                }
+            }
+            return false;
+        }
+
+
+        @Override
+        public String toString() {
+            return expression + ", " + replacement;
+        }
+    }
+
+
+    private final LinkedList<Rule> plurals = new LinkedList<Rule>();
+    private final LinkedList<Rule> singulars = new LinkedList<Rule>();
+    /**
+     * The lowercase words that are to be excluded and not processed. This map can be modified by the users via {@link
+     * #getUncountables()}.
+     */
+    private final Set<String> uncountables = new HashSet<String>();
+
+
+    public Inflector() {
+        initialize();
+    }
+
+
+    protected Inflector( Inflector original ) {
+        plurals.addAll( original.plurals );
+        singulars.addAll( original.singulars );
+        uncountables.addAll( original.uncountables );
+    }
+
+
+    @Override
+    @SuppressWarnings("all")
+    public Inflector clone() {
+        return new Inflector( this );
+    }
+
+    // ------------------------------------------------------------------------------------------------
+    // Usage functions
+    // ------------------------------------------------------------------------------------------------
+
+
+    /**
+     * Returns the plural form of the word in the string. <p> Examples: <p/>
+     * <pre>
+     *   inflector.pluralize(&quot;post&quot;)               #=&gt; &quot;posts&quot;
+     *   inflector.pluralize(&quot;octopus&quot;)            #=&gt; &quot;octopi&quot;
+     *   inflector.pluralize(&quot;sheep&quot;)              #=&gt; &quot;sheep&quot;
+     *   inflector.pluralize(&quot;words&quot;)              #=&gt; &quot;words&quot;
+     *   inflector.pluralize(&quot;the blue mailman&quot;)   #=&gt; &quot;the blue mailmen&quot;
+     *   inflector.pluralize(&quot;CamelOctopus&quot;)       #=&gt; &quot;CamelOctopi&quot;
+     * </pre>
+     * <p/> </p> <p> Note that if the {@link Object#toString()} is called on the supplied object, so this method works
+     * for non-strings, too. </p>
+     *
+     * @param word the word that is to be pluralized.
+     *
+     * @return the pluralized form of the word, or the word itself if it could not be pluralized
+     *
+     * @see #singularize(Object)
+     */
+    public String pluralize( Object word ) {
+        if ( word == null ) {
+            return null;
+        }
+        String wordStr = word.toString().trim();
+        if ( wordStr.length() == 0 ) {
+            return wordStr;
+        }
+        if ( isUncountable( wordStr ) ) {
+            return wordStr;
+        }
+        for ( Rule rule : plurals ) {
+            String result = rule.apply( wordStr );
+            if ( result != null ) {
+                return result;
+            }
+        }
+        return wordStr;
+    }
+
+
+    public String pluralize( Object word, int count ) {
+        if ( word == null ) {
+            return null;
+        }
+        if ( ( count == 1 ) || ( count == -1 ) ) {
+            return word.toString();
+        }
+        return pluralize( word );
+    }
+
+
+    public boolean isPlural( Object word ) {
+        if ( word == null ) {
+            return false;
+        }
+        return pluralize( word ).equals( word.toString() );
+    }
+
+
+    /**
+     * Returns the singular form of the word in the string. <p> Examples: <p/>
+     * <pre>
+     *   inflector.singularize(&quot;posts&quot;)             #=&gt; &quot;post&quot;
+     *   inflector.singularize(&quot;octopi&quot;)            #=&gt; &quot;octopus&quot;
+     *   inflector.singularize(&quot;sheep&quot;)             #=&gt; &quot;sheep&quot;
+     *   inflector.singularize(&quot;words&quot;)             #=&gt; &quot;word&quot;
+     *   inflector.singularize(&quot;the blue mailmen&quot;)  #=&gt; &quot;the blue mailman&quot;
+     *   inflector.singularize(&quot;CamelOctopi&quot;)       #=&gt; &quot;CamelOctopus&quot;
+     * </pre>
+     * <p/> </p> <p> Note that if the {@link Object#toString()} is called on the supplied object, so this method works
+     * for non-strings, too. </p>
+     *
+     * @param word the word that is to be pluralized.
+     *
+     * @return the pluralized form of the word, or the word itself if it could not be pluralized
+     *
+     * @see #pluralize(Object)
+     */
+    public String singularize( Object word ) {
+        if ( word == null ) {
+            return null;
+        }
+        String wordStr = word.toString().trim();
+        if ( wordStr.length() == 0 ) {
+            return wordStr;
+        }
+        if ( isUncountable( wordStr ) ) {
+            return wordStr;
+        }
+        for ( Rule rule : singulars ) {
+            String result = rule.apply( wordStr );
+            if ( result != null ) {
+                return result;
+            }
+        }
+        return wordStr;
+    }
+
+
+    public boolean isSingular( Object word ) {
+        if ( word == null ) {
+            return false;
+        }
+        return singularize( word ).equals( word.toString() );
+    }
+
+
+    /**
+     * By default, this method converts strings to UpperCamelCase. If the <code>uppercaseFirstLetter</code> argument to
+     * false, then this method produces lowerCamelCase. This method will also use any extra delimiter characters to
+     * identify word boundaries. <p> Examples: <p/>
+     * <pre>
+     *   inflector.camelCase(&quot;active_record&quot;,false)    #=&gt; &quot;activeRecord&quot;
+     *   inflector.camelCase(&quot;active_record&quot;,true)     #=&gt; &quot;ActiveRecord&quot;
+     *   inflector.camelCase(&quot;first_name&quot;,false)       #=&gt; &quot;firstName&quot;
+     *   inflector.camelCase(&quot;first_name&quot;,true)        #=&gt; &quot;FirstName&quot;
+     *   inflector.camelCase(&quot;name&quot;,false)             #=&gt; &quot;name&quot;
+     *   inflector.camelCase(&quot;name&quot;,true)              #=&gt; &quot;Name&quot;
+     * </pre>
+     * <p/> </p>
+     *
+     * @param lowerCaseAndUnderscoredWord the word that is to be converted to camel case
+     * @param uppercaseFirstLetter true if the first character is to be uppercased, or false if the first character is
+     * to be lowercased
+     * @param delimiterChars optional characters that are used to delimit word boundaries
+     *
+     * @return the camel case version of the word
+     *
+     * @see #underscore(String, char[])
+     */
+    public String camelCase( String lowerCaseAndUnderscoredWord, boolean uppercaseFirstLetter,
+                             char... delimiterChars ) {
+        if ( lowerCaseAndUnderscoredWord == null ) {
+            return null;
+        }
+        lowerCaseAndUnderscoredWord = lowerCaseAndUnderscoredWord.trim();
+        if ( lowerCaseAndUnderscoredWord.length() == 0 ) {
+            return "";
+        }
+        if ( uppercaseFirstLetter ) {
+            String result = lowerCaseAndUnderscoredWord;
+            // Replace any extra delimiters with underscores (before the
+            // underscores are converted in the next step)...
+            if ( delimiterChars != null ) {
+                for ( char delimiterChar : delimiterChars ) {
+                    result = result.replace( delimiterChar, '_' );
+                }
+            }
+
+            // Change the case at the beginning at after each underscore ...
+            return replaceAllWithUppercase( result, "(^|_)(.)", 2 );
+        }
+        if ( lowerCaseAndUnderscoredWord.length() < 2 ) {
+            return lowerCaseAndUnderscoredWord;
+        }
+        return "" + Character.toLowerCase( lowerCaseAndUnderscoredWord.charAt( 0 ) ) + camelCase(
+                lowerCaseAndUnderscoredWord, true, delimiterChars ).substring( 1 );
+    }
+
+
+    /**
+     * Makes an underscored form from the expression in the string (the reverse of the {@link #camelCase(String,
+     * boolean, char[]) camelCase} method. Also changes any characters that match the supplied delimiters into
+     * underscore. <p> Examples: <p/>
+     * <pre>
+     *   inflector.underscore(&quot;activeRecord&quot;)     #=&gt; &quot;active_record&quot;
+     *   inflector.underscore(&quot;ActiveRecord&quot;)     #=&gt; &quot;active_record&quot;
+     *   inflector.underscore(&quot;firstName&quot;)        #=&gt; &quot;first_name&quot;
+     *   inflector.underscore(&quot;FirstName&quot;)        #=&gt; &quot;first_name&quot;
+     *   inflector.underscore(&quot;name&quot;)             #=&gt; &quot;name&quot;
+     *   inflector.underscore(&quot;The.firstName&quot;)    #=&gt; &quot;the_first_name&quot;
+     * </pre>
+     * <p/> </p>
+     *
+     * @param camelCaseWord the camel-cased word that is to be converted;
+     * @param delimiterChars optional characters that are used to delimit word boundaries (beyond capitalization)
+     *
+     * @return a lower-cased version of the input, with separate words delimited by the underscore character.
+     */
+    public String underscore( String camelCaseWord, char... delimiterChars ) {
+        if ( camelCaseWord == null ) {
+            return null;
+        }
+        String result = camelCaseWord.trim();
+        if ( result.length() == 0 ) {
+            return "";
+        }
+        result = result.replaceAll( "([A-Z]+)([A-Z][a-z])", "$1_$2" );
+        result = result.replaceAll( "([a-z\\d])([A-Z])", "$1_$2" );
+        result = result.replace( '-', '_' );
+        if ( delimiterChars != null ) {
+            for ( char delimiterChar : delimiterChars ) {
+                result = result.replace( delimiterChar, '_' );
+            }
+        }
+        return result.toLowerCase();
+    }
+
+
+    /**
+     * Returns a copy of the input with the first character converted to uppercase and the remainder to lowercase.
+     *
+     * @param words the word to be capitalized
+     *
+     * @return the string with the first character capitalized and the remaining characters lowercased
+     */
+    public String capitalize( String words ) {
+        if ( words == null ) {
+            return null;
+        }
+        String result = words.trim();
+        if ( result.length() == 0 ) {
+            return "";
+        }
+        if ( result.length() == 1 ) {
+            return result.toUpperCase();
+        }
+        return "" + Character.toUpperCase( result.charAt( 0 ) ) + result.substring( 1 ).toLowerCase();
+    }
+
+
+    // ------------------------------------------------------------------------------------------------
+    // Management methods
+    // ------------------------------------------------------------------------------------------------
+
+
+    /**
+     * Determine whether the supplied word is considered uncountable by the {@link #pluralize(Object) pluralize} and
+     * {@link #singularize(Object) singularize} methods.
+     *
+     * @param word the word
+     *
+     * @return true if the plural and singular forms of the word are the same
+     */
+    public boolean isUncountable( String word ) {
+        if ( word == null ) {
+            return false;
+        }
+        String trimmedLower = word.trim().toLowerCase();
+        return uncountables.contains( trimmedLower );
+    }
+
+
+    /**
+     * Get the set of words that are not processed by the Inflector. The resulting map is directly modifiable.
+     *
+     * @return the set of uncountable words
+     */
+    public Set<String> getUncountables() {
+        return uncountables;
+    }
+
+
+    public void addPluralize( String rule, String replacement ) {
+        final Rule pluralizeRule = new Rule( rule, replacement );
+        plurals.addFirst( pluralizeRule );
+    }
+
+
+    public void addSingularize( String rule, String replacement ) {
+        final Rule singularizeRule = new Rule( rule, replacement );
+        singulars.addFirst( singularizeRule );
+    }
+
+
+    public void addIrregular( String singular, String plural ) {
+        if ( org.apache.commons.lang.StringUtils.isEmpty( singular ) ) {
+            throw new IllegalArgumentException( "singular rule may not be empty" );
+        }
+        if ( org.apache.commons.lang.StringUtils.isEmpty( plural ) ) {
+            throw new IllegalArgumentException( "plural rule may not be empty" );
+        }
+        String singularRemainder = singular.length() > 1 ? singular.substring( 1 ) : "";
+        String pluralRemainder = plural.length() > 1 ? plural.substring( 1 ) : "";
+        addPluralize( "(" + singular.charAt( 0 ) + ")" + singularRemainder + "$", "$1" + pluralRemainder );
+        addSingularize( "(" + plural.charAt( 0 ) + ")" + pluralRemainder + "$", "$1" + singularRemainder );
+    }
+
+
+    public void addUncountable( String... words ) {
+        if ( ( words == null ) || ( words.length == 0 ) ) {
+            return;
+        }
+        for ( String word : words ) {
+            if ( word != null ) {
+                uncountables.add( word.trim().toLowerCase() );
+            }
+        }
+    }
+
+
+    /**
+     * Utility method to replace all occurrences given by the specific backreference with its uppercased form, and
+     * remove all other backreferences. <p> The Java {@link Pattern regular expression processing} does not use the
+     * preprocessing directives <code>\l</code>, <code>&#92;u</code>, <code>\L</code>, and <code>\U</code>. If so, such
+     * directives could be used in the replacement string to uppercase or lowercase the backreferences. For example,
+     * <code>\L1</code> would lowercase the first backreference, and <code>&#92;u3</code> would uppercase the 3rd
+     * backreference. </p>
+     *
+     * @return the input string with the appropriate characters converted to upper-case
+     */
+    protected static String replaceAllWithUppercase( String input, String regex, int groupNumberToUppercase ) {
+        Pattern underscoreAndDotPattern = Pattern.compile( regex );
+        Matcher matcher = underscoreAndDotPattern.matcher( input );
+        StringBuffer sb = new StringBuffer();
+        while ( matcher.find() ) {
+            matcher.appendReplacement( sb, matcher.group( groupNumberToUppercase ).toUpperCase() );
+        }
+        matcher.appendTail( sb );
+        return sb.toString();
+    }
+
+
+    /** Completely remove all rules within this inflector. */
+    public void clear() {
+        uncountables.clear();
+        plurals.clear();
+        singulars.clear();
+    }
+
+
+    protected void initialize() {
+        Inflector inflect = this;
+        inflect.addPluralize( "$", "s" );
+        inflect.addPluralize( "s$", "s" );
+        inflect.addPluralize( "(ax|test)is$", "$1es" );
+        inflect.addPluralize( "(octop|vir)us$", "$1i" );
+        inflect.addPluralize( "(octop|vir)i$", "$1i" ); // already plural
+        inflect.addPluralize( "(alias|status)$", "$1es" );
+        inflect.addPluralize( "(bu)s$", "$1ses" );
+        inflect.addPluralize( "(buffal|tomat)o$", "$1oes" );
+        inflect.addPluralize( "([ti])um$", "$1a" );
+        inflect.addPluralize( "([ti])a$", "$1a" ); // already plural
+        inflect.addPluralize( "sis$", "ses" );
+        inflect.addPluralize( "(?:([^f])fe|([lr])f)$", "$1$2ves" );
+        inflect.addPluralize( "(hive)$", "$1s" );
+        inflect.addPluralize( "([^aeiouy]|qu)y$", "$1ies" );
+        inflect.addPluralize( "(x|ch|ss|sh)$", "$1es" );
+        inflect.addPluralize( "(matr|vert|ind)ix|ex$", "$1ices" );
+        inflect.addPluralize( "([m|l])ouse$", "$1ice" );
+        inflect.addPluralize( "([m|l])ice$", "$1ice" );
+        inflect.addPluralize( "^(ox)$", "$1en" );
+        inflect.addPluralize( "(quiz)$", "$1zes" );
+        // Need to check for the following words that are already pluralized:
+        inflect.addPluralize( "(people|men|children|sexes|moves|stadiums)$", "$1" ); // irregulars
+        inflect.addPluralize( "(oxen|octopi|viri|aliases|quizzes)$", "$1" ); // special
+        // rules
+
+        inflect.addSingularize( "s$", "" );
+        inflect.addSingularize( "(s|si|u)s$", "$1s" ); // '-us' and '-ss' are
+        // already singular
+        inflect.addSingularize( "(n)ews$", "$1ews" );
+        inflect.addSingularize( "([ti])a$", "$1um" );
+        inflect.addSingularize( "((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$", "$1$2sis" );
+        inflect.addSingularize( "(^analy)ses$", "$1sis" );
+        inflect.addSingularize( "(^analy)sis$", "$1sis" ); // already singular,
+        // but ends in 's'
+        inflect.addSingularize( "([^f])ves$", "$1fe" );
+        inflect.addSingularize( "(hive)s$", "$1" );
+        inflect.addSingularize( "(tive)s$", "$1" );
+        inflect.addSingularize( "([lr])ves$", "$1f" );
+        inflect.addSingularize( "([^aeiouy]|qu)ies$", "$1y" );
+        inflect.addSingularize( "(s)eries$", "$1eries" );
+        inflect.addSingularize( "(m)ovies$", "$1ovie" );
+        inflect.addSingularize( "(x|ch|ss|sh)es$", "$1" );
+        inflect.addSingularize( "([m|l])ice$", "$1ouse" );
+        inflect.addSingularize( "(bus)es$", "$1" );
+        inflect.addSingularize( "(o)es$", "$1" );
+        inflect.addSingularize( "(shoe)s$", "$1" );
+        inflect.addSingularize( "(cris|ax|test)is$", "$1is" ); // already
+        // singular, but
+        // ends in 's'
+        inflect.addSingularize( "(cris|ax|test)es$", "$1is" );
+        inflect.addSingularize( "(octop|vir)i$", "$1us" );
+        inflect.addSingularize( "(octop|vir)us$", "$1us" ); // already singular,
+        // but ends in 's'
+        inflect.addSingularize( "(alias|status)es$", "$1" );
+        inflect.addSingularize( "(alias|status)$", "$1" ); // already singular,
+        // but ends in 's'
+        inflect.addSingularize( "^(ox)en", "$1" );
+        inflect.addSingularize( "(vert|ind)ices$", "$1ex" );
+        inflect.addSingularize( "(matr)ices$", "$1ix" );
+        inflect.addSingularize( "(quiz)zes$", "$1" );
+
+        inflect.addIrregular( "person", "people" );
+        inflect.addIrregular( "man", "men" );
+        inflect.addIrregular( "child", "children" );
+        inflect.addIrregular( "sex", "sexes" );
+        inflect.addIrregular( "move", "moves" );
+        inflect.addIrregular( "stadium", "stadiums" );
+
+        inflect.addUncountable( "equipment", "information", "rice", "money", "species", "series", "fish", "sheep",
+                "data", "analytics" );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/utils/JsonUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/utils/JsonUtils.java b/stack/core/src/main/java/org/apache/usergrid/utils/JsonUtils.java
new file mode 100644
index 0000000..6643ce7
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/utils/JsonUtils.java
@@ -0,0 +1,327 @@
+/*
+ * 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.utils;
+
+
+import java.io.File;
+import java.math.BigInteger;
+import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
+import org.apache.usergrid.exception.JsonReadException;
+import org.apache.usergrid.exception.JsonWriteException;
+import org.apache.usergrid.persistence.Entity;
+import org.codehaus.jackson.JsonNode;
+import org.codehaus.jackson.io.JsonStringEncoder;
+import org.codehaus.jackson.map.ObjectMapper;
+import org.codehaus.jackson.map.SerializationConfig.Feature;
+import org.codehaus.jackson.smile.SmileFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static org.apache.commons.lang.StringUtils.substringAfter;
+import static org.apache.usergrid.utils.StringUtils.stringOrSubstringBeforeFirst;
+
+
+public class JsonUtils {
+
+    private static final Logger LOG = LoggerFactory.getLogger( JsonUtils.class );
+
+    static ObjectMapper mapper = new ObjectMapper();
+
+    static SmileFactory smile = new SmileFactory();
+
+    static ObjectMapper smileMapper = new ObjectMapper( smile );
+
+    private static ObjectMapper indentObjectMapper = new ObjectMapper();
+
+
+    static {
+        indentObjectMapper.getSerializationConfig().set( Feature.INDENT_OUTPUT, true );
+    }
+
+
+    /** Converts object to JSON string, throws runtime exception JsonWriteException on failure. */
+    public static String mapToJsonString( Object obj ) {
+        try {
+            return mapper.writeValueAsString( obj );
+        }
+        catch ( Throwable t ) {
+            LOG.debug( "Error generating JSON", t );
+            throw new JsonWriteException( "Error generating JSON", t );
+        }
+    }
+
+
+    /** Converts object to JSON string, throws runtime exception JsonWriteException on failure. */
+    public static String mapToFormattedJsonString( Object obj ) {
+        try {
+            return indentObjectMapper.writeValueAsString( obj );
+        }
+        catch ( Throwable t ) {
+            LOG.debug( "Error generating JSON", t );
+            throw new JsonWriteException( "Error generating JSON", t );
+        }
+    }
+
+
+    /** Parses JSON string  and returns object, throws runtime exception JsonReadException on failure. */
+    public static Object parse( String json ) {
+        try {
+            return mapper.readValue( json, Object.class );
+        }
+        catch ( Throwable t ) {
+            LOG.debug( "Error parsing JSON", t );
+            throw new JsonReadException( "Error parsing JSON", t );
+        }
+    }
+
+
+    public static String quoteString( String s ) {
+        JsonStringEncoder encoder = new JsonStringEncoder();
+        return new String( encoder.quoteAsUTF8( s ) );
+    }
+
+
+    public static ByteBuffer toByteBuffer( Object obj ) {
+        if ( obj == null ) {
+            return null;
+        }
+
+        byte[] bytes = null;
+        try {
+            bytes = smileMapper.writeValueAsBytes( obj );
+        }
+        catch ( Exception e ) {
+            LOG.error( "Error getting SMILE bytes", e );
+        }
+        if ( bytes != null ) {
+            return ByteBuffer.wrap( bytes );
+        }
+        return null;
+    }
+
+
+    public static Object fromByteBuffer( ByteBuffer byteBuffer ) {
+        return fromByteBuffer( byteBuffer, Object.class );
+    }
+
+
+    public static Object fromByteBuffer( ByteBuffer byteBuffer, Class<?> clazz ) {
+        if ( ( byteBuffer == null ) || !byteBuffer.hasRemaining() ) {
+            return null;
+        }
+        if ( clazz == null ) {
+            clazz = Object.class;
+        }
+
+        Object obj = null;
+        try {
+            obj = smileMapper.readValue( byteBuffer.array(), byteBuffer.arrayOffset() + byteBuffer.position(),
+                    byteBuffer.remaining(), clazz );
+        }
+        catch ( Exception e ) {
+            LOG.error( "Error parsing SMILE bytes", e );
+        }
+        return obj;
+    }
+
+
+    public static JsonNode toJsonNode( Object obj ) {
+        if ( obj == null ) {
+            return null;
+        }
+        return mapper.convertValue( obj, JsonNode.class );
+    }
+
+
+    @SuppressWarnings("unchecked")
+    public static Map<String, Object> toJsonMap( Object obj ) {
+        if ( obj == null ) {
+            return null;
+        }
+
+        return ( Map<String, Object> ) mapper.convertValue( obj, Map.class );
+    }
+
+
+    private static UUID tryConvertToUUID( Object o ) {
+        if ( o instanceof String ) {
+            String s = ( String ) o;
+            if ( s.length() == 36 ) {
+                try {
+                    return UUID.fromString( s );
+                }
+                catch ( IllegalArgumentException e ) {
+                    LOG.warn( "Argument to UUID.fromString({}) was invalid.", s, e );
+                }
+            }
+        }
+        return null;
+    }
+
+
+    public static Object normalizeJsonTree( Object obj ) {
+        if ( obj instanceof Map ) {
+            @SuppressWarnings("unchecked") Map<Object, Object> m = ( Map<Object, Object> ) obj;
+            Object o;
+            UUID uuid;
+            for ( Object k : m.keySet() ) {
+                if ( k instanceof String && ( ( String ) k ).equalsIgnoreCase( "name" ) ) {
+                    continue;
+                }
+
+                o = m.get( k );
+                uuid = tryConvertToUUID( o );
+                if ( uuid != null ) {
+                    m.put( k, uuid );
+                }
+                else if ( o instanceof Integer ) {
+                    m.put( k, ( ( Integer ) o ).longValue() );
+                }
+                else if ( o instanceof BigInteger ) {
+                    m.put( k, ( ( BigInteger ) o ).longValue() );
+                }
+            }
+        }
+        else if ( obj instanceof List ) {
+            @SuppressWarnings("unchecked") List<Object> l = ( List<Object> ) obj;
+            Object o;
+            UUID uuid;
+            for ( int i = 0; i < l.size(); i++ ) {
+                o = l.get( i );
+                uuid = tryConvertToUUID( o );
+                if ( uuid != null ) {
+                    l.set( i, uuid );
+                }
+                else if ( ( o instanceof Map ) || ( o instanceof List ) ) {
+                    normalizeJsonTree( o );
+                }
+                else if ( o instanceof Integer ) {
+                    l.set( i, ( ( Integer ) o ).longValue() );
+                }
+                else if ( o instanceof BigInteger ) {
+                    l.set( i, ( ( BigInteger ) o ).longValue() );
+                }
+            }
+        }
+        else if ( obj instanceof String ) {
+            UUID uuid = tryConvertToUUID( obj );
+            if ( uuid != null ) {
+                return uuid;
+            }
+        }
+        else if ( obj instanceof Integer ) {
+            return ( ( Integer ) obj ).longValue();
+        }
+        else if ( obj instanceof BigInteger ) {
+            return ( ( BigInteger ) obj ).longValue();
+        }
+        else if ( obj instanceof JsonNode ) {
+            return mapper.convertValue( obj, Object.class );
+        }
+        return obj;
+    }
+
+
+    public static Object select( Object obj, String path ) {
+        return select( obj, path, false );
+    }
+
+
+    public static Object select( Object obj, String path, boolean buildResultTree ) {
+
+        if ( obj == null ) {
+            return null;
+        }
+
+        if ( org.apache.commons.lang.StringUtils.isBlank( path ) ) {
+            return obj;
+        }
+
+        String segment = stringOrSubstringBeforeFirst( path, '.' );
+        String remaining = substringAfter( path, "." );
+
+        if ( obj instanceof Map ) {
+            Map<?, ?> map = ( Map<?, ?> ) obj;
+            Object child = map.get( segment );
+            Object result = select( child, remaining, buildResultTree );
+            if ( result != null ) {
+                if ( buildResultTree ) {
+                    Map<Object, Object> results = new LinkedHashMap<Object, Object>();
+                    results.put( segment, result );
+                    return results;
+                }
+                else {
+                    return result;
+                }
+            }
+            return null;
+        }
+        if ( obj instanceof List ) {
+            List<Object> results = new ArrayList<Object>();
+            List<?> list = ( List<?> ) obj;
+            for ( Object i : list ) {
+                Object result = select( i, path, buildResultTree );
+                if ( result != null ) {
+                    results.add( result );
+                }
+            }
+            if ( !results.isEmpty() ) {
+                return results;
+            }
+            return null;
+        }
+
+        if ( obj instanceof Entity ) {
+            Object child = ( ( Entity ) obj ).getProperty( segment );
+            Object result = select( child, remaining, buildResultTree );
+            if ( result != null ) {
+                if ( buildResultTree ) {
+                    Map<Object, Object> results = new LinkedHashMap<Object, Object>();
+                    results.put( segment, result );
+                    return results;
+                }
+                else {
+                    return result;
+                }
+            }
+            else {
+                return result;
+            }
+        }
+
+        return obj;
+    }
+
+
+    public static Object loadFromFilesystem( String filename ) {
+        Object json = null;
+        try {
+            File file = new File( filename );
+            json = mapper.readValue( file, Object.class );
+        }
+        catch ( Exception e ) {
+            LOG.error( "Error loading JSON", e );
+        }
+        return json;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/utils/ListUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/utils/ListUtils.java b/stack/core/src/main/java/org/apache/usergrid/utils/ListUtils.java
new file mode 100644
index 0000000..6a88193
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/utils/ListUtils.java
@@ -0,0 +1,230 @@
+/*
+ * 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.utils;
+
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.UUID;
+
+import org.apache.commons.lang.math.NumberUtils;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+public class ListUtils extends org.apache.commons.collections.ListUtils {
+    private static final Logger LOG = LoggerFactory.getLogger( ListUtils.class );
+
+
+    public static <A> A first( List<A> list ) {
+        if ( list == null ) {
+            return null;
+        }
+        if ( list.size() == 0 ) {
+            return null;
+        }
+        return list.get( 0 );
+    }
+
+
+    public static <A> A last( List<A> list ) {
+        if ( list == null ) {
+            return null;
+        }
+        if ( list.size() == 0 ) {
+            return null;
+        }
+        return list.get( list.size() - 1 );
+    }
+
+
+    public static <A> Integer firstInteger( List<A> list ) {
+        A a = first( list );
+        if ( a == null ) {
+            return null;
+        }
+
+        if ( a instanceof Integer ) {
+            return ( Integer ) a;
+        }
+
+        try {
+            return NumberUtils.toInt( ( String ) a );
+        }
+        catch ( Exception e ) {
+            LOG.warn( "Could not convert list item {} to int", a, e );
+        }
+        return null;
+    }
+
+
+    public static <A> Long firstLong( List<A> list ) {
+        A a = first( list );
+        if ( a == null ) {
+            return null;
+        }
+
+        if ( a instanceof Long ) {
+            return ( Long ) a;
+        }
+
+        try {
+            return NumberUtils.toLong( ( String ) a );
+        }
+        catch ( Exception e ) {
+            LOG.warn( "Could not convert list item {} to long", a, e );
+        }
+        return null;
+    }
+
+
+    public static <A> Boolean firstBoolean( List<A> list ) {
+        A a = first( list );
+        if ( a == null ) {
+            return null;
+        }
+
+        if ( a instanceof Boolean ) {
+            return ( Boolean ) a;
+        }
+
+        try {
+            return Boolean.parseBoolean( ( String ) a );
+        }
+        catch ( Exception e ) {
+            LOG.warn( "Could not convert list item {} to boolean", a, e );
+        }
+        return null;
+    }
+
+
+    public static <A> UUID firstUuid( List<A> list ) {
+        A i = first( list );
+        if ( i == null ) {
+            return null;
+        }
+
+        if ( i instanceof UUID ) {
+            return ( UUID ) i;
+        }
+
+        try {
+            return UUIDUtils.tryGetUUID( ( String ) i );
+        }
+        catch ( Exception e ) {
+            LOG.warn( "Could not convert list item {} to UUID", i, e );
+        }
+        return null;
+    }
+
+
+    public static boolean isEmpty( List<?> list ) {
+        return ( list == null ) || ( list.size() == 0 );
+    }
+
+
+    public static <T> List<T> dequeueCopy( List<T> list ) {
+        if ( !isEmpty( list ) ) {
+            list = list.subList( 1, list.size() );
+        }
+        return list;
+    }
+
+
+    public static <T> List<T> initCopy( List<T> list ) {
+        if ( !isEmpty( list ) ) {
+            list = new ArrayList<T>( list );
+        }
+        else {
+            list = new ArrayList<T>();
+        }
+        return list;
+    }
+
+
+    public static <T> T dequeue( List<T> list ) {
+        if ( !isEmpty( list ) ) {
+            return list.remove( 0 );
+        }
+        return null;
+    }
+
+
+    public static <T> List<T> queue( List<T> list, T item ) {
+        if ( list == null ) {
+            list = new ArrayList<T>();
+        }
+        list.add( item );
+        return list;
+    }
+
+
+    public static <T> List<T> requeue( List<T> list, T item ) {
+        if ( list == null ) {
+            list = new ArrayList<T>();
+        }
+        list.add( 0, item );
+        return list;
+    }
+
+
+    @SuppressWarnings({ "unchecked", "rawtypes" })
+    public static List<?> flatten( Collection<?> l ) {
+        boolean hasCollection = false;
+        for ( Object o : l ) {
+            if ( o instanceof Collection ) {
+                hasCollection = true;
+                break;
+            }
+        }
+        if ( !hasCollection && ( l instanceof List ) ) {
+            return ( List<?> ) l;
+        }
+        List newList = new ArrayList();
+        for ( Object o : l ) {
+            if ( o instanceof List ) {
+                newList.addAll( flatten( ( List ) o ) );
+            }
+            else {
+                newList.add( o );
+            }
+        }
+        return newList;
+    }
+
+
+    public static boolean anyNull( List<?> l ) {
+        for ( Object o : l ) {
+            if ( o == null ) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+
+    public static boolean anyNull( Object... objects ) {
+        for ( Object o : objects ) {
+            if ( o == null ) {
+                return true;
+            }
+        }
+        return false;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/utils/MailUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/utils/MailUtils.java b/stack/core/src/main/java/org/apache/usergrid/utils/MailUtils.java
new file mode 100644
index 0000000..becd669
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/utils/MailUtils.java
@@ -0,0 +1,154 @@
+/*
+ * 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.utils;
+
+
+import java.util.Properties;
+
+import javax.mail.Message;
+import javax.mail.MessagingException;
+import javax.mail.Session;
+import javax.mail.Transport;
+import javax.mail.internet.AddressException;
+import javax.mail.internet.InternetAddress;
+import javax.mail.internet.MimeBodyPart;
+import javax.mail.internet.MimeMessage;
+import javax.mail.internet.MimeMultipart;
+
+import org.jsoup.Jsoup;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.google.common.base.Preconditions;
+
+import static org.apache.usergrid.utils.MapUtils.filter;
+
+
+/** Encapsulate the transport and error reporting of email */
+public class MailUtils {
+
+    private static final Logger logger = LoggerFactory.getLogger( MailUtils.class );
+
+    private static final String LOG_PREFIX = "MAIL-DELIVERY-FAILURE - description: [%s] recipient: [%s]";
+    private static final String LOG_PREFIX_OK = "MAIL-DELIVERY-SUCCESS - recipient: [%s]";
+    private static final String CONTENT_TYPE = "Content-Type";
+    private static final String MIME_VERSION = "MIME-Version";
+    private static final String MAIL_PROP_PREFIX = "mail.";
+    private static final String PROP_TRANSPORT = MAIL_PROP_PREFIX + "transport.protocol";
+
+
+    public static Properties getMailProperties( Properties properties ) {
+        return filter( properties, MAIL_PROP_PREFIX );
+    }
+
+
+    /**
+     * Send a message to the transport configured via the provided properties. Encapsulates the MIME multipart
+     * construction with the provided HTML and plain text forms.
+     * <p/>
+     * One of either plainText or htmlText (or both) are required. If both are null or empty we throw an
+     * IllegalArgumentException.
+     * <p/>
+     * In the case of only having htmlText, plainText is extracted from the body and wrapped in &lt;pre&gt; tags to
+     * create the multi-part.
+     *
+     * @param plainText can be null
+     */
+    public void sendMail( Properties props, String to, String from, String subject, String plainText,
+                          String htmlText ) {
+        Preconditions.checkArgument( StringUtils.isNotBlank( htmlText ) || StringUtils.isNotBlank( plainText ),
+                "htmlText and plainText were both blank" );
+
+        try {
+            if ( props == null ) {
+                props = System.getProperties();
+            }
+
+            String protocol = props.getProperty( PROP_TRANSPORT, "smtp" );
+            String host = props.getProperty( MAIL_PROP_PREFIX + protocol + ".host" );
+            String username = props.getProperty( MAIL_PROP_PREFIX + protocol + ".username" );
+            String password = props.getProperty( MAIL_PROP_PREFIX + protocol + ".password" );
+
+            Session session = Session.getInstance( props );
+            // session.setDebug(true);
+
+            MimeMultipart msgContent = new MimeMultipart( "alternative" );
+
+            if ( ( htmlText != null ) && ( plainText == null ) ) {
+                try {
+                    plainText = Jsoup.parse( htmlText ).body().wrap( "<pre></pre>" ).text();
+                }
+                catch ( Exception e ) {
+                    logger.error( "Html parse error", e );
+                }
+            }
+
+            if ( plainText != null ) {
+                MimeBodyPart plainPart = new MimeBodyPart();
+                plainPart.setContent( plainText, "text/plain" );
+                plainPart.setHeader( MIME_VERSION, "1.0" );
+                plainPart.setHeader( CONTENT_TYPE, "text/plain; charset=iso-8859-1" );
+                msgContent.addBodyPart( plainPart );
+            }
+
+            if ( htmlText != null ) {
+                MimeBodyPart htmlPart = new MimeBodyPart();
+                htmlPart.setContent( htmlText, "text/html" );
+                htmlPart.setHeader( MIME_VERSION, "1.0" );
+                htmlPart.setHeader( CONTENT_TYPE, "text/html; charset=iso-8859-1" );
+                msgContent.addBodyPart( htmlPart );
+            }
+
+            MimeMessage msg = new MimeMessage( session );
+            msg.setContent( msgContent );
+            msg.setFrom( new InternetAddress( from ) );
+            msg.addRecipient( Message.RecipientType.TO, new InternetAddress( to ) );
+            msg.setSubject( subject );
+
+            Transport transport = session.getTransport();
+
+            transport.connect( host, username, password );
+
+            transport.sendMessage( msg, msg.getAllRecipients() );
+            transport.close();
+            logger.info( String.format( LOG_PREFIX_OK, to ) );
+        }
+        catch ( AddressException ae ) {
+            logger.error( createErrorMessage( "could not send to bad address", to ), ae );
+        }
+        catch ( MessagingException me ) {
+            logger.error( createErrorMessage( "could not deliver message", to ), me );
+        }
+        catch ( Exception e ) {
+            logger.error( "General exception delivering mail", to, e );
+        }
+    }
+
+
+    /**
+     * Delegates to {@link #sendMail(java.util.Properties, String, String, String, String, String)} with null as the
+     * 'plainText' argument to such.
+     */
+    public void sendHtmlMail( Properties props, String to, String from, String subject, String html ) {
+        sendMail( props, to, from, subject, null, html );
+    }
+
+
+    String createErrorMessage( String message, String toAddress ) {
+        return String.format( LOG_PREFIX, message, toAddress );
+    }
+}


[50/96] [abbrv] [partial] Change package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/build-tools/pom.xml
----------------------------------------------------------------------
diff --git a/stack/build-tools/pom.xml b/stack/build-tools/pom.xml
index 2351b7b..5ad60ba 100644
--- a/stack/build-tools/pom.xml
+++ b/stack/build-tools/pom.xml
@@ -4,7 +4,7 @@
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
   <modelVersion>4.0.0</modelVersion>
   <parent>
-    <groupId>org.usergrid</groupId>
+    <groupId>org.apache.usergrid</groupId>
     <artifactId>usergrid</artifactId>
     <version>0.0.28-SNAPSHOT</version>
   </parent>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/build-tools/src/main/resources/usergrid/checkstyle.xml
----------------------------------------------------------------------
diff --git a/stack/build-tools/src/main/resources/usergrid/checkstyle.xml b/stack/build-tools/src/main/resources/usergrid/checkstyle.xml
index 7033eb2..0275984 100644
--- a/stack/build-tools/src/main/resources/usergrid/checkstyle.xml
+++ b/stack/build-tools/src/main/resources/usergrid/checkstyle.xml
@@ -137,7 +137,7 @@
     <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->
     <module name="ImportOrder">
       <property name="option" value="bottom"/>
-      <property name="groups" value="java,javax,org.apache,org.apache.usergrid,com,org.usergrid,org,net"/>
+      <property name="groups" value="java,javax,org.apache,org.apache.usergrid,com,org.apache.usergrid,org,net"/>
       <property name="separated" value="true"/>
     </module>
     <!-- ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... -->

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/config/pom.xml
----------------------------------------------------------------------
diff --git a/stack/config/pom.xml b/stack/config/pom.xml
index a362b1b..aee24d2 100644
--- a/stack/config/pom.xml
+++ b/stack/config/pom.xml
@@ -3,7 +3,7 @@
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
   <modelVersion>4.0.0</modelVersion>
   <parent>
-    <groupId>org.usergrid</groupId>
+    <groupId>org.apache.usergrid</groupId>
     <artifactId>usergrid</artifactId>
     <version>0.0.28-SNAPSHOT</version>
   </parent>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/config/src/main/resources/log4j.xml
----------------------------------------------------------------------
diff --git a/stack/config/src/main/resources/log4j.xml b/stack/config/src/main/resources/log4j.xml
index e8d2684..dc9a44f 100644
--- a/stack/config/src/main/resources/log4j.xml
+++ b/stack/config/src/main/resources/log4j.xml
@@ -23,31 +23,31 @@
         <level value="error"/>
         <appender-ref ref="stdout"/>
     </logger>
-    <logger name="org.usergrid.persistence.cassandra.BATCH">
+    <logger name="org.apache.usergrid.persistence.cassandra.BATCH">
         <level value="warn"/>
         <appender-ref ref="stdout"/>
     </logger>
-    <logger name="org.usergrid.persistence.cassandra.ConnectionRefImpl">
+    <logger name="org.apache.usergrid.persistence.cassandra.ConnectionRefImpl">
         <level value="warn"/>
         <appender-ref ref="stdout"/>
     </logger>
-    <logger name="org.usergrid.persistence.cassandra.DaoUtils">
+    <logger name="org.apache.usergrid.persistence.cassandra.DaoUtils">
         <level value="warn"/>
         <appender-ref ref="stdout"/>
     </logger>
-    <logger name="org.usergrid.persistence.cassandra.DB">
+    <logger name="org.apache.usergrid.persistence.cassandra.DB">
         <level value="warn"/>
         <appender-ref ref="stdout"/>
     </logger>
-    <logger name="org.usergrid.persistence.cassandra.EntityManagerFactoryImpl">
+    <logger name="org.apache.usergrid.persistence.cassandra.EntityManagerFactoryImpl">
         <level value="warn"/>
         <appender-ref ref="stdout"/>
     </logger>
-    <logger name="org.usergrid.persistence.cassandra.EntityManagerImpl">
+    <logger name="org.apache.usergrid.persistence.cassandra.EntityManagerImpl">
         <level value="warn"/>
         <appender-ref ref="stdout"/>
     </logger>
-    <logger name="org.usergrid.rest.security.AllowAjaxFilter">
+    <logger name="org.apache.usergrid.rest.security.AllowAjaxFilter">
         <level value="warn"/>
         <appender-ref ref="stdout"/>
     </logger>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/config/src/main/resources/usergrid-default.properties
----------------------------------------------------------------------
diff --git a/stack/config/src/main/resources/usergrid-default.properties b/stack/config/src/main/resources/usergrid-default.properties
index 62107da..492a70c 100644
--- a/stack/config/src/main/resources/usergrid-default.properties
+++ b/stack/config/src/main/resources/usergrid-default.properties
@@ -58,7 +58,7 @@ usergrid.version.properties=1.0.0
 # build number for display
 usergrid.version.build=${version}
 
-usergird.service.packages=com.usergrid.services;org.usergrid.services;baas.io
+usergird.service.packages=com.usergrid.services;org.apache.usergrid.services;baas.io
 
 #Batch submit counters ever 1000 updates
 usergrid.counter.batch.size=1000

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/config/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/stack/config/src/test/resources/log4j.properties b/stack/config/src/test/resources/log4j.properties
index bfa2719..5527973 100644
--- a/stack/config/src/test/resources/log4j.properties
+++ b/stack/config/src/test/resources/log4j.properties
@@ -28,14 +28,14 @@ log4j.appender.stdout.layout.ConversionPattern=%d %p (%t) [%c] - %m%n
 
 log4j.category.org.apache=ERROR, stdout
 
-log4j.logger.org.usergrid.persistence.cassandra.DB=WARN, stdout
-log4j.logger.org.usergrid.persistence.cassandra.BATCH=WARN, stdout
-log4j.logger.org.usergrid.persistence.cassandra.EntityManagerFactoryImpl=WARN, stdout
-log4j.logger.org.usergrid.persistence.cassandra.DaoUtils=WARN, stdout
-log4j.logger.org.usergrid.persistence.cassandra.EntityManagerImpl=WARN, stdout
-log4j.logger.org.usergrid.persistence.cassandra.ConnectionRefImpl=WARN, stdout
+log4j.logger.org.apache.usergrid.persistence.cassandra.DB=WARN, stdout
+log4j.logger.org.apache.usergrid.persistence.cassandra.BATCH=WARN, stdout
+log4j.logger.org.apache.usergrid.persistence.cassandra.EntityManagerFactoryImpl=WARN, stdout
+log4j.logger.org.apache.usergrid.persistence.cassandra.DaoUtils=WARN, stdout
+log4j.logger.org.apache.usergrid.persistence.cassandra.EntityManagerImpl=WARN, stdout
+log4j.logger.org.apache.usergrid.persistence.cassandra.ConnectionRefImpl=WARN, stdout
 log4j.logger.me.prettyprint.cassandra.hector.TimingLogger=WARN, stdout
-log4j.logger.org.usergrid.rest.security.AllowAjaxFilter=WARN, stdout
+log4j.logger.org.apache.usergrid.rest.security.AllowAjaxFilter=WARN, stdout
 log4j.logger.me.prettyprint.hector.api.beans.AbstractComposite=ERROR, stdout
 
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/config/src/test/resources/log4j.xml
----------------------------------------------------------------------
diff --git a/stack/config/src/test/resources/log4j.xml b/stack/config/src/test/resources/log4j.xml
index e86cc8b..a4696bc 100644
--- a/stack/config/src/test/resources/log4j.xml
+++ b/stack/config/src/test/resources/log4j.xml
@@ -10,10 +10,10 @@
         <level value="error"/>
         <appender-ref ref="stdout"/>
     </logger>
-    <logger name="org.usergrid.persistence.cassandra.CounterUtils">
+    <logger name="org.apache.usergrid.persistence.cassandra.CounterUtils">
         <level value="warn"/>
     </logger>
-     <logger name="org.usergrid.mq.cassandra.io" additivity="false">
+     <logger name="org.apache.usergrid.mq.cassandra.io" additivity="false">
         <level value="DEBUG"/>
         <appender-ref ref="stdout"/>
     </logger>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/pom.xml
----------------------------------------------------------------------
diff --git a/stack/core/pom.xml b/stack/core/pom.xml
index 6a2bebe..ad0a553 100644
--- a/stack/core/pom.xml
+++ b/stack/core/pom.xml
@@ -3,7 +3,7 @@
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
   <modelVersion>4.0.0</modelVersion>
   <parent>
-    <groupId>org.usergrid</groupId>
+    <groupId>org.apache.usergrid</groupId>
     <artifactId>usergrid</artifactId>
     <version>0.0.28-SNAPSHOT</version>
   </parent>
@@ -102,7 +102,7 @@
                 <exclude>**/StringLiteralTest.java</exclude>
 
                 <!-- excludes all the iterator query integration tests -->
-                <exclude>**/org/usergrid/persistence/query/*IT.java</exclude>
+                <exclude>**/org.apache.usergrid/persistence/query/*IT.java</exclude>
               </excludes>
             </configuration>
           </plugin>
@@ -180,7 +180,7 @@
                 <exclude>**/StringLiteralTest.java</exclude>
 
                 <!-- excludes all the iterator query integration tests -->
-                <exclude>**/org/usergrid/persistence/query/*IT.java</exclude>
+                <exclude>**/org.apache.usergrid/persistence/query/*IT.java</exclude>
               </excludes>
             </configuration>
           </plugin>
@@ -268,7 +268,7 @@
             </goals>
             <configuration>
               <includes>
-                <include>**/org/usergrid/**</include>
+                <include>**/org.apache.usergrid/**</include>
               </includes>
             </configuration>
           </execution>
@@ -512,7 +512,7 @@
     <!-- Test and Logging Dependencies -->
 
     <dependency>
-      <groupId>org.usergrid</groupId>
+      <groupId>org.apache.usergrid</groupId>
       <artifactId>usergrid-config</artifactId>
       <version>${project.version}</version>
       <scope>test</scope>
@@ -532,7 +532,7 @@
     </dependency>
 
     <dependency>
-      <groupId>org.usergrid</groupId>
+      <groupId>org.apache.usergrid</groupId>
       <artifactId>usergrid-test-utils</artifactId>
       <version>${project.version}</version>
       <scope>test</scope>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/antlr3/org/usergrid/persistence/query/tree/QueryFilter.g
----------------------------------------------------------------------
diff --git a/stack/core/src/main/antlr3/org/usergrid/persistence/query/tree/QueryFilter.g b/stack/core/src/main/antlr3/org/usergrid/persistence/query/tree/QueryFilter.g
index 918f0bd..c566ef9 100644
--- a/stack/core/src/main/antlr3/org/usergrid/persistence/query/tree/QueryFilter.g
+++ b/stack/core/src/main/antlr3/org/usergrid/persistence/query/tree/QueryFilter.g
@@ -10,12 +10,12 @@ options {
 
 
 @header {
-package org.usergrid.persistence.query.tree;
+package org.apache.usergrid.persistence.query.tree;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.usergrid.persistence.Query;
-import org.usergrid.persistence.Query.SortPredicate;
+import org.apache.usergrid.persistence.Query;
+import org.apache.usergrid.persistence.Query.SortPredicate;
 
 }
 
@@ -34,12 +34,12 @@ import org.usergrid.persistence.Query.SortPredicate;
 
 
 @lexer::header {
-package org.usergrid.persistence.query.tree;
+package org.apache.usergrid.persistence.query.tree;
 
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.usergrid.persistence.exceptions.QueryTokenException;
+import org.apache.usergrid.persistence.exceptions.QueryTokenException;
 
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/batch/AppArgs.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/batch/AppArgs.java b/stack/core/src/main/java/org/apache/usergrid/batch/AppArgs.java
new file mode 100644
index 0000000..c8b1b9e
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/batch/AppArgs.java
@@ -0,0 +1,57 @@
+package org.apache.usergrid.batch;
+
+
+import com.beust.jcommander.JCommander;
+import com.beust.jcommander.Parameter;
+
+
+/** @author zznate */
+public class AppArgs {
+
+    @Parameter(names = "-host", description = "The Cassandra host to which we will connect")
+    private String host = "127.0.0.1";
+
+    @Parameter(names = "-port", description = "The port which we will connect")
+    private int port = 9160;
+
+    @Parameter(names = "-workerThreads", description = "The number of worker threads")
+    private int workerThreads = 4;
+
+    @Parameter(names = "-sleepFor", description = "Number of seconds to sleep between checks of the work queue")
+    private int sleepFor = 2;
+
+    @Parameter(names = "-appContext", description = "Location of Spring Application context files")
+    private String appContext;
+
+
+    public static AppArgs parseArgs( String[] args ) {
+        AppArgs appArgs = new AppArgs();
+        JCommander jcommander = new JCommander( appArgs, args );
+        return appArgs;
+    }
+
+
+    public String getHost() {
+        return host;
+    }
+
+
+    public int getPort() {
+        return port;
+    }
+
+
+    public int getWorkerThreads() {
+        return workerThreads;
+    }
+
+
+    public int getSleepFor() {
+        return sleepFor;
+    }
+
+
+    public String getAppContext() {
+        return appContext;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/batch/Job.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/batch/Job.java b/stack/core/src/main/java/org/apache/usergrid/batch/Job.java
new file mode 100644
index 0000000..1aec006
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/batch/Job.java
@@ -0,0 +1,20 @@
+package org.apache.usergrid.batch;
+
+
+/**
+ * Defines only an execute method. Implementation functionality is completely up to the {@link JobFactory}
+ *
+ * @author zznate
+ */
+public interface Job {
+
+    /**
+     * Invoked when a job should execute
+     *
+     * @param execution The execution information.  This will be the same from the last run.  By default you should call
+     * exeuction.start() once processing starts
+     *
+     * @throws JobExecutionException If the job cannot be executed
+     */
+    public void execute( JobExecution execution ) throws Exception;
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/batch/JobExecution.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/batch/JobExecution.java b/stack/core/src/main/java/org/apache/usergrid/batch/JobExecution.java
new file mode 100644
index 0000000..f129797
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/batch/JobExecution.java
@@ -0,0 +1,91 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.batch;
+
+
+import java.util.UUID;
+
+import org.apache.usergrid.persistence.entities.JobData;
+import org.apache.usergrid.persistence.entities.JobStat;
+
+
+/**
+ * Interface to define all operations possible during a job execution. The job execution has several states.
+ * <p/>
+ * <p/>
+ * The Execution has the following state transitions
+ * <p/>
+ * NOT_STARTED->IN_PROGRESS
+ * <p/>
+ * <p/>
+ * IN_PROGRESS->COMPLETED <br/> IN_PROGRESS->FAILED <br/> IN_PROGRESS->DEAD
+ * <p/>
+ * FAILED->IN_PROGRESS
+ *
+ * @author tnine
+ */
+public interface JobExecution {
+
+    /** Retry constant to signal the job should try forever */
+    public static final int FOREVER = -1;
+
+    /** Get the data for this execution */
+    public JobData getJobData();
+
+    /** Get the job statistic information */
+    public JobStat getJobStats();
+
+    /** Marke the job as started.  If it's failed too many times, don't run it */
+    public void start( int maxFailures );
+
+    /** Mark the job as successfully completed */
+    public void completed();
+
+    /** Mark the job as failed. If it has failed more than maxFailures, mark it as dead */
+    public void failed();
+
+    /** Mark the job as dead */
+    public void killed();
+
+    /** Provide a heartbeat to the job execution to keep it alive */
+    public void heartbeat();
+
+    /** Signal the execution is still running, and delay the timeout for the milliseconds specified */
+    public void heartbeat( long milliseconds );
+
+    /**
+     * Don't treat the execution as complete.  Simply delay execution for the specified milliseconds.  Similar to
+     * heartbeat but allows the user to specify the timeout for the next attempt instead of the heartbeat default.  This
+     * DOES NOT update locks, so your job should use distributed locking internally to ensure single execution
+     */
+    public void delay( long milliseconds );
+
+    /** Get the current status of the execution */
+    public Status getStatus();
+
+    /** Get the name of the job */
+    public String getJobName();
+
+    /** Get the job id */
+    public UUID getJobId();
+
+    /** Get the current transaction Id from the heartbeat */
+    public UUID getTransactionId();
+
+    public enum Status {
+        NOT_STARTED, IN_PROGRESS, COMPLETED, FAILED, DEAD, DELAYED
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/batch/JobExecutionImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/batch/JobExecutionImpl.java b/stack/core/src/main/java/org/apache/usergrid/batch/JobExecutionImpl.java
new file mode 100644
index 0000000..b854fef
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/batch/JobExecutionImpl.java
@@ -0,0 +1,202 @@
+package org.apache.usergrid.batch;
+
+
+import java.util.UUID;
+
+import org.apache.usergrid.batch.repository.JobDescriptor;
+import org.apache.usergrid.batch.service.JobRuntimeService;
+import org.apache.usergrid.persistence.entities.JobData;
+import org.apache.usergrid.persistence.entities.JobStat;
+
+import com.google.common.base.Preconditions;
+
+
+/**
+ * Models the execution context of the {@link Job} with state transition methods for job status.
+ *
+ * @author zznate
+ * @author tnine
+ */
+public class JobExecutionImpl implements JobExecution, JobRuntime {
+
+    private final UUID jobId;
+    private final UUID runId;
+    private final String jobName;
+    private long duration;
+    private Status status = Status.NOT_STARTED;
+    private long startTime;
+    private JobRuntimeService runtime;
+    private UUID transactionId;
+    private JobData data;
+    private JobStat stats;
+    private long delay = -1;
+
+
+    public JobExecutionImpl( JobDescriptor jobDescriptor ) {
+        this.runId = UUID.randomUUID();
+        this.jobId = jobDescriptor.getJobId();
+        this.runtime = jobDescriptor.getRuntime();
+        this.jobName = jobDescriptor.getJobName();
+        this.transactionId = jobDescriptor.getTransactionId();
+        this.data = jobDescriptor.getData();
+        this.stats = jobDescriptor.getStats();
+    }
+
+
+    public UUID getRunId() {
+        return runId;
+    }
+
+
+    public long getDuration() {
+        return duration;
+    }
+
+
+    /** @param transactionId the transactionId to set */
+    public void setTransactionId( UUID transactionId ) {
+        this.transactionId = transactionId;
+    }
+
+
+    public UUID getJobId() {
+        return jobId;
+    }
+
+
+    /** @return the data */
+    public JobData getJobData() {
+        return data;
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.apache.usergrid.batch.JobExecution#getJobStats()
+     */
+    @Override
+    public JobStat getJobStats() {
+        return stats;
+    }
+
+
+    public void start( int maxFailures ) {
+        Preconditions.checkState( this.status.equals( Status.NOT_STARTED ) || this.status.equals( Status.FAILED ),
+                "Attempted to start job in progress" );
+        this.status = Status.IN_PROGRESS;
+
+        stats.incrementRuns();
+
+
+        // use >= in case the threshold lowers after the job has passed the failure
+        // mark
+        if ( maxFailures != FOREVER && stats.getTotalAttempts() > maxFailures ) {
+            status = Status.DEAD;
+        }
+
+        startTime = System.currentTimeMillis();
+        stats.setStartTime( startTime );
+    }
+
+
+    public void completed() {
+        updateState( Status.IN_PROGRESS, "Attempted to complete job not in progress", Status.COMPLETED );
+        stats.setDuration( duration );
+    }
+
+
+    /**
+     * Mark this execution as failed. Also pass the maxium number of possible failures. Set to JobExecution.FOREVER for
+     * no limit
+     */
+    public void failed() {
+        updateState( Status.IN_PROGRESS, "Attempted to fail job not in progress", Status.FAILED );
+    }
+
+
+    /** This job should be killed and not retried */
+    public void killed() {
+        updateState( Status.IN_PROGRESS, "Attempted to fail job not in progress", Status.DEAD );
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.apache.usergrid.batch.JobExecution#delay(long)
+     */
+    @Override
+    public void delay( long delay ) {
+        updateState( Status.IN_PROGRESS, "Attempted to delay a job not in progress", Status.DELAYED );
+        stats.incrementDelays();
+        this.delay = delay;
+        runtime.delay( this );
+    }
+
+
+    /** Update our state */
+    private void updateState( Status expected, String message, Status newStatus ) {
+        Preconditions.checkState( this.status.equals( expected ), message );
+        this.status = newStatus;
+        duration = System.currentTimeMillis() - startTime;
+    }
+
+
+    /** Make sure we're in progress and notifiy the scheduler we're still running */
+    public void heartbeat() {
+        Preconditions
+                .checkState( this.status.equals( Status.IN_PROGRESS ), "Attempted to heartbeat job not in progress" );
+        runtime.heartbeat( this );
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.usergrid.batch.JobExecution#heartbeat(long)
+     */
+    @Override
+    public void heartbeat( long milliseconds ) {
+        Preconditions
+                .checkState( this.status.equals( Status.IN_PROGRESS ), "Attempted to heartbeat job not in progress" );
+        runtime.heartbeat( this, milliseconds );
+        this.delay = milliseconds;
+    }
+
+
+    /** @return the startTime */
+    public long getStartTime() {
+        return startTime;
+    }
+
+
+    /** @return the transactionId */
+    public UUID getTransactionId() {
+        return transactionId;
+    }
+
+
+    public Status getStatus() {
+        return this.status;
+    }
+
+
+    /** @return the delay */
+    public long getDelay() {
+        return delay;
+    }
+
+
+    /** @return the jobName */
+    public String getJobName() {
+        return jobName;
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.usergrid.batch.JobRuntime#getExecution()
+     */
+    @Override
+    public JobExecution getExecution() {
+        return this;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/batch/JobFactory.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/batch/JobFactory.java b/stack/core/src/main/java/org/apache/usergrid/batch/JobFactory.java
new file mode 100644
index 0000000..0597cda
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/batch/JobFactory.java
@@ -0,0 +1,19 @@
+package org.apache.usergrid.batch;
+
+
+import java.util.List;
+
+import org.apache.usergrid.batch.repository.JobDescriptor;
+
+
+/**
+ * It is up to the implementation how many BulkJob instances to return, but this should be controled by the
+ * BulkJobsBuilder
+ *
+ * @author zznate
+ */
+public interface JobFactory {
+
+    /** Return one or more BulkJob ready for execution by a worker thread */
+    List<Job> jobsFrom( JobDescriptor descriptor ) throws JobNotFoundException;
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/batch/JobNotFoundException.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/batch/JobNotFoundException.java b/stack/core/src/main/java/org/apache/usergrid/batch/JobNotFoundException.java
new file mode 100644
index 0000000..c03d984
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/batch/JobNotFoundException.java
@@ -0,0 +1,23 @@
+package org.apache.usergrid.batch;
+
+
+/**
+ * Created when a job cannot be instantiated.  This usually occurs during the deploy of new code on nodes that don't yet
+ * have the job implementation.  Nodes receiving this message should log it and move on.
+ *
+ * @author tnine
+ */
+public class JobNotFoundException extends Exception {
+
+    /**
+     *
+     */
+    private static final long serialVersionUID = -67437852214725320L;
+
+    private static final String DEF_MSG = "Unable to find the job with name %s";
+
+
+    public JobNotFoundException( String jobName ) {
+        super( String.format( DEF_MSG, jobName ) );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/batch/JobRuntime.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/batch/JobRuntime.java b/stack/core/src/main/java/org/apache/usergrid/batch/JobRuntime.java
new file mode 100644
index 0000000..6395eb9
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/batch/JobRuntime.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.batch;
+
+
+import java.util.UUID;
+
+
+/**
+ * Interface to define all operations possible during a job's specific runtime
+ *
+ * @author tnine
+ */
+public interface JobRuntime {
+
+    /** Set the transaction id for this job's runtime */
+    public void setTransactionId( UUID transactionId );
+
+    /** Get the transaction id of the run time */
+    public UUID getTransactionId();
+
+    /** Get the delay of the run time */
+    public long getDelay();
+
+    /** Get the job execution */
+    public JobExecution getExecution();
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/batch/JobRuntimeException.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/batch/JobRuntimeException.java b/stack/core/src/main/java/org/apache/usergrid/batch/JobRuntimeException.java
new file mode 100644
index 0000000..eb99ba0
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/batch/JobRuntimeException.java
@@ -0,0 +1,49 @@
+package org.apache.usergrid.batch;
+
+
+/**
+ * Created when a job cannot be instantiated.  This usually occurs during the deploy of new code on nodes that don't yet
+ * have the job implementation.  Nodes receiving this message should log it and move on.
+ *
+ * @author tnine
+ */
+public class JobRuntimeException extends RuntimeException {
+
+    /**
+     *
+     */
+    private static final long serialVersionUID = 1;
+
+
+    /**
+     *
+     */
+    public JobRuntimeException() {
+        super();
+    }
+
+
+    /**
+     * @param arg0
+     * @param arg1
+     */
+    public JobRuntimeException( String arg0, Throwable arg1 ) {
+        super( arg0, arg1 );
+    }
+
+
+    /**
+     * @param arg0
+     */
+    public JobRuntimeException( String arg0 ) {
+        super( arg0 );
+    }
+
+
+    /**
+     * @param arg0
+     */
+    public JobRuntimeException( Throwable arg0 ) {
+        super( arg0 );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/batch/UsergridJobFactory.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/batch/UsergridJobFactory.java b/stack/core/src/main/java/org/apache/usergrid/batch/UsergridJobFactory.java
new file mode 100644
index 0000000..94e97d7
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/batch/UsergridJobFactory.java
@@ -0,0 +1,37 @@
+package org.apache.usergrid.batch;
+
+
+import java.util.Collections;
+import java.util.List;
+
+import org.apache.usergrid.batch.repository.JobDescriptor;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.ApplicationContext;
+
+
+/** @author tnine */
+public class UsergridJobFactory implements JobFactory {
+
+    @Autowired
+    private ApplicationContext context;
+
+    private Logger logger = LoggerFactory.getLogger( UsergridJobFactory.class );
+
+
+    @Override
+    public List<Job> jobsFrom( JobDescriptor descriptor ) throws JobNotFoundException {
+
+        Job job = context.getBean( descriptor.getJobName(), Job.class );
+
+        if ( job == null ) {
+            String error =
+                    String.format( "Could not find job impelmentation for job name %s", descriptor.getJobName() );
+            logger.error( error );
+            throw new JobNotFoundException( error );
+        }
+
+        return Collections.singletonList( job );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/batch/job/OnlyOnceJob.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/batch/job/OnlyOnceJob.java b/stack/core/src/main/java/org/apache/usergrid/batch/job/OnlyOnceJob.java
new file mode 100644
index 0000000..ed288cb
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/batch/job/OnlyOnceJob.java
@@ -0,0 +1,85 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.batch.job;
+
+
+import java.util.concurrent.TimeUnit;
+
+import org.apache.usergrid.batch.Job;
+import org.apache.usergrid.batch.JobExecution;
+import org.apache.usergrid.locking.Lock;
+import org.apache.usergrid.locking.LockManager;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import static org.apache.usergrid.persistence.cassandra.CassandraService.MANAGEMENT_APPLICATION_ID;
+
+
+/**
+ * Simple abstract job class that performs additional locking to ensure that the job is only executing once. This can be
+ * used if your job could potentially be too slow to invoke JobExceution.heartbeat() before the timeout passes.
+ *
+ * @author tnine
+ */
+@Component("OnlyOnceJob")
+public abstract class OnlyOnceJob implements Job {
+
+    @Autowired
+    private LockManager lockManager;
+
+
+    /**
+     *
+     */
+    public OnlyOnceJob() {
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.apache.usergrid.batch.Job#execute(org.apache.usergrid.batch.JobExecution)
+     */
+    @Override
+    public void execute( JobExecution execution ) throws Exception {
+
+        String lockId = execution.getJobId().toString();
+
+        Lock lock = lockManager.createLock( MANAGEMENT_APPLICATION_ID, String.format( "/jobs/%s", lockId ) );
+
+        // the job is still running somewhere else. Try again in getDelay() milliseconds
+        if ( !lock.tryLock( 0, TimeUnit.MILLISECONDS ) ) {
+            execution.delay( getDelay( execution ) );
+            return;
+        }
+
+        //if we get here we can proceed.  Make sure we unlock no matter what.
+        try {
+
+            doJob( execution );
+        }
+        finally {
+            lock.unlock();
+        }
+    }
+
+
+    /** Delegate the job execution to the subclass */
+    protected abstract void doJob( JobExecution execution ) throws Exception;
+
+    /** Get the delay for the next run if we can't acquire the lock */
+    protected abstract long getDelay( JobExecution execution ) throws Exception;
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/batch/job/package-info.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/batch/job/package-info.java b/stack/core/src/main/java/org/apache/usergrid/batch/job/package-info.java
new file mode 100644
index 0000000..36b0461
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/batch/job/package-info.java
@@ -0,0 +1,18 @@
+/*
+ * 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.batch.job;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/batch/repository/JobAccessor.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/batch/repository/JobAccessor.java b/stack/core/src/main/java/org/apache/usergrid/batch/repository/JobAccessor.java
new file mode 100644
index 0000000..7a15728
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/batch/repository/JobAccessor.java
@@ -0,0 +1,36 @@
+/*
+ * 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.batch.repository;
+
+
+import java.util.List;
+
+import org.apache.usergrid.batch.JobExecution;
+
+
+public interface JobAccessor {
+
+    /** Get new jobs, with a max return value of size */
+    List<JobDescriptor> getJobs( int size );
+
+    /** Save job execution information */
+    void save( JobExecution bulkJobExecution );
+
+    /** Don't remove the execution, but rather schedule it to be fired after the given delay */
+    void delayRetry( JobExecution execution, long delay );
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/batch/repository/JobDescriptor.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/batch/repository/JobDescriptor.java b/stack/core/src/main/java/org/apache/usergrid/batch/repository/JobDescriptor.java
new file mode 100644
index 0000000..74999e3
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/batch/repository/JobDescriptor.java
@@ -0,0 +1,80 @@
+package org.apache.usergrid.batch.repository;
+
+
+import java.util.UUID;
+
+import org.apache.usergrid.batch.service.JobRuntimeService;
+import org.apache.usergrid.persistence.TypedEntity;
+import org.apache.usergrid.persistence.entities.JobData;
+import org.apache.usergrid.persistence.entities.JobStat;
+
+import me.prettyprint.cassandra.utils.Assert;
+
+
+/**
+ * @author zznate
+ * @author tnine
+ */
+public class JobDescriptor extends TypedEntity {
+
+    private final String jobName;
+    private final UUID jobId;
+    private final UUID transactionId;
+    private final JobData data;
+    private final JobStat stats;
+    private final JobRuntimeService runtime;
+
+
+    public JobDescriptor( String jobName, UUID jobId, UUID transactionId, JobData data, JobStat stats,
+                          JobRuntimeService runtime ) {
+        Assert.notNull( jobName, "Job name cannot be null" );
+        Assert.notNull( jobId != null, "A JobId is required" );
+        Assert.notNull( transactionId != null, "A transactionId is required" );
+        Assert.notNull( data != null, "Data is required" );
+        Assert.notNull( stats != null, "Stats are required" );
+        Assert.notNull( runtime != null, "A scheduler is required" );
+
+        this.jobName = jobName;
+        this.jobId = jobId;
+        this.transactionId = transactionId;
+        this.data = data;
+        this.stats = stats;
+        this.runtime = runtime;
+    }
+
+
+    /** @return the jobName */
+    public String getJobName() {
+        return jobName;
+    }
+
+
+    /** @return the jobId */
+    public UUID getJobId() {
+        return jobId;
+    }
+
+
+    /** @return the transactionId */
+    public UUID getTransactionId() {
+        return transactionId;
+    }
+
+
+    /** @return the data */
+    public JobData getData() {
+        return data;
+    }
+
+
+    /** @return the scheduler */
+    public JobRuntimeService getRuntime() {
+        return runtime;
+    }
+
+
+    /** @return the stats */
+    public JobStat getStats() {
+        return stats;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/batch/repository/package-info.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/batch/repository/package-info.java b/stack/core/src/main/java/org/apache/usergrid/batch/repository/package-info.java
new file mode 100644
index 0000000..350c73e
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/batch/repository/package-info.java
@@ -0,0 +1,18 @@
+/*
+ * 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.batch.repository;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/batch/service/App.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/batch/service/App.java b/stack/core/src/main/java/org/apache/usergrid/batch/service/App.java
new file mode 100644
index 0000000..ed633d2
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/batch/service/App.java
@@ -0,0 +1,70 @@
+package org.apache.usergrid.batch.service;
+
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+import org.springframework.context.support.FileSystemXmlApplicationContext;
+
+import com.google.common.base.CharMatcher;
+
+
+/**
+ * Entry point for CLI functions of Usergrid batch framework
+ * <p/>
+ * To run this with the built-in examples, invoke it thusly from the top level of the project directory:
+ * <p/>
+ * mvn -e exec:java -Dexec.mainClass="org.apache.usergrid.batch.App" -Dexec.args="-appContext
+ * src/test/resources/appContext.xml"
+ *
+ * @author zznate
+ */
+public class App {
+
+    private static Logger logger = LoggerFactory.getLogger( App.class );
+
+    private ApplicationContext appContext;
+    private final org.apache.usergrid.batch.AppArgs appArgs;
+
+
+    public static void main( String[] args ) {
+        org.apache.usergrid.batch.AppArgs appArgs = org.apache.usergrid.batch.AppArgs.parseArgs( args );
+        if ( logger.isDebugEnabled() ) {
+            logger.debug( "Invoked App with appArgs: {}", appArgs.toString() );
+        }
+
+        App app = new App( appArgs );
+
+        app.loadContext();
+
+        logger.info( "Context loaded, invoking execute() ..." );
+        app.doExecute();
+    }
+
+
+    App( org.apache.usergrid.batch.AppArgs appArgs ) {
+        this.appArgs = appArgs;
+    }
+
+
+    private void loadContext() {
+        logger.info( "loading context" );
+        // spring context
+        int index = CharMatcher.is( ':' ).indexIn( appArgs.getAppContext() );
+        if ( index > 0 ) {
+            appContext = new ClassPathXmlApplicationContext( appArgs.getAppContext().substring( ++index ) );
+        }
+        else {
+            appContext = new FileSystemXmlApplicationContext( appArgs.getAppContext() );
+        }
+    }
+
+
+    private void doExecute() {
+        JobSchedulerService bjss = appContext.getBean( "bulkJobScheduledService", JobSchedulerService.class );
+        logger.info( "starting scheduledService..." );
+        bjss.startAndWait();
+        logger.info( "scheduledService started." );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/batch/service/JobListener.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/batch/service/JobListener.java b/stack/core/src/main/java/org/apache/usergrid/batch/service/JobListener.java
new file mode 100644
index 0000000..589dce9
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/batch/service/JobListener.java
@@ -0,0 +1,50 @@
+/*
+ * 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.batch.service;
+
+
+import org.apache.usergrid.batch.JobExecution;
+
+
+/**
+ * Job callbacks in the @{link #SchedularService} are propagated to
+ * registered implementations of this JobListener.
+ */
+public interface JobListener {
+
+    /**
+     * Submission of job execution notified onSubmit.
+     *
+     * @param execution the submitted JobExecution
+     */
+    void onSubmit( JobExecution execution );
+
+    /**
+     * Successful executions of a Job notify onSuccess.
+     *
+     * @param execution the JobExection associated with the Job
+     */
+    void onSuccess( JobExecution execution );
+
+    /**
+     * Execution failures of a Job notify onFailure.
+     *
+     * @param execution the JobExection associated with the Job
+     */
+    void onFailure( JobExecution execution );
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/batch/service/JobRuntimeService.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/batch/service/JobRuntimeService.java b/stack/core/src/main/java/org/apache/usergrid/batch/service/JobRuntimeService.java
new file mode 100644
index 0000000..1fdeb30
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/batch/service/JobRuntimeService.java
@@ -0,0 +1,49 @@
+/*
+ * 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.batch.service;
+
+
+import org.apache.usergrid.batch.JobRuntime;
+
+
+/**
+ * Methods to allow job executions to interact with the distributed runtime.
+ */
+public interface JobRuntimeService {
+
+    /**
+     * Perform any heartbeat operations required.  Update jobExecution with the appropriate data
+     *
+     * @param execution The job execution to update
+     * @param delay The delay
+     */
+    void heartbeat( JobRuntime execution, long delay );
+
+    /**
+     * Heartbeat with the system defaults.  Update jobExecution with the appropriate data
+     *
+     * @param execution The execution
+     */
+    void heartbeat( JobRuntime execution );
+
+    /**
+     * Delay this execution.
+     *
+     * @param execution the execution to delay
+     */
+    void delay( JobRuntime execution );
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/batch/service/JobSchedulerService.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/batch/service/JobSchedulerService.java b/stack/core/src/main/java/org/apache/usergrid/batch/service/JobSchedulerService.java
new file mode 100644
index 0000000..4d1b4ac
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/batch/service/JobSchedulerService.java
@@ -0,0 +1,315 @@
+/*
+ * 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.batch.service;
+
+
+import java.util.List;
+import java.util.concurrent.Callable;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Semaphore;
+import java.util.concurrent.TimeUnit;
+
+import com.google.common.util.concurrent.AbstractScheduledService;
+import com.google.common.util.concurrent.FutureCallback;
+import com.google.common.util.concurrent.Futures;
+import com.google.common.util.concurrent.ListenableFuture;
+import com.google.common.util.concurrent.ListeningScheduledExecutorService;
+import com.google.common.util.concurrent.MoreExecutors;
+import com.yammer.metrics.annotation.ExceptionMetered;
+import com.yammer.metrics.annotation.Timed;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.usergrid.batch.Job;
+import org.apache.usergrid.batch.JobExecution;
+import org.apache.usergrid.batch.JobExecutionImpl;
+import org.apache.usergrid.batch.JobFactory;
+import org.apache.usergrid.batch.JobNotFoundException;
+import org.apache.usergrid.batch.JobExecution.Status;
+import org.apache.usergrid.batch.repository.JobAccessor;
+import org.apache.usergrid.batch.repository.JobDescriptor;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * Service that schedules itself, then schedules jobs in the same pool
+ */
+public class JobSchedulerService extends AbstractScheduledService {
+    protected static final long DEFAULT_DELAY = 1000;
+
+    private static final Logger LOG = LoggerFactory.getLogger( JobSchedulerService.class );
+
+    // keep track of exceptions thrown in scheduler so we can reduce noise in logs
+    private Map<String, Integer> schedulerRunFailures = new HashMap<String, Integer>();
+
+    private long interval = DEFAULT_DELAY;
+    private int workerSize = 1;
+    private int maxFailCount = 10;
+
+    private JobAccessor jobAccessor;
+    private JobFactory jobFactory;
+
+    private Semaphore capacitySemaphore;
+
+    private ListeningScheduledExecutorService service;
+    private JobListener jobListener;
+
+    public JobSchedulerService() { }
+
+
+    @Timed(name = "BulkJobScheduledService_runOneIteration", group = "scheduler", durationUnit = TimeUnit.MILLISECONDS,
+            rateUnit = TimeUnit.MINUTES)
+    @Override
+    protected void runOneIteration() throws Exception {
+
+        try {
+            LOG.info( "running iteration..." );
+            List<JobDescriptor> activeJobs;
+
+            // run until there are no more active jobs
+            while ( true ) {
+
+                // get the semaphore if we can. This means we have space for at least 1
+                // job
+                if ( LOG.isDebugEnabled() ) {
+                    LOG.debug( "About to acquire semaphore.  Capacity is {}", capacitySemaphore.availablePermits() );
+                }
+
+                capacitySemaphore.acquire();
+                // release the sempaphore we only need to acquire as a way to stop the
+                // loop if there's no capacity
+                capacitySemaphore.release();
+
+                int capacity = capacitySemaphore.availablePermits();
+
+                LOG.debug( "Capacity is {}", capacity );
+
+                activeJobs = jobAccessor.getJobs( capacity );
+
+                // nothing to do, we don't have any jobs to run
+                if ( activeJobs.size() == 0 ) {
+                    LOG.debug( "No jobs returned. Exiting run loop" );
+                    return;
+                }
+
+                for ( JobDescriptor jd : activeJobs ) {
+                    LOG.info( "Submitting work for {}", jd );
+                    submitWork( jd );
+                    LOG.info( "Work submitted for {}", jd );
+                }
+            }
+        }
+        catch ( Throwable t ) {
+
+            // errors here happen a lot on shutdown, don't fill the logs with them
+            String error = t.getClass().getCanonicalName();
+            if (schedulerRunFailures.get( error ) == null) {
+                LOG.error( "Scheduler run failed, first instance of this exception", t );
+                schedulerRunFailures.put( error, 1);
+
+            } else {
+                int count = schedulerRunFailures.get(error) + 1; 
+                schedulerRunFailures.put(error, count);
+                if (LOG.isDebugEnabled()) {
+                    LOG.debug( error + " caused scheduler run failure, count =  " + count, t );
+                } else {
+                    LOG.error( error + " caused scheduler run failure, count =  " + count );
+                }
+            }
+        }
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see com.google.common.util.concurrent.AbstractScheduledService#scheduler()
+     */
+    @Override
+    protected Scheduler scheduler() {
+        return Scheduler.newFixedDelaySchedule( 0, interval, TimeUnit.MILLISECONDS );
+    }
+
+
+    /** Use the provided BulkJobFactory to build and submit BulkJob items as ListenableFuture objects */
+    @ExceptionMetered(name = "BulkJobScheduledService_submitWork_exceptions", group = "scheduler")
+    private void submitWork( final JobDescriptor jobDescriptor ) {
+        List<Job> jobs;
+
+        try {
+            jobs = jobFactory.jobsFrom( jobDescriptor );
+        }
+        catch ( JobNotFoundException e ) {
+            LOG.error( "Could not create jobs", e );
+            return;
+        }
+
+        for ( final Job job : jobs ) {
+
+            // job execution needs to be external to both the callback and the task.
+            // This way regardless of any error we can
+            // mark a job as failed if required
+            final JobExecution execution = new JobExecutionImpl( jobDescriptor );
+
+            // We don't care if this is atomic (not worth using a lock object)
+            // we just need to prevent NPEs from ever occurring
+            final JobListener currentListener = this.jobListener;
+
+            ListenableFuture<Void> future = service.submit( new Callable<Void>() {
+                @Override
+                public Void call() throws Exception {
+                    capacitySemaphore.acquire();
+
+                    execution.start( maxFailCount );
+
+                    jobAccessor.save( execution );
+
+                    //this job is dead, treat it as such
+                    if ( execution.getStatus() == Status.DEAD ) {
+                        return null;
+                    }
+
+                    // TODO wrap and throw specifically typed exception for onFailure,
+                    // needs jobId
+                    job.execute( execution );
+
+                    if ( currentListener != null ) {
+                        currentListener.onSubmit( execution );
+                    }
+
+                    return null;
+                }
+            } );
+
+            Futures.addCallback( future, new FutureCallback<Void>() {
+                @Override
+                public void onSuccess( Void param ) {
+
+                    if ( execution.getStatus() == Status.IN_PROGRESS ) {
+                        LOG.info( "Successful completion of bulkJob {}", execution );
+                        execution.completed();
+                    }
+
+                    jobAccessor.save( execution );
+                    capacitySemaphore.release();
+
+                    if ( currentListener != null ) {
+                        currentListener.onSuccess( execution );
+                    }
+                }
+
+
+                @Override
+                public void onFailure( Throwable throwable ) {
+                    LOG.error( "Failed execution for bulkJob", throwable );
+                    // mark it as failed
+                    if ( execution.getStatus() == Status.IN_PROGRESS ) {
+                        execution.failed();
+                    }
+
+                    jobAccessor.save( execution );
+                    capacitySemaphore.release();
+
+                    if ( currentListener != null ) {
+                        currentListener.onFailure( execution );
+                    }
+                }
+            } );
+        }
+    }
+
+
+    /** @param milliseconds the milliseconds to set to wait if we didn't receive a job to run */
+    public void setInterval( long milliseconds ) {
+        this.interval = milliseconds;
+    }
+
+
+    /** @param listeners the listeners to set */
+    public void setWorkerSize( int listeners ) {
+        this.workerSize = listeners;
+    }
+
+
+    /** @param jobAccessor the jobAccessor to set */
+    public void setJobAccessor( JobAccessor jobAccessor ) {
+        this.jobAccessor = jobAccessor;
+    }
+
+
+    /** @param jobFactory the jobFactory to set */
+    public void setJobFactory( JobFactory jobFactory ) {
+        this.jobFactory = jobFactory;
+    }
+
+
+    /** @param maxFailCount the maxFailCount to set */
+    public void setMaxFailCount( int maxFailCount ) {
+        this.maxFailCount = maxFailCount;
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see com.google.common.util.concurrent.AbstractScheduledService#startUp()
+     */
+    @Override
+    protected void startUp() throws Exception {
+        service = MoreExecutors.listeningDecorator( Executors.newScheduledThreadPool( workerSize ) );
+        capacitySemaphore = new Semaphore( workerSize );
+        super.startUp();
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see com.google.common.util.concurrent.AbstractScheduledService#shutDown()
+     */
+    @Override
+    protected void shutDown() throws Exception {
+        service.shutdown();
+        super.shutDown();
+    }
+
+
+    /**
+     * Sets the JobListener notified of Job events on this SchedulerService.
+     *
+     * @param jobListener the listener to receive Job events
+     * @return the previous listener if set, or null if none was set
+     */
+    public JobListener setJobListener( JobListener jobListener ) {
+        JobListener old = this.jobListener;
+        this.jobListener = jobListener;
+        return old;
+    }
+
+
+    /**
+     * Gets the current JobListener to be notified of Job events on this SchedulerService.
+     *
+     * @return the current JobListener or null if none was set
+     */
+    public JobListener getJobListener() {
+        return jobListener;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/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
new file mode 100644
index 0000000..ac3d5b8
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/batch/service/SchedulerService.java
@@ -0,0 +1,54 @@
+/*
+ * 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.batch.service;
+
+
+import java.util.UUID;
+
+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;
+
+
+/**
+ * Simple interface for performing job scheduling
+ */
+public interface SchedulerService {
+
+    /**
+     * Create a new job
+     *
+     * @param jobName The name of the job.  There must be an implentation in the spring context of type
+     * org.apache.usergrid.batch.Job with the name
+     * @param fireTime The time to fire in milliseconds since epoch
+     * @param jobData The data to pass to the job
+     *
+     * @return The newly created job data.  The job data uuid is the job id
+     */
+    JobData createJob( String jobName, long fireTime, JobData jobData );
+
+    /** Delete the job. */
+    void deleteJob( UUID jobId );
+
+
+    /** Query the job data with the given query object */
+    Results queryJobData( Query query ) throws Exception;
+
+    /** Get the stats for a job */
+    JobStat getStatsForJob( String jobName, UUID jobId ) throws Exception;
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/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
new file mode 100644
index 0000000..44dc8f4
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/batch/service/SchedulerServiceImpl.java
@@ -0,0 +1,427 @@
+/*
+ * 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.batch.service;
+
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.UUID;
+
+import javax.annotation.PostConstruct;
+
+import org.apache.usergrid.batch.JobExecution;
+import org.apache.usergrid.batch.JobRuntime;
+import org.apache.usergrid.batch.JobRuntimeException;
+import org.apache.usergrid.batch.JobExecution.Status;
+import org.apache.usergrid.batch.repository.JobAccessor;
+import org.apache.usergrid.batch.repository.JobDescriptor;
+import org.apache.usergrid.mq.Message;
+import org.apache.usergrid.mq.QueueManager;
+import org.apache.usergrid.mq.QueueManagerFactory;
+import org.apache.usergrid.mq.QueueQuery;
+import org.apache.usergrid.mq.QueueResults;
+import org.apache.usergrid.persistence.EntityManager;
+import org.apache.usergrid.persistence.EntityManagerFactory;
+import org.apache.usergrid.persistence.Query;
+import org.apache.usergrid.persistence.Results;
+import org.apache.usergrid.persistence.SimpleEntityRef;
+import org.apache.usergrid.persistence.cassandra.CassandraService;
+import org.apache.usergrid.persistence.entities.JobData;
+import org.apache.usergrid.persistence.entities.JobStat;
+import org.apache.usergrid.persistence.exceptions.TransactionNotFoundException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.util.Assert;
+
+import static org.apache.usergrid.persistence.cassandra.CassandraService.MANAGEMENT_APPLICATION_ID;
+
+
+/**
+ * Should be referenced by services as a SchedulerService instance. Only the internal job runtime should refer to this
+ * as a JobAccessor
+ */
+public class SchedulerServiceImpl implements SchedulerService, JobAccessor, JobRuntimeService {
+
+    /**
+     *
+     */
+    private static final String STATS_ID = "statsId";
+
+    /**
+     *
+     */
+    private static final String JOB_ID = "jobId";
+
+    /**
+     *
+     */
+    private static final String JOB_NAME = "jobName";
+
+    private static final Logger LOG = LoggerFactory.getLogger( SchedulerServiceImpl.class );
+
+    private static final String DEFAULT_QUEUE_NAME = "/jobs";
+
+    private QueueManagerFactory qmf;
+    private EntityManagerFactory emf;
+
+    private String jobQueueName = DEFAULT_QUEUE_NAME;
+
+    private QueueManager qm;
+    private EntityManager em;
+
+    /** Timeout for how long to set the transaction timeout from the queue. Default is 30000 */
+    private long jobTimeout = 30000;
+
+
+    /**
+     *
+     */
+    public SchedulerServiceImpl() {
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see
+     * org.apache.usergrid.batch.service.SchedulerService#createJob(java.lang.String,
+     * long, org.apache.usergrid.persistence.Entity)
+     */
+    @Override
+    public JobData createJob( String jobName, long fireTime, JobData jobData ) {
+        Assert.notNull( jobName, "jobName is required" );
+        Assert.notNull( jobData, "jobData is required" );
+
+        try {
+            jobData.setJobName( jobName );
+            JobData job = em.create( jobData );
+            JobStat stat = em.create( new JobStat( jobName, job.getUuid() ) );
+
+            scheduleJob( jobName, fireTime, job.getUuid(), stat.getUuid() );
+
+            return job;
+        }
+        catch ( Exception e ) {
+            throw new JobRuntimeException( e );
+        }
+    }
+
+
+    /** Schedule the job internally */
+    private void scheduleJob( String jobName, long fireTime, UUID jobDataId, UUID jobStatId ) {
+        Assert.notNull( jobName, "jobName is required" );
+        Assert.isTrue( fireTime > -1, "fireTime must be positive" );
+        Assert.notNull( jobDataId, "jobDataId is required" );
+        Assert.notNull( jobStatId, "jobStatId is required" );
+
+        Message message = new Message();
+        message.setTimestamp( fireTime );
+        message.setStringProperty( JOB_NAME, jobName );
+        message.setProperty( JOB_ID, jobDataId );
+        message.setProperty( STATS_ID, jobStatId );
+
+        qm.postToQueue( jobQueueName, message );
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.apache.usergrid.batch.service.SchedulerService#deleteJob(java.util.UUID)
+     */
+    @Override
+    public void deleteJob( UUID jobId ) {
+        /**
+         * just delete our target job data. This is easier than attempting to delete
+         * from the queue. The runner should catch this and treat the queued message
+         * as discarded
+         */
+        try {
+            LOG.debug( "deleteJob {}", jobId );
+            em.delete( new SimpleEntityRef( "jobData", jobId ) );
+        }
+        catch ( Exception e ) {
+            throw new JobRuntimeException( e );
+        }
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.apache.usergrid.batch.repository.JobAccessor#getJobs(int)
+     */
+    @Override
+    public List<JobDescriptor> getJobs( int size ) {
+        QueueQuery query = new QueueQuery();
+        query.setTimeout( jobTimeout );
+        query.setLimit( size );
+
+        QueueResults jobs = qm.getFromQueue( jobQueueName, query );
+
+        List<JobDescriptor> results = new ArrayList<JobDescriptor>( jobs.size() );
+
+        for ( Message job : jobs.getMessages() ) {
+
+            UUID jobUuid = UUID.fromString( job.getStringProperty( JOB_ID ) );
+            UUID statsUuid = UUID.fromString( job.getStringProperty( STATS_ID ) );
+            String jobName = job.getStringProperty( JOB_NAME );
+
+            try {
+                JobData data = em.get( jobUuid, JobData.class );
+
+                JobStat stats = em.get( statsUuid, JobStat.class );
+
+                /**
+                 * no job data, which is required even if empty to signal the job should
+                 * still fire. Ignore this job
+                 */
+                if ( data == null || stats == null ) {
+                    LOG.info( "Received job with data id '{}' from the queue, but no data was found.  Dropping job",
+                            jobUuid );
+                    qm.deleteTransaction( jobQueueName, job.getTransaction(), null );
+
+                    if ( data != null ) {
+                        em.delete( data );
+                    }
+
+                    if ( stats != null ) {
+                        em.delete( stats );
+                    }
+
+                    continue;
+                }
+
+                results.add( new JobDescriptor( jobName, job.getUuid(), job.getTransaction(), data, stats, this ) );
+            }
+            catch ( Exception e ) {
+                // log and skip. This is a catastrophic runtime error if we see an
+                // exception here. We don't want to cause job loss, so leave the job in
+                // the Q.
+                LOG.error(
+                        "Unable to retrieve job data for jobname {}, job id {}, stats id {}.  Skipping to avoid job "
+                                + "loss", new Object[] { jobName, jobUuid, statsUuid, e } );
+            }
+        }
+
+        return results;
+    }
+
+
+    @Override
+    public void heartbeat( JobRuntime execution, long delay ) {
+        LOG.debug( "renew transaction {}", execution.getTransactionId() );
+        try {
+            // @TODO - what's the point to this sychronized block on an argument?
+            synchronized ( execution ) {
+                UUID newId = qm.renewTransaction( jobQueueName, execution.getTransactionId(),
+                        new QueueQuery().withTimeout( delay ) );
+
+                execution.setTransactionId( newId );
+                LOG.debug( "renewed transaction {}", newId );
+            }
+        }
+        catch ( TransactionNotFoundException e ) {
+            LOG.error( "Could not renew transaction", e );
+            throw new JobRuntimeException( "Could not renew transaction during heartbeat", e );
+        }
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.usergrid.batch.service.JobRuntimeService#heartbeat(org.apache.usergrid.batch.JobRuntime)
+     */
+    @Override
+    public void heartbeat( JobRuntime execution ) {
+        heartbeat( execution, jobTimeout );
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.apache.usergrid.batch.service.SchedulerService#delay(org.apache.usergrid.batch.
+     * JobExecutionImpl)
+     */
+    @Override
+    public void delay( JobRuntime execution ) {
+        delayRetry( execution.getExecution(), execution.getDelay() );
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see
+     * org.apache.usergrid.batch.repository.JobAccessor#save(org.apache.usergrid.batch.JobExecution
+     * )
+     */
+    @Override
+    public void save( JobExecution bulkJobExecution ) {
+
+        JobData data = bulkJobExecution.getJobData();
+        JobStat stat = bulkJobExecution.getJobStats();
+
+        Status jobStatus = bulkJobExecution.getStatus();
+
+        try {
+
+            // we're done. Mark the transaction as complete and delete the job info
+            if ( jobStatus == Status.COMPLETED ) {
+                LOG.info( "Job {} is complete id: {}", data.getJobName(), bulkJobExecution.getTransactionId() );
+                qm.deleteTransaction( jobQueueName, bulkJobExecution.getTransactionId(), null );
+                LOG.debug( "delete job data {}", data.getUuid() );
+                em.delete( data );
+            }
+
+            // the job failed too many times. Delete the transaction to prevent it
+            // running again and save it for querying later
+            else if ( jobStatus == Status.DEAD ) {
+                LOG.warn( "Job {} is dead.  Removing", data.getJobName() );
+                qm.deleteTransaction( jobQueueName, bulkJobExecution.getTransactionId(), null );
+                em.update( data );
+            }
+
+            // update the job for the next run
+            else {
+                em.update( data );
+            }
+
+            LOG.info( "Updating stats for job {}", data.getJobName() );
+
+            em.update( stat );
+        }
+        catch ( Exception e ) {
+            // should never happen
+            throw new JobRuntimeException( String.format( "Unable to delete job data with id %s", data.getUuid() ), e );
+        }
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.apache.usergrid.batch.service.SchedulerService#queryJobData(org.apache.usergrid.
+     * persistence.Query)
+     */
+    @Override
+    public Results queryJobData( Query query ) throws Exception {
+
+        if ( query == null ) {
+            query = new Query();
+        }
+
+        return em.searchCollection( em.getApplicationRef(), "job_data", query );
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see
+     * org.apache.usergrid.batch.repository.JobAccessor#delayRetry(org.apache.usergrid.batch
+     * .JobExecution, long)
+     */
+    @Override
+    public void delayRetry( JobExecution execution, long delay ) {
+
+        JobData data = execution.getJobData();
+        JobStat stat = execution.getJobStats();
+
+        try {
+
+            // if it's a dead status, it's failed too many times, just kill the job
+            if ( execution.getStatus() == Status.DEAD ) {
+                qm.deleteTransaction( jobQueueName, execution.getTransactionId(), null );
+                em.update( data );
+                em.update( stat );
+                return;
+            }
+
+            // re-schedule the job to run again in the future
+            scheduleJob( execution.getJobName(), System.currentTimeMillis() + delay, data.getUuid(), stat.getUuid() );
+
+            // delete the pending transaction
+            qm.deleteTransaction( jobQueueName, execution.getTransactionId(), null );
+
+            // update the data for the next run
+
+            em.update( data );
+            em.update( stat );
+        }
+        catch ( Exception e ) {
+            // should never happen
+            throw new JobRuntimeException( String.format( "Unable to delete job data with id %s", data.getUuid() ), e );
+        }
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.usergrid.batch.service.SchedulerService#getStatsForJob(java.lang.String, java.util.UUID)
+     */
+    @Override
+    public JobStat getStatsForJob( String jobName, UUID jobId ) throws Exception {
+        EntityManager em = emf.getEntityManager( MANAGEMENT_APPLICATION_ID );
+
+
+        Query query = new Query();
+        query.addEqualityFilter( JOB_NAME, jobName );
+        query.addEqualityFilter( JOB_ID, jobId );
+
+        Results r = em.searchCollection( em.getApplicationRef(), "job_stats", query );
+
+        if ( r.size() == 1 ) {
+            return ( JobStat ) r.getEntity();
+        }
+
+        return null;
+    }
+
+
+    @PostConstruct
+    public void init() {
+        qm = qmf.getQueueManager( CassandraService.MANAGEMENT_APPLICATION_ID );
+        em = emf.getEntityManager( CassandraService.MANAGEMENT_APPLICATION_ID );
+    }
+
+
+    /** @param qmf the qmf to set */
+    @Autowired
+    public void setQmf( QueueManagerFactory qmf ) {
+        this.qmf = qmf;
+    }
+
+
+    /** @param emf the emf to set */
+    @Autowired
+    public void setEmf( EntityManagerFactory emf ) {
+        this.emf = emf;
+    }
+
+
+    /** @param jobQueueName the jobQueueName to set */
+    public void setJobQueueName( String jobQueueName ) {
+        this.jobQueueName = jobQueueName;
+    }
+
+
+    /** @param timeout the timeout to set */
+    public void setJobTimeout( long timeout ) {
+        this.jobTimeout = timeout;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/batch/service/package-info.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/batch/service/package-info.java b/stack/core/src/main/java/org/apache/usergrid/batch/service/package-info.java
new file mode 100644
index 0000000..0736e1e
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/batch/service/package-info.java
@@ -0,0 +1,18 @@
+/*
+ * 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.batch.service;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/clustering/hazelcast/HazelcastLifecycleMonitor.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/clustering/hazelcast/HazelcastLifecycleMonitor.java b/stack/core/src/main/java/org/apache/usergrid/clustering/hazelcast/HazelcastLifecycleMonitor.java
new file mode 100644
index 0000000..a814f95
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/clustering/hazelcast/HazelcastLifecycleMonitor.java
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.clustering.hazelcast;
+
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.hazelcast.core.Hazelcast;
+import com.hazelcast.core.Instance;
+import com.hazelcast.core.InstanceEvent;
+import com.hazelcast.core.InstanceListener;
+import com.hazelcast.core.MembershipEvent;
+import com.hazelcast.core.MembershipListener;
+
+
+public class HazelcastLifecycleMonitor implements InstanceListener, MembershipListener {
+
+    private static final Logger logger = LoggerFactory.getLogger( HazelcastLifecycleMonitor.class );
+
+
+    public HazelcastLifecycleMonitor() {
+    }
+
+
+    public void init() {
+        logger.info( "HazelcastLifecycleMonitor initializing..." );
+        Hazelcast.addInstanceListener( this );
+        Hazelcast.getCluster().addMembershipListener( this );
+        logger.info( "HazelcastLifecycleMonitor initialized" );
+    }
+
+
+    public void destroy() {
+        logger.info( "Shutting down Hazelcast" );
+        Hazelcast.shutdownAll();
+        logger.info( "Hazelcast shutdown" );
+    }
+
+
+    @Override
+    public void instanceCreated( InstanceEvent event ) {
+        Instance instance = event.getInstance();
+        logger.info( "Created instance ID: [" + instance.getId() + "] Type: [" + instance.getInstanceType() + "]" );
+    }
+
+
+    @Override
+    public void instanceDestroyed( InstanceEvent event ) {
+        Instance instance = event.getInstance();
+        logger.info( "Destroyed isntance ID: [" + instance.getId() + "] Type: [" + instance.getInstanceType() + "]" );
+    }
+
+
+    @Override
+    public void memberAdded( MembershipEvent membersipEvent ) {
+        logger.info( "MemberAdded " + membersipEvent );
+    }
+
+
+    @Override
+    public void memberRemoved( MembershipEvent membersipEvent ) {
+        logger.info( "MemberRemoved " + membersipEvent );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/count/AbstractBatcher.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/count/AbstractBatcher.java b/stack/core/src/main/java/org/apache/usergrid/count/AbstractBatcher.java
new file mode 100644
index 0000000..52574df
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/count/AbstractBatcher.java
@@ -0,0 +1,176 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.count;
+
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.concurrent.ArrayBlockingQueue;
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicLong;
+
+import org.apache.usergrid.count.common.Count;
+
+import com.yammer.metrics.Metrics;
+import com.yammer.metrics.core.Counter;
+import com.yammer.metrics.core.Timer;
+import com.yammer.metrics.core.TimerContext;
+
+
+/**
+ * Base batcher implementation, handles concurrency and locking throughput throttling.
+ *
+ * @author zznate
+ */
+public abstract class AbstractBatcher implements Batcher {
+    protected BatchSubmitter batchSubmitter;
+
+    private volatile Batch batch;
+    private final AtomicLong opCount = new AtomicLong();
+    private final Timer addTimer =
+            Metrics.newTimer( AbstractBatcher.class, "add_invocation", TimeUnit.MICROSECONDS, TimeUnit.SECONDS );
+    protected final Counter invocationCounter = Metrics.newCounter( AbstractBatcher.class, "batch_add_invocations" );
+    private final Counter existingCounterHit = Metrics.newCounter( AbstractBatcher.class, "counter_existed" );
+    // TODO add batchCount, remove shouldSubmit, impl submit, change simpleBatcher to just be an extension
+    protected int batchSize = 500;
+    private final AtomicLong batchSubmissionCount = new AtomicLong();
+    private final AtomicBoolean lock = new AtomicBoolean( false );
+
+
+    public void setBatchSize( int batchSize ) {
+        this.batchSize = batchSize;
+    }
+
+
+    public void setBatchSubmitter( BatchSubmitter batchSubmitter ) {
+        this.batchSubmitter = batchSubmitter;
+    }
+
+
+    /**
+     * Individual {@link Count} for the same counter get rolled up, so we track the individual number of operations.
+     *
+     * @return the number of operation against this SimpleBatcher
+     */
+    public long getOpCount() {
+        return opCount.get();
+    }
+
+
+    /** Add a count object to this batcher */
+    public void add( Count count ) throws CounterProcessingUnavailableException {
+        invocationCounter.inc();
+        final TimerContext context = addTimer.time();
+        if ( batchSize == 1 ) {
+            getBatch().addSerial( count );
+        }
+        else {
+            getBatch().add( count );
+        }
+        context.stop();
+    }
+
+
+    Batch getBatch() {
+        Batch active = batch;
+        if ( active == null ) {
+            synchronized ( this ) {
+                active = batch;
+                if ( active == null ) {
+                    batch = active = new Batch();
+                }
+            }
+        }
+        if ( batchSize > 1 && active.getCapacity() == 0 ) {
+            synchronized ( this ) {
+                if ( active.getCapacity() == 0 ) {
+                    active.flush();
+                }
+            }
+        }
+        return active;
+    }
+
+
+    public long getBatchSubmissionCount() {
+        return batchSubmissionCount.get();
+    }
+
+
+    class Batch {
+        private BlockingQueue<Count> counts;
+        private final AtomicInteger localCallCounter = new AtomicInteger();
+
+        private final AtomicBoolean lock = new AtomicBoolean( false );
+
+
+        Batch() {
+            counts = new ArrayBlockingQueue<Count>( batchSize );
+        }
+
+
+        int getCapacity() {
+            return counts.remainingCapacity();
+        }
+
+
+        void flush() {
+            ArrayList<Count> flushed = new ArrayList<Count>( batchSize );
+            counts.drainTo( flushed );
+            batchSubmitter.submit( flushed );
+            batchSubmissionCount.incrementAndGet();
+            opCount.incrementAndGet();
+            localCallCounter.incrementAndGet();
+        }
+
+
+        void add( Count count ) {
+            try {
+                counts.offer( count, 500, TimeUnit.MILLISECONDS );
+            }
+            catch ( Exception ex ) {
+                ex.printStackTrace();
+            }
+        }
+
+
+        void addSerial( Count count ) {
+            Future f = batchSubmitter.submit( Arrays.asList( count ) );
+            try {
+                f.get();
+            }
+            catch ( Exception ex ) {
+                ex.printStackTrace();
+            }
+            batchSubmissionCount.incrementAndGet();
+            opCount.incrementAndGet();
+            localCallCounter.incrementAndGet();
+        }
+
+
+        /**
+         * The number of times the {@link #add(org.apache.usergrid.count.common.Count)} method has been invoked on this batch
+         * instance
+         */
+        public int getLocalCallCount() {
+            return localCallCounter.get();
+        }
+    }
+}


[92/96] [abbrv] USERGRID-2 package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/index-files/index-2.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/index-files/index-2.html b/sdks/android/doc/index-files/index-2.html
index 6940394..53cbf2a 100644
--- a/sdks/android/doc/index-files/index-2.html
+++ b/sdks/android/doc/index-files/index-2.html
@@ -83,55 +83,55 @@ function windowTitle()
 <B>C</B></H2>
 <DL>
 <DT><A HREF="../org/usergrid/android/client/entities/Entity.html#CLASS_FOR_ENTITY_TYPE"><B>CLASS_FOR_ENTITY_TYPE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client"><B>Client</B></A> - Class in <A HREF="../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A><DD>The Client class for accessing the Usergrid API.<DT><A HREF="../org/usergrid/android/client/Client.html#Client()"><B>Client()</B></A> - 
-Constructor for class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client"><B>Client</B></A> - Class in <A HREF="../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A><DD>The Client class for accessing the Usergrid API.<DT><A HREF="../org/usergrid/android/client/Client.html#Client()"><B>Client()</B></A> - 
+Constructor for class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Default constructor for instantiating a client.
 <DT><A HREF="../org/usergrid/android/client/Client.html#Client(java.lang.String)"><B>Client(String)</B></A> - 
-Constructor for class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Constructor for class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Instantiate client for a specific app
-<DT><A HREF="../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client"><B>Client.Query</B></A> - Interface in <A HREF="../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client"><B>Client.QueuePosition</B></A> - Enum in <A HREF="../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.usergrid.android.client.callbacks"><B>ClientAsyncTask</B></A>&lt;<A HREF="../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="type parameter in ClientAsyncTask">T</A>&gt; - Class in <A HREF="../org/usergrid/android/client/callbacks/package-summary.html">org.usergrid.android.client.callbacks</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/callbacks/ClientAsyn
 cTask.html#ClientAsyncTask(org.usergrid.android.client.callbacks.ClientCallback)"><B>ClientAsyncTask(ClientCallback&lt;T&gt;)</B></A> - 
-Constructor for class org.usergrid.android.client.callbacks.<A HREF="../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.usergrid.android.client.callbacks">ClientAsyncTask</A>
+<DT><A HREF="../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client"><B>Client.Query</B></A> - Interface in <A HREF="../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client"><B>Client.QueuePosition</B></A> - Enum in <A HREF="../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.apache.usergrid.android.client.callbacks"><B>ClientAsyncTask</B></A>&lt;<A HREF="../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="type parameter in ClientAsyncTask">T</A>&gt; - Class in <A HREF="../org/usergrid/android/client/callbacks/package-summary.html">org.apache.usergrid.android.client.callbacks</A><DD>&nbsp;<DT><A HREF="../org/us
 ergrid/android/client/callbacks/ClientAsyncTask.html#ClientAsyncTask(org.apache.usergrid.android.client.callbacks.ClientCallback)"><B>ClientAsyncTask(ClientCallback&lt;T&gt;)</B></A> - 
+Constructor for class org.apache.usergrid.android.client.callbacks.<A HREF="../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.apache.usergrid.android.client.callbacks">ClientAsyncTask</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>ClientCallback</B></A>&lt;<A HREF="../org/usergrid/android/client/callbacks/ClientCallback.html" title="type parameter in ClientCallback">T</A>&gt; - Interface in <A HREF="../org/usergrid/android/client/callbacks/package-summary.html">org.usergrid.android.client.callbacks</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response"><B>ClientCredentialsInfo</B></A> - Class in <A HREF="../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/response/ClientCredentialsInfo.html#ClientCredentialsInfo(java.lang.String, java.lang.String)"><B>ClientCredentialsInfo(String, String)</B></A> - 
-Constructor for class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response">ClientCredentialsInfo</A>
+<DT><A HREF="../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>ClientCallback</B></A>&lt;<A HREF="../org/usergrid/android/client/callbacks/ClientCallback.html" title="type parameter in ClientCallback">T</A>&gt; - Interface in <A HREF="../org/usergrid/android/client/callbacks/package-summary.html">org.apache.usergrid.android.client.callbacks</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response"><B>ClientCredentialsInfo</B></A> - Class in <A HREF="../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/response/ClientCredentialsInfo.html#ClientCredentialsInfo(java.lang.String, java.lang.String)"><B>ClientCredentialsInfo(String, String)</B></A> - 
+Constructor for class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response">ClientCredentialsInfo</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.html#connectEntities(java.lang.String, java.lang.String, java.lang.String, java.lang.String)"><B>connectEntities(String, String, String, String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Connect two entities together.
-<DT><A HREF="../org/usergrid/android/client/Client.html#connectEntitiesAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)"><B>connectEntitiesAsync(String, String, String, String, ApiResponseCallback)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#connectEntitiesAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)"><B>connectEntitiesAsync(String, String, String, String, ApiResponseCallback)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Connect two entities together.
-<DT><A HREF="../org/usergrid/android/client/Client.html#createEntity(org.usergrid.android.client.entities.Entity)"><B>createEntity(Entity)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#createEntity(org.apache.usergrid.android.client.entities.Entity)"><B>createEntity(Entity)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Create a new entity on the server.
 <DT><A HREF="../org/usergrid/android/client/Client.html#createEntity(java.util.Map)"><B>createEntity(Map&lt;String, Object&gt;)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Create a new entity on the server from a set of properties.
-<DT><A HREF="../org/usergrid/android/client/Client.html#createEntityAsync(org.usergrid.android.client.entities.Entity, org.usergrid.android.client.callbacks.ApiResponseCallback)"><B>createEntityAsync(Entity, ApiResponseCallback)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#createEntityAsync(org.apache.usergrid.android.client.entities.Entity, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)"><B>createEntityAsync(Entity, ApiResponseCallback)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Create a new entity on the server.
-<DT><A HREF="../org/usergrid/android/client/Client.html#createEntityAsync(java.util.Map, org.usergrid.android.client.callbacks.ApiResponseCallback)"><B>createEntityAsync(Map&lt;String, Object&gt;, ApiResponseCallback)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#createEntityAsync(java.util.Map, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)"><B>createEntityAsync(Map&lt;String, Object&gt;, ApiResponseCallback)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Create a new entity on the server from a set of properties.
 <DT><A HREF="../org/usergrid/android/client/Client.html#createGroup(java.lang.String)"><B>createGroup(String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Creates a group with the specified group path.
 <DT><A HREF="../org/usergrid/android/client/Client.html#createGroup(java.lang.String, java.lang.String)"><B>createGroup(String, String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Creates a group with the specified group path and group title.
-<DT><A HREF="../org/usergrid/android/client/Client.html#createGroupAsync(java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)"><B>createGroupAsync(String, ApiResponseCallback)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#createGroupAsync(java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)"><B>createGroupAsync(String, ApiResponseCallback)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Creates a group with the specified group path.
-<DT><A HREF="../org/usergrid/android/client/Client.html#createGroupAsync(java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)"><B>createGroupAsync(String, String, ApiResponseCallback)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#createGroupAsync(java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)"><B>createGroupAsync(String, String, ApiResponseCallback)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Creates a group with the specified group path and group title.
 <DT><A HREF="../org/usergrid/android/client/Client.html#createUser(java.lang.String, java.lang.String, java.lang.String, java.lang.String)"><B>createUser(String, String, String, String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Creates a user.
-<DT><A HREF="../org/usergrid/android/client/Client.html#createUserAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)"><B>createUserAsync(String, String, String, String, ApiResponseCallback)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#createUserAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)"><B>createUserAsync(String, String, String, String, ApiResponseCallback)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Creates a user.
 </DL>
 <HR>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/index-files/index-20.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/index-files/index-20.html b/sdks/android/doc/index-files/index-20.html
index fa79c74..bd547b5 100644
--- a/sdks/android/doc/index-files/index-20.html
+++ b/sdks/android/doc/index-files/index-20.html
@@ -83,101 +83,101 @@ function windowTitle()
 <B>V</B></H2>
 <DL>
 <DT><A HREF="../org/usergrid/android/client/Client.QueuePosition.html#valueOf(java.lang.String)"><B>valueOf(String)</B></A> - 
-Static method in enum org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A>
+Static method in enum org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A>
 <DD>Returns the enum constant of this type with the specified name.
 <DT><A HREF="../org/usergrid/android/client/Client.QueuePosition.html#values()"><B>values()</B></A> - 
-Static method in enum org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A>
+Static method in enum org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A>
 <DD>Returns an array containing the constants of this enum type, in
 the order they are declared.
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_ADD"><B>VERB_ADD</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_CANCEL"><B>VERB_CANCEL</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_CHECKIN"><B>VERB_CHECKIN</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_DELETE"><B>VERB_DELETE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_FAVORITE"><B>VERB_FAVORITE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_FOLLOW"><B>VERB_FOLLOW</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_GIVE"><B>VERB_GIVE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_IGNORE"><B>VERB_IGNORE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_INVITE"><B>VERB_INVITE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_JOIN"><B>VERB_JOIN</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_LEAVE"><B>VERB_LEAVE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_LIKE"><B>VERB_LIKE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_MAKE_FRIEND"><B>VERB_MAKE_FRIEND</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_PLAY"><B>VERB_PLAY</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_POST"><B>VERB_POST</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_RECEIVE"><B>VERB_RECEIVE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_REMOVE"><B>VERB_REMOVE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_REMOVE_FRIEND"><B>VERB_REMOVE_FRIEND</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_REQUEST_FRIEND"><B>VERB_REQUEST_FRIEND</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_RSVP_MAYBE"><B>VERB_RSVP_MAYBE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_RSVP_NO"><B>VERB_RSVP_NO</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_RSVP_YES"><B>VERB_RSVP_YES</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_SAVE"><B>VERB_SAVE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_SHARE"><B>VERB_SHARE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_STOP_FOLLOWING"><B>VERB_STOP_FOLLOWING</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_TAG"><B>VERB_TAG</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_UNFAVORITE"><B>VERB_UNFAVORITE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_UNLIKE"><B>VERB_UNLIKE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_UNSAVE"><B>VERB_UNSAVE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_UPDATE"><B>VERB_UPDATE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 </DL>
 <HR>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/index-files/index-21.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/index-files/index-21.html b/sdks/android/doc/index-files/index-21.html
index 950615f..e6a1ff0 100644
--- a/sdks/android/doc/index-files/index-21.html
+++ b/sdks/android/doc/index-files/index-21.html
@@ -83,16 +83,16 @@ function windowTitle()
 <B>W</B></H2>
 <DL>
 <DT><A HREF="../org/usergrid/android/client/Client.html#withApiUrl(java.lang.String)"><B>withApiUrl(String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.html#withApplicationId(java.lang.String)"><B>withApplicationId(String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.html#withClientId(java.lang.String)"><B>withClientId(String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.html#withClientSecret(java.lang.String)"><B>withClientSecret(String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 </DL>
 <HR>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/index-files/index-3.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/index-files/index-3.html b/sdks/android/doc/index-files/index-3.html
index 78471fe..641b4d0 100644
--- a/sdks/android/doc/index-files/index-3.html
+++ b/sdks/android/doc/index-files/index-3.html
@@ -82,24 +82,24 @@ function windowTitle()
 <A NAME="_D_"><!-- --></A><H2>
 <B>D</B></H2>
 <DL>
-<DT><A HREF="../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities"><B>Device</B></A> - Class in <A HREF="../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/entities/Device.html#Device()"><B>Device()</B></A> - 
-Constructor for class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities">Device</A>
+<DT><A HREF="../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities"><B>Device</B></A> - Class in <A HREF="../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/entities/Device.html#Device()"><B>Device()</B></A> - 
+Constructor for class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities">Device</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/entities/Device.html#Device(org.usergrid.android.client.entities.Entity)"><B>Device(Entity)</B></A> - 
-Constructor for class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities">Device</A>
+<DT><A HREF="../org/usergrid/android/client/entities/Device.html#Device(org.apache.usergrid.android.client.entities.Entity)"><B>Device(Entity)</B></A> - 
+Constructor for class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities">Device</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>DeviceRegistrationCallback</B></A> - Interface in <A HREF="../org/usergrid/android/client/callbacks/package-summary.html">org.usergrid.android.client.callbacks</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/utils/DeviceUuidFactory.html" title="class in org.usergrid.android.client.utils"><B>DeviceUuidFactory</B></A> - Class in <A HREF="../org/usergrid/android/client/utils/package-summary.html">org.usergrid.android.client.utils</A><DD>Tries to get the device ID as a UUID and fallsback to a generated UUID value
+<DT><A HREF="../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>DeviceRegistrationCallback</B></A> - Interface in <A HREF="../org/usergrid/android/client/callbacks/package-summary.html">org.apache.usergrid.android.client.callbacks</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/utils/DeviceUuidFactory.html" title="class in org.apache.usergrid.android.client.utils"><B>DeviceUuidFactory</B></A> - Class in <A HREF="../org/usergrid/android/client/utils/package-summary.html">org.apache.usergrid.android.client.utils</A><DD>Tries to get the device ID as a UUID and fallsback to a generated UUID value
  if it doesn't work.<DT><A HREF="../org/usergrid/android/client/utils/DeviceUuidFactory.html#DeviceUuidFactory(android.content.Context)"><B>DeviceUuidFactory(Context)</B></A> - 
-Constructor for class org.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/DeviceUuidFactory.html" title="class in org.usergrid.android.client.utils">DeviceUuidFactory</A>
+Constructor for class org.apache.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/DeviceUuidFactory.html" title="class in org.apache.usergrid.android.client.utils">DeviceUuidFactory</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.html#disconnectEntities(java.lang.String, java.lang.String, java.lang.String, java.lang.String)"><B>disconnectEntities(String, String, String, String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Disconnect two entities.
-<DT><A HREF="../org/usergrid/android/client/Client.html#disconnectEntitiesAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)"><B>disconnectEntitiesAsync(String, String, String, String, ApiResponseCallback)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#disconnectEntitiesAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)"><B>disconnectEntitiesAsync(String, String, String, String, ApiResponseCallback)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Disconnect two entities.
 <DT><A HREF="../org/usergrid/android/client/callbacks/ClientAsyncTask.html#doTask()"><B>doTask()</B></A> - 
-Method in class org.usergrid.android.client.callbacks.<A HREF="../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.usergrid.android.client.callbacks">ClientAsyncTask</A>
+Method in class org.apache.usergrid.android.client.callbacks.<A HREF="../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.apache.usergrid.android.client.callbacks">ClientAsyncTask</A>
 <DD>&nbsp;
 </DL>
 <HR>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/index-files/index-4.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/index-files/index-4.html b/sdks/android/doc/index-files/index-4.html
index 351ee7e..fe9fbce 100644
--- a/sdks/android/doc/index-files/index-4.html
+++ b/sdks/android/doc/index-files/index-4.html
@@ -83,28 +83,28 @@ function windowTitle()
 <B>E</B></H2>
 <DL>
 <DT><A HREF="../org/usergrid/android/client/utils/UrlUtils.html#encodeParams(java.util.Map)"><B>encodeParams(Map&lt;String, Object&gt;)</B></A> - 
-Static method in class org.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/UrlUtils.html" title="class in org.usergrid.android.client.utils">UrlUtils</A>
+Static method in class org.apache.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/UrlUtils.html" title="class in org.apache.usergrid.android.client.utils">UrlUtils</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities"><B>Entity</B></A> - Class in <A HREF="../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/entities/Entity.html#Entity()"><B>Entity()</B></A> - 
-Constructor for class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>
+<DT><A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities"><B>Entity</B></A> - Class in <A HREF="../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/entities/Entity.html#Entity()"><B>Entity()</B></A> - 
+Constructor for class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Entity.html#Entity(java.lang.String)"><B>Entity(String)</B></A> - 
-Constructor for class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>
+Constructor for class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#ENTITY_TYPE"><B>ENTITY_TYPE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Device.html#ENTITY_TYPE"><B>ENTITY_TYPE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities">Device</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities">Device</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Group.html#ENTITY_TYPE"><B>ENTITY_TYPE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Message.html#ENTITY_TYPE"><B>ENTITY_TYPE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#ENTITY_TYPE"><B>ENTITY_TYPE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 </DL>
 <HR>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/index-files/index-5.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/index-files/index-5.html b/sdks/android/doc/index-files/index-5.html
index 8ed5e03..ef86294 100644
--- a/sdks/android/doc/index-files/index-5.html
+++ b/sdks/android/doc/index-files/index-5.html
@@ -83,13 +83,13 @@ function windowTitle()
 <B>F</B></H2>
 <DL>
 <DT><A HREF="../org/usergrid/android/client/Client.QueuePosition.html#find(java.lang.String)"><B>find(String)</B></A> - 
-Static method in enum org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A>
+Static method in enum org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.html#FORCE_PUBLIC_API"><B>FORCE_PUBLIC_API</B></A> - 
-Static variable in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Static variable in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/utils/JsonUtils.html#fromJsonNode(org.codehaus.jackson.JsonNode, java.lang.Class)"><B>fromJsonNode(JsonNode, Class&lt;T&gt;)</B></A> - 
-Static method in class org.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.usergrid.android.client.utils">JsonUtils</A>
+Static method in class org.apache.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.apache.usergrid.android.client.utils">JsonUtils</A>
 <DD>&nbsp;
 </DL>
 <HR>


[30/96] [abbrv] [partial] Change package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/OrderByIterator.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/OrderByIterator.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/OrderByIterator.java
new file mode 100644
index 0000000..183615a
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/OrderByIterator.java
@@ -0,0 +1,251 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.query.ir.result;
+
+
+import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeSet;
+import java.util.UUID;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.apache.commons.collections.comparators.ComparatorChain;
+import org.apache.usergrid.persistence.Entity;
+import org.apache.usergrid.persistence.EntityManager;
+import org.apache.usergrid.persistence.EntityPropertyComparator;
+import org.apache.usergrid.persistence.Query;
+import org.apache.usergrid.persistence.Query.SortPredicate;
+import org.apache.usergrid.persistence.cassandra.CursorCache;
+import org.apache.usergrid.persistence.query.ir.QuerySlice;
+
+import me.prettyprint.cassandra.serializers.UUIDSerializer;
+
+
+/**
+ * 1) Take a result set iterator as the child 2) Iterate only over candidates and create a cursor from the candidates
+ *
+ * @author tnine
+ */
+
+public class OrderByIterator extends MergeIterator {
+
+    private static final UUIDSerializer UUID_SER = new UUIDSerializer();
+
+    private static final String NAME_UUID = "uuid";
+    private static final Logger logger = LoggerFactory.getLogger( OrderByIterator.class );
+    private final QuerySlice slice;
+    private final ResultIterator candidates;
+    private final ComparatorChain subSortCompare;
+    private final List<String> secondaryFields;
+    private final EntityManager em;
+
+    //our last result from in memory sorting
+    private SortedEntitySet entries;
+
+
+    /**
+     * @param pageSize
+     */
+    public OrderByIterator( QuerySlice slice, List<Query.SortPredicate> secondary, ResultIterator candidates,
+                            EntityManager em, int pageSize ) {
+        super( pageSize );
+        this.slice = slice;
+        this.em = em;
+        this.candidates = candidates;
+        this.subSortCompare = new ComparatorChain();
+        this.secondaryFields = new ArrayList<String>( 1 + secondary.size() );
+
+        //add the sort of the primary column
+        this.secondaryFields.add( slice.getPropertyName() );
+        this.subSortCompare
+                .addComparator( new EntityPropertyComparator( slice.getPropertyName(), slice.isReversed() ) );
+
+        for ( SortPredicate sort : secondary ) {
+            this.subSortCompare.addComparator( new EntityPropertyComparator( sort.getPropertyName(),
+                    sort.getDirection() == Query.SortDirection.DESCENDING ) );
+            this.secondaryFields.add( sort.getPropertyName() );
+        }
+
+        //do uuid sorting last, this way if all our previous sorts are equal, we'll have a reproducible sort order for
+        // paging
+        this.secondaryFields.add( NAME_UUID );
+        this.subSortCompare.addComparator( new EntityPropertyComparator( NAME_UUID, false ) );
+    }
+
+
+    @Override
+    protected Set<ScanColumn> advance() {
+
+        ByteBuffer cursor = slice.getCursor();
+
+        UUID minEntryId = null;
+
+        if ( cursor != null ) {
+            minEntryId = UUID_SER.fromByteBuffer( cursor );
+        }
+
+        entries = new SortedEntitySet( subSortCompare, em, secondaryFields, pageSize, minEntryId );
+
+        /**
+         *  keep looping through our peek iterator.  We need to inspect each forward page to ensure we have performed a
+         *  seek to the end of our primary range.  Otherwise we need to keep aggregating. I.E  if the value is a boolean
+         *  and we order by "true
+         *  asc, timestamp desc" we must load every entity that has the value "true" before sub sorting,
+         *  then drop all values that fall out of the sort.
+         */
+        while ( candidates.hasNext() ) {
+
+
+            for ( ScanColumn id : candidates.next() ) {
+                entries.add( id );
+            }
+
+            entries.load();
+        }
+
+
+        return entries.toIds();
+    }
+
+
+    @Override
+    protected void doReset() {
+        // no op
+    }
+
+
+    @Override
+    public void finalizeCursor( CursorCache cache, UUID lastValue ) {
+        int sliceHash = slice.hashCode();
+
+        ByteBuffer bytes = UUID_SER.toByteBuffer( lastValue );
+
+        if ( bytes == null ) {
+            return;
+        }
+
+        cache.setNextCursor( sliceHash, bytes );
+    }
+
+
+    /** A Sorted set with a max size. When a new entry is added, the max is removed */
+    public static final class SortedEntitySet extends TreeSet<Entity> {
+
+        private final int maxSize;
+        private final Map<UUID, ScanColumn> cursorVal = new HashMap<UUID, ScanColumn>();
+        private final EntityManager em;
+        private final List<String> fields;
+        private final Entity minEntity;
+        private final Comparator<Entity> comparator;
+
+
+        public SortedEntitySet( Comparator<Entity> comparator, EntityManager em, List<String> fields, int maxSize,
+                                UUID minEntityId ) {
+            super( comparator );
+            this.maxSize = maxSize;
+            this.em = em;
+            this.fields = fields;
+            this.comparator = comparator;
+            this.minEntity = getPartialEntity( minEntityId );
+        }
+
+
+        @Override
+        public boolean add( Entity entity ) {
+
+            // don't add this entity.  We get it in our scan range, but it's <= the minimum value that
+            //should be allowed in the result set
+            if ( minEntity != null && comparator.compare( entity, minEntity ) <= 0 ) {
+                return false;
+            }
+
+            boolean added = super.add( entity );
+
+            while ( size() > maxSize ) {
+                //remove our last element, we're over size
+                Entity e = this.pollLast();
+                //remove it from the cursors as well
+                cursorVal.remove( e.getUuid() );
+            }
+
+            return added;
+        }
+
+
+        /** add the id to be loaded, and the dynamiccomposite column that belongs with it */
+        public void add( ScanColumn col ) {
+            cursorVal.put( col.getUUID(), col );
+        }
+
+
+        private Entity getPartialEntity( UUID minEntityId ) {
+            List<Entity> entities;
+
+            try {
+                entities = em.getPartialEntities( Collections.singletonList( minEntityId ), fields );
+            }
+            catch ( Exception e ) {
+                logger.error( "Unable to load partial entities", e );
+                throw new RuntimeException( e );
+            }
+
+            if ( entities == null || entities.size() == 0 ) {
+                return null;
+            }
+
+            return entities.get( 0 );
+        }
+
+
+        public void load() {
+            try {
+                for ( Entity e : em.getPartialEntities( cursorVal.keySet(), fields ) ) {
+                    add( e );
+                }
+            }
+            catch ( Exception e ) {
+                logger.error( "Unable to load partial entities", e );
+                throw new RuntimeException( e );
+            }
+        }
+
+
+        /** Turn our sorted entities into a set of ids */
+        public Set<ScanColumn> toIds() {
+            Iterator<Entity> itr = iterator();
+
+            Set<ScanColumn> columns = new LinkedHashSet<ScanColumn>( this.size() );
+
+            while ( itr.hasNext() ) {
+
+                UUID id = itr.next().getUuid();
+
+                columns.add( cursorVal.get( id ) );
+            }
+
+            return columns;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/ResultIterator.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/ResultIterator.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/ResultIterator.java
new file mode 100644
index 0000000..cde2bc8
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/ResultIterator.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.query.ir.result;
+
+
+import java.util.Iterator;
+import java.util.Set;
+import java.util.UUID;
+
+import org.apache.usergrid.persistence.cassandra.CursorCache;
+
+
+/**
+ * Interface for iterating slice results per node.  This is to be used to iterate and join or intersect values Each
+ * iterator element is a set.  Each set size is determined by the underlying implementation.  When no sets of uuids are
+ * left the iterator should fail the next statement.  Note that you should not rely on the returned set being exactly
+ * the same size as the specified page size.  Valid sets can be returned with size >= that of the set value in the
+ * underlying implementation
+ *
+ * @author tnine
+ */
+public interface ResultIterator extends Iterable<Set<ScanColumn>>, Iterator<Set<ScanColumn>> {
+
+
+    /** Reset this iterator to the start to begin iterating again */
+    public void reset();
+
+    /** Finalize the cursor for this results.  Pass in the uuid of the last entity loaded. */
+    public void finalizeCursor( CursorCache cache, UUID lastValue );
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/ResultsLoader.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/ResultsLoader.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/ResultsLoader.java
new file mode 100644
index 0000000..9d0c70c
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/ResultsLoader.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.query.ir.result;
+
+
+import java.util.List;
+
+import org.apache.usergrid.persistence.Results;
+
+
+/** @author tnine */
+public interface ResultsLoader {
+
+    /** Load results from the list of uuids.  Should return a Results entity where the query cursor can be set */
+    public Results getResults( List<ScanColumn> entityIds ) throws Exception;
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/ResultsLoaderFactory.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/ResultsLoaderFactory.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/ResultsLoaderFactory.java
new file mode 100644
index 0000000..c1c5fbb
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/ResultsLoaderFactory.java
@@ -0,0 +1,21 @@
+package org.apache.usergrid.persistence.query.ir.result;
+
+
+import org.apache.usergrid.persistence.EntityManager;
+import org.apache.usergrid.persistence.Query;
+import org.apache.usergrid.persistence.Results;
+
+
+/**
+ *
+ * @author: tnine
+ *
+ */
+public interface ResultsLoaderFactory {
+
+    /**
+     * Get the results loaded that will load all Ids given the results level.  The original query and the entity manager
+     * may be needed to load these results
+     */
+    public ResultsLoader getResultsLoader( EntityManager em, Query query, Results.Level level );
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/ScanColumn.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/ScanColumn.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/ScanColumn.java
new file mode 100644
index 0000000..91603c8
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/ScanColumn.java
@@ -0,0 +1,16 @@
+package org.apache.usergrid.persistence.query.ir.result;
+
+
+import java.nio.ByteBuffer;
+import java.util.UUID;
+
+
+/** An interface that represents a column */
+public interface ScanColumn {
+
+    /** Get the uuid from the column */
+    public UUID getUUID();
+
+    /** Get the cursor value of this column */
+    public ByteBuffer getCursorValue();
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/ScanColumnTransformer.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/ScanColumnTransformer.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/ScanColumnTransformer.java
new file mode 100644
index 0000000..3102404
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/ScanColumnTransformer.java
@@ -0,0 +1,23 @@
+package org.apache.usergrid.persistence.query.ir.result;
+
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.UUID;
+
+
+/** Simple utility to convert Scan Columns collections to lists */
+public class ScanColumnTransformer {
+
+    public static List<UUID> getIds( Collection<ScanColumn> cols ) {
+
+        List<UUID> ids = new ArrayList<UUID>( cols.size() );
+
+        for ( ScanColumn col : cols ) {
+            ids.add( col.getUUID() );
+        }
+
+        return ids;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/SecondaryIndexSliceParser.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/SecondaryIndexSliceParser.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/SecondaryIndexSliceParser.java
new file mode 100644
index 0000000..68bc37a
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/SecondaryIndexSliceParser.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.query.ir.result;
+
+
+import java.nio.ByteBuffer;
+import java.util.UUID;
+
+import me.prettyprint.hector.api.beans.DynamicComposite;
+
+
+/**
+ * Parser for reading and writing secondary index composites
+ *
+ * @author tnine
+ */
+public class SecondaryIndexSliceParser implements SliceParser {
+
+
+    /* (non-Javadoc)
+     * @see org.apache.usergrid.persistence.query.ir.result.SliceParser#parse(java.nio.ByteBuffer)
+     */
+    @Override
+    public ScanColumn parse( ByteBuffer buff ) {
+        DynamicComposite composite = DynamicComposite.fromByteBuffer( buff.duplicate() );
+
+        return new SecondaryIndexColumn( ( UUID ) composite.get( 2 ), composite.get( 1 ), buff );
+    }
+
+
+    public static class SecondaryIndexColumn extends AbstractScanColumn {
+
+        private final Object value;
+
+
+        public SecondaryIndexColumn( UUID uuid, Object value, ByteBuffer buff ) {
+            super( uuid, buff );
+            this.value = value;
+        }
+
+
+        /** Get the value from the node */
+        public Object getValue() {
+            return this.value;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/SliceIterator.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/SliceIterator.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/SliceIterator.java
new file mode 100644
index 0000000..3829ad8
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/SliceIterator.java
@@ -0,0 +1,251 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.query.ir.result;
+
+
+import java.nio.ByteBuffer;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.LinkedHashSet;
+import java.util.Set;
+import java.util.UUID;
+
+import org.apache.usergrid.persistence.cassandra.CursorCache;
+import org.apache.usergrid.persistence.cassandra.index.IndexScanner;
+import org.apache.usergrid.persistence.exceptions.QueryIterationException;
+import org.apache.usergrid.persistence.query.ir.QuerySlice;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import me.prettyprint.hector.api.beans.HColumn;
+
+
+/**
+ * An iterator that will take all slices and order them correctly
+ *
+ * @author tnine
+ */
+public class SliceIterator implements ResultIterator {
+
+    private static final Logger logger = LoggerFactory.getLogger( SliceIterator.class );
+
+    private final LinkedHashMap<UUID, ScanColumn> cols;
+    private final QuerySlice slice;
+    private final SliceParser parser;
+    private final IndexScanner scanner;
+    private final int pageSize;
+    private final boolean skipFirst;
+
+    /**
+     * Pointer to the uuid set until it's returned
+     */
+    private Set<ScanColumn> lastResult;
+
+    /**
+     * The pointer to the last set of parsed columns
+     */
+    private Set<ScanColumn> parsedCols;
+
+    /**
+     * counter that's incremented as we load pages. If pages loaded = 1 when reset, we don't have to reload from cass
+     */
+    private int pagesLoaded = 0;
+
+    /**
+     * Pointer to the last column we parsed
+     */
+    private ScanColumn last;
+
+
+    /**
+     * @param scanner The scanner to use to read the cols
+     * @param slice The slice used in the scanner
+     * @param parser The parser for the scanner results
+     * @param skipFirst True if the first record should be skipped, used with cursors
+     */
+    public SliceIterator( QuerySlice slice, IndexScanner scanner, SliceParser parser, boolean skipFirst ) {
+        this.slice = slice;
+        this.parser = parser;
+        this.scanner = scanner;
+        this.skipFirst = skipFirst;
+        this.pageSize = scanner.getPageSize();
+        this.cols = new LinkedHashMap<UUID, ScanColumn>( this.pageSize );
+        this.parsedCols = new LinkedHashSet<ScanColumn>( this.pageSize );
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see java.lang.Iterable#iterator()
+     */
+    @Override
+    public Iterator<Set<ScanColumn>> iterator() {
+        return this;
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see java.util.Iterator#hasNext()
+     */
+    @Override
+    public boolean hasNext() {
+        if ( lastResult == null ) {
+            return load();
+        }
+
+        return true;
+    }
+
+
+    private boolean load() {
+        if ( !scanner.hasNext() ) {
+            return false;
+        }
+
+        Iterator<HColumn<ByteBuffer, ByteBuffer>> results = scanner.next().iterator();
+
+        cols.clear();
+
+        /**
+         * Skip the first value, it's from the previous cursor
+         */
+        if ( skipFirst && pagesLoaded == 0 && results.hasNext() ) {
+            results.next();
+        }
+
+        parsedCols.clear();
+
+        while ( results.hasNext() ) {
+
+            ByteBuffer colName = results.next().getName().duplicate();
+
+            ScanColumn parsed = parser.parse( colName );
+
+            //skip this value, the parser has discarded it
+            if ( parsed == null ) {
+                continue;
+            }
+
+            last = parsed;
+            cols.put( parsed.getUUID(), parsed );
+            parsedCols.add( parsed );
+        }
+
+
+        pagesLoaded++;
+
+        lastResult = parsedCols;
+
+        return lastResult != null && lastResult.size() > 0;
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see java.util.Iterator#next()
+     */
+    @Override
+    public Set<ScanColumn> next() {
+        Set<ScanColumn> temp = lastResult;
+        lastResult = null;
+        return temp;
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see java.util.Iterator#remove()
+     */
+    @Override
+    public void remove() {
+        throw new UnsupportedOperationException( "Remove is not supported" );
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.apache.usergrid.persistence.query.ir.result.ResultIterator#reset()
+     */
+    @Override
+    public void reset() {
+        // Do nothing, we'll just return the first page again
+        if ( pagesLoaded == 1 ) {
+            lastResult = parsedCols;
+            return;
+        }
+        scanner.reset();
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see
+     * org.apache.usergrid.persistence.query.ir.result.ResultIterator#finalizeCursor()
+     */
+    @Override
+    public void finalizeCursor( CursorCache cache, UUID lastLoaded ) {
+        final int sliceHash = slice.hashCode();
+
+        ByteBuffer bytes = null;
+
+        ScanColumn col = cols.get( lastLoaded );
+
+
+        //the column came from the current page
+        if ( col != null ) {
+            bytes = col.getCursorValue();
+        }
+        else {
+
+            //check if we reached the end of our iterator.  If we did, set the last value into the cursor.  Otherwise
+            //this is a bug
+            if ( scanner.hasNext() ) {
+                logger.error(
+                        "An iterator attempted to access a slice that was not iterated over.  This will result in the" +
+                                " cursor construction failing" );
+                throw new QueryIterationException(
+                        "An iterator attempted to access a slice that was not iterated over.  This will result in the" +
+                                " cursor construction failing" );
+            }
+
+            final ByteBuffer sliceCursor = slice.getCursor();
+
+            //we've never loaded anything, just re-use the existing slice
+            if (last == null && sliceCursor != null ) {
+                bytes = sliceCursor;
+            }
+
+            //use the last column we loaded.  This way our scan returns nothing next time since start == finish
+            else if(last != null) {
+                bytes = last.getCursorValue();
+            }
+        }
+
+
+        if ( bytes == null ) {
+            return;
+        }
+
+        cache.setNextCursor( sliceHash, bytes );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/SliceParser.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/SliceParser.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/SliceParser.java
new file mode 100644
index 0000000..6f45efb
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/SliceParser.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.query.ir.result;
+
+
+import java.nio.ByteBuffer;
+
+
+/**
+ * Interface to parse and compare range slices
+ *
+ * @author tnine
+ */
+public interface SliceParser {
+
+    /** Parse the slice and return it's parse type.  If null is returned, the column should be considered discarded */
+    public ScanColumn parse( ByteBuffer buff );
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/StaticIdIterator.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/StaticIdIterator.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/StaticIdIterator.java
new file mode 100644
index 0000000..10ee4b8
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/StaticIdIterator.java
@@ -0,0 +1,66 @@
+package org.apache.usergrid.persistence.query.ir.result;
+
+
+import java.nio.ByteBuffer;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.Set;
+import java.util.UUID;
+
+import org.apache.usergrid.persistence.cassandra.CursorCache;
+
+
+/** Simple iterator that just returns UUIDs that are set into it */
+public class StaticIdIterator implements ResultIterator {
+
+    private final Set<ScanColumn> ids;
+
+    private boolean returnedOnce = false;
+
+
+    /**
+     *
+     */
+    public StaticIdIterator( UUID id ) {
+        final ScanColumn col = new UUIDIndexSliceParser.UUIDColumn( id, ByteBuffer.allocate( 0 ) );
+
+        ids = Collections.singleton( col );
+    }
+
+
+    @Override
+    public void reset() {
+        //no op
+    }
+
+
+    @Override
+    public void finalizeCursor( CursorCache cache, UUID lastValue ) {
+        //no cursor, it's a static list
+    }
+
+
+    @Override
+    public Iterator<Set<ScanColumn>> iterator() {
+        return this;
+    }
+
+
+    @Override
+    public boolean hasNext() {
+        return !returnedOnce;
+    }
+
+
+    @Override
+    public Set<ScanColumn> next() {
+        returnedOnce = true;
+        return ids;
+    }
+
+
+    @Override
+    public void remove() {
+        throw new UnsupportedOperationException( "This iterator does not support remove" );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/SubtractionIterator.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/SubtractionIterator.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/SubtractionIterator.java
new file mode 100644
index 0000000..8475756
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/SubtractionIterator.java
@@ -0,0 +1,108 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.query.ir.result;
+
+
+import java.util.LinkedHashSet;
+import java.util.Set;
+import java.util.UUID;
+
+import org.apache.usergrid.persistence.cassandra.CursorCache;
+
+import com.google.common.collect.Sets;
+
+
+/**
+ * Simple iterator to perform Unions
+ *
+ * @author tnine
+ */
+public class SubtractionIterator extends MergeIterator {
+
+    private ResultIterator keepIterator;
+    private ResultIterator subtractIterator;
+
+
+    public SubtractionIterator( int pageSize ) {
+        super( pageSize );
+    }
+
+
+    /** @param subtractIterator the subtractIterator to set */
+    public void setSubtractIterator( ResultIterator subtractIterator ) {
+        this.subtractIterator = subtractIterator;
+    }
+
+
+    /** @param keepIterator the keepIterator to set */
+    public void setKeepIterator( ResultIterator keepIterator ) {
+        this.keepIterator = keepIterator;
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.apache.usergrid.persistence.query.ir.result.ResultIterator#reset()
+     */
+    @Override
+    public void doReset() {
+        keepIterator.reset();
+        subtractIterator.reset();
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.apache.usergrid.persistence.query.ir.result.MergeIterator#advance()
+     */
+    @Override
+    protected Set<ScanColumn> advance() {
+        if ( !keepIterator.hasNext() ) {
+            return null;
+        }
+
+        Set<ScanColumn> results = new LinkedHashSet<ScanColumn>( pageSize );
+
+        while ( keepIterator.hasNext() && results.size() < pageSize ) {
+
+            Set<ScanColumn> keepPage = keepIterator.next();
+
+            while ( subtractIterator.hasNext() && keepPage.size() > 0 ) {
+                keepPage = Sets.difference( keepPage, subtractIterator.next() );
+            }
+
+            subtractIterator.reset();
+
+            results.addAll( keepPage );
+        }
+
+        return results;
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.usergrid.persistence.query.ir.result.ResultIterator#finalizeCursor(org.apache.usergrid.persistence.cassandra
+     * .CursorCache)
+     */
+    @Override
+    public void finalizeCursor( CursorCache cache, UUID lastLoaded ) {
+        //we can only keep a cursor on our keep result set, we must subtract from every page of keep when loading
+        // results
+        keepIterator.finalizeCursor( cache, lastLoaded );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/UUIDIndexSliceParser.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/UUIDIndexSliceParser.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/UUIDIndexSliceParser.java
new file mode 100644
index 0000000..fecbc24
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/UUIDIndexSliceParser.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.query.ir.result;
+
+
+import java.nio.ByteBuffer;
+import java.util.UUID;
+
+import me.prettyprint.cassandra.serializers.UUIDSerializer;
+
+
+/**
+ * Parser for reading and writing secondary index composites
+ *
+ * @author tnine
+ */
+public class UUIDIndexSliceParser implements SliceParser {
+
+    private static final UUIDSerializer SERIALIZER = UUIDSerializer.get();
+
+
+    /* (non-Javadoc)
+     * @see org.apache.usergrid.persistence.query.ir.result.SliceParser#parse(java.nio.ByteBuffer)
+     */
+    @Override
+    public ScanColumn parse( ByteBuffer buff ) {
+        return new UUIDColumn( SERIALIZER.fromByteBuffer( buff.duplicate() ), buff );
+    }
+
+
+    public static class UUIDColumn extends AbstractScanColumn {
+
+        public UUIDColumn( UUID uuid, ByteBuffer buffer ) {
+            super( uuid, buffer );
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/UnionIterator.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/UnionIterator.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/UnionIterator.java
new file mode 100644
index 0000000..9630eda
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/UnionIterator.java
@@ -0,0 +1,252 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.query.ir.result;
+
+
+import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.UUID;
+
+import org.apache.usergrid.persistence.cassandra.CursorCache;
+import org.apache.usergrid.utils.UUIDUtils;
+
+import me.prettyprint.cassandra.serializers.UUIDSerializer;
+
+
+/**
+ * Simple iterator to perform Unions
+ *
+ * @author tnine
+ */
+public class UnionIterator extends MultiIterator {
+
+    private static final ScanColumnComparator COMP = new ScanColumnComparator();
+
+    private static final UUIDSerializer UUID_SERIALIZER = UUIDSerializer.get();
+
+
+    private SortedColumnList list;
+
+    private final int id;
+
+
+    /**
+     * @param pageSize The page size to return
+     * @param id The id assigned to this node
+     * @param minUuid The minimum UUID to return
+     */
+    public UnionIterator( int pageSize, int id, ByteBuffer minUuid ) {
+        super( pageSize );
+
+        this.id = id;
+
+        UUID parseMinUuid = null;
+
+        if(minUuid != null)      {
+            parseMinUuid = UUID_SERIALIZER.fromByteBuffer( minUuid );
+        }
+
+        list = new SortedColumnList( pageSize, parseMinUuid );
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.apache.usergrid.persistence.query.ir.result.MergeIterator#advance()
+     */
+    @Override
+    protected Set<ScanColumn> advance() {
+
+        int size = iterators.size();
+
+        if ( size == 0 ) {
+            return null;
+        }
+
+
+        list.clear();
+
+        for ( ResultIterator itr : iterators ) {
+
+            while ( itr.hasNext() ) {
+                list.addAll( itr.next() );
+            }
+
+            itr.reset();
+        }
+
+        //mark us for the next page
+        list.mark();
+
+
+        return list.asSet();
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see
+     * org.apache.usergrid.persistence.query.ir.result.ResultIterator#finalizeCursor(
+     * org.apache.usergrid.persistence.cassandra.CursorCache)
+     */
+    @Override
+    public void finalizeCursor( CursorCache cache, UUID lastLoaded ) {
+
+        ByteBuffer buff = UUIDSerializer.get().toByteBuffer( lastLoaded );
+        cache.setNextCursor( id, buff );
+        //get our scan column and put them in the cache
+        //we finalize the cursor of the min
+    }
+
+
+    /**
+     * A Sorted Set with a max size. When a new entry is added, the max is removed.  You can mark the next "min" by
+     * calling the mark method.  Values > min are accepted.  Values > min and that are over size are discarded
+     */
+    public static final class SortedColumnList {
+
+        private static final ScanColumnComparator COMP = new ScanColumnComparator();
+
+        private final int maxSize;
+
+        private final List<ScanColumn> list;
+
+
+        private ScanColumn min;
+
+
+        public SortedColumnList( final int maxSize, final UUID minUuid ) {
+            //we need to allocate the extra space if required
+            this.list = new ArrayList<ScanColumn>( maxSize );
+            this.maxSize = maxSize;
+
+            if ( minUuid != null ) {
+                min = new AbstractScanColumn( minUuid, null ) {};
+            }
+        }
+
+
+        /**
+         * Add the column to this list
+         */
+        public void add( ScanColumn col ) {
+            //less than our min, don't add
+            if ( COMP.compare( min, col ) >= 0 ) {
+                return;
+            }
+
+            int index = Collections.binarySearch( this.list, col, COMP );
+
+            //already present
+            if ( index > -1 ) {
+                return;
+            }
+
+            index = ( index * -1 ) - 1;
+
+            //outside the renage
+            if ( index >= maxSize ) {
+                return;
+            }
+
+            this.list.add( index, col );
+
+            final int size = this.list.size();
+
+            if ( size > maxSize ) {
+                this.list.subList( maxSize, size ).clear();
+            }
+        }
+
+
+        /**
+         * Add all the elements to this list
+         */
+        public void addAll( final Collection<? extends ScanColumn> cols ) {
+            for ( ScanColumn col : cols ) {
+                add( col );
+            }
+        }
+
+
+        /**
+         * Returns a new list.  If no elements are present, returns null
+         */
+        public Set<ScanColumn> asSet() {
+            if ( this.list.size() == 0 ) {
+                return null;
+            }
+
+            return new LinkedHashSet<ScanColumn>( this.list );
+        }
+
+
+        /**
+         * Mark our last element in the tree as the max
+         */
+        public void mark() {
+
+            final int size = this.list.size();
+
+            //we don't have any elements in the list, and we've never set a min
+            if ( size == 0 ) {
+                return;
+            }
+
+            min = this.list.get( size - 1 );
+        }
+
+
+        /**
+         * Clear the list
+         */
+        public void clear() {
+            this.list.clear();
+        }
+    }
+
+
+    /**
+     * Simple comparator for comparing scan columns.  Orders them by time uuid
+     */
+    private static class ScanColumnComparator implements Comparator<ScanColumn> {
+
+        @Override
+        public int compare( final ScanColumn o1, final ScanColumn o2 ) {
+            if ( o1 == null ) {
+                if ( o2 == null ) {
+                    return 0;
+                }
+
+                return -1;
+            }
+
+            else if ( o2 == null ) {
+                return 1;
+            }
+
+            return UUIDUtils.compare( o1.getUUID(), o2.getUUID() );
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/.gitignore
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/.gitignore b/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/.gitignore
new file mode 100644
index 0000000..65eb766
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/.gitignore
@@ -0,0 +1,2 @@
+/QueryFilterLexer.java
+/QueryFilterParser.java

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/AndOperand.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/AndOperand.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/AndOperand.java
new file mode 100644
index 0000000..e4c82ed
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/AndOperand.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.query.tree;
+
+
+import org.antlr.runtime.CommonToken;
+import org.antlr.runtime.Token;
+import org.apache.usergrid.persistence.exceptions.PersistenceException;
+
+
+/** @author tnine */
+public class AndOperand extends BooleanOperand {
+
+    public AndOperand() {
+        super( new CommonToken( 0, "and" ) );
+    }
+
+
+    public AndOperand( Token t ) {
+        super( t );
+    }
+
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.usergrid.persistence.query.tree.Operand#visit(org.apache.usergrid.persistence
+     * .query.tree.QueryVisitor)
+     */
+    @Override
+    public void visit( QueryVisitor visitor ) throws PersistenceException {
+        visitor.visit( this );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/BooleanLiteral.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/BooleanLiteral.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/BooleanLiteral.java
new file mode 100644
index 0000000..e624e25
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/BooleanLiteral.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.query.tree;
+
+
+import org.antlr.runtime.ClassicToken;
+import org.antlr.runtime.Token;
+
+
+/** @author tnine */
+public class BooleanLiteral extends Literal<Boolean> {
+
+    private boolean value;
+
+
+    /**
+     * @param t
+     */
+    protected BooleanLiteral( Token t ) {
+        super( t );
+        value = Boolean.valueOf( t.getText() );
+    }
+
+
+    /** The boolean literal */
+    public BooleanLiteral( boolean value ) {
+        super( new ClassicToken( 0, String.valueOf( value ) ) );
+        this.value = value;
+    }
+
+
+    public Boolean getValue() {
+        return value;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/BooleanOperand.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/BooleanOperand.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/BooleanOperand.java
new file mode 100644
index 0000000..ecf5451
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/BooleanOperand.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.query.tree;
+
+
+import org.antlr.runtime.Token;
+
+
+/**
+ * A base class for any equality expression.  Expressions must have a property and a value. Examples are >=, >, =, <,
+ * <=,
+ *
+ * @author tnine
+ */
+public abstract class BooleanOperand extends Operand {
+
+
+    /**
+     * @param property
+     * @param literal
+     */
+    public BooleanOperand( Token t ) {
+        super( t );
+    }
+
+
+    public Operand getLeft() {
+        return ( Operand ) this.children.get( 0 );
+    }
+
+
+    public Operand getRight() {
+        return ( Operand ) this.children.get( 1 );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/ContainsOperand.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/ContainsOperand.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/ContainsOperand.java
new file mode 100644
index 0000000..aa75a1e
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/ContainsOperand.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.query.tree;
+
+
+import org.antlr.runtime.Token;
+import org.apache.usergrid.persistence.exceptions.PersistenceException;
+
+
+/** @author tnine */
+public class ContainsOperand extends EqualityOperand {
+
+    /**
+     * @param property
+     * @param literal
+     */
+    public ContainsOperand( Token t ) {
+        super( t );
+    }
+
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.usergrid.persistence.query.tree.Operand#visit(org.apache.usergrid.persistence
+     * .query.tree.QueryVisitor)
+     */
+    @Override
+    public void visit( QueryVisitor visitor ) throws PersistenceException {
+        visitor.visit( this );
+    }
+
+
+    public StringLiteral getString() {
+        return ( StringLiteral ) getLiteral();
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.usergrid.persistence.query.tree.EqualityOperand#newProperty(java.lang.String)
+     */
+    @Override
+    protected Property newProperty( String name ) {
+        return new ContainsProperty( name );
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.usergrid.persistence.query.tree.EqualityOperand#getProperty()
+     */
+    @Override
+    public ContainsProperty getProperty() {
+        return ( ContainsProperty ) this.children.get( 0 );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/ContainsProperty.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/ContainsProperty.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/ContainsProperty.java
new file mode 100644
index 0000000..1e35af6
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/ContainsProperty.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.query.tree;
+
+
+import org.antlr.runtime.ClassicToken;
+import org.antlr.runtime.Token;
+
+
+/**
+ * A property for full text searching that requires special renaming
+ *
+ * @author tnine
+ */
+public class ContainsProperty extends Property {
+
+    private String indexedName = null;
+
+
+    public ContainsProperty( Token t ) {
+        super( t );
+        this.indexedName = String.format( "%s.keywords", super.getValue() );
+    }
+
+
+    public ContainsProperty( String property ) {
+        this( new ClassicToken( 0, property ) );
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.usergrid.persistence.query.tree.Property#getIndexedValue()
+     */
+    @Override
+    public String getIndexedValue() {
+        return this.indexedName;
+    }
+
+
+    /** @return the property */
+    public ContainsProperty getProperty() {
+        return ( ContainsProperty ) this.children.get( 0 );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/Equal.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/Equal.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/Equal.java
new file mode 100644
index 0000000..d4d4406
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/Equal.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.query.tree;
+
+
+import org.antlr.runtime.ClassicToken;
+import org.antlr.runtime.Token;
+import org.apache.usergrid.persistence.exceptions.NoIndexException;
+
+
+/** @author tnine */
+public class Equal extends EqualityOperand {
+
+    /**
+     * @param property
+     * @param literal
+     */
+    public Equal( Token t ) {
+        super( t );
+    }
+
+
+    public Equal() {
+        super( new ClassicToken( 0, "=" ) );
+    }
+
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.usergrid.persistence.query.tree.Operand#visit(org.apache.usergrid.persistence
+     * .query.tree.QueryVisitor)
+     */
+    @Override
+    public void visit( QueryVisitor visitor ) throws NoIndexException {
+        visitor.visit( this );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/EqualityOperand.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/EqualityOperand.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/EqualityOperand.java
new file mode 100644
index 0000000..1e3cbc9
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/EqualityOperand.java
@@ -0,0 +1,88 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.query.tree;
+
+
+import org.antlr.runtime.Token;
+
+
+/**
+ * A base class for any equality expression. Expressions must have a property and a value. Examples are >=, >, =, <,
+ * <=,
+ *
+ * @author tnine
+ */
+public abstract class EqualityOperand extends Operand {
+
+    /**
+     * @param property
+     * @param literal
+     */
+    public EqualityOperand( Token t ) {
+        super( t );
+    }
+
+
+    public EqualityOperand( String propName, Literal<?> value ) {
+        super( null );
+    }
+
+
+    /** Set the property on this operand */
+    public void setProperty( String name ) {
+        setAtIndex( 0, newProperty( name ) );
+    }
+
+
+    /** Get the property to set into the equality. Allows subclasses to override the type */
+    protected Property newProperty( String name ) {
+        return new Property( name );
+    }
+
+
+    /** Set the literal on this operand from the given value */
+    public void setLiteral( Object value ) {
+        setAtIndex( 1, LiteralFactory.getLiteral( value ) );
+    }
+
+
+    /** Set the child at the specified index. If it doesn't exist, it's added until it does */
+    @SuppressWarnings("unchecked")
+    private void setAtIndex( int index, Literal<?> value ) {
+
+        if ( children == null ) {
+            children = createChildrenList();
+        }
+
+        while ( children.size() - 1 < index ) {
+            children.add( null );
+        }
+
+        setChild( index, value );
+    }
+
+
+    /** @return the property */
+    public Property getProperty() {
+        return ( Property ) this.children.get( 0 );
+    }
+
+
+    /** @return the literal */
+    public Literal<?> getLiteral() {
+        return ( Literal<?> ) this.children.get( 1 );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/FloatLiteral.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/FloatLiteral.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/FloatLiteral.java
new file mode 100644
index 0000000..6363234
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/FloatLiteral.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.query.tree;
+
+
+import org.antlr.runtime.ClassicToken;
+import org.antlr.runtime.Token;
+
+
+/** @author tnine */
+public class FloatLiteral extends Literal<Float> implements NumericLiteral {
+
+    private float value;
+
+
+    /**
+     * @param t
+     */
+    public FloatLiteral( Token t ) {
+        super( t );
+        value = Float.valueOf( t.getText() );
+    }
+
+
+    public FloatLiteral( float f ) {
+        super( new ClassicToken( 0, String.valueOf( f ) ) );
+        value = f;
+    }
+
+
+    /** @return the value */
+    public Float getValue() {
+        return value;
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.usergrid.persistence.query.tree.NumericLiteral#getFloatValue()
+     */
+    @Override
+    public float getFloatValue() {
+        return value;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/GreaterThan.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/GreaterThan.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/GreaterThan.java
new file mode 100644
index 0000000..0f6495f
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/GreaterThan.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.query.tree;
+
+
+import org.antlr.runtime.CommonToken;
+import org.antlr.runtime.Token;
+import org.apache.usergrid.persistence.exceptions.NoIndexException;
+
+
+/** @author tnine */
+public class GreaterThan extends EqualityOperand {
+
+    /**
+     * @param property
+     * @param literal
+     */
+    public GreaterThan( Token t ) {
+        super( t );
+    }
+
+
+    public GreaterThan() {
+        super( new CommonToken( 0, ">" ) );
+    }
+
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.usergrid.persistence.query.tree.Operand#visit(org.apache.usergrid.persistence
+     * .query.tree.QueryVisitor)
+     */
+    @Override
+    public void visit( QueryVisitor visitor ) throws NoIndexException {
+        visitor.visit( this );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/GreaterThanEqual.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/GreaterThanEqual.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/GreaterThanEqual.java
new file mode 100644
index 0000000..5d5d431
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/GreaterThanEqual.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.query.tree;
+
+
+import org.antlr.runtime.CommonToken;
+import org.antlr.runtime.Token;
+import org.apache.usergrid.persistence.exceptions.NoIndexException;
+
+
+/** @author tnine */
+public class GreaterThanEqual extends EqualityOperand {
+
+    /**
+     * @param property
+     * @param literal
+     */
+    public GreaterThanEqual( Token t ) {
+        super( t );
+    }
+
+
+    /**
+     * @param property
+     * @param literal
+     */
+    public GreaterThanEqual() {
+        super( new CommonToken( 0, ">=" ) );
+    }
+
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.usergrid.persistence.query.tree.Operand#visit(org.apache.usergrid.persistence
+     * .query.tree.QueryVisitor)
+     */
+    @Override
+    public void visit( QueryVisitor visitor ) throws NoIndexException {
+        visitor.visit( this );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/LessThan.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/LessThan.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/LessThan.java
new file mode 100644
index 0000000..a3c7979
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/LessThan.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.query.tree;
+
+
+import org.antlr.runtime.CommonToken;
+import org.antlr.runtime.Token;
+import org.apache.usergrid.persistence.exceptions.NoIndexException;
+
+
+/** @author tnine */
+public class LessThan extends EqualityOperand {
+
+    /**
+     * @param property
+     * @param literal
+     */
+    public LessThan( Token t ) {
+        super( t );
+    }
+
+
+    public LessThan() {
+        super( new CommonToken( 0, "<" ) );
+    }
+
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.usergrid.persistence.query.tree.Operand#visit(org.apache.usergrid.persistence
+     * .query.tree.QueryVisitor)
+     */
+    @Override
+    public void visit( QueryVisitor visitor ) throws NoIndexException {
+        visitor.visit( this );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/LessThanEqual.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/LessThanEqual.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/LessThanEqual.java
new file mode 100644
index 0000000..7638721
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/LessThanEqual.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.query.tree;
+
+
+import org.antlr.runtime.CommonToken;
+import org.antlr.runtime.Token;
+import org.apache.usergrid.persistence.exceptions.NoIndexException;
+
+
+/** @author tnine */
+public class LessThanEqual extends EqualityOperand {
+
+    /**
+     * @param property
+     * @param literal
+     */
+    public LessThanEqual( Token t ) {
+        super( t );
+    }
+
+
+    /**
+     */
+    public LessThanEqual() {
+        super( new CommonToken( 0, "<=" ) );
+    }
+
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.usergrid.persistence.query.tree.Operand#visit(org.apache.usergrid.persistence
+     * .query.tree.QueryVisitor)
+     */
+    @Override
+    public void visit( QueryVisitor visitor ) throws NoIndexException {
+        visitor.visit( this );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/Literal.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/Literal.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/Literal.java
new file mode 100644
index 0000000..60071c4
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/Literal.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.query.tree;
+
+
+import org.antlr.runtime.Token;
+import org.antlr.runtime.tree.CommonTree;
+
+
+/**
+ * Abstract class for literals
+ *
+ * @author tnine
+ */
+public abstract class Literal<V> extends CommonTree {
+
+
+    protected Literal( Token t ) {
+        super( t );
+    }
+
+
+    /** Return the value of the literal the user has passed in */
+    public abstract V getValue();
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/LiteralFactory.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/LiteralFactory.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/LiteralFactory.java
new file mode 100644
index 0000000..cc69f9d
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/LiteralFactory.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.query.tree;
+
+
+import java.util.UUID;
+
+
+/**
+ * Simple factory for generating literal instance based on the runtime value
+ *
+ * @author tnine
+ */
+public class LiteralFactory {
+
+    /** Generate the correct literal subclass based on the runtime instance. */
+    public static final Literal<?> getLiteral( Object value ) {
+        if ( value instanceof Integer ) {
+            return new LongLiteral( ( Integer ) value );
+        }
+        if ( value instanceof Long ) {
+            return new LongLiteral( ( Long ) value );
+        }
+
+        if ( value instanceof String ) {
+            return new StringLiteral( ( String ) value );
+        }
+
+        if ( value instanceof Float ) {
+            return new FloatLiteral( ( Float ) value );
+        }
+
+        if ( value instanceof UUID ) {
+            return new UUIDLiteral( ( UUID ) value );
+        }
+
+        if ( value instanceof Boolean ) {
+            return new BooleanLiteral( ( Boolean ) value );
+        }
+
+        throw new UnsupportedOperationException(
+                String.format( "Unsupported type of %s was passed when trying to construct a literal",
+                        value.getClass() ) );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/LongLiteral.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/LongLiteral.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/LongLiteral.java
new file mode 100644
index 0000000..8f1b084
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/LongLiteral.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.query.tree;
+
+
+import org.antlr.runtime.ClassicToken;
+import org.antlr.runtime.Token;
+
+
+/** @author tnine */
+public class LongLiteral extends Literal<Long> implements NumericLiteral {
+
+    private long value;
+
+
+    /**
+     * @param t
+     */
+    public LongLiteral( Token t ) {
+        super( t );
+        this.value = Long.valueOf( t.getText() );
+    }
+
+
+    /**
+     *
+     * @param value
+     */
+    public LongLiteral( long value ) {
+        super( new ClassicToken( 0, String.valueOf( value ) ) );
+        this.value = value;
+    }
+
+
+    /**
+     *
+     * @return
+     */
+    public Long getValue() {
+        return this.value;
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.usergrid.persistence.query.tree.NumericLiteral#getFloatValue()
+     */
+    @Override
+    public float getFloatValue() {
+        return value;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/NotOperand.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/NotOperand.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/NotOperand.java
new file mode 100644
index 0000000..8388e5d
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/NotOperand.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.query.tree;
+
+
+import org.antlr.runtime.Token;
+import org.apache.usergrid.persistence.exceptions.PersistenceException;
+
+
+/** @author tnine */
+public class NotOperand extends Operand {
+
+
+    public NotOperand( Token t ) {
+        super( t );
+    }
+
+
+    /** get the only child operation */
+    public Operand getOperation() {
+        return ( Operand ) this.children.get( 0 );
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.usergrid.persistence.query.tree.Operand#visit(org.apache.usergrid.persistence.query.tree.QueryVisitor)
+     */
+    @Override
+    public void visit( QueryVisitor visitor ) throws PersistenceException {
+        visitor.visit( this );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/NumericLiteral.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/NumericLiteral.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/NumericLiteral.java
new file mode 100644
index 0000000..96d5f49
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/NumericLiteral.java
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.query.tree;
+
+
+/** @author tnine */
+public interface NumericLiteral {
+
+    /** Return the value of this numeric literal as a float */
+    public float getFloatValue();
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/Operand.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/Operand.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/Operand.java
new file mode 100644
index 0000000..0f59ca8
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/Operand.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.query.tree;
+
+
+import org.antlr.runtime.Token;
+import org.antlr.runtime.tree.CommonTree;
+import org.apache.usergrid.persistence.exceptions.PersistenceException;
+
+
+/**
+ * Any logical operation should subclass.  Boolean logic, equality, not, contains, within and others are examples of
+ * operands
+ *
+ * @author tnine
+ */
+public abstract class Operand extends CommonTree {
+
+
+    /** Default constructor to take a token */
+    public Operand( Token t ) {
+        super( t );
+    }
+
+
+    /** Get the pointer to the parent node */
+    public Operand getParent() {
+        return ( Operand ) super.getParent();
+    }
+
+
+    /** Visitor method */
+    public abstract void visit( QueryVisitor visitor ) throws PersistenceException;
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/OrOperand.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/OrOperand.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/OrOperand.java
new file mode 100644
index 0000000..1771dbc
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/OrOperand.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.query.tree;
+
+
+import org.antlr.runtime.CommonToken;
+import org.antlr.runtime.Token;
+import org.apache.usergrid.persistence.exceptions.PersistenceException;
+
+
+/** @author tnine */
+public class OrOperand extends BooleanOperand {
+
+    /**
+     * @param left
+     * @param token
+     * @param right
+     */
+    public OrOperand( Token t ) {
+        super( t );
+    }
+
+
+    public OrOperand() {
+        super( new CommonToken( 0, "or" ) );
+    }
+
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.usergrid.persistence.query.tree.Operand#visit(org.apache.usergrid.persistence
+     * .query.tree.QueryVisitor)
+     */
+    @Override
+    public void visit( QueryVisitor visitor ) throws PersistenceException {
+        visitor.visit( this );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/Property.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/Property.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/Property.java
new file mode 100644
index 0000000..36028c8
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/tree/Property.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.query.tree;
+
+
+import org.antlr.runtime.ClassicToken;
+import org.antlr.runtime.Token;
+
+
+/**
+ * A property
+ *
+ * @author tnine
+ */
+public class Property extends Literal<String> {
+
+    private String property;
+
+
+    public Property( Token t ) {
+        super( t );
+        this.property = t.getText();
+    }
+
+
+    public Property( String property ) {
+        this( new ClassicToken( 0, property ) );
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.apache.usergrid.persistence.query.tree.Literal#getValue()
+     */
+    @Override
+    public String getValue() {
+        return this.property;
+    }
+
+
+    /**
+     * Subclasses an override.  Indexed value could be different when stored internally.  By default returns the same
+     * property
+     */
+    public String getIndexedValue() {
+        return this.property;
+    }
+}


[63/96] [abbrv] USERGRID-2 package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/entities/Group.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/entities/Group.html b/sdks/android/doc/org/usergrid/android/client/entities/Group.html
index 45fce5a..aa18d91 100644
--- a/sdks/android/doc/org/usergrid/android/client/entities/Group.html
+++ b/sdks/android/doc/org/usergrid/android/client/entities/Group.html
@@ -55,8 +55,8 @@ function windowTitle()
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/entities/Group.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="Group.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
@@ -88,17 +88,17 @@ DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client.entities</FONT>
+org.apache.usergrid.android.client.entities</FONT>
 <BR>
 Class Group</H2>
 <PRE>
 java.lang.Object
-  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">org.usergrid.android.client.entities.Entity</A>
-      <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.usergrid.android.client.entities.Group</B>
+  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">org.apache.usergrid.android.client.entities.Entity</A>
+      <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.usergrid.android.client.entities.Group</B>
 </PRE>
 <HR>
 <DL>
-<DT><PRE>public class <B>Group</B><DT>extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></DL>
+<DT><PRE>public class <B>Group</B><DT>extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></DL>
 </PRE>
 
 <P>
@@ -141,7 +141,7 @@ java.lang.Object
 &nbsp;<A NAME="fields_inherited_from_class_org.usergrid.android.client.entities.Entity"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left"><B>Fields inherited from class org.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></B></TH>
+<TH ALIGN="left"><B>Fields inherited from class org.apache.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></B></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#CLASS_FOR_ENTITY_TYPE">CLASS_FOR_ENTITY_TYPE</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#PROPERTY_TYPE">PROPERTY_TYPE</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#PROPERTY_UUID">PROPERTY_UUID</A></CODE></TD>
@@ -163,7 +163,7 @@ java.lang.Object
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Group.html#Group(org.usergrid.android.client.entities.Entity)">Group</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;entity)</CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Group.html#Group(org.apache.usergrid.android.client.entities.Entity)">Group</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;entity)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -230,10 +230,10 @@ java.lang.Object
 &nbsp;<A NAME="methods_inherited_from_class_org.usergrid.android.client.entities.Entity"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left"><B>Methods inherited from class org.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></B></TH>
+<TH ALIGN="left"><B>Methods inherited from class org.apache.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></B></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getProperties()">getProperties</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getType()">getType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getUuid()">getUuid</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setProperty(java.lang.String, org.codehaus.jackson.JsonNode)">setProperty</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setType(java.lang.String)">setType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setUuid(java.util.UUID)">setUuid</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toString()">toString</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(java.lang.Class)">toType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(org.usergrid.androi
 d.client.entities.Entity, java.lang.Class)">toType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(java.util.List, java.lang.Class)">toType</A></CODE></TD>
+<TD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getProperties()">getProperties</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getType()">getType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getUuid()">getUuid</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setProperty(java.lang.String, org.codehaus.jackson.JsonNode)">setProperty</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setType(java.lang.String)">setType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setUuid(java.util.UUID)">setUuid</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toString()">toString</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(java.lang.Class)">toType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(org.apache.usergrid
 .android.client.entities.Entity, java.lang.Class)">toType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(java.util.List, java.lang.Class)">toType</A></CODE></TD>
 </TR>
 </TABLE>
 &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
@@ -264,7 +264,7 @@ ENTITY_TYPE</H3>
 public static final java.lang.String <B>ENTITY_TYPE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Group.ENTITY_TYPE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Group.ENTITY_TYPE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -274,7 +274,7 @@ PROPERTY_PATH</H3>
 public static final java.lang.String <B>PROPERTY_PATH</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Group.PROPERTY_PATH">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Group.PROPERTY_PATH">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -284,7 +284,7 @@ PROPERTY_TITLE</H3>
 public static final java.lang.String <B>PROPERTY_TITLE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Group.PROPERTY_TITLE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Group.PROPERTY_TITLE">Constant Field Values</A></DL>
 </DL>
 
 <!-- ========= CONSTRUCTOR DETAIL ======== -->
@@ -305,10 +305,10 @@ public <B>Group</B>()</PRE>
 </DL>
 <HR>
 
-<A NAME="Group(org.usergrid.android.client.entities.Entity)"><!-- --></A><H3>
+<A NAME="Group(org.apache.usergrid.android.client.entities.Entity)"><!-- --></A><H3>
 Group</H3>
 <PRE>
-public <B>Group</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;entity)</PRE>
+public <B>Group</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;entity)</PRE>
 <DL>
 </DL>
 
@@ -328,7 +328,7 @@ getNativeType</H3>
 public java.lang.String <B>getNativeType</B>()</PRE>
 <DL>
 <DD><DL>
-<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getNativeType()">getNativeType</A></CODE> in class <CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></CODE></DL>
+<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getNativeType()">getNativeType</A></CODE> in class <CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></CODE></DL>
 </DD>
 <DD><DL>
 </DL>
@@ -342,7 +342,7 @@ getPropertyNames</H3>
 public java.util.List&lt;java.lang.String&gt; <B>getPropertyNames</B>()</PRE>
 <DL>
 <DD><DL>
-<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getPropertyNames()">getPropertyNames</A></CODE> in class <CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></CODE></DL>
+<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getPropertyNames()">getPropertyNames</A></CODE> in class <CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></CODE></DL>
 </DD>
 <DD><DL>
 </DL>
@@ -423,8 +423,8 @@ public void <B>setTitle</B>(java.lang.String&nbsp;title)</PRE>
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/entities/Group.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="Group.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/entities/Message.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/entities/Message.html b/sdks/android/doc/org/usergrid/android/client/entities/Message.html
index f9c09bb..290c3dd 100644
--- a/sdks/android/doc/org/usergrid/android/client/entities/Message.html
+++ b/sdks/android/doc/org/usergrid/android/client/entities/Message.html
@@ -55,8 +55,8 @@ function windowTitle()
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/entities/Message.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="Message.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
@@ -88,17 +88,17 @@ DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client.entities</FONT>
+org.apache.usergrid.android.client.entities</FONT>
 <BR>
 Class Message</H2>
 <PRE>
 java.lang.Object
-  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">org.usergrid.android.client.entities.Entity</A>
-      <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.usergrid.android.client.entities.Message</B>
+  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">org.apache.usergrid.android.client.entities.Entity</A>
+      <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.usergrid.android.client.entities.Message</B>
 </PRE>
 <HR>
 <DL>
-<DT><PRE>public class <B>Message</B><DT>extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></DL>
+<DT><PRE>public class <B>Message</B><DT>extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></DL>
 </PRE>
 
 <P>
@@ -189,7 +189,7 @@ java.lang.Object
 &nbsp;<A NAME="fields_inherited_from_class_org.usergrid.android.client.entities.Entity"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left"><B>Fields inherited from class org.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></B></TH>
+<TH ALIGN="left"><B>Fields inherited from class org.apache.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></B></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#CLASS_FOR_ENTITY_TYPE">CLASS_FOR_ENTITY_TYPE</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#PROPERTY_UUID">PROPERTY_UUID</A></CODE></TD>
@@ -211,7 +211,7 @@ java.lang.Object
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Message.html#Message(org.usergrid.android.client.entities.Entity)">Message</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;entity)</CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Message.html#Message(org.apache.usergrid.android.client.entities.Entity)">Message</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;entity)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -358,10 +358,10 @@ java.lang.Object
 &nbsp;<A NAME="methods_inherited_from_class_org.usergrid.android.client.entities.Entity"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left"><B>Methods inherited from class org.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></B></TH>
+<TH ALIGN="left"><B>Methods inherited from class org.apache.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></B></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getProperties()">getProperties</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getType()">getType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getUuid()">getUuid</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setProperty(java.lang.String, org.codehaus.jackson.JsonNode)">setProperty</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setType(java.lang.String)">setType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setUuid(java.util.UUID)">setUuid</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toString()">toString</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(java.lang.Class)">toType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(org.usergrid.androi
 d.client.entities.Entity, java.lang.Class)">toType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(java.util.List, java.lang.Class)">toType</A></CODE></TD>
+<TD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getProperties()">getProperties</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getType()">getType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getUuid()">getUuid</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setProperty(java.lang.String, org.codehaus.jackson.JsonNode)">setProperty</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setType(java.lang.String)">setType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setUuid(java.util.UUID)">setUuid</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toString()">toString</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(java.lang.Class)">toType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(org.apache.usergrid
 .android.client.entities.Entity, java.lang.Class)">toType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(java.util.List, java.lang.Class)">toType</A></CODE></TD>
 </TR>
 </TABLE>
 &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
@@ -392,7 +392,7 @@ ENTITY_TYPE</H3>
 public static final java.lang.String <B>ENTITY_TYPE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Message.ENTITY_TYPE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Message.ENTITY_TYPE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -402,7 +402,7 @@ PROPERTY_CORRELATION_ID</H3>
 public static final java.lang.String <B>PROPERTY_CORRELATION_ID</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Message.PROPERTY_CORRELATION_ID">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Message.PROPERTY_CORRELATION_ID">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -412,7 +412,7 @@ PROPERTY_DESTINATION</H3>
 public static final java.lang.String <B>PROPERTY_DESTINATION</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Message.PROPERTY_DESTINATION">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Message.PROPERTY_DESTINATION">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -422,7 +422,7 @@ PROPERTY_REPLY_TO</H3>
 public static final java.lang.String <B>PROPERTY_REPLY_TO</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Message.PROPERTY_REPLY_TO">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Message.PROPERTY_REPLY_TO">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -432,7 +432,7 @@ PROPERTY_TIMESTAMP</H3>
 public static final java.lang.String <B>PROPERTY_TIMESTAMP</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Message.PROPERTY_TIMESTAMP">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Message.PROPERTY_TIMESTAMP">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -442,7 +442,7 @@ PROPERTY_TYPE</H3>
 public static final java.lang.String <B>PROPERTY_TYPE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Message.PROPERTY_TYPE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Message.PROPERTY_TYPE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -452,7 +452,7 @@ PROPERTY_CATEGORY</H3>
 public static final java.lang.String <B>PROPERTY_CATEGORY</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Message.PROPERTY_CATEGORY">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Message.PROPERTY_CATEGORY">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -462,7 +462,7 @@ PROPERTY_INDEXED</H3>
 public static final java.lang.String <B>PROPERTY_INDEXED</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Message.PROPERTY_INDEXED">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Message.PROPERTY_INDEXED">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -472,7 +472,7 @@ PROPERTY_PERSISTENT</H3>
 public static final java.lang.String <B>PROPERTY_PERSISTENT</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.Message.PROPERTY_PERSISTENT">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.Message.PROPERTY_PERSISTENT">Constant Field Values</A></DL>
 </DL>
 
 <!-- ========= CONSTRUCTOR DETAIL ======== -->
@@ -493,10 +493,10 @@ public <B>Message</B>()</PRE>
 </DL>
 <HR>
 
-<A NAME="Message(org.usergrid.android.client.entities.Entity)"><!-- --></A><H3>
+<A NAME="Message(org.apache.usergrid.android.client.entities.Entity)"><!-- --></A><H3>
 Message</H3>
 <PRE>
-public <B>Message</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;entity)</PRE>
+public <B>Message</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;entity)</PRE>
 <DL>
 </DL>
 
@@ -516,7 +516,7 @@ getNativeType</H3>
 public java.lang.String <B>getNativeType</B>()</PRE>
 <DL>
 <DD><DL>
-<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getNativeType()">getNativeType</A></CODE> in class <CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></CODE></DL>
+<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getNativeType()">getNativeType</A></CODE> in class <CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></CODE></DL>
 </DD>
 <DD><DL>
 </DL>
@@ -530,7 +530,7 @@ getPropertyNames</H3>
 public java.util.List&lt;java.lang.String&gt; <B>getPropertyNames</B>()</PRE>
 <DL>
 <DD><DL>
-<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getPropertyNames()">getPropertyNames</A></CODE> in class <CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></CODE></DL>
+<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getPropertyNames()">getPropertyNames</A></CODE> in class <CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></CODE></DL>
 </DD>
 <DD><DL>
 </DL>
@@ -721,8 +721,8 @@ public void <B>setPersistent</B>(java.lang.Boolean&nbsp;persistent)</PRE>
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/entities/Message.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="Message.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/entities/User.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/entities/User.html b/sdks/android/doc/org/usergrid/android/client/entities/User.html
index 75686b1..1157a9b 100644
--- a/sdks/android/doc/org/usergrid/android/client/entities/User.html
+++ b/sdks/android/doc/org/usergrid/android/client/entities/User.html
@@ -55,7 +55,7 @@ function windowTitle()
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
 &nbsp;NEXT CLASS</FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/entities/User.html" target="_top"><B>FRAMES</B></A>  &nbsp;
@@ -88,17 +88,17 @@ DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client.entities</FONT>
+org.apache.usergrid.android.client.entities</FONT>
 <BR>
 Class User</H2>
 <PRE>
 java.lang.Object
-  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">org.usergrid.android.client.entities.Entity</A>
-      <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.usergrid.android.client.entities.User</B>
+  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">org.apache.usergrid.android.client.entities.Entity</A>
+      <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.usergrid.android.client.entities.User</B>
 </PRE>
 <HR>
 <DL>
-<DT><PRE>public class <B>User</B><DT>extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></DL>
+<DT><PRE>public class <B>User</B><DT>extends <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></DL>
 </PRE>
 
 <P>
@@ -197,7 +197,7 @@ java.lang.Object
 &nbsp;<A NAME="fields_inherited_from_class_org.usergrid.android.client.entities.Entity"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left"><B>Fields inherited from class org.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></B></TH>
+<TH ALIGN="left"><B>Fields inherited from class org.apache.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></B></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#CLASS_FOR_ENTITY_TYPE">CLASS_FOR_ENTITY_TYPE</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#PROPERTY_TYPE">PROPERTY_TYPE</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#PROPERTY_UUID">PROPERTY_UUID</A></CODE></TD>
@@ -219,7 +219,7 @@ java.lang.Object
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/User.html#User(org.usergrid.android.client.entities.Entity)">User</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;entity)</CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/User.html#User(org.apache.usergrid.android.client.entities.Entity)">User</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;entity)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -398,10 +398,10 @@ java.lang.Object
 &nbsp;<A NAME="methods_inherited_from_class_org.usergrid.android.client.entities.Entity"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left"><B>Methods inherited from class org.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></B></TH>
+<TH ALIGN="left"><B>Methods inherited from class org.apache.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></B></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getProperties()">getProperties</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getType()">getType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getUuid()">getUuid</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setProperty(java.lang.String, org.codehaus.jackson.JsonNode)">setProperty</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setType(java.lang.String)">setType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setUuid(java.util.UUID)">setUuid</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toString()">toString</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(java.lang.Class)">toType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(org.usergrid.androi
 d.client.entities.Entity, java.lang.Class)">toType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(java.util.List, java.lang.Class)">toType</A></CODE></TD>
+<TD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getProperties()">getProperties</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getType()">getType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getUuid()">getUuid</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setProperty(java.lang.String, org.codehaus.jackson.JsonNode)">setProperty</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setType(java.lang.String)">setType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#setUuid(java.util.UUID)">setUuid</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toString()">toString</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(java.lang.Class)">toType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(org.apache.usergrid
 .android.client.entities.Entity, java.lang.Class)">toType</A>, <A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#toType(java.util.List, java.lang.Class)">toType</A></CODE></TD>
 </TR>
 </TABLE>
 &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
@@ -432,7 +432,7 @@ ENTITY_TYPE</H3>
 public static final java.lang.String <B>ENTITY_TYPE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.User.ENTITY_TYPE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.User.ENTITY_TYPE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -442,7 +442,7 @@ PROPERTY_USERNAME</H3>
 public static final java.lang.String <B>PROPERTY_USERNAME</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.User.PROPERTY_USERNAME">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.User.PROPERTY_USERNAME">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -452,7 +452,7 @@ PROPERTY_EMAIL</H3>
 public static final java.lang.String <B>PROPERTY_EMAIL</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.User.PROPERTY_EMAIL">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.User.PROPERTY_EMAIL">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -462,7 +462,7 @@ PROPERTY_NAME</H3>
 public static final java.lang.String <B>PROPERTY_NAME</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.User.PROPERTY_NAME">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.User.PROPERTY_NAME">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -472,7 +472,7 @@ PROPERTY_FIRSTNAME</H3>
 public static final java.lang.String <B>PROPERTY_FIRSTNAME</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.User.PROPERTY_FIRSTNAME">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.User.PROPERTY_FIRSTNAME">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -482,7 +482,7 @@ PROPERTY_MIDDLENAME</H3>
 public static final java.lang.String <B>PROPERTY_MIDDLENAME</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.User.PROPERTY_MIDDLENAME">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.User.PROPERTY_MIDDLENAME">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -492,7 +492,7 @@ PROPERTY_LASTNAME</H3>
 public static final java.lang.String <B>PROPERTY_LASTNAME</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.User.PROPERTY_LASTNAME">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.User.PROPERTY_LASTNAME">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -502,7 +502,7 @@ PROPERTY_ACTIVATED</H3>
 public static final java.lang.String <B>PROPERTY_ACTIVATED</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.User.PROPERTY_ACTIVATED">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.User.PROPERTY_ACTIVATED">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -512,7 +512,7 @@ PROPERTY_PICTURE</H3>
 public static final java.lang.String <B>PROPERTY_PICTURE</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.User.PROPERTY_PICTURE">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.User.PROPERTY_PICTURE">Constant Field Values</A></DL>
 </DL>
 <HR>
 
@@ -522,7 +522,7 @@ PROPERTY_DISABLED</H3>
 public static final java.lang.String <B>PROPERTY_DISABLED</B></PRE>
 <DL>
 <DL>
-<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.usergrid.android.client.entities.User.PROPERTY_DISABLED">Constant Field Values</A></DL>
+<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.usergrid.android.client.entities.User.PROPERTY_DISABLED">Constant Field Values</A></DL>
 </DL>
 
 <!-- ========= CONSTRUCTOR DETAIL ======== -->
@@ -543,10 +543,10 @@ public <B>User</B>()</PRE>
 </DL>
 <HR>
 
-<A NAME="User(org.usergrid.android.client.entities.Entity)"><!-- --></A><H3>
+<A NAME="User(org.apache.usergrid.android.client.entities.Entity)"><!-- --></A><H3>
 User</H3>
 <PRE>
-public <B>User</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;entity)</PRE>
+public <B>User</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;entity)</PRE>
 <DL>
 </DL>
 
@@ -566,7 +566,7 @@ getNativeType</H3>
 public java.lang.String <B>getNativeType</B>()</PRE>
 <DL>
 <DD><DL>
-<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getNativeType()">getNativeType</A></CODE> in class <CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></CODE></DL>
+<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getNativeType()">getNativeType</A></CODE> in class <CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></CODE></DL>
 </DD>
 <DD><DL>
 </DL>
@@ -580,7 +580,7 @@ getPropertyNames</H3>
 public java.util.List&lt;java.lang.String&gt; <B>getPropertyNames</B>()</PRE>
 <DL>
 <DD><DL>
-<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getPropertyNames()">getPropertyNames</A></CODE> in class <CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></CODE></DL>
+<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html#getPropertyNames()">getPropertyNames</A></CODE> in class <CODE><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></CODE></DL>
 </DD>
 <DD><DL>
 </DL>
@@ -815,7 +815,7 @@ public void <B>setPicture</B>(java.lang.String&nbsp;picture)</PRE>
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
 &nbsp;NEXT CLASS</FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/entities/User.html" target="_top"><B>FRAMES</B></A>  &nbsp;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/entities/class-use/Activity.ActivityCollection.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/entities/class-use/Activity.ActivityCollection.html b/sdks/android/doc/org/usergrid/android/client/entities/class-use/Activity.ActivityCollection.html
index 94cc480..d3e2ed2 100644
--- a/sdks/android/doc/org/usergrid/android/client/entities/class-use/Activity.ActivityCollection.html
+++ b/sdks/android/doc/org/usergrid/android/client/entities/class-use/Activity.ActivityCollection.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Class org.usergrid.android.client.entities.Activity.ActivityCollection
+Uses of Class org.apache.usergrid.android.client.entities.Activity.ActivityCollection
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Class org.usergrid.android.client.entities.Activity.ActivityCollection
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Class org.usergrid.android.client.entities.Activity.ActivityCollection";
+        parent.document.title="Uses of Class org.apache.usergrid.android.client.entities.Activity.ActivityCollection";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.apache.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,9 +81,9 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Class<br>org.usergrid.android.client.entities.Activity.ActivityCollection</B></H2>
+<B>Uses of Class<br>org.apache.usergrid.android.client.entities.Activity.ActivityCollection</B></H2>
 </CENTER>
-No usage of org.usergrid.android.client.entities.Activity.ActivityCollection
+No usage of org.apache.usergrid.android.client.entities.Activity.ActivityCollection
 <P>
 <HR>
 
@@ -99,7 +99,7 @@ No usage of org.usergrid.android.client.entities.Activity.ActivityCollection
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.apache.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/entities/class-use/Activity.ActivityObject.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/entities/class-use/Activity.ActivityObject.html b/sdks/android/doc/org/usergrid/android/client/entities/class-use/Activity.ActivityObject.html
index 3015866..376797e 100644
--- a/sdks/android/doc/org/usergrid/android/client/entities/class-use/Activity.ActivityObject.html
+++ b/sdks/android/doc/org/usergrid/android/client/entities/class-use/Activity.ActivityObject.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Class org.usergrid.android.client.entities.Activity.ActivityObject
+Uses of Class org.apache.usergrid.android.client.entities.Activity.ActivityObject
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Class org.usergrid.android.client.entities.Activity.ActivityObject
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Class org.usergrid.android.client.entities.Activity.ActivityObject";
+        parent.document.title="Uses of Class org.apache.usergrid.android.client.entities.Activity.ActivityObject";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,26 +81,26 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Class<br>org.usergrid.android.client.entities.Activity.ActivityObject</B></H2>
+<B>Uses of Class<br>org.apache.usergrid.android.client.entities.Activity.ActivityObject</B></H2>
 </CENTER>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Packages that use <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A></FONT></TH>
+Packages that use <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client.entities"><B>org.usergrid.android.client.entities</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client.entities"><B>org.apache.usergrid.android.client.entities</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client.entities"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client.entities"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A> in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A></FONT></TH>
+Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A> in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -108,11 +108,11 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A> that return <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A> that return <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A></CODE></FONT></TD>
 <TD><CODE><B>Activity.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html#getActor()">getActor</A></B>()</CODE>
 
 <BR>
@@ -120,7 +120,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>[]</CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>[]</CODE></FONT></TD>
 <TD><CODE><B>Activity.ActivityObject.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html#getAttachments()">getAttachments</A></B>()</CODE>
 
 <BR>
@@ -128,7 +128,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A></CODE></FONT></TD>
 <TD><CODE><B>Activity.ActivityObject.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html#getAuthor()">getAuthor</A></B>()</CODE>
 
 <BR>
@@ -136,7 +136,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A></CODE></FONT></TD>
 <TD><CODE><B>Activity.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html#getGenerator()">getGenerator</A></B>()</CODE>
 
 <BR>
@@ -144,7 +144,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>[]</CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>[]</CODE></FONT></TD>
 <TD><CODE><B>Activity.ActivityCollection.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityCollection.html#getItems()">getItems</A></B>()</CODE>
 
 <BR>
@@ -152,7 +152,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A></CODE></FONT></TD>
 <TD><CODE><B>Activity.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html#getObject()">getObject</A></B>()</CODE>
 
 <BR>
@@ -164,12 +164,12 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Activity.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html#setActor(org.usergrid.android.client.entities.Activity.ActivityObject)">setActor</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>&nbsp;actor)</CODE>
+<TD><CODE><B>Activity.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html#setActor(org.apache.usergrid.android.client.entities.Activity.ActivityObject)">setActor</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>&nbsp;actor)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -177,7 +177,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Activity.ActivityObject.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html#setAttachments(org.usergrid.android.client.entities.Activity.ActivityObject[])">setAttachments</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>[]&nbsp;attachments)</CODE>
+<TD><CODE><B>Activity.ActivityObject.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html#setAttachments(org.apache.usergrid.android.client.entities.Activity.ActivityObject[])">setAttachments</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>[]&nbsp;attachments)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -185,7 +185,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Activity.ActivityObject.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html#setAuthor(org.usergrid.android.client.entities.Activity.ActivityObject)">setAuthor</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>&nbsp;author)</CODE>
+<TD><CODE><B>Activity.ActivityObject.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html#setAuthor(org.apache.usergrid.android.client.entities.Activity.ActivityObject)">setAuthor</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>&nbsp;author)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -193,7 +193,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Activity.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html#setGenerator(org.usergrid.android.client.entities.Activity.ActivityObject)">setGenerator</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>&nbsp;generator)</CODE>
+<TD><CODE><B>Activity.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html#setGenerator(org.apache.usergrid.android.client.entities.Activity.ActivityObject)">setGenerator</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>&nbsp;generator)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -201,7 +201,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Activity.ActivityCollection.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityCollection.html#setItems(org.usergrid.android.client.entities.Activity.ActivityObject[])">setItems</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>[]&nbsp;items)</CODE>
+<TD><CODE><B>Activity.ActivityCollection.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityCollection.html#setItems(org.apache.usergrid.android.client.entities.Activity.ActivityObject[])">setItems</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>[]&nbsp;items)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -209,7 +209,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Activity.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html#setObject(org.usergrid.android.client.entities.Activity.ActivityObject)">setObject</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>&nbsp;object)</CODE>
+<TD><CODE><B>Activity.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html#setObject(org.apache.usergrid.android.client.entities.Activity.ActivityObject)">setObject</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>&nbsp;object)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -231,7 +231,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/entities/class-use/Activity.MediaLink.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/entities/class-use/Activity.MediaLink.html b/sdks/android/doc/org/usergrid/android/client/entities/class-use/Activity.MediaLink.html
index 6489937..921b2ec 100644
--- a/sdks/android/doc/org/usergrid/android/client/entities/class-use/Activity.MediaLink.html
+++ b/sdks/android/doc/org/usergrid/android/client/entities/class-use/Activity.MediaLink.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Class org.usergrid.android.client.entities.Activity.MediaLink
+Uses of Class org.apache.usergrid.android.client.entities.Activity.MediaLink
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Class org.usergrid.android.client.entities.Activity.MediaLink
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Class org.usergrid.android.client.entities.Activity.MediaLink";
+        parent.document.title="Uses of Class org.apache.usergrid.android.client.entities.Activity.MediaLink";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,26 +81,26 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Class<br>org.usergrid.android.client.entities.Activity.MediaLink</B></H2>
+<B>Uses of Class<br>org.apache.usergrid.android.client.entities.Activity.MediaLink</B></H2>
 </CENTER>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Packages that use <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A></FONT></TH>
+Packages that use <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client.entities"><B>org.usergrid.android.client.entities</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client.entities"><B>org.apache.usergrid.android.client.entities</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client.entities"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client.entities"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A> in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A></FONT></TH>
+Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A> in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -108,11 +108,11 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A> that return <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A> that return <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A></CODE></FONT></TD>
 <TD><CODE><B>Activity.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html#getIcon()">getIcon</A></B>()</CODE>
 
 <BR>
@@ -120,7 +120,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A></CODE></FONT></TD>
 <TD><CODE><B>Activity.ActivityObject.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html#getImage()">getImage</A></B>()</CODE>
 
 <BR>
@@ -132,12 +132,12 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Activity.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html#setIcon(org.usergrid.android.client.entities.Activity.MediaLink)">setIcon</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A>&nbsp;icon)</CODE>
+<TD><CODE><B>Activity.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html#setIcon(org.apache.usergrid.android.client.entities.Activity.MediaLink)">setIcon</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A>&nbsp;icon)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -145,7 +145,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Activity.ActivityObject.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html#setImage(org.usergrid.android.client.entities.Activity.MediaLink)">setImage</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A>&nbsp;image)</CODE>
+<TD><CODE><B>Activity.ActivityObject.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html#setImage(org.apache.usergrid.android.client.entities.Activity.MediaLink)">setImage</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A>&nbsp;image)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -167,7 +167,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>


[42/96] [abbrv] [partial] Change package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/EntityFactory.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/EntityFactory.java b/stack/core/src/main/java/org/apache/usergrid/persistence/EntityFactory.java
new file mode 100644
index 0000000..f633afc
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/EntityFactory.java
@@ -0,0 +1,131 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence;
+
+
+import java.util.UUID;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/** A factory for creating Entity objects. */
+public class EntityFactory {
+
+    /** The Constant logger. */
+    private static final Logger logger = LoggerFactory.getLogger( EntityFactory.class );
+
+
+    /**
+     * New entity.
+     *
+     * @param <A> the generic type
+     * @param id the id
+     * @param type the type
+     * @param entityClass the entity class
+     *
+     * @return new entity
+     */
+    public static <A extends Entity> A newEntity( UUID id, String type, Class<A> entityClass ) {
+        if ( type == null ) {
+            String errorMsg = "Entity type cannot be null";
+            logger.error( errorMsg );
+            throw new IllegalArgumentException( errorMsg );
+        }
+        if ( "entity".equalsIgnoreCase( type ) || "dynamicentity".equalsIgnoreCase( type ) ) {
+            String errorMsg = "Unable to instantiate entity (" + type + ") because that is not a valid type.";
+            logger.error( errorMsg );
+            throw new IllegalArgumentException( errorMsg );
+        }
+        Class<? extends Entity> expectedCls = Schema.getDefaultSchema().getEntityClass( type );
+
+        if ( entityClass == null ) {
+            if ( expectedCls != null ) {
+                entityClass = ( Class<A> ) expectedCls;
+            }
+            else {
+                entityClass = ( Class<A> ) DynamicEntity.class;
+            }
+        }
+
+        if ( ( expectedCls != null ) && !Entity.class.isAssignableFrom( entityClass ) && !expectedCls
+                .isAssignableFrom( entityClass ) ) {
+            String errorMsg = "Unable to instantiate entity (" + type
+                    + ") because type and entityClass do not match, either use DynamicClass as entityClass or fix " +
+                    "mismatch.";
+            logger.error( errorMsg );
+            throw new IllegalArgumentException( errorMsg );
+        }
+        else {
+            try {
+                A entity = entityClass.newInstance();
+                entity.setUuid( id );
+                entity.setType( type );
+                return entity;
+            }
+            catch ( IllegalAccessException e ) {
+                String errorMsg = "Unable to access entity (" + type + "): " + e.getMessage();
+                logger.error( errorMsg );
+            }
+            catch ( InstantiationException e ) {
+                String errorMsg = "Unable to instantiate entity (" + type + "): " + e.getMessage();
+                logger.error( errorMsg );
+            }
+        }
+
+        return null;
+    }
+
+
+    /**
+     * New entity.
+     *
+     * @param <A> the generic type
+     * @param id the id
+     * @param entityClass the entity class
+     *
+     * @return new entity
+     */
+    public static <A extends Entity> A newEntity( UUID id, Class<A> entityClass ) {
+
+        if ( entityClass == DynamicEntity.class ) {
+            return null;
+        }
+
+        String type = Schema.getDefaultSchema().getEntityType( entityClass );
+
+        return newEntity( id, type, entityClass );
+    }
+
+
+    /**
+     * New entity.
+     *
+     * @param id the id
+     * @param type the type
+     *
+     * @return new entity
+     */
+    public static Entity newEntity( UUID id, String type ) {
+
+        Class<? extends Entity> entityClass = Schema.getDefaultSchema().getEntityClass( type );
+        if ( entityClass == null ) {
+            entityClass = DynamicEntity.class;
+        }
+
+        return newEntity( id, type, entityClass );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/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
new file mode 100644
index 0000000..fac6071
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/EntityManager.java
@@ -0,0 +1,605 @@
+package org.apache.usergrid.persistence;
+
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
+
+import org.apache.usergrid.persistence.Results.Level;
+import org.apache.usergrid.persistence.cassandra.GeoIndexManager;
+import org.apache.usergrid.persistence.entities.Application;
+import org.apache.usergrid.persistence.entities.Role;
+
+
+/**
+ * The interface class for the data access object for Applications. Each application contains a set of users as well as
+ * a hierarchy of groups. A application also includes a set of message inboxes and a set of assets.
+ */
+public interface EntityManager {
+
+    public void setApplicationId( UUID applicationId );
+
+    public GeoIndexManager getGeoIndexManager();
+
+    public EntityRef getApplicationRef();
+
+    public Application getApplication() throws Exception;
+
+    public void updateApplication( Application app ) throws Exception;
+
+    public void updateApplication( Map<String, Object> properties ) throws Exception;
+
+    public RelationManager getRelationManager( EntityRef entityRef );
+
+    /** Get all collections for the application. Includes both user defined collections and schema collections */
+    public Set<String> getApplicationCollections() throws Exception;
+
+    public Map<String, Object> getApplicationCollectionMetadata() throws Exception;
+
+    public long getApplicationCollectionSize( String collectionName ) throws Exception;
+
+    /**
+     * Creates an entity of the specified type attached to the specified application.
+     *
+     * @param type the type of the entity to create.
+     * @param properties property values to create in the new entity or null.
+     *
+     * @return the newly created entity object.
+     */
+    public Entity create( String entityType, Map<String, Object> properties ) throws Exception;
+
+    public <A extends Entity> A create( String entityType, Class<A> entityClass, Map<String, Object> properties )
+            throws Exception;
+
+    public <A extends TypedEntity> A create( A entity ) throws Exception;
+
+    /**
+     * Creates an entity of the specified type attached to the specified application.
+     *
+     * @param importId the UUID to assign to the imported entity
+     * @param type the type of the entity to create.
+     * @param properties property values to create in the new entity or null.
+     *
+     * @return the newly created entity object.
+     *
+     * @throws Exception the exception
+     */
+    public Entity create( UUID importId, String entityType, Map<String, Object> properties ) throws Exception;
+
+    public void createApplicationCollection( String entityType ) throws Exception;
+
+    public EntityRef getAlias( String aliasType, String alias ) throws Exception;
+
+    /**
+     * Get the entity ref from the value
+     *
+     * @param ownerId The owner Id of the collection
+     * @param collectionName The name of the collection
+     * @param aliasValue The value of the alias
+     */
+    public EntityRef getAlias( UUID ownerId, String collectionName, String aliasValue ) throws Exception;
+
+    public Map<String, EntityRef> getAlias( String aliasType, List<String> aliases ) throws Exception;
+
+    /**
+     * Get aliases from the index with the given value
+     *
+     * @param ownerId The id of the collection owner
+     * @param collectionName The name of the collection
+     * @param aliases The alias property
+     */
+    public Map<String, EntityRef> getAlias( UUID ownerId, String collectionName, List<String> aliases )
+            throws Exception;
+
+    /**
+     * Validates that the entity exists in the datastore meaning that it exists and the type has been loaded if not
+     * already provided.
+     *
+     * @return an validated EntityRef or null.
+     */
+    public EntityRef validate( EntityRef entityRef ) throws Exception;
+
+    public String getType( UUID entityId ) throws Exception;
+
+    public EntityRef getRef( UUID entityId ) throws Exception;
+
+    public Entity get( UUID entityId ) throws Exception;
+
+    /**
+     * Retrieves the entity for the specified entity reference.
+     *
+     * @param entity an Entity reference
+     *
+     * @return an Entity object for the specified entity reference.
+     */
+    public Entity get( EntityRef entityRef ) throws Exception;
+
+    public <A extends Entity> A get( UUID entityId, Class<A> entityClass ) throws Exception;
+
+    /**
+     * Retrieves a set of Entities. Will return an Entity object containing all of the entity's name/value properties
+     * and properties. For large numbers of entities, retrieving the properties can have additional overhead, passing
+     * false for includeProperties can result in better performance.
+     * <p/>
+     * This method will be deprecated in future releases in favor of a version that supports paging.
+     *
+     * @param entityIds a list of entity UUIDs.
+     * @param includeProperties whether to retrieve properties for the specified entities.
+     *
+     * @return a list of entity objects.
+     */
+    public Results get( Collection<UUID> entityIds, Results.Level resultsLevel ) throws Exception;
+
+    /**
+     * Retrieves a set of Entities. Will return an Entity object containing all of the entity's name/value properties
+     * and properties. For large numbers of entities, retrieving the properties can have additional overhead, passing
+     * false for includeProperties can result in better performance.
+     * <p/>
+     * This method will be deprecated in future releases in favor of a version that supports paging.
+     *
+     * @param entityIds a list of entity UUIDs.
+     * @param includeProperties whether to retrieve properties for the specified entities.
+     *
+     * @return a list of entity objects.
+     */
+    public Results get( Collection<UUID> entityIds ) throws Exception;
+
+    /**
+     * Retrieves a set of Entitues cast to the specified class type.
+     *
+     * @return a list of entity objects.
+     */
+    public Results get( Collection<UUID> entityIds, Class<? extends Entity> entityClass, Results.Level resultsLevel )
+            throws Exception;
+
+    /**
+     * Retrieves a set of Entities cast to the specified class type.
+     *
+     * @return a list of entity objects.
+     */
+    public Results get( Collection<UUID> entityIds, String entityType, Class<? extends Entity> entityClass,
+                        Results.Level resultsLevel ) throws Exception;
+
+    /**
+     * Updates the entity with the properties and values in the Entity Object.
+     *
+     * @param entity an Entity object.
+     */
+    public void update( Entity entity ) throws Exception;
+
+    /**
+     * Gets the value for a named entity property. Entity properties must be defined in the schema
+     *
+     * @param entity an entity reference
+     * @param propertyName the property name to retrieve.
+     *
+     * @return the value of the named property or null.
+     *
+     * @throws Exception the exception
+     */
+    public Object getProperty( EntityRef entityRef, String propertyName ) throws Exception;
+
+    /**
+     * Do a single load of all entities with the given properties.  Efficient if you have a subset of properties, and
+     * know the ids of them.  The entity UUID is in the key, the runtime subtype of Entity is in the value.  Note that
+     * if an entity cannot be loaded (id doesn't exist) it is simply ignored
+     */
+    public List<Entity> getPartialEntities( Collection<UUID> ids, Collection<String> properties ) throws Exception;
+
+    /**
+     * Gets the properties for the specified entity property.
+     *
+     * @param entity an entity reference
+     *
+     * @return the property values.
+     *
+     * @throws Exception the exception
+     */
+    public Map<String, Object> getProperties( EntityRef entityRef ) throws Exception;
+
+    /**
+     * Sets the value for a named entity property. If the property is being index, the index is updated to remove the
+     * old value and add the new value.
+     *
+     * @param entity an entity reference
+     * @param propertyName the property to set.
+     * @param propertyValue new value for property.
+     *
+     * @throws Exception the exception
+     */
+    public void setProperty( EntityRef entityRef, String propertyName, Object propertyValue ) throws Exception;
+
+    /**
+     * You should only use this method if you are absolutely sure what you're doing. Use setProperty without the
+     * override param in most cases. With great power comes great responsibility....
+     *
+     * @param override set to true to force this value to persist. This will ignore all mutable attributes as well as
+     * validation. Use with care
+     */
+    void setProperty( EntityRef entityRef, String propertyName, Object propertyValue, boolean override )
+            throws Exception;
+
+    /**
+     * Updates the properties for the specified entity.
+     *
+     * @param entity an entity reference
+     * @param properties the properties
+     *
+     * @throws Exception the exception
+     */
+    public void updateProperties( EntityRef entityRef, Map<String, Object> properties ) throws Exception;
+
+    public void deleteProperty( EntityRef entityRef, String propertyName ) throws Exception;
+
+    /**
+     * Gets the values from an entity list property. Lists are a special type of entity property that can contain an
+     * unordered set of non-duplicate values.
+     *
+     * @param entity an entity reference
+     * @param dictionaryName the property list name to retrieve.
+     *
+     * @return the value of the named property or null.
+     *
+     * @throws Exception the exception
+     */
+    public Set<Object> getDictionaryAsSet( EntityRef entityRef, String dictionaryName ) throws Exception;
+
+    /**
+     * Adds the specified value to the named entity list property. Lists are a special type of entity property that can
+     * contain an unordered set of non-duplicate values.
+     *
+     * @param entity an entity reference
+     * @param dictionaryName the property to set.
+     * @param elementValue new value for property.
+     *
+     * @throws Exception the exception
+     */
+    public void addToDictionary( EntityRef entityRef, String dictionaryName, Object elementValue ) throws Exception;
+
+    public void addToDictionary( EntityRef entityRef, String dictionaryName, Object elementName, Object elementValue )
+            throws Exception;
+
+    public void addSetToDictionary( EntityRef entityRef, String dictionaryName, Set<?> elementValues ) throws Exception;
+
+    public void addMapToDictionary( EntityRef entityRef, String dictionaryName, Map<?, ?> elementValues )
+            throws Exception;
+
+    public Map<Object, Object> getDictionaryAsMap( EntityRef entityRef, String dictionaryName ) throws Exception;
+
+    public Object getDictionaryElementValue( EntityRef entityRef, String dictionaryName, String elementName )
+            throws Exception;
+
+    /**
+     * Removes the specified value to the named entity list property. Lists are a special type of entity property that
+     * can contain an unordered set of non-duplicate values.
+     *
+     * @param entity an entity reference
+     * @param dictionaryName the property to set.
+     * @param elementValue new value for property.
+     *
+     * @throws Exception the exception
+     */
+    public void removeFromDictionary( EntityRef entityRef, String dictionaryName, Object elementValue )
+            throws Exception;
+
+    public Set<String> getDictionaries( EntityRef entity ) throws Exception;
+
+    /**
+     * Deletes the specified entity.
+     *
+     * @param entity an entity reference
+     *
+     * @throws Exception the exception
+     */
+    public void delete( EntityRef entityRef ) throws Exception;
+
+    /**
+     * Gets the entities and collections that the specified entity is a member of.
+     *
+     * @param entity an entity reference
+     *
+     * @return a map of entity references to set of collection names for the entities and collections that this entity
+     *         is a member of.
+     *
+     * @throws Exception the exception
+     */
+    public Map<String, Map<UUID, Set<String>>> getOwners( EntityRef entityRef ) throws Exception;
+
+    /**
+     * Return true if the owner entity ref is an owner of the entity;
+     *
+     * @param owner The owner of the collection
+     * @param collectionName The collection name
+     * @param entity The entity in the collection
+     */
+    public boolean isCollectionMember( EntityRef owner, String collectionName, EntityRef entity ) throws Exception;
+
+    /**
+     * Return true if the owner entity ref is an owner of the entity;
+     *
+     * @param owner The owner of the collection
+     * @param collectionName The collection name
+     * @param entity The entity in the collection
+     */
+    public boolean isConnectionMember( EntityRef owner, String connectionName, EntityRef entity ) throws Exception;
+
+
+    /**
+     * Gets the collections for the specified entity. Collection for a given type are encoded in the schema, this method
+     * loads the entity type and returns the collections from the schema.
+     *
+     * @param entity an entity reference
+     *
+     * @return the collections for the entity type of the given entity.
+     *
+     * @throws Exception the exception
+     */
+    public Set<String> getCollections( EntityRef entityRef ) throws Exception;
+
+    /**
+     * Gets a list of entities in the specified collection belonging to the specified entity.
+     *
+     * @param entity an entity reference
+     * @param collectionName the collection name.
+     * @param startResult the start result
+     * @param count the count
+     *
+     * @return a list of entities in the specified collection.
+     *
+     * @throws Exception the exception
+     */
+    public Results getCollection( EntityRef entityRef, String collectionName, UUID startResult, int count,
+                                  Results.Level resultsLevel, boolean reversed ) throws Exception;
+
+
+    public Results getCollection( UUID entityId, String collectionName, Query query, Results.Level resultsLevel )
+            throws Exception;
+
+    /**
+     * Adds an entity to the specified collection belonging to the specified entity entity.
+     *
+     * @param entity an entity reference
+     * @param collectionName the collection name.
+     * @param item an entity to be added to the collection.
+     *
+     * @throws Exception the exception
+     */
+    public Entity addToCollection( EntityRef entityRef, String collectionName, EntityRef itemRef ) throws Exception;
+
+    public Entity addToCollections( List<EntityRef> ownerEntities, String collectionName, EntityRef itemRef )
+            throws Exception;
+
+    /**
+     * Create the item in a sub collection
+     *
+     * @param entityRef The owning entity
+     * @param collectionName The name of the collection
+     * @param itemType The type of the item
+     * @param properties The properties for the item
+     */
+    public Entity createItemInCollection( EntityRef entityRef, String collectionName, String itemType,
+                                          Map<String, Object> properties ) throws Exception;
+
+    /**
+     * Removes an entity to the specified collection belonging to the specified entity.
+     *
+     * @param entity an entity reference
+     * @param collectionName the collection name.
+     * @param item a entity to be removed from the collection.
+     *
+     * @throws Exception the exception
+     */
+    public void removeFromCollection( EntityRef entityRef, String collectionName, EntityRef itemRef ) throws Exception;
+
+    public Results searchCollection( EntityRef entityRef, String collectionName, Query query ) throws Exception;
+
+    public Set<String> getCollectionIndexes( EntityRef entity, String collectionName ) throws Exception;
+
+    public void copyRelationships( EntityRef srcEntityRef, String srcRelationName, EntityRef dstEntityRef,
+                                   String dstRelationName ) throws Exception;
+
+    /**
+     * Connect the specified entity to another entity with the specified connection type. Connections are directional
+     * relationships that can be traversed in either direction.
+     *
+     * @param entity an entity reference
+     * @param connectionType type of connection to make.
+     * @param connectedEntity the entity to connect.
+     *
+     * @throws Exception the exception
+     */
+    public ConnectionRef createConnection( ConnectionRef connection ) throws Exception;
+
+    public ConnectionRef createConnection( EntityRef connectingEntity, String connectionType,
+                                           EntityRef connectedEntityRef ) throws Exception;
+
+    public ConnectionRef createConnection( EntityRef connectingEntity, String pairedConnectionType,
+                                           EntityRef pairedEntity, String connectionType, EntityRef connectedEntityRef )
+            throws Exception;
+
+    public ConnectionRef createConnection( EntityRef connectingEntity, ConnectedEntityRef... connections )
+            throws Exception;
+
+    public ConnectionRef connectionRef( EntityRef connectingEntity, String connectionType,
+                                        EntityRef connectedEntityRef ) throws Exception;
+
+    public ConnectionRef connectionRef( EntityRef connectingEntity, String pairedConnectionType, EntityRef pairedEntity,
+                                        String connectionType, EntityRef connectedEntityRef ) throws Exception;
+
+    public ConnectionRef connectionRef( EntityRef connectingEntity, ConnectedEntityRef... connections );
+
+    /**
+     * Disconnects two connected entities with the specified connection type. Connections are directional relationships
+     * that can be traversed in either direction.
+     *
+     * @param entity an entity reference
+     * @param connectionType type of connection to make.
+     * @param connectedEntity the entity to connect
+     *
+     * @throws Exception the exception
+     */
+
+    public void deleteConnection( ConnectionRef connectionRef ) throws Exception;
+
+    public Set<String> getConnectionTypes( EntityRef ref ) throws Exception;
+
+
+    /**
+     * Gets the entities of the specified type connected to the specified entity, optionally matching the specified
+     * connection types and/or entity types. Returns a list of entity ids.
+     *
+     * @param entity an entity reference
+     * @param connectionType type of connection or null.
+     * @param connectedEntityType type of entity or null.
+     *
+     * @return a list of connected entity ids.
+     *
+     * @throws Exception the exception
+     */
+    public Results getConnectedEntities( UUID entityId, String connectionType, String connectedEntityType,
+                                         Results.Level resultsLevel ) throws Exception;
+
+    /**
+     * Gets the entities connecting to this entity, optionally with the specified connection type and/or entity type.
+     * <p/>
+     * e.g. "get users who have favorited this place"
+     *
+     * @param entity an entity reference
+     * @param connectionType type of connection or null.
+     * @param connectingEntityType type of entity or null.
+     *
+     * @return a list of entities connecting to this one.
+     *
+     * @throws Exception the exception
+     */
+    public Results getConnectingEntities( UUID entityId, String connectionType, String connectedEntityType,
+                                          Results.Level resultsLevel ) throws Exception;
+
+
+    public Results getConnectingEntities(UUID uuid, String connectionType,
+    		String entityType, Level level, int count) throws Exception;
+
+	public Results searchConnectedEntities( EntityRef connectingEntity, Query query ) throws Exception;
+
+
+    // Application roles
+
+    public Set<String> getConnectionIndexes( EntityRef entity, String connectionType ) throws Exception;
+
+    public Map<String, String> getRoles() throws Exception;
+
+    public void resetRoles() throws Exception;
+
+    /**
+     * Create the role with the title and inactivity
+     *
+     * @param roleName The name of the role
+     * @param roleTitle The human readable title
+     * @param inactivity The amount of inactivity time to have the role expire. 0 is infinity, I.E no expiration
+     */
+    public Entity createRole( String roleName, String roleTitle, long inactivity ) throws Exception;
+
+    public void grantRolePermission( String roleName, String permission ) throws Exception;
+
+    public void grantRolePermissions( String roleName, Collection<String> permissions ) throws Exception;
+
+    public void revokeRolePermission( String roleName, String permission ) throws Exception;
+
+    public Set<String> getRolePermissions( String roleName ) throws Exception;
+
+    public void deleteRole( String roleName ) throws Exception;
+
+    // Group roles
+
+    public Map<String, String> getGroupRoles( UUID groupId ) throws Exception;
+
+    /** Create a group role with the group id, roleName, and inactivity */
+    public Entity createGroupRole( UUID groupId, String roleName, long inactivity ) throws Exception;
+
+    public void grantGroupRolePermission( UUID groupId, String roleName, String permission ) throws Exception;
+
+    public void revokeGroupRolePermission( UUID groupId, String roleName, String permission ) throws Exception;
+
+    public Set<String> getGroupRolePermissions( UUID groupId, String roleName ) throws Exception;
+
+    public void deleteGroupRole( UUID groupId, String roleName ) throws Exception;
+
+    // User role membership
+
+    public Set<String> getUserRoles( UUID userId ) throws Exception;
+
+    public void addUserToRole( UUID userId, String roleName ) throws Exception;
+
+    public void removeUserFromRole( UUID userId, String roleName ) throws Exception;
+
+    // User permissions
+
+    public Set<String> getUserPermissions( UUID userId ) throws Exception;
+
+    public void grantUserPermission( UUID userId, String permission ) throws Exception;
+
+    public void revokeUserPermission( UUID userId, String permission ) throws Exception;
+
+    // User role membership
+
+    public Map<String, String> getUserGroupRoles( UUID userId, UUID groupId ) throws Exception;
+
+    public void addUserToGroupRole( UUID userId, UUID groupId, String roleName ) throws Exception;
+
+    public void removeUserFromGroupRole( UUID userId, UUID groupId, String roleName ) throws Exception;
+
+    public Results getUsersInGroupRole( UUID groupId, String roleName, Results.Level level ) throws Exception;
+
+    public void incrementAggregateCounters( UUID userId, UUID groupId, String category, String counterName,
+                                            long value );
+
+    public Results getAggregateCounters( UUID userId, UUID groupId, String category, String counterName,
+                                         CounterResolution resolution, long start, long finish, boolean pad );
+
+    public Results getAggregateCounters( UUID userId, UUID groupId, UUID queueId, String category, String counterName,
+                                         CounterResolution resolution, long start, long finish, boolean pad );
+
+    public Results getAggregateCounters( Query query ) throws Exception;
+
+    public EntityRef getUserByIdentifier( Identifier identifier ) throws Exception;
+
+    public EntityRef getGroupByIdentifier( Identifier identifier ) throws Exception;
+
+    public Set<String> getCounterNames() throws Exception;
+
+    public Map<String, Long> getEntityCounters( UUID entityId ) throws Exception;
+
+    public Map<String, Long> getApplicationCounters() throws Exception;
+
+    public void incrementAggregateCounters( UUID userId, UUID groupId, String category, Map<String, Long> counters );
+
+    public boolean isPropertyValueUniqueForEntity( String entityType, String propertyName, Object propertyValue )
+            throws Exception;
+
+    public <A extends Entity> A get( EntityRef entityRef, Class<A> entityClass ) throws Exception;
+
+    public Map<String, Role> getRolesWithTitles( Set<String> roleNames ) throws Exception;
+
+    public String getRoleTitle( String roleName ) throws Exception;
+
+    public Map<String, Role> getUserRolesWithTitles( UUID userId ) throws Exception;
+
+
+    // Group role membership
+
+    public Map<String, Role> getGroupRolesWithTitles( UUID userId ) throws Exception;
+
+    public void addGroupToRole( UUID userId, String roleName ) throws Exception;
+
+    public void removeGroupFromRole( UUID userId, String roleName ) throws Exception;
+
+    // Group permissions
+
+    public Set<String> getGroupPermissions( UUID groupId ) throws Exception;
+
+    public void grantGroupPermission( UUID groupId, String permission ) throws Exception;
+
+    public void revokeGroupPermission( UUID groupId, String permission ) throws Exception;
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/EntityManagerFactory.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/EntityManagerFactory.java b/stack/core/src/main/java/org/apache/usergrid/persistence/EntityManagerFactory.java
new file mode 100644
index 0000000..fad80d9
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/EntityManagerFactory.java
@@ -0,0 +1,108 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence;
+
+
+import java.util.Map;
+import java.util.UUID;
+
+
+// TODO: Auto-generated Javadoc
+
+
+/**
+ * The interface class that specifies the operations that can be performed on the Usergrid Datastore. This interface is
+ * designed to be implemented by different backends. Although these operations are meant to take advantage of the
+ * capabilities of Cassandra, they should be implementable using other relational databases such as MySql or NoSQL
+ * databases such as GAE or MongoDB.
+ */
+public interface EntityManagerFactory {
+
+    /**
+     * A string description provided by the implementing class.
+     *
+     * @return description text
+     *
+     * @throws Exception the exception
+     */
+    public abstract String getImpementationDescription() throws Exception;
+
+    /**
+     * Gets the entity manager.
+     *
+     * @param applicationId the application id
+     *
+     * @return EntityDao for the specfied parameters
+     */
+    public abstract EntityManager getEntityManager( UUID applicationId );
+
+    /**
+     * Creates a new application.
+     *
+     * @param name a unique application name.
+     *
+     * @return the newly created application id.
+     *
+     * @throws Exception the exception
+     */
+    public abstract UUID createApplication( String organizationName, String name ) throws Exception;
+
+    /**
+     * Creates a Application entity. All entities except for applications must be attached to a Application.
+     *
+     * @param name the name of the application to create.
+     * @param properties property values to create in the new entity or null.
+     *
+     * @return the newly created application id.
+     *
+     * @throws Exception the exception
+     */
+    public abstract UUID createApplication( String organizationName, String name, Map<String, Object> properties )
+            throws Exception;
+
+    public abstract UUID importApplication( String organization, UUID applicationId, String name,
+                                            Map<String, Object> properties ) throws Exception;
+
+    /**
+     * Returns the application id for the application name.
+     *
+     * @param name a unique application name.
+     *
+     * @return the Application id or null.
+     *
+     * @throws Exception the exception
+     */
+    public abstract UUID lookupApplication( String name ) throws Exception;
+
+    /**
+     * Returns all the applications in the system.
+     *
+     * @return all the applications.
+     *
+     * @throws Exception the exception
+     */
+    public abstract Map<String, UUID> getApplications() throws Exception;
+
+    public abstract void setup() throws Exception;
+
+    public abstract Map<String, String> getServiceProperties();
+
+    public abstract boolean updateServiceProperties( Map<String, String> properties );
+
+    public abstract boolean setServiceProperty( String name, String value );
+
+    public abstract boolean deleteServiceProperty( String name );
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/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
new file mode 100644
index 0000000..f6609c7
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/EntityPropertyComparator.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.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/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/EntityRef.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/EntityRef.java b/stack/core/src/main/java/org/apache/usergrid/persistence/EntityRef.java
new file mode 100644
index 0000000..089f1a4
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/EntityRef.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence;
+
+
+import java.util.UUID;
+
+
+public interface EntityRef {
+
+    /**
+     * Gets the id.
+     *
+     * @return the id
+     */
+    public UUID getUuid();
+
+    /**
+     * Gets the type.
+     *
+     * @return the type
+     */
+    public String getType();
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/EntityUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/EntityUtils.java b/stack/core/src/main/java/org/apache/usergrid/persistence/EntityUtils.java
new file mode 100644
index 0000000..8b1b5d3
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/EntityUtils.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence;
+
+
+import java.util.Map;
+import java.util.TreeMap;
+
+
+public class EntityUtils {
+
+    public static Map<String, Object> getSchemaProperties( String entityType, Map<String, Object> properties ) {
+
+        Map<String, Object> sys_props = new TreeMap<String, Object>( String.CASE_INSENSITIVE_ORDER );
+
+        for ( String propName : properties.keySet() ) {
+            if ( Schema.getDefaultSchema().hasProperty( entityType, propName ) ) {
+                Object propValue = properties.get( propName );
+                sys_props.put( propName, propValue );
+            }
+        }
+
+        return sys_props;
+    }
+
+
+    public static Map<String, Object> getDynamicProperties( String entityType, Map<String, Object> properties ) {
+
+        Map<String, Object> sys_props = new TreeMap<String, Object>( String.CASE_INSENSITIVE_ORDER );
+
+        for ( String propName : properties.keySet() ) {
+            if ( !Schema.getDefaultSchema().hasProperty( entityType, propName ) ) {
+                Object propValue = properties.get( propName );
+                sys_props.put( propName, propValue );
+            }
+        }
+
+        return sys_props;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/Identifier.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/Identifier.java b/stack/core/src/main/java/org/apache/usergrid/persistence/Identifier.java
new file mode 100644
index 0000000..00f24ee
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/Identifier.java
@@ -0,0 +1,226 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence;
+
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.UUID;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.apache.usergrid.utils.UUIDUtils;
+import org.codehaus.jackson.annotate.JsonIgnore;
+
+
+public class Identifier implements Serializable {
+
+    public enum Type {
+        UUID, NAME, EMAIL
+    }
+
+
+    Type type;
+    Object value;
+
+    static Pattern emailRegEx = Pattern.compile( "[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,4}" );
+    static Pattern nameRegEx = Pattern.compile( "[a-zA-Z0-9_\\-./]*" );
+
+
+    private Identifier( Type type, Object value ) {
+        this.type = type;
+        this.value = value;
+    }
+
+
+    public static Identifier from( Object obj ) {
+        if ( obj == null ) {
+            return null;
+        }
+        if ( obj instanceof UUID ) {
+            return new Identifier( Type.UUID, obj );
+        }
+        if ( obj instanceof String ) {
+            UUID uuid = UUIDUtils.tryGetUUID( ( String ) obj );
+            if ( uuid != null ) {
+                return new Identifier( Type.UUID, uuid );
+            }
+            Matcher m = emailRegEx.matcher( ( String ) obj );
+            if ( m.matches() ) {
+                return new Identifier( Type.EMAIL, ( ( String ) obj ).toLowerCase() );
+            }
+            m = nameRegEx.matcher( ( String ) obj );
+            if ( m.matches() ) {
+                return new Identifier( Type.NAME, ( ( String ) obj ).toLowerCase() );
+            }
+        }
+        return null;
+    }
+
+
+    public static Identifier fromUUID( UUID uuid ) {
+        if ( uuid == null ) {
+            return null;
+        }
+        return new Identifier( Type.UUID, uuid );
+    }
+
+
+    public static Identifier fromName( String name ) {
+        if ( name == null ) {
+            return null;
+        }
+        return new Identifier( Type.NAME, name );
+    }
+
+
+    public static Identifier fromEmail( String email ) {
+        if ( email == null ) {
+            return null;
+        }
+        return new Identifier( Type.EMAIL, email );
+    }
+
+
+    @JsonIgnore
+    public UUID getUUID() {
+        if ( type != Type.UUID ) {
+            return null;
+        }
+        return ( UUID ) value;
+    }
+
+
+    @JsonIgnore
+    public boolean isUUID() {
+        return type == Type.UUID;
+    }
+
+
+    @JsonIgnore
+    public String getEmail() {
+        if ( type != Type.EMAIL ) {
+            return null;
+        }
+        return ( String ) value;
+    }
+
+
+    @JsonIgnore
+    public boolean isEmail() {
+        return type == Type.EMAIL;
+    }
+
+
+    @JsonIgnore
+    public String getName() {
+        if ( type != Type.NAME ) {
+            return null;
+        }
+        return ( String ) value;
+    }
+
+
+    @JsonIgnore
+    public boolean isName() {
+        return type == Type.NAME;
+    }
+
+
+    public Type getType() {
+        return type;
+    }
+
+
+    @Override
+    public String toString() {
+        return value != null ? value.toString() : null;
+    }
+
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ( ( type == null ) ? 0 : type.hashCode() );
+        result = prime * result + ( ( value == null ) ? 0 : value.hashCode() );
+        return result;
+    }
+
+
+    @Override
+    public boolean equals( Object obj ) {
+        if ( this == obj ) {
+            return true;
+        }
+        if ( obj == null ) {
+            return false;
+        }
+        if ( getClass() != obj.getClass() ) {
+            return false;
+        }
+        Identifier other = ( Identifier ) obj;
+        if ( type != other.type ) {
+            return false;
+        }
+        if ( value == null ) {
+            if ( other.value != null ) {
+                return false;
+            }
+        }
+        else if ( !value.equals( other.value ) ) {
+            return false;
+        }
+        return true;
+    }
+
+
+    public static List<Identifier> fromList( List<String> l ) {
+        List<Identifier> identifiers = null;
+        if ( ( l != null ) && ( l.size() > 0 ) ) {
+            for ( String s : l ) {
+                Identifier identifier = Identifier.from( s );
+                if ( identifier != null ) {
+                    if ( identifiers == null ) {
+                        identifiers = new ArrayList<Identifier>();
+                    }
+                    identifiers.add( identifier );
+                }
+            }
+        }
+        return identifiers;
+    }
+
+
+    // for serialization
+    public Identifier() { }
+
+
+    // for serialization
+    public Object getValue() {
+        return value;
+    }
+
+
+    // for serialization
+    public void setValue( Object value ) {
+        if ( isUUID() && value instanceof String ) {
+            value = UUID.fromString( ( String ) value );
+        }
+        this.value = value;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/IndexBucketLocator.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/IndexBucketLocator.java b/stack/core/src/main/java/org/apache/usergrid/persistence/IndexBucketLocator.java
new file mode 100644
index 0000000..47a2aad
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/IndexBucketLocator.java
@@ -0,0 +1,75 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence;
+
+
+import java.util.List;
+import java.util.UUID;
+
+
+/**
+ * Interface for locating different buckets for indexing entities. These buckets are not intended for user with time
+ * series indexing. Rather this a means of partitioning index puts across multiple rows
+ *
+ * @author tnine
+ */
+public interface IndexBucketLocator {
+
+    public enum IndexType {
+        COLLECTION( "collection" ), CONNECTION( "connection" ), GEO( "geo" ), UNIQUE( "unique" );
+
+        private final String type;
+
+
+        private IndexType( String type ) {
+            this.type = type;
+        }
+
+
+        public String getType() {
+            return type;
+        }
+
+    }
+
+    /**
+     * Return the bucket to use for indexing this entity
+     *
+     * @param applicationId The application id
+     * @param type The type of the index. This way indexing on the same property value for different types of indexes
+     * does not cause collisions on partitioning and lookups
+     * @param entityId The entity id to be indexed
+     * @param components The strings and uniquely identify the path to this index. I.E entityType and propName,
+     * collection name etc This string must remain the same for all reads and writes
+     *
+     * @return A bucket to use.  Note that ALL properties for the given entity should be in the same bucket.  This
+     *         allows us to shard and execute queries in parallel.  Generally speaking, sharding on entityId is the best
+     *         strategy, since this is an immutable value
+     */
+    public String getBucket( UUID applicationId, IndexType type, UUID entityId, String... components );
+
+    /**
+     * Get all buckets that exist for this application with the given entity type, and property name
+     *
+     * @param applicationId The application id
+     * @param type The type of index
+     * @param components The strings and uniquely identify the path to this index. I.E entityType and propName,
+     * collection name etc
+     *
+     * @return All buckets for this application at the given component path
+     */
+    public List<String> getBuckets( UUID applicationId, IndexType type, String... components );
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/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
new file mode 100644
index 0000000..8d714f6
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/MultiQueryIterator.java
@@ -0,0 +1,106 @@
+package org.apache.usergrid.persistence;
+
+
+import java.util.Iterator;
+import java.util.UUID;
+
+
+/**
+ * For each in a set of source UUIDs, executes a sub-query and provides a unified iterator over the union of all
+ * results. Honors page sizes for the Query to ensure memory isn't blown out.
+ */
+public class MultiQueryIterator implements Iterator {
+
+    private EntityManager entityManager;
+    private Iterator<UUID> source;
+    private Query query;
+    private MutableEntityRef entityRef = new MutableEntityRef();
+    private Iterator currentIterator;
+
+
+    public MultiQueryIterator( Results results, Query query ) {
+        this( results.getQueryProcessor().getEntityManager(), new PagingResultsIterator( results, Results.Level.IDS ),
+                query );
+    }
+
+
+    public MultiQueryIterator( EntityManager entityManager, Iterator<UUID> source, Query query ) {
+        if ( query.getCollection() == null && query.getConnectionType() == null ) {
+            throw new IllegalArgumentException( "Query must have a collection or connectionType value" );
+        }
+        this.entityManager = entityManager;
+        this.source = source;
+        this.query = query;
+    }
+
+
+    @Override
+    public boolean hasNext() {
+        if ( source == null ) {
+            return false;
+        }
+        if ( currentIterator != null && currentIterator.hasNext() ) {
+            return true;
+        }
+        while ( source.hasNext() ) {
+            UUID uuid = source.next();
+            Results r = getResultsFor( uuid );
+            if ( r.size() > 0 ) {
+                currentIterator = new PagingResultsIterator( r, query.getResultsLevel() );
+                return currentIterator.hasNext();
+            }
+        }
+        currentIterator = null;
+        source = null;
+        return false;
+    }
+
+
+    @Override
+    public Object next() {
+        return ( currentIterator != null ) ? currentIterator.next() : null;
+    }
+
+
+    @Override
+    public void remove() {
+        throw new UnsupportedOperationException();
+    }
+
+
+    private Results getResultsFor( UUID uuid ) {
+        entityRef.setUUID( uuid );
+        try {
+            return ( query.getCollection() != null ) ?
+                   entityManager.searchCollection( entityRef, query.getCollection(), query ) :
+                   entityManager.searchConnectedEntities( entityRef, query );
+        }
+        catch ( Exception e ) {
+            throw new RuntimeException( e );
+        }
+    }
+
+
+    // just avoid some garbage collection
+    private static class MutableEntityRef implements EntityRef {
+
+        private UUID uuid;
+
+
+        public void setUUID( UUID uuid ) {
+            this.uuid = uuid;
+        }
+
+
+        @Override
+        public UUID getUuid() {
+            return uuid;
+        }
+
+
+        @Override
+        public String getType() {
+            return null;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/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
new file mode 100644
index 0000000..acaa13f
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/PagingResultsIterator.java
@@ -0,0 +1,109 @@
+package org.apache.usergrid.persistence;
+
+
+import java.util.Iterator;
+import java.util.List;
+
+
+/** iterates over a Results object, crossing page boundaries automatically */
+public class PagingResultsIterator implements Iterator, Iterable {
+
+    private Results results;
+    private Iterator currentPageIterator;
+    private Results.Level level;
+
+
+    public PagingResultsIterator( Results results ) {
+        this( results, results.level );
+    }
+
+
+    /**
+     * @param level overrides the default level from the Results - in case you want to return, say, UUIDs where the
+     * Query was set for Entities
+     */
+    public PagingResultsIterator( Results results, Results.Level level ) {
+        this.results = results;
+        this.level = level;
+        initCurrentPageIterator();
+    }
+
+
+    @Override
+    public boolean hasNext() {
+        if ( currentPageIterator != null ) {
+            if ( currentPageIterator.hasNext() ) {
+                return true;
+            }
+            else {
+                return loadNextPage();
+            }
+        }
+        return false;
+    }
+
+
+    /** @return the next object (type varies according the Results.Level) */
+    @Override
+    public Object next() {
+        return currentPageIterator.next();
+    }
+
+
+    /** not supported */
+    @Override
+    public void remove() {
+        throw new UnsupportedOperationException();
+    }
+
+
+    /**
+     * initialize the iterator for the current page of results.
+     *
+     * @return true if the iterator has more results
+     */
+    private boolean initCurrentPageIterator() {
+        List currentPage;
+        if ( results != null ) {
+            switch ( level ) {
+                case IDS:
+                    currentPage = results.getIds();
+                    break;
+                case REFS:
+                    currentPage = results.getRefs();
+                    break;
+                default:
+                    currentPage = results.getEntities();
+            }
+            if ( currentPage.size() > 0 ) {
+                currentPageIterator = currentPage.iterator();
+            }
+        }
+        else {
+            currentPageIterator = null;
+        }
+        return currentPageIterator != null && currentPageIterator.hasNext();
+    }
+
+
+    /**
+     * attempts to load the next page
+     *
+     * @return true if loaded there are more results
+     */
+    private boolean loadNextPage() {
+        try {
+            results = results.getNextPageResults();
+        }
+        catch ( Exception e ) {
+            throw new RuntimeException( e );
+        }
+        return initCurrentPageIterator();
+    }
+
+
+    @Override
+    public Iterator iterator() {
+        return this;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/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
new file mode 100644
index 0000000..a91aac4
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/PathQuery.java
@@ -0,0 +1,115 @@
+package org.apache.usergrid.persistence;
+
+
+import java.util.Iterator;
+import java.util.UUID;
+
+
+public class PathQuery<E> {
+
+    private PathQuery source;
+    private Query query;
+    private UUID head;
+
+
+    public PathQuery() {
+    }
+
+
+    /**
+     * top level
+     *
+     * @param head the top-level entity
+     */
+    public PathQuery( EntityRef head ) {
+        this.head = head.getUuid();
+        this.query = null;
+    }
+
+
+    /**
+     * top level
+     *
+     * @param head the top-level entity
+     * @param collectionName the query - must have a collection or connectType value set
+     */
+    public PathQuery( EntityRef head, Query query ) {
+        if ( query.getCollection() == null && query.getConnectionType() == null ) {
+            throw new IllegalArgumentException( "Query must have a collection or connectionType value" );
+        }
+        this.head = head.getUuid();
+        this.query = query;
+    }
+
+
+    /**
+     * chained
+     *
+     * @param source the source query we're chaining from
+     * @param collectionName the query - must have a collection or connectType value set
+     */
+    public PathQuery( PathQuery source, Query query ) {
+        if ( query.getCollection() == null && query.getConnectionType() == null ) {
+            throw new IllegalArgumentException( "Query must have a collection or connectionType value" );
+        }
+        this.source = source;
+        this.query = query;
+    }
+
+
+    public PathQuery chain( Query query ) {
+        return new PathQuery( this, query );
+    }
+
+
+    public Iterator<E> iterator( EntityManager em ) {
+        try {
+            if ( head != null ) {
+                return new PagingResultsIterator( getHeadResults( em ), query.getResultsLevel() );
+            }
+            else {
+                return new MultiQueryIterator( em, source.uuidIterator( em ), query );
+            }
+        }
+        catch ( Exception e ) {
+            throw new RuntimeException( e );
+        }
+    }
+
+
+    protected Results getHeadResults( EntityManager em ) throws Exception {
+        EntityRef ref = new SimpleEntityRef( head );
+        return ( query.getCollection() != null ) ? em.searchCollection( ref, query.getCollection(), query ) :
+               em.searchConnectedEntities( ref, query );
+    }
+
+
+    protected Iterator uuidIterator( EntityManager em ) throws Exception {
+        if ( head != null ) {
+            return new PagingResultsIterator( getHeadResults( em ), Results.Level.IDS );
+        }
+        else {
+            Query q = query;
+            if ( query.getResultsLevel() != Results.Level.IDS ) { // ensure IDs level
+                q = new Query( q );
+                q.setResultsLevel( Results.Level.IDS );
+            }
+            return new MultiQueryIterator( em, source.uuidIterator( em ), q );
+        }
+    }
+
+
+    public PathQuery getSource() {
+        return source;
+    }
+
+
+    public UUID getHead() {
+        return head;
+    }
+
+
+    public Query getQuery() {
+        return query;
+    }
+}


[43/96] [abbrv] [partial] Change package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/io/ConsumerTransaction.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/io/ConsumerTransaction.java b/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/io/ConsumerTransaction.java
new file mode 100644
index 0000000..5df1b79
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/io/ConsumerTransaction.java
@@ -0,0 +1,470 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.mq.cassandra.io;
+
+
+import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.UUID;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.usergrid.locking.Lock;
+import org.apache.usergrid.locking.LockManager;
+import org.apache.usergrid.locking.exception.UGLockException;
+import org.apache.usergrid.mq.Message;
+import org.apache.usergrid.mq.QueueQuery;
+import org.apache.usergrid.mq.QueueResults;
+import org.apache.usergrid.persistence.cassandra.CassandraService;
+import org.apache.usergrid.persistence.exceptions.QueueException;
+import org.apache.usergrid.persistence.exceptions.TransactionNotFoundException;
+import org.apache.usergrid.utils.UUIDUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import me.prettyprint.hector.api.Keyspace;
+import me.prettyprint.hector.api.beans.HColumn;
+import me.prettyprint.hector.api.mutation.Mutator;
+import me.prettyprint.hector.api.query.SliceQuery;
+import static me.prettyprint.hector.api.factory.HFactory.createColumn;
+import static me.prettyprint.hector.api.factory.HFactory.createMutator;
+import static me.prettyprint.hector.api.factory.HFactory.createSliceQuery;
+import static org.apache.usergrid.mq.cassandra.CassandraMQUtils.getConsumerId;
+import static org.apache.usergrid.mq.cassandra.CassandraMQUtils.getQueueClientTransactionKey;
+import static org.apache.usergrid.mq.cassandra.CassandraMQUtils.getQueueId;
+import static org.apache.usergrid.mq.cassandra.QueuesCF.CONSUMER_QUEUE_TIMEOUTS;
+
+
+/**
+ * Reads from the queue and starts a transaction
+ *
+ * @author tnine
+ */
+public class ConsumerTransaction extends NoTransactionSearch
+{
+
+    private static final Logger logger = LoggerFactory.getLogger( ConsumerTransaction.class );
+    private static final int MAX_READ = 10000;
+    private final LockManager lockManager;
+    private final UUID applicationId;
+    protected final CassandraService cass;
+
+    //timeout on reading lock
+    private final int lockTimeout;
+
+
+    /**
+     * @param ko
+     */
+    public ConsumerTransaction( UUID applicationId, Keyspace ko, LockManager lockManager, CassandraService cass, int lockTimeout )
+    {
+        super( ko );
+        this.applicationId = applicationId;
+        this.lockManager = lockManager;
+        this.cass = cass;
+        this.lockTimeout = lockTimeout;
+    }
+
+
+    /**
+     * Renew the existing transaction. Does so by deleting the exiting timeout, and replacing it with a new value
+     *
+     * @param queuePath The queue path
+     * @param transactionId The transaction id
+     * @param query The query params
+     *
+     * @return The new transaction uuid
+     */
+    public UUID renewTransaction( String queuePath, UUID transactionId, QueueQuery query )
+            throws TransactionNotFoundException
+    {
+        long now = System.currentTimeMillis();
+
+        if ( query == null )
+        {
+            query = new QueueQuery();
+        }
+
+        UUID queueId = getQueueId( queuePath );
+        UUID consumerId = getConsumerId( queueId, query );
+        ByteBuffer key = getQueueClientTransactionKey( queueId, consumerId );
+
+        // read the original transaction, if it's not there, then we can't possibly
+        // extend it
+        SliceQuery<ByteBuffer, UUID, UUID> q = createSliceQuery( ko, be, ue, ue );
+        q.setColumnFamily( CONSUMER_QUEUE_TIMEOUTS.getColumnFamily() );
+        q.setKey( key );
+        q.setColumnNames( transactionId );
+
+        HColumn<UUID, UUID> col = q.execute().get().getColumnByName( transactionId );
+
+        if ( col == null )
+        {
+            throw new TransactionNotFoundException(
+                    String.format( "No transaction with id %s exists", transactionId ) );
+        }
+
+        UUID origTrans = col.getName();
+        UUID messageId = col.getValue();
+
+        // Generate a new expiration and insert it
+        UUID expirationId = UUIDUtils.newTimeUUID( now + query.getTimeout() );
+
+        logger.debug( "Writing new timeout at '{}' for message '{}'", expirationId, messageId );
+
+        Mutator<ByteBuffer> mutator = createMutator( ko, be );
+
+        mutator.addInsertion( key, CONSUMER_QUEUE_TIMEOUTS.getColumnFamily(),
+                createColumn( expirationId, messageId, cass.createTimestamp(), ue, ue ) );
+
+        mutator.execute();
+
+        // now delete the old value
+        deleteTransaction( queueId, consumerId, origTrans );
+
+        return expirationId;
+    }
+
+
+    /** Delete the specified transaction */
+    public void deleteTransaction( String queuePath, UUID transactionId, QueueQuery query )
+    {
+
+        if ( query == null )
+        {
+            query = new QueueQuery();
+        }
+
+        UUID queueId = getQueueId( queuePath );
+        UUID consumerId = getConsumerId( queueId, query );
+
+        deleteTransaction( queueId, consumerId, transactionId );
+    }
+
+
+    /** Delete the specified transaction */
+    private void deleteTransaction( UUID queueId, UUID consumerId, UUID transactionId )
+    {
+
+        Mutator<ByteBuffer> mutator = createMutator( ko, be );
+        ByteBuffer key = getQueueClientTransactionKey( queueId, consumerId );
+
+        mutator.addDeletion( key, CONSUMER_QUEUE_TIMEOUTS.getColumnFamily(), transactionId, ue,
+                cass.createTimestamp() );
+
+        mutator.execute();
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.apache.usergrid.mq.cassandra.io.QueueSearch#getResults(java.lang.String,
+     * org.apache.usergrid.mq.QueueQuery)
+     */
+    @Override
+    public QueueResults getResults( String queuePath, QueueQuery query )
+    {
+
+        UUID queueId = getQueueId( queuePath );
+        UUID consumerId = getConsumerId( queueId, query );
+
+        if ( query.getLimit() > MAX_READ )
+        {
+            throw new IllegalArgumentException( String.format(
+                    "You specified a size of %d, you cannot specify a size larger than %d when using transations",
+                    query.getLimit( DEFAULT_READ ), MAX_READ ) );
+        }
+
+        QueueResults results = null;
+
+        Lock lock = lockManager.createLock( applicationId, queueId.toString(), consumerId.toString() );
+
+        try
+        {
+
+            //only try to get a lock with a timeout, if we can't bail
+            if(!lock.tryLock(lockTimeout, TimeUnit.SECONDS)){
+                throw new QueueException( "Unable to obtain a lock on queue '" + queuePath + "' after '" + lockTimeout + "'seconds" );
+            }
+
+            long startTime = System.currentTimeMillis();
+
+            UUID startTimeUUID = UUIDUtils.newTimeUUID( startTime, 0 );
+
+            QueueBounds bounds = getQueueBounds( queueId );
+
+            //queue has never been written to
+            if ( bounds == null )
+            {
+                return createResults( new ArrayList<Message>( 0 ), queuePath, queueId, consumerId );
+            }
+
+            // with transactional reads, we can't read into the future, set the bounds
+            // to be now
+            bounds = new QueueBounds( bounds.getOldest(), startTimeUUID );
+
+            SearchParam params = getParams( queueId, consumerId, query );
+
+            List<UUID> ids = getQueueRange( queueId, bounds, params );
+
+            // get a list of ids from the consumer.
+
+            List<TransactionPointer> pointers = getConsumerIds( queueId, consumerId, params, startTimeUUID );
+
+            TransactionPointer pointer = null;
+
+            int lastTransactionIndex = -1;
+
+            for ( int i = 0; i < pointers.size(); i++ )
+            {
+
+                pointer = pointers.get( i );
+
+                int insertIndex = Collections.binarySearch( ids, pointer.expiration );
+
+                // we're done, this message goes at the end, no point in continuing
+                // since
+                // we have our full result set
+                if ( insertIndex <= params.limit * -1 - 1 )
+                {
+                    break;
+                }
+
+                // get the insertion index into the set
+                insertIndex = ( insertIndex + 1 ) * -1;
+
+                ids.add( insertIndex, pointer.targetMessage );
+
+                lastTransactionIndex = i;
+            }
+
+            // now we've merge the results, trim them to size;
+            if ( ids.size() > params.limit )
+            {
+                ids = ids.subList( 0, params.limit );
+            }
+
+            // load the messages
+            List<Message> messages = loadMessages( ids, params.reversed );
+
+            // write our future timeouts for all these messages
+            writeTransactions( messages, query.getTimeout() + startTime, queueId, consumerId );
+
+            // remove all read transaction pointers
+            deleteTransactionPointers( pointers, lastTransactionIndex + 1, queueId, consumerId );
+
+            // return the results
+            results = createResults( messages, queuePath, queueId, consumerId );
+
+            UUID lastReadTransactionPointer =
+                    lastTransactionIndex == -1 ? null : pointers.get( lastTransactionIndex ).expiration;
+
+            UUID lastId = messages.size() == 0 ? null : messages.get( messages.size() - 1 ).getUuid();
+
+            // our last read id will either be the last read transaction pointer, or
+            // the
+            // last read messages uuid, whichever is greater
+            UUID lastReadId = UUIDUtils.max( lastReadTransactionPointer, lastId );
+
+            writeClientPointer( queueId, consumerId, lastReadId );
+        }
+        catch ( UGLockException e )
+        {
+            logger.debug( "Unable to acquire lock", e );
+            throw new QueueException( "Unable to acquire lock", e );
+        }
+        finally
+        {
+            try
+            {
+                lock.unlock();
+            }
+            catch ( UGLockException e )
+            {
+                logger.debug( "Unable to release lock", e );
+                throw new QueueException( "Unable to release lock", e );
+            }
+        }
+
+        return results;
+    }
+
+
+    /**
+     * Get all pending transactions that have timed out
+     *
+     * @param queueId The queue id
+     * @param consumerId The consumer id
+     * @param params The server params
+     * @param startTimeUUID The start time
+     */
+    protected List<TransactionPointer> getConsumerIds( UUID queueId, UUID consumerId, SearchParam params,
+                                                       UUID startTimeUUID )
+    {
+
+        SliceQuery<ByteBuffer, UUID, UUID> q = createSliceQuery( ko, be, ue, ue );
+        q.setColumnFamily( CONSUMER_QUEUE_TIMEOUTS.getColumnFamily() );
+        q.setKey( getQueueClientTransactionKey( queueId, consumerId ) );
+        q.setRange( params.startId, startTimeUUID, false, params.limit + 1 );
+
+        List<HColumn<UUID, UUID>> cassResults = q.execute().get().getColumns();
+
+        List<TransactionPointer> results = new ArrayList<TransactionPointer>( params.limit );
+
+        for ( HColumn<UUID, UUID> column : cassResults )
+        {
+
+            if ( logger.isDebugEnabled() )
+            {
+                logger.debug( "Adding uuid '{}' for original message '{}' to results for queue '{}' and consumer '{}'",
+                        new Object[] { column.getName(), column.getValue(), queueId, consumerId } );
+                logger.debug( "Max timeuuid : '{}', Current timeuuid : '{}', comparison '{}'", new Object[] {
+                        startTimeUUID, column.getName(), UUIDUtils.compare( startTimeUUID, column.getName() )
+                } );
+            }
+
+            results.add( new TransactionPointer( column.getName(), column.getValue() ) );
+        }
+
+        return results;
+    }
+
+
+    public boolean hasOutstandingTransactions( UUID queueId, UUID consumerId )
+    {
+        SliceQuery<ByteBuffer, UUID, UUID> q = createSliceQuery( ko, be, ue, ue );
+        q.setColumnFamily( CONSUMER_QUEUE_TIMEOUTS.getColumnFamily() );
+        q.setKey( getQueueClientTransactionKey( queueId, consumerId ) );
+        q.setRange( null, null, false, 1 );
+        return q.execute().get().getColumns().size() > 0;
+    }
+
+
+    /**
+     * Delete all re-read transaction pointers
+     *
+     * @param pointers The list of transaction pointers
+     * @param maxIndex The index to stop at (exclusive)
+     * @param queueId The queue id
+     * @param consumerId The consumer id
+     */
+    protected void deleteTransactionPointers( List<TransactionPointer> pointers, int maxIndex, UUID queueId,
+                                              UUID consumerId )
+    {
+
+        if ( maxIndex == 0 || pointers.size() == 0 )
+        {
+            return;
+        }
+
+        Mutator<ByteBuffer> mutator = createMutator( ko, be );
+        ByteBuffer key = getQueueClientTransactionKey( queueId, consumerId );
+
+        for ( int i = 0; i < maxIndex && i < pointers.size(); i++ )
+        {
+            UUID pointer = pointers.get( i ).expiration;
+
+            if ( logger.isDebugEnabled() )
+            {
+                logger.debug( "Removing transaction pointer '{}' for queue '{}' and consumer '{}'", new Object[] {
+                        pointer, queueId, consumerId
+                } );
+            }
+
+            mutator.addDeletion( key, CONSUMER_QUEUE_TIMEOUTS.getColumnFamily(), pointer, ue, cass.createTimestamp() );
+        }
+
+        mutator.execute();
+    }
+
+
+    /**
+     * Write the transaction timeouts
+     *
+     * @param messages The messages to load
+     * @param futureTimeout The time these message should expire
+     * @param queueId The queue UUId
+     * @param consumerId The consumer Id
+     */
+    protected void writeTransactions( List<Message> messages, final long futureTimeout, UUID queueId, UUID consumerId )
+    {
+
+        Mutator<ByteBuffer> mutator = createMutator( ko, be );
+
+        ByteBuffer key = getQueueClientTransactionKey( queueId, consumerId );
+
+        int counter = 0;
+
+        long time = cass.createTimestamp();
+
+        for ( Message message : messages )
+        {
+            // note we're not incrementing futureSnapshot on purpose. The uuid
+            // generation should give us a sequenced unique ID for each response, even
+            // if the
+            // time is the same since we increment the counter. If we read more than
+            // 10k messages in a single transaction, our millisecond will roll to the
+            // next due to 10k being the max amount of 1/10 microsecond headroom. Not
+            // possible to avoid this given the way time uuids are encoded.
+            UUID expirationId = UUIDUtils.newTimeUUID( futureTimeout, counter );
+            UUID messageId = message.getUuid();
+
+            logger.debug( "Writing new timeout at '{}' for message '{}'", expirationId, messageId );
+
+            mutator.addInsertion( key, CONSUMER_QUEUE_TIMEOUTS.getColumnFamily(),
+                    createColumn( expirationId, messageId, time, ue, ue ) );
+
+            // add the transactionid to the message
+            message.setTransaction( expirationId );
+            counter++;
+        }
+
+        mutator.execute();
+    }
+
+
+    private static class TransactionPointer
+    {
+        private UUID expiration;
+        private UUID targetMessage;
+
+
+        /**
+         * @param expiration
+         * @param targetMessage
+         */
+        public TransactionPointer( UUID expiration, UUID targetMessage )
+        {
+            super();
+            this.expiration = expiration;
+            this.targetMessage = targetMessage;
+        }
+
+
+        /*
+         * (non-Javadoc)
+         *
+         * @see java.lang.Object#toString()
+         */
+        @Override
+        public String toString()
+        {
+            return "TransactionPointer [expiration=" + expiration + ", targetMessage=" + targetMessage + "]";
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/io/EndSearch.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/io/EndSearch.java b/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/io/EndSearch.java
new file mode 100644
index 0000000..fd5497f
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/io/EndSearch.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.mq.cassandra.io;
+
+
+import java.util.UUID;
+
+import org.apache.usergrid.mq.QueueQuery;
+
+import me.prettyprint.hector.api.Keyspace;
+
+
+/**
+ * Reads from the queue without starting transactions.
+ *
+ * @author tnine
+ */
+public class EndSearch extends NoTransactionSearch
+{
+
+    /**
+     * @param ko
+     * @param cassTimestamp
+     */
+    public EndSearch( Keyspace ko )
+    {
+        super( ko );
+    } /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.usergrid.mq.cassandra.io.NoTransaction#getParams(java.util.UUID,
+     * java.util.UUID, org.apache.usergrid.mq.QueueQuery)
+     */
+
+
+    @Override
+    protected SearchParam getParams( UUID queueId, UUID consumerId, QueueQuery query )
+    {
+        UUID lastMessageId = query.getLastMessageId();
+        return new SearchParam( lastMessageId, true, lastMessageId != null, query.getLimit( DEFAULT_READ ) );
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see
+     * org.apache.usergrid.mq.cassandra.io.FifoSearch#writeClientPointer(java.util.UUID,
+     * java.util.UUID, java.util.UUID)
+     */
+    @Override
+    protected void writeClientPointer( UUID queueId, UUID consumerId, UUID lastReturnedId )
+    {
+        // no op for searches from the end
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/io/FilterSearch.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/io/FilterSearch.java b/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/io/FilterSearch.java
new file mode 100644
index 0000000..42332a8
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/io/FilterSearch.java
@@ -0,0 +1,258 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.mq.cassandra.io;
+
+
+import java.nio.ByteBuffer;
+import java.util.Iterator;
+import java.util.List;
+import java.util.SortedSet;
+import java.util.TreeSet;
+import java.util.UUID;
+
+import org.apache.usergrid.mq.Message;
+import org.apache.usergrid.mq.QueryProcessor;
+import org.apache.usergrid.mq.QueueQuery;
+import org.apache.usergrid.mq.QueueResults;
+import org.apache.usergrid.mq.QueryProcessor.QuerySlice;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.fasterxml.uuid.UUIDComparator;
+
+import me.prettyprint.hector.api.Keyspace;
+import me.prettyprint.hector.api.beans.AbstractComposite.ComponentEquality;
+import me.prettyprint.hector.api.beans.DynamicComposite;
+import me.prettyprint.hector.api.beans.HColumn;
+import static me.prettyprint.hector.api.factory.HFactory.createSliceQuery;
+import static org.apache.usergrid.mq.Queue.getQueueId;
+import static org.apache.usergrid.mq.cassandra.CassandraMQUtils.getConsumerId;
+import static org.apache.usergrid.mq.cassandra.QueueManagerImpl.DEFAULT_SEARCH_COUNT;
+import static org.apache.usergrid.mq.cassandra.QueueManagerImpl.QUEUE_SHARD_INTERVAL;
+import static org.apache.usergrid.mq.cassandra.QueuesCF.PROPERTY_INDEX;
+import static org.apache.usergrid.persistence.cassandra.CassandraPersistenceUtils.key;
+import static org.apache.usergrid.utils.CompositeUtils.setEqualityFlag;
+import static org.apache.usergrid.utils.ConversionUtils.bytebuffer;
+import static org.apache.usergrid.utils.NumberUtils.roundLong;
+import static org.apache.usergrid.utils.UUIDUtils.getTimestampInMillis;
+
+
+/**
+ * Searches in the queue without transactions
+ *
+ * @author tnine
+ */
+public class FilterSearch extends NoTransactionSearch
+{
+
+    private static final Logger logger = LoggerFactory.getLogger( FilterSearch.class );
+
+
+    /**
+     *
+     */
+    public FilterSearch( Keyspace ko )
+    {
+        super( ko );
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.apache.usergrid.mq.cassandra.io.QueueSearch#getResults(java.lang.String,
+     * org.apache.usergrid.mq.QueueQuery)
+     */
+    @Override
+    public QueueResults getResults( String queuePath, QueueQuery query )
+    {
+
+        QueryProcessor qp = new QueryProcessor( query );
+        List<QuerySlice> slices = qp.getSlices();
+
+        long limit = query.getLimit();
+
+        UUID queueId = getQueueId( queuePath );
+        UUID consumerId = getConsumerId( queueId, query );
+        QueueBounds bounds = getQueueBounds( queueId );
+
+        UUIDComparator comparator = query.isReversed() ? new ReverseUUIDComparator() : new UUIDComparator();
+
+        SortedSet<UUID> merged = null;
+
+        for ( QuerySlice slice : slices )
+        {
+            SortedSet<UUID> results =
+                    searchQueueRange( ko, queueId, bounds, slice, query.getLastMessageId(), query.isReversed(),
+                            comparator );
+
+            if ( merged == null )
+            {
+                merged = results;
+            }
+            else
+            {
+                merged.retainAll( results );
+            }
+        }
+
+        // now trim. Not efficient, but when indexing is updated, seeking will
+        // change, so I'm not worried about this.
+        if ( merged.size() > limit )
+        {
+            Iterator<UUID> current = merged.iterator();
+            UUID max = null;
+
+
+            for ( int i = 0; i <= limit && current.hasNext(); i++ )
+            {
+                max = current.next();
+            }
+
+            merged = merged.headSet( max );
+        }
+
+        List<Message> messages = loadMessages( merged, query.isReversed() );
+
+        QueueResults results = createResults( messages, queuePath, queueId, consumerId );
+
+        return results;
+    }
+
+
+    public SortedSet<UUID> searchQueueRange( Keyspace ko, UUID queueId, QueueBounds bounds, QuerySlice slice, UUID last,
+                                             boolean reversed, UUIDComparator comparator )
+    {
+
+        TreeSet<UUID> uuid_set = new TreeSet<UUID>( comparator );
+
+        if ( bounds == null )
+        {
+            logger.error( "Necessary queue bounds not found" );
+            return uuid_set;
+        }
+
+        UUID start_uuid = reversed ? bounds.getNewest() : bounds.getOldest();
+
+        UUID finish_uuid = reversed ? bounds.getOldest() : bounds.getNewest();
+
+        if ( last != null )
+        {
+            start_uuid = last;
+        }
+
+
+        if ( finish_uuid == null )
+        {
+            logger.error( "No last message in queue" );
+            return uuid_set;
+        }
+
+        long start_ts_shard = roundLong( getTimestampInMillis( start_uuid ), QUEUE_SHARD_INTERVAL );
+
+        long finish_ts_shard = roundLong( getTimestampInMillis( finish_uuid ), QUEUE_SHARD_INTERVAL );
+
+        long current_ts_shard = start_ts_shard;
+
+        if ( reversed )
+        {
+            current_ts_shard = finish_ts_shard;
+        }
+
+        ByteBuffer start = null;
+        if ( slice.getCursor() != null )
+        {
+            start = slice.getCursor();
+        }
+        else if ( slice.getStart() != null )
+        {
+            DynamicComposite s = new DynamicComposite( slice.getStart().getCode(), slice.getStart().getValue() );
+            if ( !slice.getStart().isInclusive() )
+            {
+                setEqualityFlag( s, ComponentEquality.GREATER_THAN_EQUAL );
+            }
+            start = s.serialize();
+        }
+
+        ByteBuffer finish = null;
+        if ( slice.getFinish() != null )
+        {
+            DynamicComposite f = new DynamicComposite( slice.getFinish().getCode(), slice.getFinish().getValue() );
+            if ( slice.getFinish().isInclusive() )
+            {
+                setEqualityFlag( f, ComponentEquality.GREATER_THAN_EQUAL );
+            }
+            finish = f.serialize();
+        }
+
+        while ( ( current_ts_shard >= start_ts_shard ) && ( current_ts_shard <= finish_ts_shard ) && ( uuid_set.size()
+                < DEFAULT_SEARCH_COUNT ) )
+        {
+
+            while ( true )
+            {
+                List<HColumn<ByteBuffer, ByteBuffer>> results =
+                        createSliceQuery( ko, be, be, be ).setColumnFamily( PROPERTY_INDEX.getColumnFamily() )
+                                .setKey( bytebuffer( key( queueId, current_ts_shard, slice.getPropertyName() ) ) )
+                                .setRange( start, finish, false, DEFAULT_SEARCH_COUNT ).execute().get().getColumns();
+
+                for ( HColumn<ByteBuffer, ByteBuffer> column : results )
+                {
+                    DynamicComposite c = DynamicComposite.fromByteBuffer( column.getName().duplicate() );
+                    UUID uuid = c.get( 2, ue );
+
+                    uuid_set.add( uuid );
+                }
+
+                if ( results.size() < DEFAULT_SEARCH_COUNT )
+                {
+                    break;
+                }
+
+                start = results.get( results.size() - 1 ).getName().duplicate();
+            }
+
+            if ( reversed )
+            {
+                current_ts_shard -= QUEUE_SHARD_INTERVAL;
+            }
+            else
+            {
+                current_ts_shard += QUEUE_SHARD_INTERVAL;
+            }
+        }
+
+        // trim the results
+        return uuid_set.headSet( finish_uuid ).tailSet( start_uuid );
+    }
+
+
+    private static class ReverseUUIDComparator extends UUIDComparator
+    {
+
+        /*
+         * (non-Javadoc)
+         *
+         * @see com.fasterxml.uuid.UUIDComparator#compare(java.util.UUID,
+         * java.util.UUID)
+         */
+        @Override
+        public int compare( UUID u1, UUID u2 )
+        {
+            return super.compare( u1, u2 ) * -1;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/io/NoTransactionSearch.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/io/NoTransactionSearch.java b/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/io/NoTransactionSearch.java
new file mode 100644
index 0000000..5ca2eb4
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/io/NoTransactionSearch.java
@@ -0,0 +1,131 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.mq.cassandra.io;
+
+
+import java.util.List;
+import java.util.UUID;
+
+import org.apache.usergrid.mq.Message;
+import org.apache.usergrid.mq.QueueQuery;
+import org.apache.usergrid.mq.QueueResults;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import me.prettyprint.hector.api.Keyspace;
+import static org.apache.usergrid.mq.cassandra.CassandraMQUtils.getConsumerId;
+import static org.apache.usergrid.mq.cassandra.CassandraMQUtils.getQueueId;
+
+
+/**
+ * Reads from the queue without starting transactions.
+ *
+ * @author tnine
+ */
+public class NoTransactionSearch extends AbstractSearch
+{
+
+    private static final Logger logger = LoggerFactory.getLogger( NoTransactionSearch.class );
+
+    protected static final int DEFAULT_READ = 1;
+
+
+    /**
+     * @param ko
+     */
+    public NoTransactionSearch( Keyspace ko )
+    {
+        super( ko );
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.apache.usergrid.mq.cassandra.io.QueueSearch#getResults(java.lang.String,
+     * org.apache.usergrid.mq.QueueQuery)
+     */
+    @Override
+    public QueueResults getResults( String queuePath, QueueQuery query )
+    {
+
+        UUID queueId = getQueueId( queuePath );
+        UUID consumerId = getConsumerId( queueId, query );
+        QueueBounds bounds = getQueueBounds( queueId );
+        SearchParam params = getParams( queueId, consumerId, query );
+
+        List<UUID> ids = getIds( queueId, consumerId, bounds, params );
+
+        List<Message> messages = loadMessages( ids, params.reversed );
+
+        QueueResults results = createResults( messages, queuePath, queueId, consumerId );
+
+        writeClientPointer( queueId, consumerId, results.getLast() );
+
+        return results;
+    }
+
+
+    /** Get information for reading no transactionally from the query. Subclasses can override this behavior */
+    protected SearchParam getParams( UUID queueId, UUID consumerId, QueueQuery query )
+    {
+        UUID lastReadMessageId = getConsumerQueuePosition( queueId, consumerId );
+
+        if ( logger.isDebugEnabled() )
+        {
+            logger.debug( "Last message id is '{}' for queueId '{}' and clientId '{}'",
+                    new Object[] { lastReadMessageId, queueId, consumerId } );
+        }
+
+        return new SearchParam( lastReadMessageId, false, lastReadMessageId != null, query.getLimit( DEFAULT_READ ) );
+    }
+
+
+    /** Get the list of ids we should load and return to the client. Message ids should be in order on return */
+    protected List<UUID> getIds( UUID queueId, UUID consumerId, QueueBounds bounds, SearchParam params )
+    {
+        return getQueueRange( queueId, bounds, params );
+    }
+
+
+    protected static class SearchParam
+    {
+
+        /** The uuid to start seeking from */
+        protected final UUID startId;
+
+        /** true if we should seek from high to low */
+        protected final boolean reversed;
+        /** The number of results to include */
+        protected final int limit;
+        /** true if the first result should be skipped. Useful for paging from a previous result */
+        protected final boolean skipFirst;
+
+
+        /**
+         * @param startId
+         * @param reversed
+         * @param count
+         */
+        public SearchParam( UUID startId, boolean reversed, boolean skipFirst, int count )
+        {
+            this.startId = startId;
+            this.reversed = reversed;
+            this.skipFirst = skipFirst;
+            this.limit = count;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/io/QueueBounds.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/io/QueueBounds.java b/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/io/QueueBounds.java
new file mode 100644
index 0000000..6e7cf4b
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/io/QueueBounds.java
@@ -0,0 +1,91 @@
+package org.apache.usergrid.mq.cassandra.io;
+
+
+import java.util.UUID;
+
+
+public class QueueBounds
+{
+
+    private final UUID oldest;
+    private final UUID newest;
+
+
+    public QueueBounds( UUID oldest, UUID newest )
+    {
+        this.oldest = oldest;
+        this.newest = newest;
+    }
+
+
+    public UUID getOldest()
+    {
+        return oldest;
+    }
+
+
+    public UUID getNewest()
+    {
+        return newest;
+    }
+
+
+    @Override
+    public int hashCode()
+    {
+        final int prime = 31;
+        int result = 1;
+        result = ( prime * result ) + ( ( newest == null ) ? 0 : newest.hashCode() );
+        result = ( prime * result ) + ( ( oldest == null ) ? 0 : oldest.hashCode() );
+        return result;
+    }
+
+
+    @Override
+    public boolean equals( Object obj )
+    {
+        if ( this == obj )
+        {
+            return true;
+        }
+        if ( obj == null )
+        {
+            return false;
+        }
+        if ( getClass() != obj.getClass() )
+        {
+            return false;
+        }
+        QueueBounds other = ( QueueBounds ) obj;
+        if ( newest == null )
+        {
+            if ( other.newest != null )
+            {
+                return false;
+            }
+        }
+        else if ( !newest.equals( other.newest ) )
+        {
+            return false;
+        }
+        if ( oldest == null )
+        {
+            if ( other.oldest != null )
+            {
+                return false;
+            }
+        }
+        else if ( !oldest.equals( other.oldest ) )
+        {
+            return false;
+        }
+        return true;
+    }
+
+
+    @Override
+    public String toString()
+    {
+        return "QueueBounds [oldest=" + oldest + ", newest=" + newest + "]";
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/io/QueueSearch.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/io/QueueSearch.java b/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/io/QueueSearch.java
new file mode 100644
index 0000000..c12afe6
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/io/QueueSearch.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.mq.cassandra.io;
+
+
+import org.apache.usergrid.mq.QueueQuery;
+import org.apache.usergrid.mq.QueueResults;
+
+
+/** @author tnine */
+public interface QueueSearch
+{
+
+    /** Get the results for this queue search */
+    public QueueResults getResults( String queuePath, QueueQuery query );
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/io/StartSearch.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/io/StartSearch.java b/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/io/StartSearch.java
new file mode 100644
index 0000000..370f841
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/mq/cassandra/io/StartSearch.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.mq.cassandra.io;
+
+
+import java.util.UUID;
+
+import org.apache.usergrid.mq.QueueQuery;
+
+import me.prettyprint.hector.api.Keyspace;
+
+
+/**
+ * Reads from the queue without starting transactions.
+ *
+ * @author tnine
+ */
+public class StartSearch extends NoTransactionSearch
+{
+
+    /**
+     * @param ko
+     * @param cassTimestamp
+     */
+    public StartSearch( Keyspace ko )
+    {
+        super( ko );
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.apache.usergrid.mq.cassandra.io.NoTransaction#getParams(java.util.UUID,
+     * java.util.UUID, org.apache.usergrid.mq.QueueQuery)
+     */
+    @Override
+    protected SearchParam getParams( UUID queueId, UUID consumerId, QueueQuery query )
+    {
+        UUID lastMessageId = query.getLastMessageId();
+
+
+        return new SearchParam( lastMessageId, false, lastMessageId != null, query.getLimit( DEFAULT_READ ) );
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.usergrid.mq.cassandra.io.FifoSearch#writeClientPointer(java.util.UUID, java.util.UUID, java.util.UUID)
+     */
+    @Override
+    protected void writeClientPointer( UUID queueId, UUID consumerId, UUID lastReturnedId )
+    {
+        //no op for searches from the start
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/AbstractEntity.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/AbstractEntity.java b/stack/core/src/main/java/org/apache/usergrid/persistence/AbstractEntity.java
new file mode 100644
index 0000000..91d9da2
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/AbstractEntity.java
@@ -0,0 +1,342 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence;
+
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.UUID;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.apache.usergrid.persistence.annotations.EntityProperty;
+import org.codehaus.jackson.annotate.JsonAnyGetter;
+import org.codehaus.jackson.annotate.JsonAnySetter;
+import org.codehaus.jackson.annotate.JsonIgnore;
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
+
+import static org.apache.usergrid.persistence.Schema.PROPERTY_NAME;
+
+
+/**
+ * The abstract superclass implementation of the Entity interface.
+ *
+ * @author edanuff
+ */
+@XmlRootElement
+public abstract class AbstractEntity implements Entity {
+
+    protected UUID uuid;
+
+    protected Long created;
+
+    protected Long modified;
+
+    protected Map<String, Object> dynamic_properties = new TreeMap<String, Object>( String.CASE_INSENSITIVE_ORDER );
+
+    protected Map<String, Set<Object>> dynamic_sets = new TreeMap<String, Set<Object>>( String.CASE_INSENSITIVE_ORDER );
+
+
+    @Override
+    @EntityProperty(required = true, mutable = false, basic = true, indexed = false)
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public UUID getUuid() {
+        return uuid;
+    }
+
+
+    @Override
+    public void setUuid( UUID uuid ) {
+        this.uuid = uuid;
+    }
+
+
+    @Override
+    @EntityProperty(required = true, mutable = false, basic = true, indexed = false)
+    public String getType() {
+        return Schema.getDefaultSchema().getEntityType( this.getClass() );
+    }
+
+
+    @Override
+    public void setType( String type ) {
+    }
+
+
+    @Override
+    @EntityProperty(indexed = true, required = true, mutable = false)
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public Long getCreated() {
+        return created;
+    }
+
+
+    @Override
+    public void setCreated( Long created ) {
+        if ( created == null ) {
+            created = System.currentTimeMillis();
+        }
+        this.created = created;
+    }
+
+
+    @Override
+    @EntityProperty(indexed = true, required = true, mutable = true)
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public Long getModified() {
+        return modified;
+    }
+
+
+    @Override
+    public void setModified( Long modified ) {
+        if ( modified == null ) {
+            modified = System.currentTimeMillis();
+        }
+        this.modified = modified;
+    }
+
+
+    @Override
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public String getName() {
+        Object value = getProperty( PROPERTY_NAME );
+
+        if ( value instanceof UUID ) {
+            // fixes existing data that uses UUID in USERGRID-2099
+            return value.toString();
+        }
+
+        return ( String ) value;
+    }
+
+
+    @Override
+    @JsonIgnore
+    public Map<String, Object> getProperties() {
+        return Schema.getDefaultSchema().getEntityProperties( this );
+    }
+
+
+    @Override
+    public final Object getProperty( String propertyName ) {
+        return Schema.getDefaultSchema().getEntityProperty( this, propertyName );
+    }
+
+
+    @Override
+    public final void setProperty( String propertyName, Object propertyValue ) {
+        Schema.getDefaultSchema().setEntityProperty( this, propertyName, propertyValue );
+    }
+
+
+    @Override
+    public void setProperties( Map<String, Object> properties ) {
+        dynamic_properties = new TreeMap<String, Object>( String.CASE_INSENSITIVE_ORDER );
+        addProperties( properties );
+    }
+
+
+    @Override
+    public void addProperties( Map<String, Object> properties ) {
+        if ( properties == null ) {
+            return;
+        }
+        for ( Entry<String, Object> entry : properties.entrySet() ) {
+            setProperty( entry.getKey(), entry.getValue() );
+        }
+    }
+
+
+    @Override
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public Object getMetadata( String key ) {
+        return getDataset( "metadata", key );
+    }
+
+
+    @Override
+    public void setMetadata( String key, Object value ) {
+        setDataset( "metadata", key, value );
+    }
+
+
+    @Override
+    public void mergeMetadata( Map<String, Object> new_metadata ) {
+        mergeDataset( "metadata", new_metadata );
+    }
+
+
+    @Override
+    public void clearMetadata() {
+        clearDataset( "metadata" );
+    }
+
+
+    public <T> T getDataset( String property, String key ) {
+        Object md = dynamic_properties.get( property );
+        if ( md == null ) {
+            return null;
+        }
+        if ( !( md instanceof Map<?, ?> ) ) {
+            return null;
+        }
+        @SuppressWarnings("unchecked") Map<String, T> metadata = ( Map<String, T> ) md;
+        return metadata.get( key );
+    }
+
+
+    public <T> void setDataset( String property, String key, T value ) {
+        if ( key == null ) {
+            return;
+        }
+        Object md = dynamic_properties.get( property );
+        if ( !( md instanceof Map<?, ?> ) ) {
+            md = new HashMap<String, T>();
+            dynamic_properties.put( property, md );
+        }
+        @SuppressWarnings("unchecked") Map<String, T> metadata = ( Map<String, T> ) md;
+        metadata.put( key, value );
+    }
+
+
+    public <T> void mergeDataset( String property, Map<String, T> new_metadata ) {
+        Object md = dynamic_properties.get( property );
+        if ( !( md instanceof Map<?, ?> ) ) {
+            md = new HashMap<String, T>();
+            dynamic_properties.put( property, md );
+        }
+        @SuppressWarnings("unchecked") Map<String, T> metadata = ( Map<String, T> ) md;
+        metadata.putAll( new_metadata );
+    }
+
+
+    public void clearDataset( String property ) {
+        dynamic_properties.remove( property );
+    }
+
+
+    @Override
+    public List<Entity> getCollections( String key ) {
+        return getDataset( "collections", key );
+    }
+
+
+    @Override
+    public void setCollections( String key, List<Entity> results ) {
+        setDataset( "collections", key, results );
+    }
+
+
+    @Override
+    public List<Entity> getConnections( String key ) {
+        return getDataset( "connections", key );
+    }
+
+
+    @Override
+    public void setConnections( String key, List<Entity> results ) {
+        setDataset( "connections", key, results );
+    }
+
+
+    @Override
+    public String toString() {
+        return "Entity(" + getProperties() + ")";
+    }
+
+
+    @Override
+    @JsonAnySetter
+    public void setDynamicProperty( String key, Object value ) {
+        dynamic_properties.put( key, value );
+    }
+
+
+    @Override
+    @JsonAnyGetter
+    public Map<String, Object> getDynamicProperties() {
+        return dynamic_properties;
+    }
+
+
+    @Override
+    public final int compareTo( Entity o ) {
+        if ( o == null ) {
+            return 1;
+        }
+        try {
+            long t1 = getUuid().timestamp();
+            long t2 = o.getUuid().timestamp();
+            return ( t1 < t2 ) ? -1 : ( t1 == t2 ) ? 0 : 1;
+        }
+        catch ( UnsupportedOperationException e ) {
+        }
+        return getUuid().compareTo( o.getUuid() );
+    }
+
+
+    @Override
+    public Entity toTypedEntity() {
+        Entity entity = EntityFactory.newEntity( getUuid(), getType() );
+        entity.setProperties( getProperties() );
+        return entity;
+    }
+
+
+    /* (non-Javadoc)
+     * @see java.lang.Object#hashCode()
+     */
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ( ( uuid == null ) ? 0 : uuid.hashCode() );
+        return result;
+    }
+
+
+    /* (non-Javadoc)
+     * @see java.lang.Object#equals(java.lang.Object)
+     */
+    @Override
+    public boolean equals( Object obj ) {
+        if ( this == obj ) {
+            return true;
+        }
+        if ( obj == null ) {
+            return false;
+        }
+        if ( getClass() != obj.getClass() ) {
+            return false;
+        }
+        AbstractEntity other = ( AbstractEntity ) obj;
+        if ( uuid == null ) {
+            if ( other.uuid != null ) {
+                return false;
+            }
+        }
+        else if ( !uuid.equals( other.uuid ) ) {
+            return false;
+        }
+        return true;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/AggregateCounter.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/AggregateCounter.java b/stack/core/src/main/java/org/apache/usergrid/persistence/AggregateCounter.java
new file mode 100644
index 0000000..b82c551
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/AggregateCounter.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence;
+
+
+public class AggregateCounter {
+    private long timestamp;
+    private long value;
+
+
+    public AggregateCounter( long timestamp, long value ) {
+        this.timestamp = timestamp;
+        this.value = value;
+    }
+
+
+    public long getTimestamp() {
+        return timestamp;
+    }
+
+
+    public void setTimestamp( long timestamp ) {
+        this.timestamp = timestamp;
+    }
+
+
+    public long getValue() {
+        return value;
+    }
+
+
+    public void setValue( long value ) {
+        this.value = value;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/AggregateCounterSet.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/AggregateCounterSet.java b/stack/core/src/main/java/org/apache/usergrid/persistence/AggregateCounterSet.java
new file mode 100644
index 0000000..c14d043
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/AggregateCounterSet.java
@@ -0,0 +1,116 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence;
+
+
+import java.util.List;
+import java.util.UUID;
+
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
+
+
+public class AggregateCounterSet {
+    private String name;
+    private UUID user;
+    private UUID group;
+    private UUID queue;
+    private String category;
+    private List<AggregateCounter> values;
+
+
+    public AggregateCounterSet( String name, UUID user, UUID group, String category, List<AggregateCounter> values ) {
+        this.name = name;
+        this.user = user;
+        this.group = group;
+        this.category = category;
+        this.values = values;
+    }
+
+
+    public AggregateCounterSet( String name, UUID queue, String category, List<AggregateCounter> values ) {
+        this.name = name;
+        setQueue( queue );
+        this.category = category;
+        this.values = values;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public UUID getUser() {
+        return user;
+    }
+
+
+    public void setUser( UUID user ) {
+        this.user = user;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public UUID getGroup() {
+        return group;
+    }
+
+
+    public void setGroup( UUID group ) {
+        this.group = group;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public String getCategory() {
+        return category;
+    }
+
+
+    public void setCategory( String category ) {
+        this.category = category;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public String getName() {
+        return name;
+    }
+
+
+    public void setName( String name ) {
+        this.name = name;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public List<AggregateCounter> getValues() {
+        return values;
+    }
+
+
+    public void setValues( List<AggregateCounter> values ) {
+        this.values = values;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public UUID getQueue() {
+        return queue;
+    }
+
+
+    public void setQueue( UUID queue ) {
+        this.queue = queue;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/AssociatedEntityRef.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/AssociatedEntityRef.java b/stack/core/src/main/java/org/apache/usergrid/persistence/AssociatedEntityRef.java
new file mode 100644
index 0000000..aceaf81
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/AssociatedEntityRef.java
@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence;
+
+
+public interface AssociatedEntityRef extends EntityRef {
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/CollectionRef.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/CollectionRef.java b/stack/core/src/main/java/org/apache/usergrid/persistence/CollectionRef.java
new file mode 100644
index 0000000..4a560b7
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/CollectionRef.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence;
+
+
+public interface CollectionRef extends AssociatedEntityRef {
+
+    public EntityRef getOwnerEntity();
+
+    public String getCollectionName();
+
+    public EntityRef getItemRef();
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/ConnectedEntityRef.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/ConnectedEntityRef.java b/stack/core/src/main/java/org/apache/usergrid/persistence/ConnectedEntityRef.java
new file mode 100644
index 0000000..c551ac7
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/ConnectedEntityRef.java
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence;
+
+
+public interface ConnectedEntityRef extends EntityRef {
+
+    public String getConnectionType();
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/ConnectionRef.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/ConnectionRef.java b/stack/core/src/main/java/org/apache/usergrid/persistence/ConnectionRef.java
new file mode 100644
index 0000000..9a5340c
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/ConnectionRef.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence;
+
+
+import java.util.List;
+
+
+/**
+ * Connection tuple
+ *
+ * @author edanuff
+ */
+public interface ConnectionRef extends ConnectedEntityRef, AssociatedEntityRef {
+
+    public EntityRef getConnectingEntity();
+
+    public List<ConnectedEntityRef> getPairedConnections();
+
+    public ConnectedEntityRef getConnectedEntity();
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/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
new file mode 100644
index 0000000..ea4e017
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/CounterQuery.java
@@ -0,0 +1,313 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence;
+
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.usergrid.persistence.Query.CounterFilterPredicate;
+import org.apache.usergrid.utils.JsonUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static org.apache.usergrid.utils.ClassUtils.cast;
+import static org.apache.usergrid.utils.ListUtils.firstBoolean;
+import static org.apache.usergrid.utils.ListUtils.firstInteger;
+import static org.apache.usergrid.utils.ListUtils.firstLong;
+import static org.apache.usergrid.utils.ListUtils.isEmpty;
+import static org.apache.usergrid.utils.MapUtils.toMapList;
+
+
+public class CounterQuery {
+
+    public static final Logger logger = LoggerFactory.getLogger( CounterQuery.class );
+
+    public static final int DEFAULT_MAX_RESULTS = 10;
+
+    private int limit = 0;
+    boolean limitSet = false;
+
+    private Long startTime;
+    private Long finishTime;
+    private boolean pad;
+    private CounterResolution resolution = CounterResolution.ALL;
+    private List<String> categories;
+    private List<CounterFilterPredicate> counterFilters;
+
+
+    public CounterQuery() {
+    }
+
+
+    public CounterQuery( CounterQuery q ) {
+        if ( q != null ) {
+            limit = q.limit;
+            limitSet = q.limitSet;
+            startTime = q.startTime;
+            finishTime = q.finishTime;
+            resolution = q.resolution;
+            pad = q.pad;
+            categories = q.categories != null ? new ArrayList<String>( q.categories ) : null;
+            counterFilters =
+                    q.counterFilters != null ? new ArrayList<CounterFilterPredicate>( q.counterFilters ) : null;
+        }
+    }
+
+
+    public static CounterQuery newQueryIfNull( CounterQuery query ) {
+        if ( query == null ) {
+            query = new CounterQuery();
+        }
+        return query;
+    }
+
+
+    public static CounterQuery fromJsonString( String json ) {
+        Object o = JsonUtils.parse( json );
+        if ( o instanceof Map ) {
+            @SuppressWarnings({ "unchecked", "rawtypes" }) Map<String, List<String>> params =
+                    cast( toMapList( ( Map ) o ) );
+            return fromQueryParams( params );
+        }
+        return null;
+    }
+
+
+    public static CounterQuery fromQueryParams( Map<String, List<String>> params ) {
+
+        CounterQuery q = null;
+        Integer limit = null;
+        Long startTime = null;
+        Long finishTime = null;
+        Boolean pad = null;
+        CounterResolution resolution = null;
+        List<CounterFilterPredicate> counterFilters = null;
+        List<String> categories = null;
+
+        List<String> l = null;
+
+        limit = firstInteger( params.get( "limit" ) );
+        startTime = firstLong( params.get( "start_time" ) );
+        finishTime = firstLong( params.get( "end_time" ) );
+
+        l = params.get( "resolution" );
+        if ( !isEmpty( l ) ) {
+            resolution = CounterResolution.fromString( l.get( 0 ) );
+        }
+
+        categories = params.get( "category" );
+
+        l = params.get( "counter" );
+        if ( !isEmpty( l ) ) {
+            counterFilters = CounterFilterPredicate.fromList( l );
+        }
+
+        pad = firstBoolean( params.get( "pad" ) );
+
+        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 ( categories != null ) {
+            q = newQueryIfNull( q );
+            q.setCategories( categories );
+        }
+
+        if ( counterFilters != null ) {
+            q = newQueryIfNull( q );
+            q.setCounterFilters( counterFilters );
+        }
+
+        if ( pad != null ) {
+            q = newQueryIfNull( q );
+            q.setPad( pad );
+        }
+
+        return q;
+    }
+
+
+    public int getLimit() {
+        return getLimit( DEFAULT_MAX_RESULTS );
+    }
+
+
+    public int getLimit( int defaultMax ) {
+        if ( limit <= 0 ) {
+            if ( defaultMax > 0 ) {
+                return defaultMax;
+            }
+            else {
+                return DEFAULT_MAX_RESULTS;
+            }
+        }
+        return limit;
+    }
+
+
+    public void setLimit( int limit ) {
+        limitSet = true;
+        this.limit = limit;
+    }
+
+
+    public CounterQuery withLimit( int limit ) {
+        limitSet = true;
+        this.limit = limit;
+        return this;
+    }
+
+
+    public boolean isLimitSet() {
+        return limitSet;
+    }
+
+
+    public Long getStartTime() {
+        return startTime;
+    }
+
+
+    public void setStartTime( Long startTime ) {
+        this.startTime = startTime;
+    }
+
+
+    public CounterQuery withStartTime( Long startTime ) {
+        this.startTime = startTime;
+        return this;
+    }
+
+
+    public Long getFinishTime() {
+        return finishTime;
+    }
+
+
+    public void setFinishTime( Long finishTime ) {
+        this.finishTime = finishTime;
+    }
+
+
+    public CounterQuery withFinishTime( Long finishTime ) {
+        this.finishTime = finishTime;
+        return this;
+    }
+
+
+    public boolean isPad() {
+        return pad;
+    }
+
+
+    public void setPad( boolean pad ) {
+        this.pad = pad;
+    }
+
+
+    public CounterQuery withPad( boolean pad ) {
+        this.pad = pad;
+        return this;
+    }
+
+
+    public void setResolution( CounterResolution resolution ) {
+        this.resolution = resolution;
+    }
+
+
+    public CounterResolution getResolution() {
+        return resolution;
+    }
+
+
+    public CounterQuery withResolution( CounterResolution resolution ) {
+        this.resolution = resolution;
+        return this;
+    }
+
+
+    public List<String> getCategories() {
+        return categories;
+    }
+
+
+    public CounterQuery addCategory( String category ) {
+        if ( categories == null ) {
+            categories = new ArrayList<String>();
+        }
+        categories.add( category );
+        return this;
+    }
+
+
+    public void setCategories( List<String> categories ) {
+        this.categories = categories;
+    }
+
+
+    public CounterQuery withCategories( List<String> categories ) {
+        this.categories = categories;
+        return this;
+    }
+
+
+    public List<CounterFilterPredicate> getCounterFilters() {
+        return counterFilters;
+    }
+
+
+    public CounterQuery addCounterFilter( String counter ) {
+        CounterFilterPredicate p = CounterFilterPredicate.fromString( counter );
+        if ( p == null ) {
+            return this;
+        }
+        if ( counterFilters == null ) {
+            counterFilters = new ArrayList<CounterFilterPredicate>();
+        }
+        counterFilters.add( p );
+        return this;
+    }
+
+
+    public void setCounterFilters( List<CounterFilterPredicate> counterFilters ) {
+        this.counterFilters = counterFilters;
+    }
+
+
+    public CounterQuery withCounterFilters( List<CounterFilterPredicate> counterFilters ) {
+        this.counterFilters = counterFilters;
+        return this;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/CounterResolution.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/CounterResolution.java b/stack/core/src/main/java/org/apache/usergrid/persistence/CounterResolution.java
new file mode 100644
index 0000000..b944a3b
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/CounterResolution.java
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence;
+
+
+public enum CounterResolution {
+    ALL( 0 ), MINUTE( 1 ), FIVE_MINUTES( 5 ), HALF_HOUR( 30 ), HOUR( 60 ), SIX_HOUR( 60 * 6 ), HALF_DAY( 60 * 12 ),
+    DAY( 60 * 24 ), WEEK( 60 * 24 * 7 ), MONTH( 60 * 24 * ( 365 / 12 ) );
+
+    private final long interval;
+
+
+    CounterResolution( long minutes ) {
+        interval = minutes * 60 * 1000;
+    }
+
+
+    public long interval() {
+        return interval;
+    }
+
+
+    public long round( long timestamp ) {
+        if ( interval == 0 ) {
+            return 1;
+        }
+        return ( timestamp / interval ) * interval;
+    }
+
+
+    public long next( long timestamp ) {
+        return round( timestamp ) + interval;
+    }
+
+
+    public static CounterResolution fromOrdinal( int i ) {
+        if ( ( i < 0 ) || ( i >= CounterResolution.values().length ) ) {
+            throw new IndexOutOfBoundsException( "Invalid ordinal" );
+        }
+        return CounterResolution.values()[i];
+    }
+
+
+    public static CounterResolution fromMinutes( int m ) {
+        m = m * 60 * 1000;
+        for ( int i = CounterResolution.values().length - 1; i >= 0; i-- ) {
+            if ( CounterResolution.values()[i].interval <= m ) {
+                return CounterResolution.values()[i];
+            }
+        }
+        return ALL;
+    }
+
+
+    public static CounterResolution fromString( String s ) {
+        if ( s == null ) {
+            return ALL;
+        }
+        try {
+            return CounterResolution.valueOf( s.toUpperCase() );
+        }
+        catch ( IllegalArgumentException e ) {
+        }
+        try {
+            return fromMinutes( Integer.valueOf( s ) );
+        }
+        catch ( NumberFormatException e ) {
+        }
+        return ALL;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/CredentialsInfo.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/CredentialsInfo.java b/stack/core/src/main/java/org/apache/usergrid/persistence/CredentialsInfo.java
new file mode 100644
index 0000000..1065a76
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/CredentialsInfo.java
@@ -0,0 +1,176 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence;
+
+
+import java.util.Map;
+import java.util.TreeMap;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.codehaus.jackson.annotate.JsonAnyGetter;
+import org.codehaus.jackson.annotate.JsonAnySetter;
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
+
+
+@XmlRootElement
+public class CredentialsInfo implements Comparable<CredentialsInfo> {
+
+    boolean recoverable;
+    boolean encrypted;
+    String cipher;
+    String key;
+    String secret;
+    String hashType;
+    Long created;
+
+    /**
+     * A list of crypto algorithms to apply to unecrypted input for comparison. Note that cipher and hashtype should be
+     * deprecated
+     */
+    private String[] cryptoChain;
+
+    protected Map<String, Object> properties = new TreeMap<String, Object>( String.CASE_INSENSITIVE_ORDER );
+
+
+    public CredentialsInfo() {
+        created = System.currentTimeMillis();
+    }
+
+
+    public boolean getRecoverable() {
+        return recoverable;
+    }
+
+
+    public void setRecoverable( boolean recoverable ) {
+        this.recoverable = recoverable;
+    }
+
+
+    public boolean getEncrypted() {
+        return encrypted;
+    }
+
+
+    public void setEncrypted( boolean encrypted ) {
+        this.encrypted = encrypted;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public String getCipher() {
+        return cipher;
+    }
+
+
+    public void setCipher( String cipher ) {
+        this.cipher = cipher;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public String getKey() {
+        return key;
+    }
+
+
+    public void setKey( String key ) {
+        this.key = key;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public String getSecret() {
+        return secret;
+    }
+
+
+    public void setSecret( String secret ) {
+        this.secret = secret;
+    }
+
+
+    public static String getCredentialsSecret( CredentialsInfo credentials ) {
+        if ( credentials == null ) {
+            return null;
+        }
+        return credentials.getSecret();
+    }
+
+
+    @JsonAnyGetter
+    public Map<String, Object> getProperties() {
+        return properties;
+    }
+
+
+    @JsonAnySetter
+    public void setProperty( String key, Object value ) {
+        properties.put( key, value );
+    }
+
+
+    public Object getProperty( String key ) {
+        return properties.get( key );
+    }
+
+
+    /** @return the hashType */
+    public String getHashType() {
+        return hashType;
+    }
+
+
+    /**
+     * Used for handling legacy passwords encrypted in md5 or similar.
+     *
+     * @param hashType the hashType to set
+     */
+    public void setHashType( String hashType ) {
+        this.hashType = hashType;
+    }
+
+
+    /** @return the cryptoChain */
+    public String[] getCryptoChain() {
+        return cryptoChain;
+    }
+
+
+    /** @param cryptoChain the cryptoChain to set */
+    public void setCryptoChain( String[] cryptoChain ) {
+        this.cryptoChain = cryptoChain;
+    }
+
+
+    public Long getCreated() {
+        return created;
+    }
+
+
+    @Override
+    public int compareTo( CredentialsInfo o ) {
+        if ( created == o.created ) {
+            return 0;
+        }
+        if ( o.created == null ) {
+            return 1;
+        }
+        return o.created.compareTo( created );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/DynamicEntity.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/DynamicEntity.java b/stack/core/src/main/java/org/apache/usergrid/persistence/DynamicEntity.java
new file mode 100644
index 0000000..ea6df03
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/DynamicEntity.java
@@ -0,0 +1,111 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence;
+
+
+import java.util.Map;
+import java.util.UUID;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.apache.usergrid.persistence.annotations.EntityProperty;
+import org.apache.usergrid.utils.UUIDUtils;
+
+
+/**
+ * Dynamic entities can represent any entity type whether specified in the Schema or not.
+ *
+ * @author edanuff
+ */
+@XmlRootElement
+public class DynamicEntity extends AbstractEntity {
+
+    @EntityProperty(indexed = true, fulltextIndexed = false, required = false, mutable = true, aliasProperty = true,
+            basic = true)
+    protected String name;
+
+    protected String type;
+
+
+    /**
+     *
+     */
+    public DynamicEntity() {
+        // setId(UUIDUtils.newTimeUUID());
+    }
+
+
+    /**
+     * @param id
+     */
+    public DynamicEntity( UUID id ) {
+        setUuid( id );
+    }
+
+
+    /**
+     * @param type
+     */
+    public DynamicEntity( String type ) {
+        setUuid( UUIDUtils.newTimeUUID() );
+        setType( type );
+    }
+
+
+    /**
+     * @param id
+     * @param type
+     */
+    public DynamicEntity( String type, UUID id ) {
+        setUuid( id );
+        setType( type );
+    }
+
+
+    /**
+     * @param id
+     * @param type
+     */
+    public DynamicEntity( String type, UUID id, Map<String, Object> propertyMap ) {
+        setUuid( id );
+        setType( type );
+        setProperties( propertyMap );
+    }
+
+
+    @Override
+    @EntityProperty(required = true, mutable = false, basic = true, indexed = false)
+    public String getType() {
+        return type;
+    }
+
+
+    @Override
+    public void setType( String type ) {
+        this.type = type;
+    }
+
+
+    @Override
+    public String getName() {
+        return name;
+    }
+
+
+    public void setName( String name ) {
+        this.name = name;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/Entity.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/Entity.java b/stack/core/src/main/java/org/apache/usergrid/persistence/Entity.java
new file mode 100644
index 0000000..42df9e0
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/Entity.java
@@ -0,0 +1,103 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence;
+
+
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.apache.usergrid.persistence.annotations.EntityProperty;
+import org.codehaus.jackson.annotate.JsonAnyGetter;
+import org.codehaus.jackson.annotate.JsonAnySetter;
+import org.codehaus.jackson.annotate.JsonIgnore;
+import org.codehaus.jackson.annotate.JsonPropertyOrder;
+
+import static org.apache.usergrid.persistence.Schema.PROPERTY_NAME;
+import static org.apache.usergrid.persistence.Schema.PROPERTY_TYPE;
+import static org.apache.usergrid.persistence.Schema.PROPERTY_URI;
+import static org.apache.usergrid.persistence.Schema.PROPERTY_UUID;
+
+
+/** Entities are the base object type in the service. */
+@XmlRootElement
+@JsonPropertyOrder({ PROPERTY_UUID, PROPERTY_TYPE, PROPERTY_URI, PROPERTY_NAME })
+public interface Entity extends EntityRef, Comparable<Entity> {
+
+    @Override
+    @EntityProperty(required = true, mutable = false, basic = true, indexed = false)
+    public UUID getUuid();
+
+    public void setUuid( UUID id );
+
+    @Override
+    @EntityProperty(required = true, mutable = false, basic = true, indexed = true)
+    public String getType();
+
+    public void setType( String type );
+
+    public abstract String getName();
+
+    @EntityProperty(indexed = true, required = true, mutable = false)
+    public abstract Long getCreated();
+
+    public abstract void setCreated( Long created );
+
+    @EntityProperty(indexed = true, required = true, mutable = true)
+    public abstract Long getModified();
+
+    public abstract void setModified( Long modified );
+
+    @JsonIgnore
+    public Map<String, Object> getProperties();
+
+    public void setProperties( Map<String, Object> properties );
+
+    public void addProperties( Map<String, Object> properties );
+
+    public abstract Object getProperty( String propertyName );
+
+    public abstract void setProperty( String propertyName, Object propertyValue );
+
+    @Override
+    public abstract int compareTo( Entity o );
+
+    public abstract Entity toTypedEntity();
+
+    public abstract Object getMetadata( String key );
+
+    public abstract void setMetadata( String key, Object value );
+
+    public abstract void mergeMetadata( Map<String, Object> metadata );
+
+    public abstract void clearMetadata();
+
+    public abstract List<Entity> getCollections( String key );
+
+    public abstract void setCollections( String name, List<Entity> results );
+
+    public abstract List<Entity> getConnections( String key );
+
+    public abstract void setConnections( String name, List<Entity> results );
+
+    @JsonAnySetter
+    public abstract void setDynamicProperty( String key, Object value );
+
+    @JsonAnyGetter
+    public abstract Map<String, Object> getDynamicProperties();
+}


[05/96] [abbrv] [partial] Change package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/tree/QueryVisitor.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/tree/QueryVisitor.java b/stack/core/src/main/java/org/usergrid/persistence/query/tree/QueryVisitor.java
deleted file mode 100644
index 2a41728..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/tree/QueryVisitor.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.query.tree;
-
-
-import org.usergrid.persistence.exceptions.NoFullTextIndexException;
-import org.usergrid.persistence.exceptions.NoIndexException;
-import org.usergrid.persistence.exceptions.PersistenceException;
-
-
-/**
- * Interface for visiting nodes in our AST as we produce
- *
- * @author tnine
- */
-public interface QueryVisitor {
-
-    /**
-     *
-     * @param op
-     * @throws PersistenceException
-     */
-    public void visit( AndOperand op ) throws PersistenceException;
-
-    /**
-     * @param op
-     * @throws PersistenceException
-     */
-    public void visit( OrOperand op ) throws PersistenceException;
-
-    /**
-     * @param op
-     * @throws PersistenceException
-     */
-    public void visit( NotOperand op ) throws PersistenceException;
-
-    /**
-     * @param op
-     * @throws NoIndexException
-     */
-    public void visit( LessThan op ) throws NoIndexException;
-
-    /**
-     * @param op
-     * @throws NoFullTextIndexException
-     */
-    public void visit( ContainsOperand op ) throws NoFullTextIndexException;
-
-    /**
-     * @param op
-     */
-    public void visit( WithinOperand op );
-
-    /**
-     * @param op
-     * @throws NoIndexException
-     */
-    public void visit( LessThanEqual op ) throws NoIndexException;
-
-    /**
-     * @param op
-     * @throws NoIndexException
-     */
-    public void visit( Equal op ) throws NoIndexException;
-
-    /**
-     * @param op
-     * @throws NoIndexException
-     */
-    public void visit( GreaterThan op ) throws NoIndexException;
-
-    /**
-     * @param op
-     * @throws NoIndexException
-     */
-    public void visit( GreaterThanEqual op ) throws NoIndexException;
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/tree/StringLiteral.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/tree/StringLiteral.java b/stack/core/src/main/java/org/usergrid/persistence/query/tree/StringLiteral.java
deleted file mode 100644
index be8b0cf..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/tree/StringLiteral.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.query.tree;
-
-
-import org.antlr.runtime.ClassicToken;
-import org.antlr.runtime.Token;
-
-import static org.apache.commons.lang.StringUtils.removeEnd;
-
-
-/** @author tnine */
-public class StringLiteral extends Literal<String> {
-
-    private String value;
-    private String finishValue;
-
-
-    /**
-     * @param t
-     */
-    public StringLiteral( Token t ) {
-        super( t );
-        String newValue = t.getText();
-        newValue = newValue.substring( 1, newValue.length() - 1 );
-
-        parseValue( newValue );
-    }
-
-
-    public StringLiteral( String value ) {
-        super( new ClassicToken( 0, value ) );
-        parseValue( value );
-    }
-
-
-    /** Parse the value and set the optional end value */
-    private void parseValue( String value ) {
-
-        this.value = value.trim().toLowerCase();
-
-        if ( "*".equals( value ) ) {
-            this.value = null;
-            this.finishValue = null;
-            return;
-        }
-
-        if ( value != null && value.endsWith( "*" ) ) {
-            this.value = removeEnd( value.toString(), "*" );
-
-            finishValue = this.value + "\uFFFF";
-        }
-        // set the end value to the same as the start value
-        else {
-            finishValue = value;
-        }
-    }
-
-
-    /** If this were a string literal */
-    public String getEndValue() {
-        return this.finishValue;
-    }
-
-
-    public String getValue() {
-        return this.value;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/tree/UUIDLiteral.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/tree/UUIDLiteral.java b/stack/core/src/main/java/org/usergrid/persistence/query/tree/UUIDLiteral.java
deleted file mode 100644
index b1420da..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/tree/UUIDLiteral.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.query.tree;
-
-
-import java.util.UUID;
-
-import org.antlr.runtime.ClassicToken;
-import org.antlr.runtime.Token;
-
-
-/** @author tnine */
-public class UUIDLiteral extends Literal<UUID> {
-
-    private UUID value;
-
-
-    /**
-     * @param t
-     */
-    public UUIDLiteral( Token t ) {
-        super( t );
-        value = UUID.fromString( t.getText() );
-    }
-
-
-    public UUIDLiteral( UUID value ) {
-        super( new ClassicToken( 0, String.valueOf( value ) ) );
-        this.value = value;
-    }
-
-
-    public UUID getValue() {
-        return this.value;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/tree/WithinOperand.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/tree/WithinOperand.java b/stack/core/src/main/java/org/usergrid/persistence/query/tree/WithinOperand.java
deleted file mode 100644
index 74f9b4c..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/tree/WithinOperand.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.query.tree;
-
-
-import org.antlr.runtime.Token;
-
-
-/** @author tnine */
-public class WithinOperand extends Operand {
-
-    /**
-     * @param property
-     * @param literal
-     */
-    public WithinOperand( Token t ) {
-        super( t );
-    }
-
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see
-     * org.usergrid.persistence.query.tree.Operand#visit(org.usergrid.persistence
-     * .query.tree.QueryVisitor)
-     */
-    @Override
-    public void visit( QueryVisitor visitor ) {
-        visitor.visit( this );
-    }
-
-
-    /**
-     * @param propName
-     */
-    public void setProperty( String propName ) {
-        setChild( 0, new WithinProperty( propName ) );
-    }
-
-
-    /**
-     * @param distance
-     */
-    public void setDistance( float distance ) {
-        setChild( 1, new FloatLiteral( distance ) );
-    }
-
-
-    /**
-     * @param lattitude
-     */
-    public void setLattitude( float lattitude ) {
-        setChild( 2, new FloatLiteral( lattitude ) );
-    }
-
-
-    /**
-     * @param longitude
-     */
-    public void setLongitude( float longitude ) {
-        setChild( 3, new FloatLiteral( longitude ) );
-    }
-
-
-    /**
-     *
-     * @return
-     */
-    public WithinProperty getProperty() {
-        return ( WithinProperty ) this.children.get( 0 );
-    }
-
-
-    /**
-     *
-     * @return
-     */
-    public NumericLiteral getDistance() {
-        return ( NumericLiteral ) this.children.get( 1 );
-    }
-
-
-    /**
-     * @return
-     */
-    public NumericLiteral getLattitude() {
-        return ( NumericLiteral ) this.children.get( 2 );
-    }
-
-
-    /**
-     * @return
-     */
-    public NumericLiteral getLongitude() {
-        return ( NumericLiteral ) this.children.get( 3 );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/query/tree/WithinProperty.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/query/tree/WithinProperty.java b/stack/core/src/main/java/org/usergrid/persistence/query/tree/WithinProperty.java
deleted file mode 100644
index 7970ea3..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/query/tree/WithinProperty.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.query.tree;
-
-
-import org.antlr.runtime.ClassicToken;
-import org.antlr.runtime.Token;
-
-
-/**
- * A property
- *
- * @author tnine
- */
-public class WithinProperty extends Property {
-
-    private String indexedName = null;
-
-
-    public WithinProperty( Token t ) {
-        super( t );
-        this.indexedName = String.format( "%s.coordinates", super.getValue() );
-    }
-
-
-    public WithinProperty( String property ) {
-        this( new ClassicToken( 0, property ) );
-    }
-
-
-    /** Get the */
-    public String getIndexedName() {
-        return this.indexedName;
-    }
-
-
-    /** @return the property */
-    public WithinProperty getProperty() {
-        return ( WithinProperty ) this.children.get( 0 );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/schema/CollectionInfo.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/schema/CollectionInfo.java b/stack/core/src/main/java/org/usergrid/persistence/schema/CollectionInfo.java
deleted file mode 100644
index 6cc01e5..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/schema/CollectionInfo.java
+++ /dev/null
@@ -1,207 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.schema;
-
-
-import java.util.Arrays;
-import java.util.LinkedHashSet;
-import java.util.Set;
-import java.util.TreeSet;
-
-import org.usergrid.persistence.Schema;
-import org.usergrid.persistence.annotations.EntityCollection;
-
-
-public class CollectionInfo {
-
-    private String name;
-    private EntityInfo container;
-
-    private boolean indexingDynamicDictionaries;
-    private String linkedCollection;
-    private Set<String> propertiesIndexed = null;
-    private boolean publicVisible = true;
-    private final Set<String> dictionariesIndexed = new TreeSet<String>( String.CASE_INSENSITIVE_ORDER );
-    private String type;
-    private boolean reversed;
-    private boolean includedInExport = true;
-    private String sort;
-
-
-    public CollectionInfo() {
-    }
-
-
-    public CollectionInfo( EntityCollection collectionAnnotation ) {
-        setIndexingDynamicDictionaries( collectionAnnotation.indexingDynamicDictionaries() );
-        setLinkedCollection( collectionAnnotation.linkedCollection() );
-        setPublic( collectionAnnotation.publicVisible() );
-        setDictionariesIndexed(
-                new LinkedHashSet<String>( Arrays.asList( collectionAnnotation.dictionariesIndexed() ) ) );
-        setType( collectionAnnotation.type() );
-        setReversed( collectionAnnotation.reversed() );
-        setIncludedInExport( collectionAnnotation.includedInExport() );
-        setSort( collectionAnnotation.sort() );
-    }
-
-
-    public String getType() {
-        return type;
-    }
-
-
-    public void setType( String type ) {
-        if ( "".equals( type ) ) {
-            type = null;
-        }
-        this.type = type;
-    }
-
-
-    public boolean isPropertyIndexed( String propertyName ) {
-        return getPropertiesIndexed().contains( propertyName );
-    }
-
-
-    public boolean hasIndexedProperties() {
-        return !getPropertiesIndexed().isEmpty();
-    }
-
-
-    public Set<String> getPropertiesIndexed() {
-        if ( propertiesIndexed != null ) {
-            return propertiesIndexed;
-        }
-        return Schema.getDefaultSchema().getEntityInfo( getType() ).getIndexedProperties();
-    }
-
-
-    public void setPropertiesIndexed( Set<String> propertiesIndexed ) {
-        this.propertiesIndexed = new TreeSet<String>( String.CASE_INSENSITIVE_ORDER );
-        this.propertiesIndexed.addAll( propertiesIndexed );
-    }
-
-
-    public boolean isDictionaryIndexed( String propertyName ) {
-        return dictionariesIndexed.contains( propertyName );
-    }
-
-
-    public Set<String> getDictionariesIndexed() {
-        return dictionariesIndexed;
-    }
-
-
-    public void setDictionariesIndexed( Set<String> dictionariesIndexed ) {
-        dictionariesIndexed = new TreeSet<String>( String.CASE_INSENSITIVE_ORDER );
-        dictionariesIndexed.addAll( dictionariesIndexed );
-    }
-
-
-    public boolean isIndexingDynamicDictionaries() {
-        return indexingDynamicDictionaries;
-    }
-
-
-    public void setIndexingDynamicDictionaries( boolean indexingDynamicDictionaries ) {
-        this.indexingDynamicDictionaries = indexingDynamicDictionaries;
-    }
-
-
-    public String getLinkedCollection() {
-        return linkedCollection;
-    }
-
-
-    public void setLinkedCollection( String linkedCollection ) {
-        if ( "".equals( linkedCollection ) ) {
-            linkedCollection = null;
-        }
-        this.linkedCollection = linkedCollection;
-    }
-
-
-    public String getName() {
-        return name;
-    }
-
-
-    public void setName( String name ) {
-        this.name = name;
-    }
-
-
-    public EntityInfo getContainer() {
-        return container;
-    }
-
-
-    public void setContainer( EntityInfo entityInfo ) {
-        container = entityInfo;
-    }
-
-
-    public boolean isPublic() {
-        return publicVisible;
-    }
-
-
-    public void setPublic( boolean publicVisible ) {
-        this.publicVisible = publicVisible;
-    }
-
-
-    public boolean isReversed() {
-        return reversed;
-    }
-
-
-    public void setReversed( boolean reversed ) {
-        this.reversed = reversed;
-    }
-
-
-    public void setIncludedInExport( boolean includedInExport ) {
-        this.includedInExport = includedInExport;
-    }
-
-
-    public boolean isIncludedInExport() {
-        return includedInExport;
-    }
-
-
-    public String getSort() {
-        return sort;
-    }
-
-
-    public void setSort( String sort ) {
-        if ( "".equals( sort ) ) {
-            sort = null;
-        }
-        this.sort = sort;
-    }
-
-
-    @Override
-    public String toString() {
-        return "CollectionInfo [name=" + name + ", indexingDynamicDictionaries=" + indexingDynamicDictionaries
-                + ", linkedCollection=" + linkedCollection + ", propertiesIndexed=" + propertiesIndexed
-                + ", publicVisible=" + publicVisible + ", dictionariesIndexed=" + dictionariesIndexed + ", type=" + type
-                + ", reversed=" + reversed + ", includedInExport=" + includedInExport + ", sort=" + sort + "]";
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/schema/DictionaryInfo.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/schema/DictionaryInfo.java b/stack/core/src/main/java/org/usergrid/persistence/schema/DictionaryInfo.java
deleted file mode 100644
index 3d88358..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/schema/DictionaryInfo.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.schema;
-
-
-import org.usergrid.persistence.annotations.EntityDictionary;
-
-
-public class DictionaryInfo {
-    private String name;
-    private Class<?> keyType;
-
-    private Class<?> valueType; // = Long.class.getName();
-    private boolean keysIndexedInConnections;
-    private boolean publicVisible = true;
-    private boolean includedInExport = true;
-    ;
-
-
-    public DictionaryInfo() {
-    }
-
-
-    public DictionaryInfo( EntityDictionary setAnnotation ) {
-        setKeyType( setAnnotation.keyType() );
-        setValueType( setAnnotation.valueType() );
-        setKeysIndexedInConnections( setAnnotation.keysIndexedInConnections() );
-        setPublic( setAnnotation.publicVisible() );
-        setIncludedInExport( setAnnotation.includedInExport() );
-    }
-
-
-    public String getName() {
-        return name;
-    }
-
-
-    public void setName( String name ) {
-        this.name = name;
-    }
-
-
-    public Class<?> getKeyType() {
-        return keyType;
-    }
-
-
-    public void setKeyType( Class<?> type ) {
-        if ( type == Object.class ) {
-            type = null;
-        }
-        keyType = type;
-    }
-
-
-    public Class<?> getValueType() {
-        return valueType;
-    }
-
-
-    public void setValueType( Class<?> valueType ) {
-        if ( valueType == Object.class ) {
-            valueType = null;
-        }
-        this.valueType = valueType;
-    }
-
-
-    public boolean isKeysIndexedInConnections() {
-        return keysIndexedInConnections;
-    }
-
-
-    public void setKeysIndexedInConnections( boolean keysIndexedInConnections ) {
-        this.keysIndexedInConnections = keysIndexedInConnections;
-    }
-
-
-    public boolean isPublic() {
-        return publicVisible;
-    }
-
-
-    public void setPublic( boolean publicVisible ) {
-        this.publicVisible = publicVisible;
-    }
-
-
-    public boolean isIncludedInExport() {
-        return includedInExport;
-    }
-
-
-    public void setIncludedInExport( boolean includedInExport ) {
-        this.includedInExport = includedInExport;
-    }
-
-
-    @Override
-    public String toString() {
-        return "Set [name=" + name + ", keyType=" + keyType + ", valueType=" + valueType + ", keysIndexedInConnections="
-                + keysIndexedInConnections + ", publicVisible=" + publicVisible + "]";
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/schema/EntityInfo.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/schema/EntityInfo.java b/stack/core/src/main/java/org/usergrid/persistence/schema/EntityInfo.java
deleted file mode 100644
index 843412d..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/schema/EntityInfo.java
+++ /dev/null
@@ -1,299 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.schema;
-
-
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-import java.util.TreeMap;
-import java.util.TreeSet;
-
-import org.usergrid.persistence.Schema;
-
-
-public class EntityInfo {
-
-    private String type;
-
-    private String aliasProperty;
-
-    private Map<String, PropertyInfo> properties = new TreeMap<String, PropertyInfo>( String.CASE_INSENSITIVE_ORDER );
-    private final Set<String> indexed = new TreeSet<String>( String.CASE_INSENSITIVE_ORDER );
-    private final Set<String> basic = new TreeSet<String>( String.CASE_INSENSITIVE_ORDER );
-    private final Set<String> required = new TreeSet<String>( String.CASE_INSENSITIVE_ORDER );
-    private Map<String, DictionaryInfo> dictionaries =
-            new TreeMap<String, DictionaryInfo>( String.CASE_INSENSITIVE_ORDER );
-    private Map<String, CollectionInfo> collections =
-            new TreeMap<String, CollectionInfo>( String.CASE_INSENSITIVE_ORDER );
-    private final Set<String> fulltextIndexed = new TreeSet<String>( String.CASE_INSENSITIVE_ORDER );
-
-    private boolean publicVisible = true;
-
-    private boolean includedInExport = true;
-    ;
-
-
-    public EntityInfo() {
-    }
-
-
-    public String getType() {
-        return type;
-    }
-
-
-    public void setType( String type ) {
-        this.type = type;
-    }
-
-
-    public boolean hasProperty( String propertyName ) {
-        return properties.containsKey( propertyName );
-    }
-
-
-    public PropertyInfo getProperty( String propertyName ) {
-        return properties.get( propertyName );
-    }
-
-
-    public boolean hasProperties() {
-        return !properties.isEmpty();
-    }
-
-
-    public Map<String, PropertyInfo> getProperties() {
-        return properties;
-    }
-
-
-    public void setProperties( Map<String, PropertyInfo> properties ) {
-        this.properties = new TreeMap<String, PropertyInfo>( String.CASE_INSENSITIVE_ORDER );
-        this.properties.putAll( properties );
-        for ( String key : properties.keySet() ) {
-            PropertyInfo property = properties.get( key );
-            property.setName( key );
-
-            if ( property.isIndexed() ) {
-                indexed.add( key );
-            }
-
-            if ( property.isRequired() ) {
-                required.add( key );
-                // logger.info("property " + key + " is required");
-            }
-
-            if ( property.isBasic() ) {
-                basic.add( key );
-            }
-
-
-            if ( property.isFulltextIndexed() ) {
-                fulltextIndexed.add( key );
-            }
-
-            if ( property.isAliasProperty() ) {
-                aliasProperty = property.getName();
-            }
-        }
-    }
-
-
-    public boolean isPropertyMutable( String propertyName ) {
-        PropertyInfo property = properties.get( propertyName );
-        if ( property == null ) {
-            return false;
-        }
-        return property.isMutable();
-    }
-
-
-    /** A property is unique if it has either been declared as unique, or as an alias property */
-    public boolean isPropertyUnique( String propertyName ) {
-        PropertyInfo property = properties.get( propertyName );
-        if ( property == null ) {
-            return false;
-        }
-        return property.isUnique() || property.isAliasProperty();
-    }
-
-
-    public boolean isPropertyTimestamp( String propertyName ) {
-        PropertyInfo property = properties.get( propertyName );
-        if ( property == null ) {
-            return false;
-        }
-        return property.isTimestamp();
-    }
-
-
-    public boolean isPropertyRequired( String propertyName ) {
-        return required.contains( propertyName );
-    }
-
-
-    public Set<String> getIndexedProperties() {
-        return indexed;
-    }
-
-
-    public boolean isPropertyIndexed( String propertyName ) {
-        return indexed.contains( propertyName );
-    }
-
-
-    public boolean isPropertyFulltextIndexed( String propertyName ) {
-        return fulltextIndexed.contains( propertyName );
-    }
-
-
-    public Set<String> getRequiredProperties() {
-        return required;
-    }
-
-
-    public boolean isPropertyBasic( String propertyName ) {
-        return basic.contains( propertyName );
-    }
-
-
-    public Set<String> getBasicProperties() {
-        return basic;
-    }
-
-
-    public boolean hasDictionary( String dictionaryName ) {
-        return dictionaries.containsKey( dictionaryName );
-    }
-
-
-    public DictionaryInfo getDictionary( String dictionaryName ) {
-        return dictionaries.get( dictionaryName );
-    }
-
-
-    public boolean hasDictionaries() {
-        return !dictionaries.isEmpty();
-    }
-
-
-    public Map<String, DictionaryInfo> getDictionaries() {
-        return dictionaries;
-    }
-
-
-    public void setDictionaries( Map<String, DictionaryInfo> dictionaries ) {
-        this.dictionaries = new TreeMap<String, DictionaryInfo>( String.CASE_INSENSITIVE_ORDER );
-        this.dictionaries.putAll( dictionaries );
-        for ( String key : dictionaries.keySet() ) {
-            DictionaryInfo dictionary = dictionaries.get( key );
-            dictionary.setName( key );
-        }
-
-        for ( @SuppressWarnings( "rawtypes" ) Entry<String, Class> dictionaryEntry : Schema.DEFAULT_DICTIONARIES
-                                                                                           .entrySet() ) {
-            String dictionaryName = dictionaryEntry.getKey();
-            if ( !this.dictionaries.containsKey( dictionaryName ) ) {
-                DictionaryInfo dictionary = new DictionaryInfo();
-                dictionary.setName( dictionaryName );
-                dictionary.setKeyType( String.class );
-                dictionary.setValueType( dictionaryEntry.getValue() );
-                this.dictionaries.put( dictionaryName, dictionary );
-            }
-        }
-    }
-
-
-    public boolean hasCollection( String collectionName ) {
-        return collections.containsKey( collectionName );
-    }
-
-
-    public CollectionInfo getCollection( String collectionName ) {
-        return collections.get( collectionName );
-    }
-
-
-    public Map<String, CollectionInfo> getCollections() {
-        return collections;
-    }
-
-
-    public void setCollections( Map<String, CollectionInfo> collections ) {
-        this.collections = new TreeMap<String, CollectionInfo>( String.CASE_INSENSITIVE_ORDER );
-        this.collections.putAll( collections );
-    }
-
-
-    public void mapCollectors( Schema schema, String entityType ) {
-
-        setType( entityType );
-
-        for ( String collectionName : collections.keySet() ) {
-            CollectionInfo collection = collections.get( collectionName );
-            collection.setContainer( this );
-            collection.setName( collectionName );
-            schema.mapCollector( collection.getType(), entityType, collectionName, collection );
-        }
-    }
-
-
-    public String getAliasProperty() {
-        return aliasProperty;
-    }
-
-
-    public void setAliasProperty( String nameProperty ) {
-        aliasProperty = nameProperty;
-    }
-
-
-    public PropertyInfo getAliasPropertyObject() {
-        if ( aliasProperty == null ) {
-            return null;
-        }
-        return getProperty( aliasProperty );
-    }
-
-
-    public boolean isPublic() {
-        return publicVisible;
-    }
-
-
-    public void setPublic( boolean publicVisible ) {
-        this.publicVisible = publicVisible;
-    }
-
-
-    public void setIncludedInExport( boolean includedInExport ) {
-        this.includedInExport = includedInExport;
-    }
-
-
-    public boolean isIncludedInExport() {
-        return includedInExport;
-    }
-
-
-    @Override
-    public String toString() {
-        return "Entity [type=" + type + ", aliasProperty=" + aliasProperty + ", properties=" + properties + ", indexed="
-                + indexed + ", required=" + required + ", sets=" + dictionaries + ", collections=" + collections
-                + ", fulltextIndexed=" + fulltextIndexed + ", publicVisible=" + publicVisible + "]";
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/schema/PropertyInfo.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/schema/PropertyInfo.java b/stack/core/src/main/java/org/usergrid/persistence/schema/PropertyInfo.java
deleted file mode 100644
index 465e049..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/schema/PropertyInfo.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.schema;
-
-
-import org.usergrid.persistence.annotations.EntityProperty;
-
-
-public class PropertyInfo {
-    private String name;
-    private Class<?> type;
-
-    private boolean aliasProperty;
-    private boolean fulltextIndexed;
-    private boolean indexed = true;
-    private boolean basic = false;
-    private boolean mutable = true;
-    private boolean pathBasedName;
-    private boolean publicVisible = true;
-    private boolean required;
-    private boolean unique;
-    private boolean includedInExport = true;
-    private boolean timestamp = false;
-    private boolean encrypted = false;
-
-
-    public PropertyInfo() {
-    }
-
-
-    public PropertyInfo( EntityProperty propertyAnnotation ) {
-        setName( propertyAnnotation.name() );
-        setAliasProperty( propertyAnnotation.aliasProperty() );
-        setFulltextIndexed( propertyAnnotation.fulltextIndexed() );
-        setIndexed( propertyAnnotation.indexed() );
-        setBasic( propertyAnnotation.basic() );
-        setMutable( propertyAnnotation.mutable() );
-        setPathBasedName( propertyAnnotation.pathBasedName() );
-        setPublic( propertyAnnotation.publicVisible() );
-        setRequired( propertyAnnotation.required() );
-        setUnique( propertyAnnotation.unique() );
-        setIncludedInExport( propertyAnnotation.includedInExport() );
-        setTimestamp( propertyAnnotation.timestamp() );
-        setEncrypted( propertyAnnotation.encrypted() );
-    }
-
-
-    public String getName() {
-        return name;
-    }
-
-
-    public void setName( String name ) {
-        if ( "".equals( name ) ) {
-            name = null;
-        }
-        this.name = name;
-    }
-
-
-    public Class<?> getType() {
-        return type;
-    }
-
-
-    public void setType( Class<?> type ) {
-        if ( type == Object.class ) {
-            type = null;
-        }
-        this.type = type;
-    }
-
-
-    public boolean isIndexed() {
-        return indexed;
-    }
-
-
-    public void setIndexed( boolean indexed ) {
-        this.indexed = indexed;
-    }
-
-
-    public boolean isBasic() {
-        return basic;
-    }
-
-
-    public void setBasic( boolean basic ) {
-        this.basic = basic;
-    }
-
-
-    public boolean isRequired() {
-        return required;
-    }
-
-
-    public void setRequired( boolean required ) {
-        this.required = required;
-    }
-
-
-    public boolean isMutable() {
-        return mutable;
-    }
-
-
-    public void setMutable( boolean mutable ) {
-        this.mutable = mutable;
-    }
-
-
-    public boolean isUnique() {
-        return unique;
-    }
-
-
-    public void setUnique( boolean unique ) {
-        this.unique = unique;
-    }
-
-
-    public boolean isAliasProperty() {
-        return aliasProperty;
-    }
-
-
-    public void setAliasProperty( boolean aliasProperty ) {
-        this.aliasProperty = aliasProperty;
-        if ( aliasProperty ) {
-            mutable = false;
-        }
-    }
-
-
-    public boolean isPathBasedName() {
-        return pathBasedName;
-    }
-
-
-    public void setPathBasedName( boolean pathBasedName ) {
-        this.pathBasedName = pathBasedName;
-    }
-
-
-    public boolean isFulltextIndexed() {
-        return fulltextIndexed;
-    }
-
-
-    public void setFulltextIndexed( boolean fulltextIndexed ) {
-        this.fulltextIndexed = fulltextIndexed;
-    }
-
-
-    public boolean isPublic() {
-        return publicVisible;
-    }
-
-
-    public void setPublic( boolean publicVisible ) {
-        this.publicVisible = publicVisible;
-    }
-
-
-    public boolean isIncludedInExport() {
-        return includedInExport;
-    }
-
-
-    public void setIncludedInExport( boolean includedInExport ) {
-        this.includedInExport = includedInExport;
-    }
-
-
-    public boolean isTimestamp() {
-        return timestamp;
-    }
-
-
-    public void setTimestamp( boolean timestamp ) {
-        this.timestamp = timestamp;
-    }
-
-
-    public boolean isEncrypted() {
-        return encrypted;
-    }
-
-
-    public void setEncrypted( boolean encrypted ) {
-        this.encrypted = encrypted;
-    }
-
-
-    @Override
-    public String toString() {
-        return "PropertyInfo [name=" + name + ", type=" + type + ", aliasProperty=" + aliasProperty
-                + ", fulltextIndexed=" + fulltextIndexed + ", indexed=" + indexed + ", basic=" + basic + ", mutable="
-                + mutable + ", pathBasedName=" + pathBasedName + ", publicVisible=" + publicVisible + ", required="
-                + required + ", unique=" + unique + ", includedInExport=" + includedInExport + ", timestamp="
-                + timestamp + "]";
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/system/UsergridSystemMonitor.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/system/UsergridSystemMonitor.java b/stack/core/src/main/java/org/usergrid/system/UsergridSystemMonitor.java
deleted file mode 100644
index 68dad28..0000000
--- a/stack/core/src/main/java/org/usergrid/system/UsergridSystemMonitor.java
+++ /dev/null
@@ -1,95 +0,0 @@
-package org.usergrid.system;
-
-
-import java.util.Properties;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.usergrid.utils.JsonUtils;
-import org.usergrid.utils.MapUtils;
-import org.usergrid.utils.TimeUtils;
-
-import me.prettyprint.hector.api.Cluster;
-import me.prettyprint.hector.api.exceptions.HectorException;
-
-
-/**
- * Provide a single spot for monitoring usergrid system health
- *
- * @author zznate
- */
-public class UsergridSystemMonitor {
-    private static final String TIMER_THRESHOLD_TRIGGERED_MSG =
-            "TimerThreshold triggered on duration: %d \n%s\n----------------";
-    private static Logger logger = LoggerFactory.getLogger( UsergridSystemMonitor.class );
-
-    private final String buildNumber;
-    private final Cluster cluster;
-    /** The trigger point for printing debugging information. {@see #maybeLogPayload} */
-    private long timerLogThreshold = 15 * 1000;
-    public static final String LOG_THRESHOLD_PROPERTY = "metering.request.timer.log.threshold";
-
-
-    /**
-     * Must be instantiated with a build number and a cluster to be of any use. Properties can be null. Threshold
-     * property must be a form compatible with {@link TimeUtils#millisFromDuration(String)}
-     */
-    public UsergridSystemMonitor( String buildNumber, Cluster cluster, Properties properties ) {
-        this.buildNumber = buildNumber;
-        this.cluster = cluster;
-        if ( properties != null ) {
-            timerLogThreshold = TimeUtils.millisFromDuration( properties.getProperty( LOG_THRESHOLD_PROPERTY, "15s" ) );
-        }
-    }
-
-
-    /**
-     * Wraps "describe_thrift_version API call as this hits a static string in Cassandra. This is the most lightweight
-     * way to assure that Hector is alive and talking to the cluster.
-     *
-     * @return true if we have a lit connection to the cluster.
-     */
-    public boolean getIsCassandraAlive() {
-        boolean isAlive = false;
-        try {
-            isAlive = cluster.describeThriftVersion() != null;
-        }
-        catch ( HectorException he ) {
-            logger.error( "Could not communicate with Cassandra cluster", he );
-        }
-        return isAlive;
-    }
-
-
-    /** @return a string representing the build number */
-    public String getBuildNumber() {
-        return buildNumber;
-    }
-
-
-    /**
-     * Uses {@link JsonUtils#mapToFormattedJsonString(Object)} against the object if the duration is greater than {@link
-     * #timerLogThreshold}. When using the varargs form, the number of elements must be even such that key,value,key,
-     * value mapping via {@link MapUtils#map(Object...)} can collect all the elements.
-     * <p/>
-     * Conversion to a map this way let's us lazy create the map if and only if the triggering threshold is true or we
-     * are in debug mode.
-     */
-    public void maybeLogPayload( long duration, Object... objects ) {
-        if ( duration > timerLogThreshold || logger.isDebugEnabled() ) {
-            String message;
-            if ( objects.length > 1 ) {
-                message = formatMessage( duration, MapUtils.map( objects ) );
-            }
-            else {
-                message = formatMessage( duration, objects );
-            }
-            logger.info( message );
-        }
-    }
-
-
-    static String formatMessage( long duration, Object object ) {
-        return String.format( TIMER_THRESHOLD_TRIGGERED_MSG, duration, JsonUtils.mapToFormattedJsonString( object ) );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/utils/AESUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/utils/AESUtils.java b/stack/core/src/main/java/org/usergrid/utils/AESUtils.java
deleted file mode 100644
index b409599..0000000
--- a/stack/core/src/main/java/org/usergrid/utils/AESUtils.java
+++ /dev/null
@@ -1,84 +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.usergrid.utils;
-
-
-import javax.crypto.Cipher;
-import javax.crypto.SecretKey;
-import javax.crypto.spec.SecretKeySpec;
-
-import org.apache.commons.codec.binary.Base64;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import static org.apache.commons.lang.StringUtils.rightPad;
-import static org.apache.commons.lang.StringUtils.substring;
-
-
-public class AESUtils {
-
-    private static final Logger LOG = LoggerFactory.getLogger( AESUtils.class );
-
-    private static byte[] linebreak = { };
-    private static Cipher cipher;
-    private static Base64 coder;
-
-
-    static {
-        try {
-            cipher = Cipher.getInstance( "AES/ECB/PKCS5Padding", "SunJCE" );
-            coder = new Base64( 32, linebreak, true );
-        }
-        catch ( Throwable t ) {
-            LOG.error( "Cipher error", t );
-        }
-    }
-
-
-    public static synchronized String encrypt( String secret, String plainText ) {
-        secret = substring( rightPad( secret, 16 ), 0, 16 );
-        SecretKey key = new SecretKeySpec( secret.getBytes(), "AES" );
-        try {
-            cipher.init( Cipher.ENCRYPT_MODE, key );
-            byte[] cipherText = cipher.doFinal( plainText.getBytes() );
-            return new String( coder.encode( cipherText ) );
-        }
-        catch ( Exception e ) {
-            LOG.error( "Encryption error", e );
-        }
-        return null;
-    }
-
-
-    @SuppressWarnings("unused")
-    public static synchronized String decrypt( String secret, String codedText ) {
-        secret = substring( rightPad( secret, 16 ), 0, 16 );
-        SecretKey key = new SecretKeySpec( secret.getBytes(), "AES" );
-        byte[] encypted = coder.decode( codedText.getBytes() );
-        try {
-            cipher.init( Cipher.DECRYPT_MODE, key );
-            byte[] decrypted = cipher.doFinal( encypted );
-            return new String( decrypted );
-        }
-        catch ( Exception e ) {
-            LOG.error( "Decryption error", e );
-        }
-        return null;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/utils/BCrypt.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/utils/BCrypt.java b/stack/core/src/main/java/org/usergrid/utils/BCrypt.java
deleted file mode 100644
index 4ceb06a..0000000
--- a/stack/core/src/main/java/org/usergrid/utils/BCrypt.java
+++ /dev/null
@@ -1,627 +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.usergrid.utils;
-
-//Copyright (c) 2006 Damien Miller <dj...@mindrot.org>
-//
-// Permission to use, copy, modify, and distribute this software for any
-// purpose with or without fee is hereby granted, provided that the above
-// copyright notice and this permission notice appear in all copies.
-//
-// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-import java.io.UnsupportedEncodingException;
-import java.security.SecureRandom;
-
-
-/**
- * BCrypt implements OpenBSD-style Blowfish password hashing using the scheme described in "A Future-Adaptable Password
- * Scheme" by Niels Provos and David Mazieres.
- * <p/>
- * This password hashing system tries to thwart off-line password cracking using a computationally-intensive hashing
- * algorithm, based on Bruce Schneier's Blowfish cipher. The work factor of the algorithm is parameterised, so it can be
- * increased as computers get faster.
- * <p/>
- * Usage is really simple. To hash a password for the first time, call the hashpw method with a random salt, like this:
- * <p/>
- * <code> String pw_hash = BCrypt.hashpw(plain_password, BCrypt.gensalt()); <br /> </code>
- * <p/>
- * To check whether a plaintext password matches one that has been hashed previously, use the checkpw method:
- * <p/>
- * <code> if (BCrypt.checkpw(candidate_password, stored_hash))<br /> &nbsp;&nbsp;&nbsp;&nbsp;System.out.println("It
- * matches");<br /> else<br /> &nbsp;&nbsp;&nbsp;&nbsp;System.out.println("It does not match");<br /> </code>
- * <p/>
- * The gensalt() method takes an optional parameter (logRounds) that determines the computational complexity of the
- * hashing:
- * <p/>
- * <code> String strong_salt = BCrypt.gensalt(10)<br /> String stronger_salt = BCrypt.gensalt(12)<br /> </code>
- * <p/>
- * The amount of work increases exponentially (2**logRounds), so each increment is twice as much work. The default
- * logRounds is 10, and the valid range is 4 to 31.
- *
- * @version 0.2
- */
-public class BCrypt {
-    private static final int BCRYPT_SALT_LEN = 16;
-
-    // Blowfish parameters
-    private static final int BLOWFISH_NUM_ROUNDS = 16;
-
-    // Initial contents of key schedule
-    private static final int[] P_orig = {
-            0x243f6a88, 0x85a308d3, 0x13198a2e, 0x03707344, 0xa4093822, 0x299f31d0, 0x082efa98, 0xec4e6c89, 0x452821e6,
-            0x38d01377, 0xbe5466cf, 0x34e90c6c, 0xc0ac29b7, 0xc97c50dd, 0x3f84d5b5, 0xb5470917, 0x9216d5d9, 0x8979fb1b
-    };
-    private static final int[] S_orig = {
-            0xd1310ba6, 0x98dfb5ac, 0x2ffd72db, 0xd01adfb7, 0xb8e1afed, 0x6a267e96, 0xba7c9045, 0xf12c7f99, 0x24a19947,
-            0xb3916cf7, 0x0801f2e2, 0x858efc16, 0x636920d8, 0x71574e69, 0xa458fea3, 0xf4933d7e, 0x0d95748f, 0x728eb658,
-            0x718bcd58, 0x82154aee, 0x7b54a41d, 0xc25a59b5, 0x9c30d539, 0x2af26013, 0xc5d1b023, 0x286085f0, 0xca417918,
-            0xb8db38ef, 0x8e79dcb0, 0x603a180e, 0x6c9e0e8b, 0xb01e8a3e, 0xd71577c1, 0xbd314b27, 0x78af2fda, 0x55605c60,
-            0xe65525f3, 0xaa55ab94, 0x57489862, 0x63e81440, 0x55ca396a, 0x2aab10b6, 0xb4cc5c34, 0x1141e8ce, 0xa15486af,
-            0x7c72e993, 0xb3ee1411, 0x636fbc2a, 0x2ba9c55d, 0x741831f6, 0xce5c3e16, 0x9b87931e, 0xafd6ba33, 0x6c24cf5c,
-            0x7a325381, 0x28958677, 0x3b8f4898, 0x6b4bb9af, 0xc4bfe81b, 0x66282193, 0x61d809cc, 0xfb21a991, 0x487cac60,
-            0x5dec8032, 0xef845d5d, 0xe98575b1, 0xdc262302, 0xeb651b88, 0x23893e81, 0xd396acc5, 0x0f6d6ff3, 0x83f44239,
-            0x2e0b4482, 0xa4842004, 0x69c8f04a, 0x9e1f9b5e, 0x21c66842, 0xf6e96c9a, 0x670c9c61, 0xabd388f0, 0x6a51a0d2,
-            0xd8542f68, 0x960fa728, 0xab5133a3, 0x6eef0b6c, 0x137a3be4, 0xba3bf050, 0x7efb2a98, 0xa1f1651d, 0x39af0176,
-            0x66ca593e, 0x82430e88, 0x8cee8619, 0x456f9fb4, 0x7d84a5c3, 0x3b8b5ebe, 0xe06f75d8, 0x85c12073, 0x401a449f,
-            0x56c16aa6, 0x4ed3aa62, 0x363f7706, 0x1bfedf72, 0x429b023d, 0x37d0d724, 0xd00a1248, 0xdb0fead3, 0x49f1c09b,
-            0x075372c9, 0x80991b7b, 0x25d479d8, 0xf6e8def7, 0xe3fe501a, 0xb6794c3b, 0x976ce0bd, 0x04c006ba, 0xc1a94fb6,
-            0x409f60c4, 0x5e5c9ec2, 0x196a2463, 0x68fb6faf, 0x3e6c53b5, 0x1339b2eb, 0x3b52ec6f, 0x6dfc511f, 0x9b30952c,
-            0xcc814544, 0xaf5ebd09, 0xbee3d004, 0xde334afd, 0x660f2807, 0x192e4bb3, 0xc0cba857, 0x45c8740f, 0xd20b5f39,
-            0xb9d3fbdb, 0x5579c0bd, 0x1a60320a, 0xd6a100c6, 0x402c7279, 0x679f25fe, 0xfb1fa3cc, 0x8ea5e9f8, 0xdb3222f8,
-            0x3c7516df, 0xfd616b15, 0x2f501ec8, 0xad0552ab, 0x323db5fa, 0xfd238760, 0x53317b48, 0x3e00df82, 0x9e5c57bb,
-            0xca6f8ca0, 0x1a87562e, 0xdf1769db, 0xd542a8f6, 0x287effc3, 0xac6732c6, 0x8c4f5573, 0x695b27b0, 0xbbca58c8,
-            0xe1ffa35d, 0xb8f011a0, 0x10fa3d98, 0xfd2183b8, 0x4afcb56c, 0x2dd1d35b, 0x9a53e479, 0xb6f84565, 0xd28e49bc,
-            0x4bfb9790, 0xe1ddf2da, 0xa4cb7e33, 0x62fb1341, 0xcee4c6e8, 0xef20cada, 0x36774c01, 0xd07e9efe, 0x2bf11fb4,
-            0x95dbda4d, 0xae909198, 0xeaad8e71, 0x6b93d5a0, 0xd08ed1d0, 0xafc725e0, 0x8e3c5b2f, 0x8e7594b7, 0x8ff6e2fb,
-            0xf2122b64, 0x8888b812, 0x900df01c, 0x4fad5ea0, 0x688fc31c, 0xd1cff191, 0xb3a8c1ad, 0x2f2f2218, 0xbe0e1777,
-            0xea752dfe, 0x8b021fa1, 0xe5a0cc0f, 0xb56f74e8, 0x18acf3d6, 0xce89e299, 0xb4a84fe0, 0xfd13e0b7, 0x7cc43b81,
-            0xd2ada8d9, 0x165fa266, 0x80957705, 0x93cc7314, 0x211a1477, 0xe6ad2065, 0x77b5fa86, 0xc75442f5, 0xfb9d35cf,
-            0xebcdaf0c, 0x7b3e89a0, 0xd6411bd3, 0xae1e7e49, 0x00250e2d, 0x2071b35e, 0x226800bb, 0x57b8e0af, 0x2464369b,
-            0xf009b91e, 0x5563911d, 0x59dfa6aa, 0x78c14389, 0xd95a537f, 0x207d5ba2, 0x02e5b9c5, 0x83260376, 0x6295cfa9,
-            0x11c81968, 0x4e734a41, 0xb3472dca, 0x7b14a94a, 0x1b510052, 0x9a532915, 0xd60f573f, 0xbc9bc6e4, 0x2b60a476,
-            0x81e67400, 0x08ba6fb5, 0x571be91f, 0xf296ec6b, 0x2a0dd915, 0xb6636521, 0xe7b9f9b6, 0xff34052e, 0xc5855664,
-            0x53b02d5d, 0xa99f8fa1, 0x08ba4799, 0x6e85076a, 0x4b7a70e9, 0xb5b32944, 0xdb75092e, 0xc4192623, 0xad6ea6b0,
-            0x49a7df7d, 0x9cee60b8, 0x8fedb266, 0xecaa8c71, 0x699a17ff, 0x5664526c, 0xc2b19ee1, 0x193602a5, 0x75094c29,
-            0xa0591340, 0xe4183a3e, 0x3f54989a, 0x5b429d65, 0x6b8fe4d6, 0x99f73fd6, 0xa1d29c07, 0xefe830f5, 0x4d2d38e6,
-            0xf0255dc1, 0x4cdd2086, 0x8470eb26, 0x6382e9c6, 0x021ecc5e, 0x09686b3f, 0x3ebaefc9, 0x3c971814, 0x6b6a70a1,
-            0x687f3584, 0x52a0e286, 0xb79c5305, 0xaa500737, 0x3e07841c, 0x7fdeae5c, 0x8e7d44ec, 0x5716f2b8, 0xb03ada37,
-            0xf0500c0d, 0xf01c1f04, 0x0200b3ff, 0xae0cf51a, 0x3cb574b2, 0x25837a58, 0xdc0921bd, 0xd19113f9, 0x7ca92ff6,
-            0x94324773, 0x22f54701, 0x3ae5e581, 0x37c2dadc, 0xc8b57634, 0x9af3dda7, 0xa9446146, 0x0fd0030e, 0xecc8c73e,
-            0xa4751e41, 0xe238cd99, 0x3bea0e2f, 0x3280bba1, 0x183eb331, 0x4e548b38, 0x4f6db908, 0x6f420d03, 0xf60a04bf,
-            0x2cb81290, 0x24977c79, 0x5679b072, 0xbcaf89af, 0xde9a771f, 0xd9930810, 0xb38bae12, 0xdccf3f2e, 0x5512721f,
-            0x2e6b7124, 0x501adde6, 0x9f84cd87, 0x7a584718, 0x7408da17, 0xbc9f9abc, 0xe94b7d8c, 0xec7aec3a, 0xdb851dfa,
-            0x63094366, 0xc464c3d2, 0xef1c1847, 0x3215d908, 0xdd433b37, 0x24c2ba16, 0x12a14d43, 0x2a65c451, 0x50940002,
-            0x133ae4dd, 0x71dff89e, 0x10314e55, 0x81ac77d6, 0x5f11199b, 0x043556f1, 0xd7a3c76b, 0x3c11183b, 0x5924a509,
-            0xf28fe6ed, 0x97f1fbfa, 0x9ebabf2c, 0x1e153c6e, 0x86e34570, 0xeae96fb1, 0x860e5e0a, 0x5a3e2ab3, 0x771fe71c,
-            0x4e3d06fa, 0x2965dcb9, 0x99e71d0f, 0x803e89d6, 0x5266c825, 0x2e4cc978, 0x9c10b36a, 0xc6150eba, 0x94e2ea78,
-            0xa5fc3c53, 0x1e0a2df4, 0xf2f74ea7, 0x361d2b3d, 0x1939260f, 0x19c27960, 0x5223a708, 0xf71312b6, 0xebadfe6e,
-            0xeac31f66, 0xe3bc4595, 0xa67bc883, 0xb17f37d1, 0x018cff28, 0xc332ddef, 0xbe6c5aa5, 0x65582185, 0x68ab9802,
-            0xeecea50f, 0xdb2f953b, 0x2aef7dad, 0x5b6e2f84, 0x1521b628, 0x29076170, 0xecdd4775, 0x619f1510, 0x13cca830,
-            0xeb61bd96, 0x0334fe1e, 0xaa0363cf, 0xb5735c90, 0x4c70a239, 0xd59e9e0b, 0xcbaade14, 0xeecc86bc, 0x60622ca7,
-            0x9cab5cab, 0xb2f3846e, 0x648b1eaf, 0x19bdf0ca, 0xa02369b9, 0x655abb50, 0x40685a32, 0x3c2ab4b3, 0x319ee9d5,
-            0xc021b8f7, 0x9b540b19, 0x875fa099, 0x95f7997e, 0x623d7da8, 0xf837889a, 0x97e32d77, 0x11ed935f, 0x16681281,
-            0x0e358829, 0xc7e61fd6, 0x96dedfa1, 0x7858ba99, 0x57f584a5, 0x1b227263, 0x9b83c3ff, 0x1ac24696, 0xcdb30aeb,
-            0x532e3054, 0x8fd948e4, 0x6dbc3128, 0x58ebf2ef, 0x34c6ffea, 0xfe28ed61, 0xee7c3c73, 0x5d4a14d9, 0xe864b7e3,
-            0x42105d14, 0x203e13e0, 0x45eee2b6, 0xa3aaabea, 0xdb6c4f15, 0xfacb4fd0, 0xc742f442, 0xef6abbb5, 0x654f3b1d,
-            0x41cd2105, 0xd81e799e, 0x86854dc7, 0xe44b476a, 0x3d816250, 0xcf62a1f2, 0x5b8d2646, 0xfc8883a0, 0xc1c7b6a3,
-            0x7f1524c3, 0x69cb7492, 0x47848a0b, 0x5692b285, 0x095bbf00, 0xad19489d, 0x1462b174, 0x23820e00, 0x58428d2a,
-            0x0c55f5ea, 0x1dadf43e, 0x233f7061, 0x3372f092, 0x8d937e41, 0xd65fecf1, 0x6c223bdb, 0x7cde3759, 0xcbee7460,
-            0x4085f2a7, 0xce77326e, 0xa6078084, 0x19f8509e, 0xe8efd855, 0x61d99735, 0xa969a7aa, 0xc50c06c2, 0x5a04abfc,
-            0x800bcadc, 0x9e447a2e, 0xc3453484, 0xfdd56705, 0x0e1e9ec9, 0xdb73dbd3, 0x105588cd, 0x675fda79, 0xe3674340,
-            0xc5c43465, 0x713e38d8, 0x3d28f89e, 0xf16dff20, 0x153e21e7, 0x8fb03d4a, 0xe6e39f2b, 0xdb83adf7, 0xe93d5a68,
-            0x948140f7, 0xf64c261c, 0x94692934, 0x411520f7, 0x7602d4f7, 0xbcf46b2e, 0xd4a20068, 0xd4082471, 0x3320f46a,
-            0x43b7d4b7, 0x500061af, 0x1e39f62e, 0x97244546, 0x14214f74, 0xbf8b8840, 0x4d95fc1d, 0x96b591af, 0x70f4ddd3,
-            0x66a02f45, 0xbfbc09ec, 0x03bd9785, 0x7fac6dd0, 0x31cb8504, 0x96eb27b3, 0x55fd3941, 0xda2547e6, 0xabca0a9a,
-            0x28507825, 0x530429f4, 0x0a2c86da, 0xe9b66dfb, 0x68dc1462, 0xd7486900, 0x680ec0a4, 0x27a18dee, 0x4f3ffea2,
-            0xe887ad8c, 0xb58ce006, 0x7af4d6b6, 0xaace1e7c, 0xd3375fec, 0xce78a399, 0x406b2a42, 0x20fe9e35, 0xd9f385b9,
-            0xee39d7ab, 0x3b124e8b, 0x1dc9faf7, 0x4b6d1856, 0x26a36631, 0xeae397b2, 0x3a6efa74, 0xdd5b4332, 0x6841e7f7,
-            0xca7820fb, 0xfb0af54e, 0xd8feb397, 0x454056ac, 0xba489527, 0x55533a3a, 0x20838d87, 0xfe6ba9b7, 0xd096954b,
-            0x55a867bc, 0xa1159a58, 0xcca92963, 0x99e1db33, 0xa62a4a56, 0x3f3125f9, 0x5ef47e1c, 0x9029317c, 0xfdf8e802,
-            0x04272f70, 0x80bb155c, 0x05282ce3, 0x95c11548, 0xe4c66d22, 0x48c1133f, 0xc70f86dc, 0x07f9c9ee, 0x41041f0f,
-            0x404779a4, 0x5d886e17, 0x325f51eb, 0xd59bc0d1, 0xf2bcc18f, 0x41113564, 0x257b7834, 0x602a9c60, 0xdff8e8a3,
-            0x1f636c1b, 0x0e12b4c2, 0x02e1329e, 0xaf664fd1, 0xcad18115, 0x6b2395e0, 0x333e92e1, 0x3b240b62, 0xeebeb922,
-            0x85b2a20e, 0xe6ba0d99, 0xde720c8c, 0x2da2f728, 0xd0127845, 0x95b794fd, 0x647d0862, 0xe7ccf5f0, 0x5449a36f,
-            0x877d48fa, 0xc39dfd27, 0xf33e8d1e, 0x0a476341, 0x992eff74, 0x3a6f6eab, 0xf4f8fd37, 0xa812dc60, 0xa1ebddf8,
-            0x991be14c, 0xdb6e6b0d, 0xc67b5510, 0x6d672c37, 0x2765d43b, 0xdcd0e804, 0xf1290dc7, 0xcc00ffa3, 0xb5390f92,
-            0x690fed0b, 0x667b9ffb, 0xcedb7d9c, 0xa091cf0b, 0xd9155ea3, 0xbb132f88, 0x515bad24, 0x7b9479bf, 0x763bd6eb,
-            0x37392eb3, 0xcc115979, 0x8026e297, 0xf42e312d, 0x6842ada7, 0xc66a2b3b, 0x12754ccc, 0x782ef11c, 0x6a124237,
-            0xb79251e7, 0x06a1bbe6, 0x4bfb6350, 0x1a6b1018, 0x11caedfa, 0x3d25bdd8, 0xe2e1c3c9, 0x44421659, 0x0a121386,
-            0xd90cec6e, 0xd5abea2a, 0x64af674e, 0xda86a85f, 0xbebfe988, 0x64e4c3fe, 0x9dbc8057, 0xf0f7c086, 0x60787bf8,
-            0x6003604d, 0xd1fd8346, 0xf6381fb0, 0x7745ae04, 0xd736fccc, 0x83426b33, 0xf01eab71, 0xb0804187, 0x3c005e5f,
-            0x77a057be, 0xbde8ae24, 0x55464299, 0xbf582e61, 0x4e58f48f, 0xf2ddfda2, 0xf474ef38, 0x8789bdc2, 0x5366f9c3,
-            0xc8b38e74, 0xb475f255, 0x46fcd9b9, 0x7aeb2661, 0x8b1ddf84, 0x846a0e79, 0x915f95e2, 0x466e598e, 0x20b45770,
-            0x8cd55591, 0xc902de4c, 0xb90bace1, 0xbb8205d0, 0x11a86248, 0x7574a99e, 0xb77f19b6, 0xe0a9dc09, 0x662d09a1,
-            0xc4324633, 0xe85a1f02, 0x09f0be8c, 0x4a99a025, 0x1d6efe10, 0x1ab93d1d, 0x0ba5a4df, 0xa186f20f, 0x2868f169,
-            0xdcb7da83, 0x573906fe, 0xa1e2ce9b, 0x4fcd7f52, 0x50115e01, 0xa70683fa, 0xa002b5c4, 0x0de6d027, 0x9af88c27,
-            0x773f8641, 0xc3604c06, 0x61a806b5, 0xf0177a28, 0xc0f586e0, 0x006058aa, 0x30dc7d62, 0x11e69ed7, 0x2338ea63,
-            0x53c2dd94, 0xc2c21634, 0xbbcbee56, 0x90bcb6de, 0xebfc7da1, 0xce591d76, 0x6f05e409, 0x4b7c0188, 0x39720a3d,
-            0x7c927c24, 0x86e3725f, 0x724d9db9, 0x1ac15bb4, 0xd39eb8fc, 0xed545578, 0x08fca5b5, 0xd83d7cd3, 0x4dad0fc4,
-            0x1e50ef5e, 0xb161e6f8, 0xa28514d9, 0x6c51133c, 0x6fd5c7e7, 0x56e14ec4, 0x362abfce, 0xddc6c837, 0xd79a3234,
-            0x92638212, 0x670efa8e, 0x406000e0, 0x3a39ce37, 0xd3faf5cf, 0xabc27737, 0x5ac52d1b, 0x5cb0679e, 0x4fa33742,
-            0xd3822740, 0x99bc9bbe, 0xd5118e9d, 0xbf0f7315, 0xd62d1c7e, 0xc700c47b, 0xb78c1b6b, 0x21a19045, 0xb26eb1be,
-            0x6a366eb4, 0x5748ab2f, 0xbc946e79, 0xc6a376d2, 0x6549c2c8, 0x530ff8ee, 0x468dde7d, 0xd5730a1d, 0x4cd04dc6,
-            0x2939bbdb, 0xa9ba4650, 0xac9526e8, 0xbe5ee304, 0xa1fad5f0, 0x6a2d519a, 0x63ef8ce2, 0x9a86ee22, 0xc089c2b8,
-            0x43242ef6, 0xa51e03aa, 0x9cf2d0a4, 0x83c061ba, 0x9be96a4d, 0x8fe51550, 0xba645bd6, 0x2826a2f9, 0xa73a3ae1,
-            0x4ba99586, 0xef5562e9, 0xc72fefd3, 0xf752f7da, 0x3f046f69, 0x77fa0a59, 0x80e4a915, 0x87b08601, 0x9b09e6ad,
-            0x3b3ee593, 0xe990fd5a, 0x9e34d797, 0x2cf0b7d9, 0x022b8b51, 0x96d5ac3a, 0x017da67d, 0xd1cf3ed6, 0x7c7d2d28,
-            0x1f9f25cf, 0xadf2b89b, 0x5ad6b472, 0x5a88f54c, 0xe029ac71, 0xe019a5e6, 0x47b0acfd, 0xed93fa9b, 0xe8d3c48d,
-            0x283b57cc, 0xf8d56629, 0x79132e28, 0x785f0191, 0xed756055, 0xf7960e44, 0xe3d35e8c, 0x15056dd4, 0x88f46dba,
-            0x03a16125, 0x0564f0bd, 0xc3eb9e15, 0x3c9057a2, 0x97271aec, 0xa93a072a, 0x1b3f6d9b, 0x1e6321f5, 0xf59c66fb,
-            0x26dcf319, 0x7533d928, 0xb155fdf5, 0x03563482, 0x8aba3cbb, 0x28517711, 0xc20ad9f8, 0xabcc5167, 0xccad925f,
-            0x4de81751, 0x3830dc8e, 0x379d5862, 0x9320f991, 0xea7a90c2, 0xfb3e7bce, 0x5121ce64, 0x774fbe32, 0xa8b6e37e,
-            0xc3293d46, 0x48de5369, 0x6413e680, 0xa2ae0810, 0xdd6db224, 0x69852dfd, 0x09072166, 0xb39a460a, 0x6445c0dd,
-            0x586cdecf, 0x1c20c8ae, 0x5bbef7dd, 0x1b588d40, 0xccd2017f, 0x6bb4e3bb, 0xdda26a7e, 0x3a59ff45, 0x3e350a44,
-            0xbcb4cdd5, 0x72eacea8, 0xfa6484bb, 0x8d6612ae, 0xbf3c6f47, 0xd29be463, 0x542f5d9e, 0xaec2771b, 0xf64e6370,
-            0x740e0d8d, 0xe75b1357, 0xf8721671, 0xaf537d5d, 0x4040cb08, 0x4eb4e2cc, 0x34d2466a, 0x0115af84, 0xe1b00428,
-            0x95983a1d, 0x06b89fb4, 0xce6ea048, 0x6f3f3b82, 0x3520ab82, 0x011a1d4b, 0x277227f8, 0x611560b1, 0xe7933fdc,
-            0xbb3a792b, 0x344525bd, 0xa08839e1, 0x51ce794b, 0x2f32c9b7, 0xa01fbac9, 0xe01cc87e, 0xbcc7d1f6, 0xcf0111c3,
-            0xa1e8aac7, 0x1a908749, 0xd44fbd9a, 0xd0dadecb, 0xd50ada38, 0x0339c32a, 0xc6913667, 0x8df9317c, 0xe0b12b4f,
-            0xf79e59b7, 0x43f5bb3a, 0xf2d519ff, 0x27d9459c, 0xbf97222c, 0x15e6fc2a, 0x0f91fc71, 0x9b941525, 0xfae59361,
-            0xceb69ceb, 0xc2a86459, 0x12baa8d1, 0xb6c1075e, 0xe3056a0c, 0x10d25065, 0xcb03a442, 0xe0ec6e0e, 0x1698db3b,
-            0x4c98a0be, 0x3278e964, 0x9f1f9532, 0xe0d392df, 0xd3a0342b, 0x8971f21e, 0x1b0a7441, 0x4ba3348c, 0xc5be7120,
-            0xc37632d8, 0xdf359f8d, 0x9b992f2e, 0xe60b6f47, 0x0fe3f11d, 0xe54cda54, 0x1edad891, 0xce6279cf, 0xcd3e7e6f,
-            0x1618b166, 0xfd2c1d05, 0x848fd2c5, 0xf6fb2299, 0xf523f357, 0xa6327623, 0x93a83531, 0x56cccd02, 0xacf08162,
-            0x5a75ebb5, 0x6e163697, 0x88d273cc, 0xde966292, 0x81b949d0, 0x4c50901b, 0x71c65614, 0xe6c6c7bd, 0x327a140a,
-            0x45e1d006, 0xc3f27b9a, 0xc9aa53fd, 0x62a80f00, 0xbb25bfe2, 0x35bdd2f6, 0x71126905, 0xb2040222, 0xb6cbcf7c,
-            0xcd769c2b, 0x53113ec0, 0x1640e3d3, 0x38abbd60, 0x2547adf0, 0xba38209c, 0xf746ce76, 0x77afa1c5, 0x20756060,
-            0x85cbfe4e, 0x8ae88dd8, 0x7aaaf9b0, 0x4cf9aa7e, 0x1948c25c, 0x02fb8a8c, 0x01c36ae4, 0xd6ebe1f9, 0x90d4f869,
-            0xa65cdea0, 0x3f09252d, 0xc208e69f, 0xb74e6132, 0xce77e25b, 0x578fdfe3, 0x3ac372e6
-    };
-
-    // bcrypt IV: "OrpheanBeholderScryDoubt"
-    private static final int[] BF_CRYPT_CYPHERTEXT = {
-            0x4f727068, 0x65616e42, 0x65686f6c, 0x64657253, 0x63727944, 0x6f756274
-    };
-
-    // Table for Base64 encoding
-    private static final char[] BASE64_CODE = {
-            '.', '/', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S',
-            'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n',
-            'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'
-    };
-
-    // Table for Base64 decoding
-    private static final byte[] INDEX_64 = {
-            -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-            -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 54, 55, 56, 57, 58, 59,
-            60, 61, 62, 63, -1, -1, -1, -1, -1, -1, -1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
-            20, 21, 22, 23, 24, 25, 26, 27, -1, -1, -1, -1, -1, -1, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
-            41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, -1, -1, -1, -1, -1
-    };
-
-    // Expanded Blowfish key
-    private int[] p;
-    private int[] s;
-
-
-    /**
-     * Encode a byte array using bcrypt's slightly-modified base64 encoding scheme. Note that this is *not* compatible
-     * with the standard MIME-base64 encoding.
-     *
-     * @param d the byte array to encode
-     * @param len the number of bytes to encode
-     *
-     * @return base64-encoded string
-     *
-     * @throws IllegalArgumentException if the length is invalid
-     */
-    private static String encodeBase64( byte[] d, int len ) throws IllegalArgumentException {
-        int off = 0;
-        StringBuilder rs = new StringBuilder();
-        int c1;
-        int c2;
-
-        if ( ( len <= 0 ) || ( len > d.length ) ) {
-            throw new IllegalArgumentException( "Invalid len" );
-        }
-
-        while ( off < len ) {
-            c1 = d[off++] & 0xff;
-            rs.append( BASE64_CODE[( c1 >> 2 ) & 0x3f] );
-            c1 = ( c1 & 0x03 ) << 4;
-            if ( off >= len ) {
-                rs.append( BASE64_CODE[c1 & 0x3f] );
-                break;
-            }
-            c2 = d[off++] & 0xff;
-            c1 |= ( c2 >> 4 ) & 0x0f;
-            rs.append( BASE64_CODE[c1 & 0x3f] );
-            c1 = ( c2 & 0x0f ) << 2;
-            if ( off >= len ) {
-                rs.append( BASE64_CODE[c1 & 0x3f] );
-                break;
-            }
-            c2 = d[off++] & 0xff;
-            c1 |= ( c2 >> 6 ) & 0x03;
-            rs.append( BASE64_CODE[c1 & 0x3f] );
-            rs.append( BASE64_CODE[c2 & 0x3f] );
-        }
-        return rs.toString();
-    }
-
-
-    /**
-     * Look up the 3 bits base64-encoded by the specified character, range-checking againt conversion table
-     *
-     * @param x the base64-encoded value
-     *
-     * @return the decoded value of x
-     */
-    private static byte char64( char x ) {
-        if ( ( x < 0 ) || ( x > INDEX_64.length ) ) {
-            return -1;
-        }
-        return INDEX_64[x];
-    }
-
-
-    /**
-     * Decode a string encoded using bcrypt's base64 scheme to a byte array. Note that this is *not* compatible with the
-     * standard MIME-base64 encoding.
-     *
-     * @param s the string to decode
-     * @param maxolen the maximum number of bytes to decode
-     *
-     * @return an array containing the decoded bytes
-     *
-     * @throws IllegalArgumentException if maxolen is invalid
-     */
-    private static byte[] decodeBase64( String s, int maxolen ) throws IllegalArgumentException {
-        StringBuilder rs = new StringBuilder();
-        int off = 0;
-        int slen = s.length();
-        int olen = 0;
-        byte[] ret;
-        byte c1;
-        byte c2;
-        byte c3;
-        byte c4;
-        byte o;
-
-        if ( maxolen <= 0 ) {
-            throw new IllegalArgumentException( "Invalid maxolen" );
-        }
-
-        while ( ( off < slen - 1 ) && ( olen < maxolen ) ) {
-            c1 = char64( s.charAt( off++ ) );
-            c2 = char64( s.charAt( off++ ) );
-            if ( ( c1 == -1 ) || ( c2 == -1 ) ) {
-                break;
-            }
-            o = ( byte ) ( c1 << 2 );
-            o |= ( c2 & 0x30 ) >> 4;
-            rs.append( ( char ) o );
-            if ( ( ++olen >= maxolen ) || ( off >= slen ) ) {
-                break;
-            }
-            c3 = char64( s.charAt( off++ ) );
-            if ( c3 == -1 ) {
-                break;
-            }
-            o = ( byte ) ( ( c2 & 0x0f ) << 4 );
-            o |= ( c3 & 0x3c ) >> 2;
-            rs.append( ( char ) o );
-            if ( ( ++olen >= maxolen ) || ( off >= slen ) ) {
-                break;
-            }
-            c4 = char64( s.charAt( off++ ) );
-            o = ( byte ) ( ( c3 & 0x03 ) << 6 );
-            o |= c4;
-            rs.append( ( char ) o );
-            ++olen;
-        }
-
-        ret = new byte[olen];
-        for ( off = 0; off < olen; off++ ) {
-            ret[off] = ( byte ) rs.charAt( off );
-        }
-        return ret;
-    }
-
-
-    /**
-     * Blowfish encipher a single 64-bit block encoded as two 32-bit halves
-     *
-     * @param lr an array containing the two 32-bit half blocks
-     * @param off the position in the array of the blocks
-     */
-    private void encipher( int[] lr, int off ) {
-        int i;
-        int n;
-        int l = lr[off];
-        int r = lr[off + 1];
-
-        l ^= p[0];
-        for ( i = 0; i <= BLOWFISH_NUM_ROUNDS - 2; ) {
-            // Feistel substitution on left word
-            n = s[( l >> 24 ) & 0xff];
-            n += s[0x100 | ( ( l >> 16 ) & 0xff )];
-            n ^= s[0x200 | ( ( l >> 8 ) & 0xff )];
-            n += s[0x300 | ( l & 0xff )];
-            r ^= n ^ p[++i];
-
-            // Feistel substitution on right word
-            n = s[( r >> 24 ) & 0xff];
-            n += s[0x100 | ( ( r >> 16 ) & 0xff )];
-            n ^= s[0x200 | ( ( r >> 8 ) & 0xff )];
-            n += s[0x300 | ( r & 0xff )];
-            l ^= n ^ p[++i];
-        }
-        lr[off] = r ^ p[BLOWFISH_NUM_ROUNDS + 1];
-        lr[off + 1] = l;
-    }
-
-
-    /**
-     * Cyclically extract a word of key material
-     *
-     * @param data the string to extract the data from
-     * @param offp a "pointer" (as a one-entry array) to the current offset into data
-     *
-     * @return the next word of material from data
-     */
-    private static int streamtoword( byte[] data, int[] offp ) {
-        int i;
-        int word = 0;
-        int off = offp[0];
-
-        for ( i = 0; i < 4; i++ ) {
-            word = ( word << 8 ) | ( data[off] & 0xff );
-            off = ( off + 1 ) % data.length;
-        }
-
-        offp[0] = off;
-        return word;
-    }
-
-
-    /** Initialise the Blowfish key schedule */
-    private void initKey() {
-        p = P_orig.clone();
-        s = S_orig.clone();
-    }
-
-
-    /**
-     * Key the Blowfish cipher
-     *
-     * @param key an array containing the key
-     */
-    private void key( byte[] key ) {
-        int i;
-        int[] koffp = { 0 };
-        int[] lr = { 0, 0 };
-        int plen = p.length;
-        int slen = s.length;
-
-        for ( i = 0; i < plen; i++ ) {
-            p[i] = p[i] ^ streamtoword( key, koffp );
-        }
-
-        for ( i = 0; i < plen; i += 2 ) {
-            encipher( lr, 0 );
-            p[i] = lr[0];
-            p[i + 1] = lr[1];
-        }
-
-        for ( i = 0; i < slen; i += 2 ) {
-            encipher( lr, 0 );
-            s[i] = lr[0];
-            s[i + 1] = lr[1];
-        }
-    }
-
-
-    /**
-     * Perform the "enhanced key schedule" step described by Provos and Mazieres in "A Future-Adaptable Password Scheme"
-     * http://www.openbsd.org/papers/bcrypt-paper.ps
-     *
-     * @param data salt information
-     * @param key password information
-     */
-    private void ekskey( byte[] data, byte[] key ) {
-        int i;
-        int[] koffp = { 0 };
-        int[] doffp = { 0 };
-        int[] lr = { 0, 0 };
-        int plen = p.length;
-        int slen = s.length;
-
-        for ( i = 0; i < plen; i++ ) {
-            p[i] = p[i] ^ streamtoword( key, koffp );
-        }
-
-        for ( i = 0; i < plen; i += 2 ) {
-            lr[0] ^= streamtoword( data, doffp );
-            lr[1] ^= streamtoword( data, doffp );
-            encipher( lr, 0 );
-            p[i] = lr[0];
-            p[i + 1] = lr[1];
-        }
-
-        for ( i = 0; i < slen; i += 2 ) {
-            lr[0] ^= streamtoword( data, doffp );
-            lr[1] ^= streamtoword( data, doffp );
-            encipher( lr, 0 );
-            s[i] = lr[0];
-            s[i + 1] = lr[1];
-        }
-    }
-
-
-    /**
-     * Perform the central password hashing step in the bcrypt scheme
-     *
-     * @param password the password to hash
-     * @param salt the binary salt to hash with the password
-     * @param logRounds the binary logarithm of the number of rounds of hashing to apply
-     *
-     * @return an array containing the binary hashed password
-     */
-    private byte[] cryptRaw( byte[] password, byte[] salt, int logRounds ) {
-        int rounds;
-        int i;
-        int j;
-        int[] cdata = BF_CRYPT_CYPHERTEXT.clone();
-        int clen = cdata.length;
-        byte[] ret;
-
-        if ( ( logRounds < 4 ) || ( logRounds > 31 ) ) {
-            throw new IllegalArgumentException( "Bad number of rounds" );
-        }
-        rounds = 1 << logRounds;
-        if ( salt.length != BCRYPT_SALT_LEN ) {
-            throw new IllegalArgumentException( "Bad salt length" );
-        }
-
-        initKey();
-        ekskey( salt, password );
-        for ( i = 0; i < rounds; i++ ) {
-            key( password );
-            key( salt );
-        }
-
-        for ( i = 0; i < 64; i++ ) {
-            for ( j = 0; j < ( clen >> 1 ); j++ ) {
-                encipher( cdata, j << 1 );
-            }
-        }
-
-        ret = new byte[clen * 4];
-        for ( i = 0, j = 0; i < clen; i++ ) {
-            ret[j++] = ( byte ) ( ( cdata[i] >> 24 ) & 0xff );
-            ret[j++] = ( byte ) ( ( cdata[i] >> 16 ) & 0xff );
-            ret[j++] = ( byte ) ( ( cdata[i] >> 8 ) & 0xff );
-            ret[j++] = ( byte ) ( cdata[i] & 0xff );
-        }
-        return ret;
-    }
-
-
-    /**
-     * Hash a password using the OpenBSD bcrypt scheme
-     *
-     * @param password the password to hash
-     * @param salt the salt to hash with (perhaps generated using BCrypt.gensalt)
-     *
-     * @return the hashed password
-     */
-    public static String hashpw( String password, String salt ) {
-        BCrypt b;
-        String realSalt;
-        byte[] passwordb;
-        byte[] saltb;
-        byte[] hashed;
-        char minor = ( char ) 0;
-        int rounds;
-        int off;
-        StringBuilder rs = new StringBuilder();
-
-        if ( ( salt.charAt( 0 ) != '$' ) || ( salt.charAt( 1 ) != '2' ) ) {
-            throw new IllegalArgumentException( "Invalid salt version" );
-        }
-        if ( salt.charAt( 2 ) == '$' ) {
-            off = 3;
-        }
-        else {
-            minor = salt.charAt( 2 );
-            if ( ( minor != 'a' ) || ( salt.charAt( 3 ) != '$' ) ) {
-                throw new IllegalArgumentException( "Invalid salt revision" );
-            }
-            off = 4;
-        }
-
-        // Extract number of rounds
-        if ( salt.charAt( off + 2 ) > '$' ) {
-            throw new IllegalArgumentException( "Missing salt rounds" );
-        }
-        rounds = Integer.parseInt( salt.substring( off, off + 2 ) );
-
-        realSalt = salt.substring( off + 3, off + 25 );
-        try {
-            passwordb = ( password + ( minor >= 'a' ? "\000" : "" ) ).getBytes( "UTF-8" );
-        }
-        catch ( UnsupportedEncodingException uee ) {
-            throw new AssertionError( "UTF-8 is not supported" );
-        }
-
-        saltb = decodeBase64( realSalt, BCRYPT_SALT_LEN );
-
-        b = new BCrypt();
-        hashed = b.cryptRaw( passwordb, saltb, rounds );
-
-        rs.append( "$2" );
-        if ( minor >= 'a' ) {
-            rs.append( minor );
-        }
-        rs.append( "$" );
-        if ( rounds < 10 ) {
-            rs.append( "0" );
-        }
-        rs.append( Integer.toString( rounds ) );
-        rs.append( "$" );
-        rs.append( encodeBase64( saltb, saltb.length ) );
-        rs.append( encodeBase64( hashed, BF_CRYPT_CYPHERTEXT.length * 4 - 1 ) );
-        return rs.toString();
-    }
-
-
-    /**
-     * Generate a salt for use with the BCrypt.hashpw() method
-     *
-     * @param logRounds the log2 of the number of rounds of hashing to apply - the work factor therefore increases as
-     * 2**logRounds.
-     * @param random an instance of SecureRandom to use
-     *
-     * @return an encoded salt value
-     */
-    public static String gensalt( int logRounds, SecureRandom random ) {
-        StringBuilder rs = new StringBuilder();
-        byte[] rnd = new byte[BCRYPT_SALT_LEN];
-
-        random.nextBytes( rnd );
-
-        rs.append( "$2a$" );
-        if ( logRounds < 10 ) {
-            rs.append( "0" );
-        }
-        rs.append( Integer.toString( logRounds ) );
-        rs.append( "$" );
-        rs.append( encodeBase64( rnd, rnd.length ) );
-        return rs.toString();
-    }
-
-
-    /**
-     * Generate a salt for use with the BCrypt.hashpw() method
-     *
-     * @param logRounds the log2 of the number of rounds of hashing to apply - the work factor therefore increases as
-     * 2**logRounds.
-     *
-     * @return an encoded salt value
-     */
-    public static String gensalt( int logRounds ) {
-        return gensalt( logRounds, new SecureRandom() );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/utils/ClassUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/utils/ClassUtils.java b/stack/core/src/main/java/org/usergrid/utils/ClassUtils.java
deleted file mode 100644
index 3864fde..0000000
--- a/stack/core/src/main/java/org/usergrid/utils/ClassUtils.java
+++ /dev/null
@@ -1,58 +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.usergrid.utils;
-
-
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Set;
-
-
-public class ClassUtils extends org.apache.commons.lang.ClassUtils {
-
-    @SuppressWarnings("unchecked")
-    public static <A, B> B cast( A a ) {
-        return ( B ) a;
-    }
-
-
-    @SuppressWarnings("unchecked")
-    private static final Set<Class<?>> WRAPPER_TYPES = new HashSet<Class<?>>(
-            Arrays.asList( Boolean.class, Byte.class, Character.class, Double.class, Float.class, Integer.class,
-                    Long.class, Short.class, Void.class ) );
-
-
-    public static boolean isWrapperType( Class<?> clazz ) {
-        return WRAPPER_TYPES.contains( clazz );
-    }
-
-
-    public static boolean isPrimitiveType( Class<?> clazz ) {
-        if ( clazz == null ) {
-            return false;
-        }
-        return clazz.isPrimitive() || isWrapperType( clazz );
-    }
-
-
-    public static boolean isBasicType( Class<?> clazz ) {
-        if ( clazz == null ) {
-            return false;
-        }
-        return ( String.class.isAssignableFrom( clazz ) ) || isPrimitiveType( clazz );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/utils/CodecUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/utils/CodecUtils.java b/stack/core/src/main/java/org/usergrid/utils/CodecUtils.java
deleted file mode 100644
index 56acce5..0000000
--- a/stack/core/src/main/java/org/usergrid/utils/CodecUtils.java
+++ /dev/null
@@ -1,45 +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.usergrid.utils;
-
-
-import java.util.UUID;
-
-import org.apache.commons.codec.binary.Base64;
-
-import static org.usergrid.utils.ConversionUtils.bytes;
-
-
-public class CodecUtils {
-
-    public static Base64 base64 = new Base64( true );
-
-
-    public static String base64( byte[] bytes ) {
-        return base64.encodeToString( bytes );
-    }
-
-
-    public static String base64( UUID uuid ) {
-        return base64.encodeToString( bytes( uuid ) );
-    }
-
-
-    public static String base64( String str ) {
-        return Base64.encodeBase64URLSafeString( bytes( str ) );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/utils/CompositeUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/utils/CompositeUtils.java b/stack/core/src/main/java/org/usergrid/utils/CompositeUtils.java
deleted file mode 100644
index db63d86..0000000
--- a/stack/core/src/main/java/org/usergrid/utils/CompositeUtils.java
+++ /dev/null
@@ -1,54 +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.usergrid.utils;
-
-
-import java.nio.ByteBuffer;
-import java.util.List;
-
-import me.prettyprint.hector.api.beans.AbstractComposite.Component;
-import me.prettyprint.hector.api.beans.AbstractComposite.ComponentEquality;
-import me.prettyprint.hector.api.beans.DynamicComposite;
-
-
-public class CompositeUtils {
-
-    public static Object deserialize( ByteBuffer bytes ) {
-        List<Object> objects = DynamicComposite.fromByteBuffer( bytes );
-        if ( objects.size() > 0 ) {
-            return objects.get( 0 );
-        }
-        return null;
-    }
-
-
-    @SuppressWarnings("unchecked")
-    public static DynamicComposite setEqualityFlag( DynamicComposite composite, ComponentEquality eq ) {
-        if ( composite.isEmpty() ) {
-            return composite;
-        }
-        int i = composite.size() - 1;
-        @SuppressWarnings("rawtypes") Component c = composite.getComponent( i );
-        composite.setComponent( i, c.getValue(), c.getSerializer(), c.getComparator(), eq );
-        return composite;
-    }
-
-
-    public static DynamicComposite setGreaterThanEqualityFlag( DynamicComposite composite ) {
-        return setEqualityFlag( composite, ComponentEquality.GREATER_THAN_EQUAL );
-    }
-}


[12/96] [abbrv] [partial] Change package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/cassandra/EntityValueSerializer.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/cassandra/EntityValueSerializer.java b/stack/core/src/main/java/org/usergrid/persistence/cassandra/EntityValueSerializer.java
deleted file mode 100644
index d4b13e7..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/cassandra/EntityValueSerializer.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.cassandra;
-
-
-import java.nio.ByteBuffer;
-import java.util.List;
-
-import me.prettyprint.cassandra.serializers.AbstractSerializer;
-import me.prettyprint.hector.api.beans.DynamicComposite;
-
-import static org.usergrid.utils.ConversionUtils.bytebuffer;
-
-
-public class EntityValueSerializer extends AbstractSerializer<Object> {
-
-    @Override
-    public ByteBuffer toByteBuffer( Object obj ) {
-        ByteBuffer bytes = null;
-        if ( obj instanceof List ) {
-            bytes = DynamicComposite.toByteBuffer( ( List<?> ) obj );
-        }
-        else if ( obj instanceof Object[] ) {
-            bytes = DynamicComposite.toByteBuffer( ( Object[] ) obj );
-        }
-        else {
-            bytes = bytebuffer( obj );
-        }
-        return bytes;
-    }
-
-
-    @Override
-    public Object fromByteBuffer( ByteBuffer byteBuffer ) {
-        throw new IllegalStateException(
-                "The entity value serializer can only be used for data going to the database, " +
-                        "and not data coming from the database" );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/cassandra/GeoIndexManager.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/cassandra/GeoIndexManager.java b/stack/core/src/main/java/org/usergrid/persistence/cassandra/GeoIndexManager.java
deleted file mode 100644
index 1f83422..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/cassandra/GeoIndexManager.java
+++ /dev/null
@@ -1,323 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.cassandra;
-
-
-import java.nio.ByteBuffer;
-import java.util.List;
-import java.util.UUID;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.usergrid.persistence.EntityRef;
-import org.usergrid.persistence.IndexBucketLocator;
-import org.usergrid.persistence.IndexBucketLocator.IndexType;
-import org.usergrid.persistence.geo.EntityLocationRef;
-import org.usergrid.persistence.geo.GeocellManager;
-import org.usergrid.persistence.geo.model.Point;
-
-import me.prettyprint.cassandra.serializers.ByteBufferSerializer;
-import me.prettyprint.hector.api.Keyspace;
-import me.prettyprint.hector.api.beans.DynamicComposite;
-import me.prettyprint.hector.api.beans.HColumn;
-import me.prettyprint.hector.api.mutation.Mutator;
-
-import static me.prettyprint.hector.api.factory.HFactory.createColumn;
-import static me.prettyprint.hector.api.factory.HFactory.createMutator;
-import static org.usergrid.persistence.Schema.DICTIONARY_GEOCELL;
-import static org.usergrid.persistence.Schema.INDEX_CONNECTIONS;
-import static org.usergrid.persistence.cassandra.ApplicationCF.ENTITY_INDEX;
-import static org.usergrid.persistence.cassandra.CassandraPersistenceUtils.addInsertToMutator;
-import static org.usergrid.persistence.cassandra.CassandraPersistenceUtils.batchExecute;
-import static org.usergrid.persistence.cassandra.CassandraPersistenceUtils.key;
-import static org.usergrid.persistence.cassandra.CassandraPersistenceUtils.logBatchOperation;
-import static org.usergrid.utils.ConversionUtils.bytebuffer;
-
-
-public class GeoIndexManager {
-
-    private static final Logger logger = LoggerFactory.getLogger( GeoIndexManager.class );
-
-    /**
-     * We only ever go down to max resolution of 9 because we use bucket hashing. Every level divides the region by
-     * 1/16. Our original "box" is 90 degrees by 45 degrees. We therefore have 90 * (1/16)^(r-1) and 45 * (1/16)^(r-1)
-     * for our size where r is the largest bucket resolution. This gives us a size of 90 deg => 0.0000000209547 deg =
-     * .2cm and 45 deg => 0.00000001047735 deg = .1 cm
-     */
-    public static final int MAX_RESOLUTION = 9;
-
-
-    EntityManagerImpl em;
-    CassandraService cass;
-
-
-    public GeoIndexManager() {
-    }
-
-
-    public GeoIndexManager init( EntityManagerImpl em ) {
-        this.em = em;
-        this.cass = em.getCass();
-        return this;
-    }
-
-
-    public static Mutator<ByteBuffer> addLocationEntryInsertionToMutator( Mutator<ByteBuffer> m, Object key,
-                                                                          EntityLocationRef entry ) {
-
-        DynamicComposite columnName = entry.getColumnName();
-        DynamicComposite columnValue = entry.getColumnValue();
-        long ts = entry.getTimestampInMicros();
-
-        logBatchOperation( "Insert", ENTITY_INDEX, key, columnName, columnValue, ts );
-
-        HColumn<ByteBuffer, ByteBuffer> column =
-                createColumn( columnName.serialize(), columnValue.serialize(), ts, ByteBufferSerializer.get(),
-                        ByteBufferSerializer.get() );
-        m.addInsertion( bytebuffer( key ), ENTITY_INDEX.toString(), column );
-
-        return m;
-    }
-
-
-    private static Mutator<ByteBuffer> batchAddConnectionIndexEntries( Mutator<ByteBuffer> m,
-                                                                       IndexBucketLocator locator, UUID appId,
-                                                                       String propertyName, String geoCell,
-                                                                       UUID[] index_keys, ByteBuffer columnName,
-                                                                       ByteBuffer columnValue, long timestamp ) {
-
-        // entity_id,prop_name
-        Object property_index_key =
-                key( index_keys[ConnectionRefImpl.ALL], INDEX_CONNECTIONS, propertyName, DICTIONARY_GEOCELL, geoCell,
-                        locator.getBucket( appId, IndexType.CONNECTION, index_keys[ConnectionRefImpl.ALL], geoCell ) );
-
-        // entity_id,entity_type,prop_name
-        Object entity_type_prop_index_key =
-                key( index_keys[ConnectionRefImpl.BY_ENTITY_TYPE], INDEX_CONNECTIONS, propertyName, DICTIONARY_GEOCELL,
-                        geoCell,
-                        locator.getBucket( appId, IndexType.CONNECTION, index_keys[ConnectionRefImpl.BY_ENTITY_TYPE],
-                                geoCell ) );
-
-        // entity_id,connection_type,prop_name
-        Object connection_type_prop_index_key =
-                key( index_keys[ConnectionRefImpl.BY_CONNECTION_TYPE], INDEX_CONNECTIONS, propertyName,
-                        DICTIONARY_GEOCELL, geoCell, locator.getBucket( appId, IndexType.CONNECTION,
-                        index_keys[ConnectionRefImpl.BY_CONNECTION_TYPE], geoCell ) );
-
-        // entity_id,connection_type,entity_type,prop_name
-        Object connection_type_and_entity_type_prop_index_key =
-                key( index_keys[ConnectionRefImpl.BY_CONNECTION_AND_ENTITY_TYPE], INDEX_CONNECTIONS, propertyName,
-                        DICTIONARY_GEOCELL, geoCell, locator.getBucket( appId, IndexType.CONNECTION,
-                        index_keys[ConnectionRefImpl.BY_CONNECTION_AND_ENTITY_TYPE], geoCell ) );
-
-        // composite(property_value,connected_entity_id,connection_type,entity_type,entry_timestamp)
-        addInsertToMutator( m, ENTITY_INDEX, property_index_key, columnName, columnValue, timestamp );
-
-        // composite(property_value,connected_entity_id,connection_type,entry_timestamp)
-        addInsertToMutator( m, ENTITY_INDEX, entity_type_prop_index_key, columnName, columnValue, timestamp );
-
-        // composite(property_value,connected_entity_id,entity_type,entry_timestamp)
-        addInsertToMutator( m, ENTITY_INDEX, connection_type_prop_index_key, columnName, columnValue, timestamp );
-
-        // composite(property_value,connected_entity_id,entry_timestamp)
-        addInsertToMutator( m, ENTITY_INDEX, connection_type_and_entity_type_prop_index_key, columnName, columnValue,
-                timestamp );
-
-        return m;
-    }
-
-
-    public static void batchStoreLocationInConnectionsIndex( Mutator<ByteBuffer> m, IndexBucketLocator locator,
-                                                             UUID appId, UUID[] index_keys, String propertyName,
-                                                             EntityLocationRef location ) {
-
-        Point p = location.getPoint();
-        List<String> cells = GeocellManager.generateGeoCell( p );
-
-        ByteBuffer columnName = location.getColumnName().serialize();
-        ByteBuffer columnValue = location.getColumnValue().serialize();
-        long ts = location.getTimestampInMicros();
-        for ( String cell : cells ) {
-            batchAddConnectionIndexEntries( m, locator, appId, propertyName, cell, index_keys, columnName, columnValue,
-                    ts );
-        }
-
-        logger.info( "Geocells to be saved for Point({} , {} ) are: {}", new Object[] {
-                location.getLatitude(), location.getLongitude(), cells
-        } );
-    }
-
-
-    private static Mutator<ByteBuffer> addLocationEntryDeletionToMutator( Mutator<ByteBuffer> m, Object key,
-                                                                          EntityLocationRef entry ) {
-
-        DynamicComposite columnName = entry.getColumnName();
-        long ts = entry.getTimestampInMicros();
-
-        logBatchOperation( "Delete", ENTITY_INDEX, key, columnName, null, ts );
-
-        m.addDeletion( bytebuffer( key ), ENTITY_INDEX.toString(), columnName.serialize(), ByteBufferSerializer.get(),
-                ts + 1 );
-
-        return m;
-    }
-
-
-    private static Mutator<ByteBuffer> batchDeleteConnectionIndexEntries( Mutator<ByteBuffer> m,
-                                                                          IndexBucketLocator locator, UUID appId,
-                                                                          String propertyName, String geoCell,
-                                                                          UUID[] index_keys, ByteBuffer columnName,
-                                                                          long timestamp ) {
-
-        // entity_id,prop_name
-        Object property_index_key =
-                key( index_keys[ConnectionRefImpl.ALL], INDEX_CONNECTIONS, propertyName, DICTIONARY_GEOCELL, geoCell,
-                        locator.getBucket( appId, IndexType.CONNECTION, index_keys[ConnectionRefImpl.ALL], geoCell ) );
-
-        // entity_id,entity_type,prop_name
-        Object entity_type_prop_index_key =
-                key( index_keys[ConnectionRefImpl.BY_ENTITY_TYPE], INDEX_CONNECTIONS, propertyName, DICTIONARY_GEOCELL,
-                        geoCell,
-                        locator.getBucket( appId, IndexType.CONNECTION, index_keys[ConnectionRefImpl.BY_ENTITY_TYPE],
-                                geoCell ) );
-
-        // entity_id,connection_type,prop_name
-        Object connection_type_prop_index_key =
-                key( index_keys[ConnectionRefImpl.BY_CONNECTION_TYPE], INDEX_CONNECTIONS, propertyName,
-                        DICTIONARY_GEOCELL, geoCell, locator.getBucket( appId, IndexType.CONNECTION,
-                        index_keys[ConnectionRefImpl.BY_CONNECTION_TYPE], geoCell ) );
-
-        // entity_id,connection_type,entity_type,prop_name
-        Object connection_type_and_entity_type_prop_index_key =
-                key( index_keys[ConnectionRefImpl.BY_CONNECTION_AND_ENTITY_TYPE], INDEX_CONNECTIONS, propertyName,
-                        DICTIONARY_GEOCELL, geoCell, locator.getBucket( appId, IndexType.CONNECTION,
-                        index_keys[ConnectionRefImpl.BY_CONNECTION_AND_ENTITY_TYPE], geoCell ) );
-
-        // composite(property_value,connected_entity_id,connection_type,entity_type,entry_timestamp)
-        m.addDeletion( bytebuffer( property_index_key ), ENTITY_INDEX.toString(), columnName,
-                ByteBufferSerializer.get(), timestamp );
-
-        // composite(property_value,connected_entity_id,connection_type,entry_timestamp)
-        m.addDeletion( bytebuffer( entity_type_prop_index_key ), ENTITY_INDEX.toString(), columnName,
-                ByteBufferSerializer.get(), timestamp );
-
-        // composite(property_value,connected_entity_id,entity_type,entry_timestamp)
-        m.addDeletion( bytebuffer( connection_type_prop_index_key ), ENTITY_INDEX.toString(), columnName,
-                ByteBufferSerializer.get(), timestamp );
-
-        // composite(property_value,connected_entity_id,entry_timestamp)
-        m.addDeletion( bytebuffer( connection_type_and_entity_type_prop_index_key ), ENTITY_INDEX.toString(),
-                columnName, ByteBufferSerializer.get(), timestamp );
-
-        return m;
-    }
-
-
-    public static void batchDeleteLocationInConnectionsIndex( Mutator<ByteBuffer> m, IndexBucketLocator locator,
-                                                              UUID appId, UUID[] index_keys, String propertyName,
-                                                              EntityLocationRef location ) {
-
-        Point p = location.getPoint();
-        List<String> cells = GeocellManager.generateGeoCell( p );
-
-        ByteBuffer columnName = location.getColumnName().serialize();
-
-        long ts = location.getTimestampInMicros();
-
-        for ( String cell : cells ) {
-
-            batchDeleteConnectionIndexEntries( m, locator, appId, propertyName, cell, index_keys, columnName, ts );
-        }
-
-        logger.info( "Geocells to be saved for Point({} , {} ) are: {}", new Object[] {
-                location.getLatitude(), location.getLongitude(), cells
-        } );
-    }
-
-
-    public static void batchStoreLocationInCollectionIndex( Mutator<ByteBuffer> m, IndexBucketLocator locator,
-                                                            UUID appId, Object key, UUID entityId,
-                                                            EntityLocationRef location ) {
-
-        Point p = location.getPoint();
-        List<String> cells = GeocellManager.generateGeoCell( p );
-
-        for ( int i = 0; i < MAX_RESOLUTION; i++ ) {
-            String cell = cells.get( i );
-
-            String indexBucket = locator.getBucket( appId, IndexType.GEO, entityId, cell );
-
-            addLocationEntryInsertionToMutator( m, key( key, DICTIONARY_GEOCELL, cell, indexBucket ), location );
-        }
-
-        if ( logger.isInfoEnabled() ) {
-            logger.info( "Geocells to be saved for Point({},{}) are: {}", new Object[] {
-                    location.getLatitude(), location.getLongitude(), cells
-            } );
-        }
-    }
-
-
-    public void storeLocationInCollectionIndex( EntityRef owner, String collectionName, UUID entityId,
-                                                String propertyName, EntityLocationRef location ) {
-
-        Keyspace ko = cass.getApplicationKeyspace( em.getApplicationId() );
-        Mutator<ByteBuffer> m = createMutator( ko, ByteBufferSerializer.get() );
-
-        batchStoreLocationInCollectionIndex( m, em.getIndexBucketLocator(), em.getApplicationId(),
-                key( owner.getUuid(), collectionName, propertyName ), owner.getUuid(), location );
-
-        batchExecute( m, CassandraService.RETRY_COUNT );
-    }
-
-
-    public static void batchRemoveLocationFromCollectionIndex( Mutator<ByteBuffer> m, IndexBucketLocator locator,
-                                                               UUID appId, Object key, EntityLocationRef location ) {
-
-        Point p = location.getPoint();
-        List<String> cells = GeocellManager.generateGeoCell( p );
-
-        // delete for every bucket in every resolution
-        for ( int i = 0; i < MAX_RESOLUTION; i++ ) {
-
-            String cell = cells.get( i );
-
-            for ( String indexBucket : locator.getBuckets( appId, IndexType.GEO, cell ) ) {
-
-                addLocationEntryDeletionToMutator( m, key( key, DICTIONARY_GEOCELL, cell, indexBucket ), location );
-            }
-        }
-
-        if ( logger.isInfoEnabled() ) {
-            logger.info( "Geocells to be deleted for Point({},{}) are: {}", new Object[] {
-                    location.getLatitude(), location.getLongitude(), cells
-            } );
-        }
-    }
-
-
-    public void removeLocationFromCollectionIndex( EntityRef owner, String collectionName, String propertyName,
-                                                   EntityLocationRef location ) {
-
-        Keyspace ko = cass.getApplicationKeyspace( em.getApplicationId() );
-        Mutator<ByteBuffer> m = createMutator( ko, ByteBufferSerializer.get() );
-
-        batchRemoveLocationFromCollectionIndex( m, em.getIndexBucketLocator(), em.getApplicationId(),
-                key( owner.getUuid(), collectionName, propertyName ), location );
-
-        batchExecute( m, CassandraService.RETRY_COUNT );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/cassandra/IndexUpdate.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/cassandra/IndexUpdate.java b/stack/core/src/main/java/org/usergrid/persistence/cassandra/IndexUpdate.java
deleted file mode 100644
index 0a3f578..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/cassandra/IndexUpdate.java
+++ /dev/null
@@ -1,450 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.cassandra;
-
-
-import java.io.IOException;
-import java.math.BigInteger;
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.UUID;
-
-import org.codehaus.jackson.JsonNode;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.usergrid.persistence.Entity;
-
-import com.fasterxml.uuid.UUIDComparator;
-
-import me.prettyprint.hector.api.beans.DynamicComposite;
-import me.prettyprint.hector.api.mutation.Mutator;
-
-import static java.nio.ByteBuffer.wrap;
-import static java.util.Arrays.asList;
-
-import static org.usergrid.utils.JsonUtils.toJsonNode;
-import static org.usergrid.utils.UUIDUtils.getTimestampInMicros;
-
-
-public class IndexUpdate {
-
-    private static final Logger logger = LoggerFactory.getLogger( IndexUpdate.class );
-
-    public static final byte VALUE_CODE_BYTES = 0;
-    public static final byte VALUE_CODE_UTF8 = 1;
-    public static final byte VALUE_CODE_UUID = 2;
-    public static final byte VALUE_CODE_INT = 3;
-    public static final byte VALUE_CODE_MAX = 127;
-
-    public static int INDEX_STRING_VALUE_LENGTH = 1024;
-
-    private Mutator<ByteBuffer> batch;
-    private Entity entity;
-    private String entryName;
-    private Object entryValue;
-    private final List<IndexEntry> prevEntries = new ArrayList<IndexEntry>();
-    private final List<IndexEntry> newEntries = new ArrayList<IndexEntry>();
-    private final Set<String> indexesSet = new LinkedHashSet<String>();
-    private boolean schemaHasProperty;
-    private boolean isMultiValue;
-    private boolean removeListEntry;
-    private long timestamp;
-    private final UUID timestampUuid;
-    private UUID associatedId;
-
-
-    public IndexUpdate( Mutator<ByteBuffer> batch, Entity entity, String entryName, Object entryValue,
-                        boolean schemaHasProperty, boolean isMultiValue, boolean removeListEntry, UUID timestampUuid ) {
-        this.batch = batch;
-        this.entity = entity;
-        this.entryName = entryName;
-        this.entryValue = entryValue;
-        this.schemaHasProperty = schemaHasProperty;
-        this.isMultiValue = isMultiValue;
-        this.removeListEntry = removeListEntry;
-        timestamp = getTimestampInMicros( timestampUuid );
-        this.timestampUuid = timestampUuid;
-    }
-
-
-    public Mutator<ByteBuffer> getBatch() {
-        return batch;
-    }
-
-
-    public void setBatch( Mutator<ByteBuffer> batch ) {
-        this.batch = batch;
-    }
-
-
-    public Entity getEntity() {
-        return entity;
-    }
-
-
-    public void setEntity( Entity entity ) {
-        this.entity = entity;
-    }
-
-
-    public UUID getId() {
-        if ( associatedId != null ) {
-            return associatedId;
-        }
-        return entity.getUuid();
-    }
-
-
-    public String getEntryName() {
-        return entryName;
-    }
-
-
-    public void setEntryName( String entryName ) {
-        this.entryName = entryName;
-    }
-
-
-    public Object getEntryValue() {
-        return entryValue;
-    }
-
-
-    public void setEntryValue( Object entryValue ) {
-        this.entryValue = entryValue;
-    }
-
-
-    public long getTimestamp() {
-        return timestamp;
-    }
-
-
-    public void setTimestamp( long timestamp ) {
-        this.timestamp = timestamp;
-    }
-
-
-    public UUID getTimestampUuid() {
-        return timestampUuid;
-    }
-
-
-    public List<IndexEntry> getPrevEntries() {
-        return prevEntries;
-    }
-
-
-    public void addPrevEntry( String path, Object value, UUID timestamp, ByteBuffer ledgerValue ) {
-        IndexEntry entry = new IndexEntry( path, value, timestamp, ledgerValue );
-        prevEntries.add( entry );
-    }
-
-
-    public List<IndexEntry> getNewEntries() {
-        return newEntries;
-    }
-
-
-    public void addNewEntry( String path, Object value ) {
-        IndexEntry entry = new IndexEntry( path, value, timestampUuid, null );
-        newEntries.add( entry );
-    }
-
-
-    public Set<String> getIndexesSet() {
-        return indexesSet;
-    }
-
-
-    public void addIndex( String index ) {
-        logger.debug( "Indexing {}", index );
-        indexesSet.add( index );
-    }
-
-
-    public boolean isSchemaHasProperty() {
-        return schemaHasProperty;
-    }
-
-
-    public void setSchemaHasProperty( boolean schemaHasProperty ) {
-        this.schemaHasProperty = schemaHasProperty;
-    }
-
-
-    public boolean isMultiValue() {
-        return isMultiValue;
-    }
-
-
-    public void setMultiValue( boolean isMultiValue ) {
-        this.isMultiValue = isMultiValue;
-    }
-
-
-    public boolean isRemoveListEntry() {
-        return removeListEntry;
-    }
-
-
-    public void setRemoveListEntry( boolean removeListEntry ) {
-        this.removeListEntry = removeListEntry;
-    }
-
-
-    public void setAssociatedId( UUID associatedId ) {
-        this.associatedId = associatedId;
-    }
-
-
-    public UUID getAssociatedId() {
-        return associatedId;
-    }
-
-
-    public class IndexEntry {
-        private final byte code;
-        private String path;
-        private final Object value;
-        private final UUID timestampUuid;
-        private final ByteBuffer ledgerColumn;
-
-
-        public IndexEntry( String path, Object value, UUID timestampUuid, ByteBuffer ledgerColumn ) {
-            this.path = path;
-            this.value = value;
-            code = indexValueCode( value );
-            this.timestampUuid = timestampUuid;
-            this.ledgerColumn = ledgerColumn;
-        }
-
-
-        public String getPath() {
-            return path;
-        }
-
-
-        public void setPath( String path ) {
-            this.path = path;
-        }
-
-
-        public Object getValue() {
-            return value;
-        }
-
-
-        public byte getValueCode() {
-            return code;
-        }
-
-
-        public UUID getTimestampUuid() {
-            return timestampUuid;
-        }
-
-
-        public DynamicComposite getIndexComposite() {
-            return new DynamicComposite( code, value, getId(), timestampUuid );
-        }
-
-
-        public DynamicComposite getIndexComposite( Object... ids ) {
-            return new DynamicComposite( code, value, asList( ids ), timestampUuid );
-        }
-
-
-        public ByteBuffer getLedgerColumn() {
-            return this.ledgerColumn;
-        }
-    }
-
-
-    public static class UniqueIndexEntry {
-        private final byte code;
-        private String path;
-        private final Object value;
-
-
-        public UniqueIndexEntry( String path, Object value ) {
-            this.path = path;
-            this.value = value;
-            code = indexValueCode( value );
-        }
-
-
-        public String getPath() {
-            return path;
-        }
-
-
-        public void setPath( String path ) {
-            this.path = path;
-        }
-
-
-        public Object getValue() {
-            return value;
-        }
-
-
-        public byte getValueCode() {
-            return code;
-        }
-
-
-        public DynamicComposite getIndexComposite() {
-            return new DynamicComposite( code, value );
-        }
-    }
-
-
-    private static String prepStringForIndex( String str ) {
-        str = str.trim().toLowerCase();
-        str = str.substring( 0, Math.min( INDEX_STRING_VALUE_LENGTH, str.length() ) );
-        return str;
-    }
-
-
-    /**
-     * @param obj
-     * @return
-     */
-    public static Object toIndexableValue( Object obj ) {
-        if ( obj == null ) {
-            return null;
-        }
-
-        if ( obj instanceof String ) {
-            return prepStringForIndex( ( String ) obj );
-        }
-
-        // UUIDs, and BigIntegers map to Cassandra UTF8Type and IntegerType
-        if ( ( obj instanceof UUID ) || ( obj instanceof BigInteger ) ) {
-            return obj;
-        }
-
-        // For any numeric values, turn them into a long
-        // and make them BigIntegers for IntegerType
-        if ( obj instanceof Number ) {
-            return BigInteger.valueOf( ( ( Number ) obj ).longValue() );
-        }
-
-        if ( obj instanceof Boolean ) {
-            return BigInteger.valueOf( ( ( Boolean ) obj ) ? 1L : 0L );
-        }
-
-        if ( obj instanceof Date ) {
-            return BigInteger.valueOf( ( ( Date ) obj ).getTime() );
-        }
-
-        if ( obj instanceof byte[] ) {
-            return wrap( ( byte[] ) obj );
-        }
-
-        if ( obj instanceof ByteBuffer ) {
-            return obj;
-        }
-
-        JsonNode json = toJsonNode( obj );
-        if ( ( json != null ) && json.isValueNode() ) {
-            if ( json.isBigInteger() ) {
-                return json.getBigIntegerValue();
-            }
-            else if ( json.isNumber() || json.isBoolean() ) {
-                return BigInteger.valueOf( json.getValueAsLong() );
-            }
-            else if ( json.isTextual() ) {
-                return prepStringForIndex( json.getTextValue() );
-            }
-            else if ( json.isBinary() ) {
-                try {
-                    return wrap( json.getBinaryValue() );
-                }
-                catch ( IOException e ) {
-                }
-            }
-        }
-
-        return null;
-    }
-
-
-    public static boolean validIndexableValue( Object obj ) {
-        return toIndexableValue( obj ) != null;
-    }
-
-
-    public static boolean validIndexableValueOrJson( Object obj ) {
-        if ( ( obj instanceof Map ) || ( obj instanceof List ) || ( obj instanceof JsonNode ) ) {
-            return true;
-        }
-        return toIndexableValue( obj ) != null;
-    }
-
-
-    public static byte indexValueCode( Object obj ) {
-        obj = toIndexableValue( obj );
-        if ( obj instanceof String ) {
-            return VALUE_CODE_UTF8;
-        }
-        else if ( obj instanceof UUID ) {
-            return VALUE_CODE_UUID;
-        }
-        else if ( obj instanceof BigInteger ) {
-            return VALUE_CODE_INT;
-        }
-        else if ( obj instanceof Number ) {
-            return VALUE_CODE_INT;
-        }
-        else {
-            return VALUE_CODE_BYTES;
-        }
-    }
-
-
-    @SuppressWarnings({ "rawtypes", "unchecked" })
-    public static int compareIndexedValues( Object o1, Object o2 ) {
-        o1 = toIndexableValue( o1 );
-        o2 = toIndexableValue( o2 );
-        if ( ( o1 == null ) && ( o2 == null ) ) {
-            return 0;
-        }
-        else if ( o1 == null ) {
-            return -1;
-        }
-        else if ( o2 == null ) {
-            return 1;
-        }
-        int c1 = indexValueCode( o1 );
-        int c2 = indexValueCode( o2 );
-        if ( c1 == c2 ) {
-            if ( o1 instanceof UUID ) {
-                UUIDComparator.staticCompare( ( UUID ) o1, ( UUID ) o2 );
-            }
-            else if ( o1 instanceof Comparable ) {
-                return ( ( Comparable ) o1 ).compareTo( o2 );
-            }
-        }
-        return c1 - c2;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/cassandra/QueryProcessor.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/cassandra/QueryProcessor.java b/stack/core/src/main/java/org/usergrid/persistence/cassandra/QueryProcessor.java
deleted file mode 100644
index b5d77a3..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/cassandra/QueryProcessor.java
+++ /dev/null
@@ -1,720 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.cassandra;
-
-
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Stack;
-import java.util.UUID;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.usergrid.persistence.EntityManager;
-import org.usergrid.persistence.Identifier;
-import org.usergrid.persistence.Query;
-import org.usergrid.persistence.Query.SortDirection;
-import org.usergrid.persistence.Query.SortPredicate;
-import org.usergrid.persistence.Results;
-import org.usergrid.persistence.Schema;
-import org.usergrid.persistence.entities.User;
-import org.usergrid.persistence.exceptions.NoFullTextIndexException;
-import org.usergrid.persistence.exceptions.NoIndexException;
-import org.usergrid.persistence.exceptions.PersistenceException;
-import org.usergrid.persistence.query.ir.AllNode;
-import org.usergrid.persistence.query.ir.AndNode;
-import org.usergrid.persistence.query.ir.EmailIdentifierNode;
-import org.usergrid.persistence.query.ir.NameIdentifierNode;
-import org.usergrid.persistence.query.ir.NotNode;
-import org.usergrid.persistence.query.ir.OrNode;
-import org.usergrid.persistence.query.ir.OrderByNode;
-import org.usergrid.persistence.query.ir.QueryNode;
-import org.usergrid.persistence.query.ir.QuerySlice;
-import org.usergrid.persistence.query.ir.SearchVisitor;
-import org.usergrid.persistence.query.ir.SliceNode;
-import org.usergrid.persistence.query.ir.UuidIdentifierNode;
-import org.usergrid.persistence.query.ir.WithinNode;
-import org.usergrid.persistence.query.ir.result.ResultIterator;
-import org.usergrid.persistence.query.ir.result.ResultsLoader;
-import org.usergrid.persistence.query.ir.result.ResultsLoaderFactory;
-import org.usergrid.persistence.query.ir.result.ScanColumn;
-import org.usergrid.persistence.query.tree.AndOperand;
-import org.usergrid.persistence.query.tree.ContainsOperand;
-import org.usergrid.persistence.query.tree.Equal;
-import org.usergrid.persistence.query.tree.EqualityOperand;
-import org.usergrid.persistence.query.tree.GreaterThan;
-import org.usergrid.persistence.query.tree.GreaterThanEqual;
-import org.usergrid.persistence.query.tree.LessThan;
-import org.usergrid.persistence.query.tree.LessThanEqual;
-import org.usergrid.persistence.query.tree.Literal;
-import org.usergrid.persistence.query.tree.NotOperand;
-import org.usergrid.persistence.query.tree.Operand;
-import org.usergrid.persistence.query.tree.OrOperand;
-import org.usergrid.persistence.query.tree.QueryVisitor;
-import org.usergrid.persistence.query.tree.StringLiteral;
-import org.usergrid.persistence.query.tree.WithinOperand;
-import org.usergrid.persistence.schema.CollectionInfo;
-
-import me.prettyprint.cassandra.serializers.UUIDSerializer;
-
-import static org.usergrid.persistence.Schema.getDefaultSchema;
-
-
-public class QueryProcessor {
-
-    private static final int PAGE_SIZE = 1000;
-    private static final Logger logger = LoggerFactory.getLogger( QueryProcessor.class );
-
-    private static final Schema SCHEMA = getDefaultSchema();
-
-    private final CollectionInfo collectionInfo;
-    private final EntityManager em;
-    private final ResultsLoaderFactory loaderFactory;
-
-    private Operand rootOperand;
-    private List<SortPredicate> sorts;
-    private CursorCache cursorCache;
-    private QueryNode rootNode;
-    private String entityType;
-
-    private int size;
-    private Query query;
-    private int pageSizeHint;
-
-
-    public QueryProcessor( Query query, CollectionInfo collectionInfo, EntityManager em,
-                           ResultsLoaderFactory loaderFactory ) throws PersistenceException {
-        setQuery( query );
-        this.collectionInfo = collectionInfo;
-        this.em = em;
-        this.loaderFactory = loaderFactory;
-        process();
-    }
-
-
-    public Query getQuery() {
-        return query;
-    }
-
-
-    public void setQuery( Query query ) {
-        this.sorts = query.getSortPredicates();
-        this.cursorCache = new CursorCache( query.getCursor() );
-        this.rootOperand = query.getRootOperand();
-        this.entityType = query.getEntityType();
-        this.size = query.getLimit();
-        this.query = query;
-    }
-
-
-    public CollectionInfo getCollectionInfo() {
-        return collectionInfo;
-    }
-
-
-    private void process() throws PersistenceException {
-
-        int opCount = 0;
-
-        // no operand. Check for sorts
-        if ( rootOperand != null ) {
-            // visit the tree
-
-            TreeEvaluator visitor = new TreeEvaluator();
-
-            rootOperand.visit( visitor );
-
-            rootNode = visitor.getRootNode();
-
-            opCount = visitor.getSliceCount();
-        }
-
-        // see if we have sorts, if so, we can add them all as a single node at
-        // the root
-        if ( sorts.size() > 0 ) {
-
-            OrderByNode order = generateSorts( opCount );
-
-            opCount += order.getFirstPredicate().getAllSlices().size();
-
-            rootNode = order;
-        }
-
-
-        //if we still don't have a root node, no query nor order by was specified,
-        // just use the all node or the identifiers
-        if ( rootNode == null ) {
-
-
-            //a name alias or email alias was specified
-            if ( query.containsSingleNameOrEmailIdentifier() ) {
-
-                Identifier ident = query.getSingleIdentifier();
-
-                //an email was specified.  An edge case that only applies to users.  This is fulgy to put here,
-                // but required
-                if ( query.getEntityType().equals( User.ENTITY_TYPE ) && ident.isEmail() ) {
-                    rootNode = new EmailIdentifierNode( ident );
-                }
-
-                //use the ident with the default alias.  could be an email
-                else {
-                    rootNode = new NameIdentifierNode( ident.getName() );
-                }
-            }
-            //a uuid was specified
-            else if ( query.containsSingleUuidIdentifier() ) {
-                rootNode = new UuidIdentifierNode( query.getSingleUuidIdentifier() );
-            }
-
-
-            //nothing was specified, order it by uuid
-            else {
-
-
-                //this is a bit ugly, but how we handle the start parameter
-                UUID startResult = query.getStartResult();
-
-                boolean startResultSet = startResult != null;
-
-                AllNode allNode = new AllNode( 0, startResultSet );
-
-                if ( startResultSet ) {
-                    cursorCache.setNextCursor( allNode.getSlice().hashCode(),
-                            UUIDSerializer.get().toByteBuffer( startResult ) );
-                }
-
-                rootNode = allNode;
-            }
-        }
-
-        if ( opCount > 1 ) {
-            pageSizeHint = PAGE_SIZE;
-        }
-        else {
-            pageSizeHint = Math.min( size, PAGE_SIZE );
-        }
-    }
-
-
-    public QueryNode getFirstNode() {
-        return rootNode;
-    }
-
-
-    /**
-     * Apply cursor position and sort order to this slice. This should only be invoke at evaluation time to ensure that
-     * the IR tree has already been fully constructed
-     */
-    public void applyCursorAndSort( QuerySlice slice ) {
-        // apply the sort first, since this can change the hash code
-        SortPredicate sort = getSort( slice.getPropertyName() );
-
-        if ( sort != null ) {
-            boolean isReversed = sort.getDirection() == SortDirection.DESCENDING;
-
-            //we're reversing the direction of this slice, reverse the params as well
-            if ( isReversed != slice.isReversed() ) {
-                slice.reverse();
-            }
-        }
-        // apply the cursor
-        ByteBuffer cursor = cursorCache.getCursorBytes( slice.hashCode() );
-
-        if ( cursor != null ) {
-            slice.setCursor( cursor );
-        }
-    }
-
-
-    /**
-     * Return the node id from the cursor cache
-     * @param nodeId
-     * @return
-     */
-    public ByteBuffer getCursorCache(int nodeId){
-        return cursorCache.getCursorBytes( nodeId );
-    }
-
-
-    private SortPredicate getSort( String propertyName ) {
-        for ( SortPredicate sort : sorts ) {
-            if ( sort.getPropertyName().equals( propertyName ) ) {
-                return sort;
-            }
-        }
-        return null;
-    }
-
-
-    /** Return the iterator results, ordered if required */
-    public Results getResults( SearchVisitor visitor ) throws Exception {
-        // if we have no order by just load the results
-
-        if ( rootNode == null ) {
-            return null;
-        }
-
-        rootNode.visit( visitor );
-
-        ResultIterator itr = visitor.getResults();
-
-        List<ScanColumn> entityIds = new ArrayList<ScanColumn>( Math.min( size, Query.MAX_LIMIT ) );
-
-        CursorCache resultsCursor = new CursorCache();
-
-        while ( entityIds.size() < size && itr.hasNext() ) {
-            entityIds.addAll( itr.next() );
-        }
-
-        //set our cursor, we paged through more entities than we want to return
-        if ( entityIds.size() > 0 ) {
-            int resultSize = Math.min( entityIds.size(), size );
-            entityIds = entityIds.subList( 0, resultSize );
-
-            if ( resultSize == size ) {
-                itr.finalizeCursor( resultsCursor, entityIds.get( resultSize - 1 ).getUUID() );
-            }
-        }
-        if (logger.isDebugEnabled()) {
-        	logger.debug("Getting result for query: [{}],  returning entityIds size: {}", getQuery(), entityIds.size());
-        }
-
-        final ResultsLoader loader = loaderFactory.getResultsLoader( em, query, query.getResultsLevel() );
-        final Results results = loader.getResults( entityIds );
-
-        if ( results == null ) {
-            return null;
-        }
-
-        // now we need to set the cursor from our tree evaluation for return
-        results.setCursor( resultsCursor.asString() );
-
-        results.setQuery( query );
-        results.setQueryProcessor( this );
-        results.setSearchVisitor( visitor );
-
-        return results;
-    }
-
-
-    private class TreeEvaluator implements QueryVisitor {
-
-        // stack for nodes that will be used to construct the tree and create
-        // objects
-        private CountingStack<QueryNode> nodes = new CountingStack<QueryNode>();
-
-
-        private int contextCount = -1;
-
-
-        /** Get the root node in our tree for runtime evaluation */
-        public QueryNode getRootNode() {
-            return nodes.peek();
-        }
-
-
-        /*
-         * (non-Javadoc)
-         *
-         * @see org.usergrid.persistence.query.tree.QueryVisitor#visit(org.usergrid
-         * .persistence.query.tree.AndOperand)
-         */
-        @Override
-        public void visit( AndOperand op ) throws PersistenceException {
-
-            op.getLeft().visit( this );
-
-            QueryNode leftResult = nodes.peek();
-
-            op.getRight().visit( this );
-
-            QueryNode rightResult = nodes.peek();
-
-            // if the result of the left and right are the same, we don't want
-            // to create an AND. We'll use the same SliceNode. Do nothing
-            if ( leftResult == rightResult ) {
-                return;
-            }
-
-            // otherwise create a new AND node from the result of the visit
-
-            QueryNode right = nodes.pop();
-            QueryNode left = nodes.pop();
-
-            AndNode newNode = new AndNode( left, right );
-
-            nodes.push( newNode );
-        }
-
-
-        /*
-         * (non-Javadoc)
-         *
-         * @see org.usergrid.persistence.query.tree.QueryVisitor#visit(org.usergrid
-         * .persistence.query.tree.OrOperand)
-         */
-        @Override
-        public void visit( OrOperand op ) throws PersistenceException {
-
-            // we need to create a new slicenode for the children of this
-            // operation
-
-            Operand left = op.getLeft();
-            Operand right = op.getRight();
-
-            // we only create a new slice node if our children are && and ||
-            // operations
-            createNewSlice( left );
-
-            left.visit( this );
-
-            // we only create a new slice node if our children are && and ||
-            // operations
-            createNewSlice( right );
-
-            right.visit( this );
-
-            QueryNode rightResult = nodes.pop();
-            QueryNode leftResult = nodes.pop();
-
-            // rewrite with the new Or operand
-            OrNode orNode = new OrNode( leftResult, rightResult,  ++contextCount );
-
-            nodes.push( orNode );
-        }
-
-
-        /*
-         * (non-Javadoc)
-         *
-         * @see org.usergrid.persistence.query.tree.QueryVisitor#visit(org.usergrid
-         * .persistence.query.tree.NotOperand)
-         */
-        @Override
-        public void visit( NotOperand op ) throws PersistenceException {
-
-            // create a new context since any child of NOT will need to be
-            // evaluated independently
-            Operand child = op.getOperation();
-            createNewSlice( child );
-            child.visit( this );
-
-            nodes.push( new NotNode( nodes.pop(), new AllNode( ++contextCount, false ) ) );
-        }
-
-
-        /*
-         * (non-Javadoc)
-         *
-         * @see org.usergrid.persistence.query.tree.QueryVisitor#visit(org.usergrid
-         * .persistence.query.tree.ContainsOperand)
-         */
-        @Override
-        public void visit( ContainsOperand op ) throws NoFullTextIndexException {
-
-            String propertyName = op.getProperty().getValue();
-
-            if ( !SCHEMA.isPropertyFulltextIndexed( entityType, propertyName ) ) {
-                throw new NoFullTextIndexException( entityType, propertyName );
-            }
-
-            StringLiteral string = op.getString();
-
-            String indexName = op.getProperty().getIndexedValue();
-
-            SliceNode node = null;
-
-            // sdg - if left & right have same field name, we need to create a new
-            // slice
-            if ( !nodes.isEmpty() && nodes.peek() instanceof SliceNode
-                    && ( ( SliceNode ) nodes.peek() ).getSlice( indexName ) != null ) {
-                node = newSliceNode();
-            }
-            else {
-                node = getUnionNode( op );
-            }
-
-            String fieldName = op.getProperty().getIndexedValue();
-
-            node.setStart( fieldName, string.getValue(), true );
-            node.setFinish( fieldName, string.getEndValue(), true );
-        }
-
-
-        /*
-         * (non-Javadoc)
-         *
-         * @see org.usergrid.persistence.query.tree.QueryVisitor#visit(org.usergrid
-         * .persistence.query.tree.WithinOperand)
-         */
-        @Override
-        public void visit( WithinOperand op ) {
-
-            // change the property name to coordinates
-            nodes.push( new WithinNode( op.getProperty().getIndexedName(), op.getDistance().getFloatValue(),
-                    op.getLattitude().getFloatValue(), op.getLongitude().getFloatValue(), ++contextCount ) );
-        }
-
-
-        /*
-         * (non-Javadoc)
-         *
-         * @see org.usergrid.persistence.query.tree.QueryVisitor#visit(org.usergrid
-         * .persistence.query.tree.LessThan)
-         */
-        @Override
-        public void visit( LessThan op ) throws NoIndexException {
-            String propertyName = op.getProperty().getValue();
-
-            checkIndexed( propertyName );
-
-            getUnionNode( op ).setFinish( propertyName, op.getLiteral().getValue(), false );
-        }
-
-
-        /*
-         * (non-Javadoc)
-         *
-         * @see org.usergrid.persistence.query.tree.QueryVisitor#visit(org.usergrid
-         * .persistence.query.tree.LessThanEqual)
-         */
-        @Override
-        public void visit( LessThanEqual op ) throws NoIndexException {
-
-            String propertyName = op.getProperty().getValue();
-
-            checkIndexed( propertyName );
-
-            getUnionNode( op ).setFinish( propertyName, op.getLiteral().getValue(), true );
-        }
-
-
-        /*
-         * (non-Javadoc)
-         *
-         * @see org.usergrid.persistence.query.tree.QueryVisitor#visit(org.usergrid
-         * .persistence.query.tree.Equal)
-         */
-        @Override
-        public void visit( Equal op ) throws NoIndexException {
-            String fieldName = op.getProperty().getValue();
-
-            checkIndexed( fieldName );
-
-            Literal<?> literal = op.getLiteral();
-            SliceNode node = getUnionNode( op );
-
-            // this is an edge case. If we get more edge cases, we need to push
-            // this down into the literals and let the objects
-            // handle this
-            if ( literal instanceof StringLiteral ) {
-
-                StringLiteral stringLiteral = ( StringLiteral ) literal;
-
-                String endValue = stringLiteral.getEndValue();
-
-                if ( endValue != null ) {
-                    node.setFinish( fieldName, endValue, true );
-                }
-            }
-            else {
-                node.setFinish( fieldName, literal.getValue(), true );
-            }
-
-            node.setStart( fieldName, literal.getValue(), true );
-        }
-
-
-        /*
-         * (non-Javadoc)
-         *
-         * @see org.usergrid.persistence.query.tree.QueryVisitor#visit(org.usergrid
-         * .persistence.query.tree.GreaterThan)
-         */
-        @Override
-        public void visit( GreaterThan op ) throws NoIndexException {
-            String propertyName = op.getProperty().getValue();
-
-            checkIndexed( propertyName );
-
-            getUnionNode( op ).setStart( propertyName, op.getLiteral().getValue(), false );
-        }
-
-
-        /*
-         * (non-Javadoc)
-         *
-         * @see org.usergrid.persistence.query.tree.QueryVisitor#visit(org.usergrid
-         * .persistence.query.tree.GreaterThanEqual)
-         */
-        @Override
-        public void visit( GreaterThanEqual op ) throws NoIndexException {
-            String propertyName = op.getProperty().getValue();
-
-            checkIndexed( propertyName );
-
-            getUnionNode( op ).setStart( propertyName, op.getLiteral().getValue(), true );
-        }
-
-
-        /**
-         * Return the current leaf node to add to if it exists. This means that we can compress multiple 'AND'
-         * operations and ranges into a single node. Otherwise a new node is created and pushed to the stack
-         *
-         * @param current The current operand node
-         */
-        private SliceNode getUnionNode( EqualityOperand current ) {
-
-            /**
-             * we only create a new slice node in 3 situations 1. No nodes exist 2.
-             * The parent node is not an AND node. Meaning we can't add this slice to
-             * the current set of slices 3. Our current top of stack is not a slice
-             * node.
-             */
-            // no nodes exist
-            if ( nodes.size() == 0 || !( nodes.peek() instanceof SliceNode ) ) {
-                return newSliceNode();
-            }
-
-            return ( SliceNode ) nodes.peek();
-        }
-
-
-        /** The new slice node */
-        private SliceNode newSliceNode() {
-            SliceNode sliceNode = new SliceNode( ++contextCount );
-
-            nodes.push( sliceNode );
-
-            return sliceNode;
-        }
-
-
-        /** Create a new slice if one will be required within the context of this node */
-        private void createNewSlice( Operand child ) {
-            if ( child instanceof EqualityOperand || child instanceof AndOperand || child instanceof ContainsOperand ) {
-                newSliceNode();
-            }
-        }
-
-
-        public int getSliceCount() {
-            return nodes.getSliceCount();
-        }
-    }
-
-
-    private static class CountingStack<T> extends Stack<T> {
-
-        private int count = 0;
-
-        /**
-         *
-         */
-        private static final long serialVersionUID = 1L;
-
-
-        /* (non-Javadoc)
-         * @see java.util.Stack#pop()
-         */
-        @Override
-        public synchronized T pop() {
-            T entry = super.pop();
-
-            if ( entry instanceof SliceNode ) {
-                count += ( ( SliceNode ) entry ).getAllSlices().size();
-            }
-
-            return entry;
-        }
-
-
-        public int getSliceCount() {
-
-            Iterator<T> itr = this.iterator();
-
-            T entry;
-
-            while ( itr.hasNext() ) {
-                entry = itr.next();
-
-                if ( entry instanceof SliceNode ) {
-                    count += ( ( SliceNode ) entry ).getAllSlices().size();
-                }
-            }
-
-            return count;
-        }
-    }
-
-
-    /** @return the pageSizeHint */
-    public int getPageSizeHint( QueryNode node ) {
-        /*****
-         * DO NOT REMOVE THIS PIECE OF CODE!!!!!!!!!!!
-         * It is crucial that the root iterator only needs the result set size per page
-         * otherwise our cursor logic will fail when passing cursor data to the leaf nodes
-         *******/
-        if(node == rootNode){
-            return size;
-        }
-
-        return pageSizeHint;
-    }
-
-
-    /** Generate a slice node with scan ranges for all the properties in our sort cache */
-    private OrderByNode generateSorts( int opCount ) throws NoIndexException {
-
-        // the value is irrelevant since we'll only ever have 1 slice node
-        // if this is called
-        SliceNode slice = new SliceNode( opCount );
-
-        SortPredicate first = sorts.get( 0 );
-
-        String propertyName = first.getPropertyName();
-
-        checkIndexed( propertyName );
-
-        slice.setStart( propertyName, null, true );
-        slice.setFinish( propertyName, null, true );
-
-
-        for ( int i = 1; i < sorts.size(); i++ ) {
-            checkIndexed( sorts.get( i ).getPropertyName() );
-        }
-
-
-        return new OrderByNode( slice, sorts.subList( 1, sorts.size() ), rootNode );
-    }
-
-
-    private void checkIndexed( String propertyName ) throws NoIndexException {
-
-        if ( propertyName == null || propertyName.isEmpty() || ( !SCHEMA.isPropertyIndexed( entityType, propertyName )
-                && collectionInfo != null ) ) {
-            throw new NoIndexException( entityType, propertyName );
-        }
-    }
-
-
-    public EntityManager getEntityManager() {
-        return em;
-    }
-}


[27/96] [abbrv] [partial] Change package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/utils/MapUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/utils/MapUtils.java b/stack/core/src/main/java/org/apache/usergrid/utils/MapUtils.java
new file mode 100644
index 0000000..fcf61b6
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/utils/MapUtils.java
@@ -0,0 +1,376 @@
+/*
+ * 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.utils;
+
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Properties;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.TreeSet;
+
+import static org.apache.commons.lang.StringUtils.isNotBlank;
+import static org.apache.usergrid.utils.ClassUtils.cast;
+
+
+public class MapUtils extends org.apache.commons.collections.MapUtils {
+
+    public static <A, B> void addMapSet( Map<A, Set<B>> map, A a, B b ) {
+        addMapSet( map, false, a, b );
+    }
+
+
+    @SuppressWarnings("unchecked")
+    public static <A, B> void addMapSet( Map<A, Set<B>> map, boolean ignoreCase, A a, B b ) {
+
+        Set<B> setB = map.get( a );
+        if ( setB == null ) {
+            if ( ignoreCase && ( b instanceof String ) ) {
+                setB = ( Set<B> ) new TreeSet<String>( String.CASE_INSENSITIVE_ORDER );
+            }
+            else {
+                setB = new LinkedHashSet<B>();
+            }
+            map.put( a, setB );
+        }
+        setB.add( b );
+    }
+
+
+    public static <A, B, C> void addMapMapSet( Map<A, Map<B, Set<C>>> map, A a, B b, C c ) {
+        addMapMapSet( map, false, a, b, c );
+    }
+
+
+    @SuppressWarnings("unchecked")
+    public static <A, B, C> void addMapMapSet( Map<A, Map<B, Set<C>>> map, boolean ignoreCase, A a, B b, C c ) {
+
+        Map<B, Set<C>> mapB = map.get( a );
+        if ( mapB == null ) {
+            if ( ignoreCase && ( b instanceof String ) ) {
+                mapB = ( Map<B, Set<C>> ) new TreeMap<String, Set<C>>( String.CASE_INSENSITIVE_ORDER );
+            }
+            else {
+                mapB = new LinkedHashMap<B, Set<C>>();
+            }
+            map.put( a, mapB );
+        }
+        addMapSet( mapB, ignoreCase, b, c );
+    }
+
+
+    @SuppressWarnings("unchecked")
+    public static <A, B, C, D> void addMapMapMapSet( Map<A, Map<B, Map<C, Set<D>>>> map, boolean ignoreCase, A a, B b,
+                                                     C c, D d ) {
+        Map<B, Map<C, Set<D>>> mapB = map.get( a );
+        if ( mapB == null ) {
+            if ( ignoreCase && ( b instanceof String ) ) {
+                mapB = ( Map<B, Map<C, Set<D>>> ) new TreeMap<String, Map<C, Set<D>>>( String.CASE_INSENSITIVE_ORDER );
+            }
+            else {
+                mapB = new LinkedHashMap<B, Map<C, Set<D>>>();
+            }
+            map.put( a, mapB );
+        }
+        addMapMapSet( mapB, ignoreCase, b, c, d );
+    }
+
+
+    public static <A, B, C> C getMapMap( Map<A, Map<B, C>> map, A a, B b ) {
+
+        Map<B, C> mapB = map.get( a );
+        if ( mapB == null ) {
+            return null;
+        }
+        return mapB.get( b );
+    }
+
+
+    public static <A, B> void addMapList( Map<A, List<B>> map, A a, B b ) {
+
+        List<B> listB = map.get( a );
+        if ( listB == null ) {
+            listB = new ArrayList<B>();
+            map.put( a, listB );
+        }
+        listB.add( b );
+    }
+
+
+    public static <A, B> void addListToMapList( Map<A, List<B>> map, A a, List<B> b ) {
+
+        List<B> listB = map.get( a );
+        if ( listB == null ) {
+            listB = new ArrayList<B>();
+            map.put( a, listB );
+        }
+        listB.addAll( b );
+    }
+
+
+    @SuppressWarnings("unchecked")
+    public static <K, V> V getValue( Map<K, ?> map, K k ) {
+        V v = null;
+        try {
+            v = ( V ) map.get( k );
+        }
+        catch ( ClassCastException e ) {
+            //LOG.war( "Map value {} was not the expected class", map.get( k ), e );
+        }
+
+        return v;
+    }
+
+
+    @SuppressWarnings("unchecked")
+    public static <K, V> Map<?, ?> map( Object... objects ) {
+        Map<K, V> map = new LinkedHashMap<K, V>();
+        int i = 0;
+        while ( i < objects.length ) {
+            if ( objects[i] instanceof Map.Entry ) {
+                Map.Entry<K, V> entry = ( Entry<K, V> ) objects[i];
+                map.put( entry.getKey(), entry.getValue() );
+                i++;
+            }
+            else if ( objects[i] instanceof Map ) {
+                map.putAll( ( Map<? extends K, ? extends V> ) objects[i] );
+                i++;
+            }
+            else if ( i < ( objects.length - 1 ) ) {
+                K k = ( K ) objects[i];
+                V v = ( V ) objects[i + 1];
+                map.put( k, v );
+                i += 2;
+            }
+            else {
+                break;
+            }
+        }
+        return map;
+    }
+
+
+    private static class SimpleMapEntry<K, V> implements Map.Entry<K, V> {
+
+        private final K k;
+        private V v;
+
+
+        public SimpleMapEntry( K k, V v ) {
+            this.k = k;
+            this.v = v;
+        }
+
+
+        @Override
+        public K getKey() {
+            return k;
+        }
+
+
+        @Override
+        public V getValue() {
+            return v;
+        }
+
+
+        @Override
+        public V setValue( V v ) {
+            V oldV = this.v;
+            this.v = v;
+            return oldV;
+        }
+    }
+
+
+    public static <K, V> Map.Entry<K, V> entry( K k, V v ) {
+        return new SimpleMapEntry<K, V>( k, v );
+    }
+
+
+    public static <K, V> K getFirstKey( Map<K, V> map ) {
+        if ( map == null ) {
+            return null;
+        }
+        Entry<K, V> e = map.entrySet().iterator().next();
+        if ( e != null ) {
+            return e.getKey();
+        }
+        return null;
+    }
+
+
+    public static <V> Map<String, V> filter( Map<String, V> map, String prefix, boolean removePrefix ) {
+        Map<String, V> filteredMap = new LinkedHashMap<String, V>();
+        for ( Entry<String, V> entry : map.entrySet() ) {
+            if ( entry.getKey().startsWith( prefix ) ) {
+                if ( removePrefix ) {
+                    filteredMap.put( entry.getKey().substring( prefix.length() ), entry.getValue() );
+                }
+                else {
+                    filteredMap.put( entry.getKey(), entry.getValue() );
+                }
+            }
+        }
+        return filteredMap;
+    }
+
+
+    public static <V> Map<String, V> filter( Map<String, V> map, String prefix ) {
+        return filter( map, prefix, false );
+    }
+
+
+    public static Properties filter( Properties properties, String prefix, boolean removePrefix ) {
+        Properties filteredProperties = new Properties();
+        for ( Entry<String, String> entry : asMap( properties ).entrySet() ) {
+            if ( entry.getKey().startsWith( prefix ) ) {
+                if ( removePrefix ) {
+                    filteredProperties.put( entry.getKey().substring( prefix.length() ), entry.getValue() );
+                }
+                else {
+                    filteredProperties.put( entry.getKey(), entry.getValue() );
+                }
+            }
+        }
+        return filteredProperties;
+    }
+
+
+    public static Properties filter( Properties properties, String prefix ) {
+        return filter( properties, prefix, false );
+    }
+
+
+    @SuppressWarnings("unchecked")
+    public static Map<String, String> asMap( Properties properties ) {
+        return cast( properties );
+    }
+
+
+    public static <S, T> HashMapBuilder<S, T> hashMap( S key, T value ) {
+        return new HashMapBuilder<S, T>().map( key, value );
+    }
+
+
+    public static class HashMapBuilder<S, T> extends HashMap<S, T> {
+        private static final long serialVersionUID = 1L;
+
+
+        public HashMapBuilder() {
+        }
+
+
+        public HashMapBuilder<S, T> map( S key, T value ) {
+            put( key, value );
+            return this;
+        }
+    }
+
+
+    @SuppressWarnings("unchecked")
+    public static Map<String, List<?>> toMapList( Map<String, ?> m ) {
+        Map<String, List<Object>> mapList = new LinkedHashMap<String, List<Object>>();
+
+        for ( Entry<String, ?> e : m.entrySet() ) {
+            if ( e.getValue() instanceof List ) {
+                addListToMapList( mapList, e.getKey(), ( List<Object> ) e.getValue() );
+            }
+            else {
+                addMapList( mapList, e.getKey(), e.getValue() );
+            }
+        }
+
+        return cast( mapList );
+    }
+
+
+    public static Map<String, ?> putPath( String path, Object value ) {
+        return putPath( null, path, value );
+    }
+
+
+    @SuppressWarnings("unchecked")
+    public static Map<String, ?> putPath( Map<String, ?> map, String path, Object value ) {
+
+        if ( map == null ) {
+            map = new HashMap<String, Object>();
+        }
+
+        int i = path.indexOf( '.' );
+        if ( i < 0 ) {
+            ( ( Map<String, Object> ) map ).put( path, value );
+            return map;
+        }
+        String segment = path.substring( 0, i ).trim();
+        if ( isNotBlank( segment ) ) {
+            Object o = map.get( segment );
+            if ( ( o != null ) && ( !( o instanceof Map ) ) ) {
+                return map;
+            }
+            Map<String, Object> subMap = ( Map<String, Object> ) o;
+            if ( subMap == null ) {
+                subMap = new HashMap<String, Object>();
+                ( ( Map<String, Object> ) map ).put( segment, subMap );
+            }
+            String subPath = path.substring( i + 1 );
+            if ( isNotBlank( subPath ) ) {
+                putPath( subMap, subPath, value );
+            }
+        }
+
+        return map;
+    }
+
+
+    public static <K, V> Map<K, V> emptyMapWithKeys( Map<K, V> map ) {
+        Map<K, V> newMap = new HashMap<K, V>();
+
+        for ( K k : map.keySet() ) {
+            newMap.put( k, null );
+        }
+
+        return newMap;
+    }
+
+
+    public static boolean hasKeys( Map<?, ?> map, String... keys ) {
+        if ( map == null ) {
+            return false;
+        }
+        for ( String key : keys ) {
+            if ( !map.containsKey( key ) ) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+
+    public static boolean hasKeys( Map<?, ?> map, Set<String> keys ) {
+        if ( map == null ) {
+            return false;
+        }
+        return map.keySet().containsAll( keys );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/utils/NumberUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/utils/NumberUtils.java b/stack/core/src/main/java/org/apache/usergrid/utils/NumberUtils.java
new file mode 100644
index 0000000..129040b
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/utils/NumberUtils.java
@@ -0,0 +1,35 @@
+/*
+ * 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.utils;
+
+
+public class NumberUtils {
+    public static int sign( int i ) {
+        if ( i < 0 ) {
+            return -1;
+        }
+        if ( i > 0 ) {
+            return 1;
+        }
+        return 0;
+    }
+
+
+    public static long roundLong( long l, long r ) {
+        return ( l / r ) * r;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/utils/PasswordUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/utils/PasswordUtils.java b/stack/core/src/main/java/org/apache/usergrid/utils/PasswordUtils.java
new file mode 100644
index 0000000..41d6a67
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/utils/PasswordUtils.java
@@ -0,0 +1,28 @@
+/*
+ * 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.utils;
+
+
+import org.apache.commons.codec.digest.DigestUtils;
+
+
+public class PasswordUtils {
+
+    public static String mongoPassword( String username, String password ) {
+        return DigestUtils.md5Hex( username + ":mongo:" + password );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/utils/StringUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/utils/StringUtils.java b/stack/core/src/main/java/org/apache/usergrid/utils/StringUtils.java
new file mode 100644
index 0000000..241e211
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/utils/StringUtils.java
@@ -0,0 +1,171 @@
+/*
+ * 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.utils;
+
+
+import java.util.Arrays;
+
+import org.apache.commons.io.IOUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static org.apache.usergrid.utils.ConversionUtils.string;
+
+
+public class StringUtils extends org.apache.commons.lang.StringUtils {
+
+    private static final Logger LOG = LoggerFactory.getLogger( StringUtils.class );
+
+
+    public static Object lower( Object obj ) {
+        if ( !( obj instanceof String ) ) {
+            return obj;
+        }
+        return ( ( String ) obj ).toLowerCase();
+    }
+
+
+    public static String stringOrSubstringAfterLast( String str, char c ) {
+        if ( str == null ) {
+            return null;
+        }
+        int i = str.lastIndexOf( c );
+        if ( i != -1 ) {
+            return str.substring( i + 1 );
+        }
+        return str;
+    }
+
+
+    public static String stringOrSubstringBeforeLast( String str, char c ) {
+        if ( str == null ) {
+            return null;
+        }
+        int i = str.lastIndexOf( c );
+        if ( i != -1 ) {
+            return str.substring( 0, i );
+        }
+        return str;
+    }
+
+
+    public static String stringOrSubstringBeforeFirst( String str, char c ) {
+        if ( str == null ) {
+            return null;
+        }
+        int i = str.indexOf( c );
+        if ( i != -1 ) {
+            return str.substring( 0, i );
+        }
+        return str;
+    }
+
+
+    public static String stringOrSubstringAfterFirst( String str, char c ) {
+        if ( str == null ) {
+            return null;
+        }
+        int i = str.indexOf( c );
+        if ( i != -1 ) {
+            return str.substring( i + 1 );
+        }
+        return str;
+    }
+
+
+    public static String compactWhitespace( String str ) {
+        if ( str == null ) {
+            return null;
+        }
+        boolean prevWS = false;
+        StringBuilder builder = new StringBuilder();
+        for ( int i = 0; i < str.length(); i++ ) {
+            char c = str.charAt( i );
+            if ( Character.isWhitespace( c ) ) {
+                if ( !prevWS ) {
+                    builder.append( ' ' );
+                }
+                prevWS = true;
+            }
+            else {
+                prevWS = false;
+                builder.append( c );
+            }
+        }
+        return builder.toString().trim();
+    }
+
+
+    /** @return new string with replace applied */
+    public static String replaceAll( String source, String find, String replace ) {
+        if ( source == null ) {
+            return null;
+        }
+        while ( true ) {
+            String old = source;
+            source = source.replaceAll( find, replace );
+            if ( source.equals( old ) ) {
+                return source;
+            }
+        }
+    }
+
+
+    public static String toString( Object obj ) {
+        return string( obj );
+    }
+
+
+    public static String toStringFormat( Object obj, String format ) {
+        if ( obj != null ) {
+            if ( format != null ) {
+                if ( obj.getClass().isArray() ) {
+                    return String.format( format, Arrays.toString( ( Object[] ) obj ) );
+                }
+                return String.format( format, string( obj ) );
+            }
+            else {
+                return string( obj );
+            }
+        }
+        return "";
+    }
+
+
+    public static boolean isString( Object obj ) {
+        return obj instanceof String;
+    }
+
+
+    public static boolean isStringOrNull( Object obj ) {
+        if ( obj == null ) {
+            return true;
+        }
+        return obj instanceof String;
+    }
+
+
+    public static String readClasspathFileAsString( String filePath ) {
+        try {
+            return IOUtils.toString( StringUtils.class.getResourceAsStream( filePath ) );
+        }
+        catch ( Exception e ) {
+            LOG.error( "Error getting file from classpath: " + filePath, e );
+        }
+        return null;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/utils/TimeUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/utils/TimeUtils.java b/stack/core/src/main/java/org/apache/usergrid/utils/TimeUtils.java
new file mode 100644
index 0000000..64dc3f5
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/utils/TimeUtils.java
@@ -0,0 +1,88 @@
+/*
+ * 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.utils;
+
+
+import com.google.common.base.CharMatcher;
+import com.google.common.base.Splitter;
+
+
+public class TimeUtils {
+    /**
+     * Jira-style duration parser. Supported duration strings are: <ul> <li>'S': milliseconds</li> <li>'s': seconds</li>
+     * <li>'m': minutes</li> <li>'h': hours</li> <li>'d': days</li> </ul>
+     * <p/>
+     * Durations can be compound statements in any order as long as they are separated by a ',' (comma). Eg. "1d,14h,3s"
+     * to get the millisecond equivalent of one day, fourteen hours and 3 seconds.
+     * <p/>
+     * Numbers with no durations will be treated as raw millisecond values
+     *
+     * @return the number of milliseconds representing the duration
+     */
+    public static long millisFromDuration( String durationStr ) {
+        long total = 0;
+        MultiplierToken mt;
+        long dur;
+        for ( String val : Splitter.on( ',' ).trimResults().omitEmptyStrings().split( durationStr ) ) {
+            dur = Long.parseLong( CharMatcher.DIGIT.retainFrom( val ) );
+            mt = MultiplierToken.from( val.charAt( val.length() - 1 ) );
+            total += ( mt.multiplier * dur );
+        }
+        return total;
+    }
+
+
+    private enum MultiplierToken {
+        MILSEC_TOKEN( 'S', 1L ),
+        SEC_TOKEN( 's', 1000L ),
+        MIN_TOKEN( 'm', 60000L ),
+        HOUR_TOKEN( 'h', 3600000L ),
+        DAY_TOKEN( 'd', 86400000L );
+
+        final char token;
+        final long multiplier;
+
+
+        MultiplierToken( char token, long multiplier ) {
+            this.token = token;
+            this.multiplier = multiplier;
+        }
+
+
+        static MultiplierToken from( char c ) {
+            switch ( c ) {
+                case 's':
+                    return SEC_TOKEN;
+                case 'm':
+                    return MIN_TOKEN;
+                case 'h':
+                    return HOUR_TOKEN;
+                case 'd':
+                    return DAY_TOKEN;
+                case 'S':
+                    return MILSEC_TOKEN;
+                default:
+                    break;
+            }
+
+            if ( CharMatcher.DIGIT.matches( c ) ) {
+                return MILSEC_TOKEN;
+            }
+            throw new IllegalArgumentException( "Duration token was not on of [S,s,m,h,d] but was " + c );
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/utils/UUIDUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/utils/UUIDUtils.java b/stack/core/src/main/java/org/apache/usergrid/utils/UUIDUtils.java
new file mode 100644
index 0000000..cbb508b
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/utils/UUIDUtils.java
@@ -0,0 +1,411 @@
+/*
+ * 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.utils;
+
+
+import java.util.Collections;
+import java.util.List;
+import java.util.Random;
+import java.util.UUID;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.locks.ReentrantLock;
+
+import com.fasterxml.uuid.EthernetAddress;
+import com.fasterxml.uuid.UUIDComparator;
+
+import static com.fasterxml.uuid.impl.UUIDUtil.BYTE_OFFSET_CLOCK_HI;
+import static com.fasterxml.uuid.impl.UUIDUtil.BYTE_OFFSET_CLOCK_LO;
+import static com.fasterxml.uuid.impl.UUIDUtil.BYTE_OFFSET_CLOCK_MID;
+import static com.fasterxml.uuid.impl.UUIDUtil.BYTE_OFFSET_CLOCK_SEQUENCE;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static org.apache.commons.codec.binary.Base64.decodeBase64;
+import static org.apache.commons.codec.binary.Base64.encodeBase64URLSafeString;
+import static org.apache.usergrid.utils.ConversionUtils.bytes;
+import static org.apache.usergrid.utils.ConversionUtils.uuid;
+
+
+public class UUIDUtils {
+    private static final Logger LOG = LoggerFactory.getLogger( UUIDUtils.class );
+    private static final int[] MICROS = new int[1000];
+
+
+    static {
+        for ( int x = 0; x < 1000; x++ ) {
+            MICROS[x] = x * 10;
+        }
+    }
+
+
+    private static ReentrantLock tsLock = new ReentrantLock( true );
+
+    public static final UUID MIN_TIME_UUID = UUID.fromString( "00000000-0000-1000-8000-000000000000" );
+
+    public static final UUID MAX_TIME_UUID = UUID.fromString( "ffffffff-ffff-1fff-bfff-ffffffffffff" );
+
+    public static final UUID ZERO_UUID = new UUID( 0, 0 );
+
+    private static long timestampMillisNow = System.currentTimeMillis();
+
+    private static AtomicInteger currentMicrosPoint = new AtomicInteger( 0 );
+    private static AtomicInteger customMicrosPointer = new AtomicInteger( 0 );
+
+
+    /**
+     * Return the "next" UUID in micro second resolution. <b>WARNING</b>: this is designed to return the next unique
+     * timestamped UUID for this JVM. Depending on velocity of the call, this method may block internally to insure that
+     * "now" is kept in sync with the UUIDs being generated by this call.
+     * <p/>
+     * In other words, we will intentionally burn CPU insuring that this method is not executed more than 10k -1 times
+     * per millisecond and guarantee that those microseconds held within are sequential.
+     * <p/>
+     * If we did not do this, you would get <b>timestamp collision</b> even though the UUIDs will technically be
+     * 'unique.'
+     */
+    public static java.util.UUID newTimeUUID() {
+        // get & inc counter, but roll on 1k (because we divide by 10 on retrieval)
+        // if count + currentMicro > 1k, block and roll
+        tsLock.lock();
+        long ts = System.currentTimeMillis();
+        if ( ts > timestampMillisNow ) {
+            timestampMillisNow = ts;
+            currentMicrosPoint.set( 0 );
+        }
+        int pointer = currentMicrosPoint.getAndIncrement();
+        try {
+            if ( pointer > 990 ) {
+                TimeUnit.MILLISECONDS.sleep( 1L );
+            }
+        }
+        catch ( Exception ex ) {
+            ex.printStackTrace();
+        }
+        finally {
+            tsLock.unlock();
+        }
+        return newTimeUUID( ts, MICROS[pointer] );
+    }
+
+
+    private static final long KCLOCK_OFFSET = 0x01b21dd213814000L;
+    private static final long KCLOCK_MULTIPLIER_L = 10000L;
+
+    private static final Random CLOCK_SEQ_RANDOM = new Random();
+
+
+    // 14 bits of randomness
+    private static int getRandomClockSequence() {
+        return CLOCK_SEQ_RANDOM.nextInt() & 0x3FFF;
+    }
+
+
+    private static void setTimestamp( long timestamp, byte[] uuidBytes, int clockSeq, int timeOffset ) {
+
+        timestamp *= KCLOCK_MULTIPLIER_L;
+        timestamp += KCLOCK_OFFSET;
+        timestamp += timeOffset;
+
+        // Set random clock sequence
+        uuidBytes[BYTE_OFFSET_CLOCK_SEQUENCE] = ( byte ) ( clockSeq >> 8 );
+        uuidBytes[BYTE_OFFSET_CLOCK_SEQUENCE + 1] = ( byte ) clockSeq;
+
+        // Set variant
+        uuidBytes[BYTE_OFFSET_CLOCK_SEQUENCE] &= 0x3F;
+        uuidBytes[BYTE_OFFSET_CLOCK_SEQUENCE] |= 0x80;
+        setTime( uuidBytes, timestamp );
+    }
+
+
+    @SuppressWarnings("all")
+    private static void setTime( byte[] uuidBytes, long timestamp ) {
+
+        // Time fields aren't nicely split across the UUID, so can't just
+        // linearly dump the stamp:
+        int clockHi = ( int ) ( timestamp >>> 32 );
+        int clockLo = ( int ) timestamp;
+
+        uuidBytes[BYTE_OFFSET_CLOCK_HI] = ( byte ) ( clockHi >>> 24 );
+        uuidBytes[BYTE_OFFSET_CLOCK_HI + 1] = ( byte ) ( clockHi >>> 16 );
+        uuidBytes[BYTE_OFFSET_CLOCK_MID] = ( byte ) ( clockHi >>> 8 );
+        uuidBytes[BYTE_OFFSET_CLOCK_MID + 1] = ( byte ) clockHi;
+
+        uuidBytes[BYTE_OFFSET_CLOCK_LO] = ( byte ) ( clockLo >>> 24 );
+        uuidBytes[BYTE_OFFSET_CLOCK_LO + 1] = ( byte ) ( clockLo >>> 16 );
+        uuidBytes[BYTE_OFFSET_CLOCK_LO + 2] = ( byte ) ( clockLo >>> 8 );
+        uuidBytes[BYTE_OFFSET_CLOCK_LO + 3] = ( byte ) clockLo;
+
+        // Set version
+        uuidBytes[BYTE_OFFSET_CLOCK_HI] &= 0x0F;
+        uuidBytes[BYTE_OFFSET_CLOCK_HI] |= 0x10;
+    }
+
+
+    /**
+     * Generate a timeuuid with the given timestamp in milliseconds and the time offset. Useful when you need to
+     * generate sequential UUIDs for the same period in time. I.E
+     * <p/>
+     * newTimeUUID(1000, 0) <br/> newTimeUUID(1000, 1) <br /> newTimeUUID(1000, 2) <br />
+     * <p/>
+     * etc.
+     * <p/>
+     * Only use this method if you are absolutely sure you need it. When it doubt use the method without the timestamp
+     * offset
+     *
+     * @param ts The timestamp in milliseconds
+     * @param timeoffset The offset, which should always be <= 10000. If you go beyond this range, the millisecond will
+     * be incremented since this is beyond the possible values when coverrting from millis to 1/10 microseconds stored
+     * in the time uuid.
+     */
+    public static UUID newTimeUUID( long ts, int timeoffset ) {
+        if ( ts == 0 ) {
+            return newTimeUUID();
+        }
+
+        byte[] uuidBytes = new byte[16];
+        // 47 bits of randomness
+        EthernetAddress eth = EthernetAddress.constructMulticastAddress();
+        eth.toByteArray( uuidBytes, 10 );
+        setTimestamp( ts, uuidBytes, getRandomClockSequence(), timeoffset );
+
+        return uuid( uuidBytes );
+    }
+
+
+    /**
+     * Generate a new UUID with the given time stamp in milliseconds. This method guarantees that subsequent calls will
+     * be of increasing value chronologically. If a large number of subsequent calls are made to this method (>1000)
+     * with the same timestamp, you will have non-unique temporal values stored in your UUID.
+     */
+    public static UUID newTimeUUID( long ts ) {
+        tsLock.lock();
+        int pointer = customMicrosPointer.getAndIncrement();
+        try {
+            if ( pointer > 990 ) {
+                customMicrosPointer.set( 0 );
+            }
+        }
+        finally {
+            tsLock.unlock();
+        }
+        return newTimeUUID( ts, MICROS[pointer] );
+    }
+
+
+    public static UUID minTimeUUID( long ts ) {
+        byte[] uuidBytes = new byte[16];
+        setTimestamp( ts, uuidBytes, 0, 0 );
+
+        return uuid( uuidBytes );
+    }
+
+
+    public static UUID maxTimeUUID( long ts ) {
+        byte[] uuidBytes = new byte[16];
+        uuidBytes[10] = ( byte ) 0xFF;
+        uuidBytes[11] = ( byte ) 0xFF;
+        uuidBytes[12] = ( byte ) 0xFF;
+        uuidBytes[13] = ( byte ) 0xFF;
+        uuidBytes[14] = ( byte ) 0xFF;
+        uuidBytes[15] = ( byte ) 0xFF;
+        setTimestamp( ts, uuidBytes, 0x3FFF, 0x1FFF );
+
+        return uuid( uuidBytes );
+    }
+
+
+    /** Returns the minimum UUID */
+    public static UUID min( UUID first, UUID second ) {
+        if ( first == null ) {
+            if ( second == null ) {
+                return null;
+            }
+            return second;
+        }
+
+        if ( second == null ) {
+            return first;
+        }
+
+        if ( compare( first, second ) < 0 ) {
+            return first;
+        }
+        return second;
+    }
+
+
+    /** Returns the minimum UUID */
+    public static UUID max( UUID first, UUID second ) {
+        if ( first == null ) {
+            if ( second == null ) {
+                return null;
+            }
+            return second;
+        }
+
+        if ( second == null ) {
+            return first;
+        }
+
+        if ( compare( first, second ) < 0 ) {
+            return second;
+        }
+        return first;
+    }
+
+
+    /** Returns a UUID that is -1 of the passed uuid, sorted by time uuid only */
+    public static UUID decrement( UUID uuid ) {
+        if ( !isTimeBased( uuid ) ) {
+            throw new IllegalArgumentException( "The uuid must be a time type" );
+        }
+
+
+        //timestamp is in the 60 bit timestamp
+        long timestamp = uuid.timestamp();
+        timestamp--;
+
+        if ( timestamp < 0 ) {
+            throw new IllegalArgumentException( "You must specify a time uuid with a timestamp > 0" );
+        }
+
+        //get our bytes, then set the smaller timestamp into it
+        byte[] uuidBytes = bytes( uuid );
+
+        setTime( uuidBytes, timestamp );
+
+        return uuid( uuidBytes );
+    }
+
+
+    public static boolean isTimeBased( UUID uuid ) {
+        if ( uuid == null ) {
+            return false;
+        }
+        return uuid.version() == 1;
+    }
+
+
+    public static long getTimestampInMillis( UUID uuid ) {
+        if ( uuid == null ) {
+            return 0;
+        }
+        long t = uuid.timestamp();
+        return ( t - KCLOCK_OFFSET ) / KCLOCK_MULTIPLIER_L;
+    }
+
+
+    public static long getTimestampInMicros( UUID uuid ) {
+        if ( uuid == null ) {
+            return 0;
+        }
+        long t = uuid.timestamp();
+        return ( t - KCLOCK_OFFSET ) / 10;
+    }
+
+
+    public static UUID tryGetUUID( String s ) {
+        if ( s == null ) {
+            return null;
+        }
+        if ( s.length() != 36 ) {
+            return null;
+        }
+        // 8-4-4-4-12
+        // 0-7,8,9-12,13,14-17,18,19-22,23,24-35
+        if ( s.charAt( 8 ) != '-' ) {
+            return null;
+        }
+        if ( s.charAt( 13 ) != '-' ) {
+            return null;
+        }
+        if ( s.charAt( 18 ) != '-' ) {
+            return null;
+        }
+        if ( s.charAt( 23 ) != '-' ) {
+            return null;
+        }
+        UUID uuid = null;
+        try {
+            uuid = UUID.fromString( s );
+        }
+        catch ( Exception e ) {
+            LOG.info( "Could not convert String {} into a UUID", s, e );
+        }
+        return uuid;
+    }
+
+
+    public static boolean isUUID( String s ) {
+        return tryGetUUID( s ) != null;
+    }
+
+
+    public static UUID tryExtractUUID( String s ) {
+        if ( s == null ) {
+            return null;
+        }
+        if ( s.length() < 36 ) {
+            return null;
+        }
+        return tryGetUUID( s.substring( 0, 36 ) );
+    }
+
+
+    public static UUID tryExtractUUID( String s, int offset ) {
+        if ( s == null ) {
+            return null;
+        }
+        if ( ( s.length() - offset ) < 36 ) {
+            return null;
+        }
+        return tryGetUUID( s.substring( offset, offset + 36 ) );
+    }
+
+
+    public static String toBase64( UUID id ) {
+        if ( id == null ) {
+            return null;
+        }
+        return encodeBase64URLSafeString( bytes( id ) );
+    }
+
+
+    public static UUID fromBase64( String str ) {
+        if ( str == null ) {
+            return null;
+        }
+        byte[] bytes = decodeBase64( str );
+        if ( bytes.length != 16 ) {
+            return null;
+        }
+        return uuid( bytes );
+    }
+
+
+    public static int compare( UUID u1, UUID u2 ) {
+        return UUIDComparator.staticCompare( u1, u2 );
+    }
+
+
+    public static List<UUID> sort( List<UUID> uuids ) {
+        Collections.sort( uuids, new UUIDComparator() );
+        return uuids;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/utils/Version.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/utils/Version.java b/stack/core/src/main/java/org/apache/usergrid/utils/Version.java
new file mode 100644
index 0000000..ec9244a
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/utils/Version.java
@@ -0,0 +1,428 @@
+/*
+ * 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.utils;
+
+/*******************************************************************************
+ * Copyright (c) 2010, Schley Andrew Kutz All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * - Neither the name of the Schley Andrew Kutz nor the names of its
+ * contributors may be used to endorse or promote products derived from this
+ * software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ ******************************************************************************/
+
+import java.io.Serializable;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.apache.commons.lang.StringUtils;
+
+
+/**
+ * The Version class can be used to parse a standard version string into its four components,
+ * MAJOR.MINOR.BUILD.REVISION.
+ */
+public class Version implements Serializable, Cloneable, Comparable<Version> {
+    /** A serial version UID. */
+    private static final long serialVersionUID = -4316270526722986552L;
+
+    /** A pattern to match the standard version format MAJOR.MINOR.BUILD.REVISION. */
+    private static final Pattern STD_VERSION_PATT =
+            Pattern.compile( "^([^\\d]*?)(\\d+)(?:\\.(\\d+))?(?:\\.(\\d+))?(?:\\.(\\d+))?(.*)$" );
+
+
+    /** Initialize a new Version object that is set to "0.0.0.0". */
+    public Version() {
+    }
+
+
+    /** Everything before the version in the string that was parsed. */
+    private String prefix;
+
+    /** Everything after the version in the string that was parsed. */
+    private String suffix;
+
+    /** The String that was parsed to create this version object. */
+    private String rawVersion;
+
+
+    /**
+     * Gets everything before the version in the string that was parsed.
+     *
+     * @return Everything before the version in the string that was parsed.
+     */
+    public String getPrefix() {
+        return prefix;
+    }
+
+
+    /**
+     * Parses a new Version object from a String.
+     *
+     * @param toParse The String object to parse.
+     *
+     * @return A new Version object.
+     *
+     * @throws Exception When there is an error parsing the String.
+     */
+    public static Version parse( String toParse ) throws Exception {
+        Matcher m = STD_VERSION_PATT.matcher( toParse );
+
+        if ( !m.find() ) {
+            throw new Exception( String.format( "Error parsing version from '%s'", toParse ) );
+        }
+
+        Version v = new Version();
+        v.rawVersion = toParse;
+        v.prefix = m.group( 1 );
+
+        if ( StringUtils.isNotEmpty( m.group( 2 ) ) ) {
+            v.setMajor( m.group( 2 ) );
+        }
+
+        if ( StringUtils.isNotEmpty( m.group( 3 ) ) ) {
+            v.setMinor( m.group( 3 ) );
+        }
+
+        if ( StringUtils.isNotEmpty( m.group( 4 ) ) ) {
+            v.setBuild( m.group( 4 ) );
+        }
+
+        if ( StringUtils.isNotEmpty( m.group( 5 ) ) ) {
+            v.setRevision( m.group( 5 ) );
+        }
+
+        v.suffix = m.group( 6 );
+
+        return v;
+    }
+
+
+    /** The version's MAJOR component. */
+    private String major = "0";
+
+
+    /**
+     * Sets the version's MAJOR component.
+     *
+     * @param toSet The version's MAJOR component.
+     *
+     * @throws IllegalArgumentException When a null or non-numeric value is given.
+     */
+    public void setMajor( String toSet ) throws IllegalArgumentException {
+        if ( StringUtils.isEmpty( toSet ) ) {
+            throw new IllegalArgumentException( "Argument is null" );
+        }
+
+        if ( !toSet.matches( "\\d+" ) ) {
+            throw new IllegalArgumentException( "Argument is not numeric" );
+        }
+
+        if ( numberOfComponents < 1 ) {
+            numberOfComponents = 1;
+        }
+
+        major = toSet;
+    }
+
+
+    /** The version's MAJOR component as an integer. */
+    private int getMajorAsInt() {
+        return Integer.parseInt( major );
+    }
+
+
+    /** The version's MINOR component. */
+    private String minor = "0";
+
+
+    /**
+     * Sets the version's MINOR component.
+     *
+     * @param toSet The version's MINOR component.
+     *
+     * @throws IllegalArgumentException When a null or non-numeric value is given.
+     */
+    public void setMinor( String toSet ) throws IllegalArgumentException {
+        if ( StringUtils.isEmpty( toSet ) ) {
+            throw new IllegalArgumentException( "Argument is null" );
+        }
+
+        if ( !toSet.matches( "\\d+" ) ) {
+            throw new IllegalArgumentException( "Argument is not numeric" );
+        }
+
+        if ( numberOfComponents < 2 ) {
+            numberOfComponents = 2;
+        }
+
+        minor = toSet;
+    }
+
+
+    /** The version's MINOR component as an integer. */
+    private int getMinorAsInt() {
+        return Integer.parseInt( minor );
+    }
+
+
+    /** The version's BUILD component. */
+    private String build = "0";
+
+
+    /** The version's BUILD component as an integer. */
+    private int getBuildAsInt() {
+        return Integer.parseInt( build );
+    }
+
+
+    /**
+     * Gets the version's BUILD component.
+     *
+     * @return The version's BUILD component.
+     */
+    public String getBuild() {
+        return build;
+    }
+
+
+    /**
+     * Sets the version's BUILD component.
+     *
+     * @param toSet The version's BUILD component.
+     *
+     * @throws IllegalArgumentException When a null or non-numeric value is given.
+     */
+    public void setBuild( String toSet ) throws IllegalArgumentException {
+        if ( StringUtils.isEmpty( toSet ) ) {
+            throw new IllegalArgumentException( "Argument is null" );
+        }
+
+        if ( !toSet.matches( "\\d+" ) ) {
+            throw new IllegalArgumentException( "Argument is not numeric" );
+        }
+
+        if ( numberOfComponents < 3 ) {
+            numberOfComponents = 3;
+        }
+
+        build = toSet;
+    }
+
+
+    /**
+     * Sets the version's BUILD component.
+     *
+     * @param toSet The version's BUILD component.
+     */
+    public void setBuild( int toSet ) {
+        setBuild( String.valueOf( toSet ) );
+    }
+
+
+    /** The version's REVISION component. */
+    private String revision = "0";
+
+
+    /** The version's REVISION component as an integer. */
+    private int getRevisionAsInt() {
+        return Integer.parseInt( revision );
+    }
+
+
+    /**
+     * Sets the version's REVISION component.
+     *
+     * @param toSet The version's REVISION component.
+     *
+     * @throws IllegalArgumentException When a null or non-numeric value is given.
+     */
+    public void setRevision( String toSet ) throws IllegalArgumentException {
+        if ( StringUtils.isEmpty( toSet ) ) {
+            throw new IllegalArgumentException( "Argument is null" );
+        }
+
+        if ( !toSet.matches( "\\d+" ) ) {
+            throw new IllegalArgumentException( "Argument is not numeric" );
+        }
+
+        if ( numberOfComponents < 4 ) {
+            numberOfComponents = 4;
+        }
+
+        revision = toSet;
+    }
+
+
+    /**
+     * The number of components that make up the version. The value will always be between 1 (inclusive) and 4
+     * (inclusive).
+     */
+    private int numberOfComponents;
+
+
+    @Override
+    @SuppressWarnings("all")
+    public Object clone() throws CloneNotSupportedException {
+        Version v = new Version();
+
+        v.rawVersion = rawVersion;
+        v.prefix = prefix;
+        v.suffix = suffix;
+
+        v.numberOfComponents = numberOfComponents;
+
+        v.major = major;
+        v.minor = minor;
+        v.build = build;
+        v.revision = revision;
+
+        return v;
+    }
+
+
+    @Override
+    public boolean equals( Object toCompare ) {
+        // Compare pointers
+        if ( toCompare == this ) {
+            return true;
+        }
+
+        // Compare types
+        if ( !( toCompare instanceof Version ) ) {
+            return false;
+        }
+
+        return compareTo( ( Version ) toCompare ) == 0;
+    }
+
+
+    @Override
+    public int hashCode() {
+        return toString().hashCode();
+    }
+
+
+    @Override
+    public String toString() {
+        return String.format( "%s.%s.%s.%s", major, minor, build, revision );
+    }
+
+
+    /**
+     * Gets the version as a string using the specified number of components.
+     *
+     * @param components The number of components. Values less than 1 will be treated as 1 and values greater than 4
+     * will be treated as 4.
+     *
+     * @return The version as a string using the specified number of components.
+     */
+    public String toString( int components ) {
+        StringBuilder buff = new StringBuilder();
+        buff.append( major );
+
+        if ( components > 4 ) {
+            components = 4;
+        }
+
+        switch ( components ) {
+            case 2:
+                buff.append( String.format( ".%s", minor ) );
+                break;
+            case 3:
+                buff.append( String.format( ".%s.%s", minor, build ) );
+                break;
+            case 4:
+                buff.append( String.format( ".%s.%s.%s", minor, build, revision ) );
+                break;
+            default:
+                break;
+        }
+
+        return buff.toString();
+    }
+
+
+    private int compareInts( int x, int y ) {
+        if ( x == y ) {
+            return 0;
+        }
+
+        if ( x < y ) {
+            return -1;
+        }
+
+        return 1;
+    }
+
+
+    @Override
+    public int compareTo( Version toCompare ) {
+        int result = toString().compareTo( toCompare.toString() );
+
+        if ( result == 0 ) {
+            return result;
+        }
+
+        result = compareInts( getMajorAsInt(), toCompare.getMajorAsInt() );
+
+        if ( result != 0 ) {
+            return result;
+        }
+
+        result = compareInts( getMinorAsInt(), toCompare.getMinorAsInt() );
+
+        if ( result != 0 ) {
+            return result;
+        }
+
+        result = compareInts( getBuildAsInt(), toCompare.getBuildAsInt() );
+
+        if ( result != 0 ) {
+            return result;
+        }
+
+        result = compareInts( getRevisionAsInt(), toCompare.getRevisionAsInt() );
+
+        if ( result != 0 ) {
+            return result;
+        }
+
+        return result;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/utils/package-info.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/utils/package-info.java b/stack/core/src/main/java/org/apache/usergrid/utils/package-info.java
new file mode 100644
index 0000000..4936523
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/utils/package-info.java
@@ -0,0 +1,18 @@
+/*
+ * 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.utils;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/batch/AppArgs.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/batch/AppArgs.java b/stack/core/src/main/java/org/usergrid/batch/AppArgs.java
deleted file mode 100644
index 55b6efe..0000000
--- a/stack/core/src/main/java/org/usergrid/batch/AppArgs.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package org.usergrid.batch;
-
-
-import com.beust.jcommander.JCommander;
-import com.beust.jcommander.Parameter;
-
-
-/** @author zznate */
-public class AppArgs {
-
-    @Parameter(names = "-host", description = "The Cassandra host to which we will connect")
-    private String host = "127.0.0.1";
-
-    @Parameter(names = "-port", description = "The port which we will connect")
-    private int port = 9160;
-
-    @Parameter(names = "-workerThreads", description = "The number of worker threads")
-    private int workerThreads = 4;
-
-    @Parameter(names = "-sleepFor", description = "Number of seconds to sleep between checks of the work queue")
-    private int sleepFor = 2;
-
-    @Parameter(names = "-appContext", description = "Location of Spring Application context files")
-    private String appContext;
-
-
-    public static AppArgs parseArgs( String[] args ) {
-        AppArgs appArgs = new AppArgs();
-        JCommander jcommander = new JCommander( appArgs, args );
-        return appArgs;
-    }
-
-
-    public String getHost() {
-        return host;
-    }
-
-
-    public int getPort() {
-        return port;
-    }
-
-
-    public int getWorkerThreads() {
-        return workerThreads;
-    }
-
-
-    public int getSleepFor() {
-        return sleepFor;
-    }
-
-
-    public String getAppContext() {
-        return appContext;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/batch/Job.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/batch/Job.java b/stack/core/src/main/java/org/usergrid/batch/Job.java
deleted file mode 100644
index 34240c8..0000000
--- a/stack/core/src/main/java/org/usergrid/batch/Job.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package org.usergrid.batch;
-
-
-/**
- * Defines only an execute method. Implementation functionality is completely up to the {@link JobFactory}
- *
- * @author zznate
- */
-public interface Job {
-
-    /**
-     * Invoked when a job should execute
-     *
-     * @param execution The execution information.  This will be the same from the last run.  By default you should call
-     * exeuction.start() once processing starts
-     *
-     * @throws JobExecutionException If the job cannot be executed
-     */
-    public void execute( JobExecution execution ) throws Exception;
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/batch/JobExecution.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/batch/JobExecution.java b/stack/core/src/main/java/org/usergrid/batch/JobExecution.java
deleted file mode 100644
index 150de17..0000000
--- a/stack/core/src/main/java/org/usergrid/batch/JobExecution.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.batch;
-
-
-import java.util.UUID;
-
-import org.usergrid.persistence.entities.JobData;
-import org.usergrid.persistence.entities.JobStat;
-
-
-/**
- * Interface to define all operations possible during a job execution. The job execution has several states.
- * <p/>
- * <p/>
- * The Execution has the following state transitions
- * <p/>
- * NOT_STARTED->IN_PROGRESS
- * <p/>
- * <p/>
- * IN_PROGRESS->COMPLETED <br/> IN_PROGRESS->FAILED <br/> IN_PROGRESS->DEAD
- * <p/>
- * FAILED->IN_PROGRESS
- *
- * @author tnine
- */
-public interface JobExecution {
-
-    /** Retry constant to signal the job should try forever */
-    public static final int FOREVER = -1;
-
-    /** Get the data for this execution */
-    public JobData getJobData();
-
-    /** Get the job statistic information */
-    public JobStat getJobStats();
-
-    /** Marke the job as started.  If it's failed too many times, don't run it */
-    public void start( int maxFailures );
-
-    /** Mark the job as successfully completed */
-    public void completed();
-
-    /** Mark the job as failed. If it has failed more than maxFailures, mark it as dead */
-    public void failed();
-
-    /** Mark the job as dead */
-    public void killed();
-
-    /** Provide a heartbeat to the job execution to keep it alive */
-    public void heartbeat();
-
-    /** Signal the execution is still running, and delay the timeout for the milliseconds specified */
-    public void heartbeat( long milliseconds );
-
-    /**
-     * Don't treat the execution as complete.  Simply delay execution for the specified milliseconds.  Similar to
-     * heartbeat but allows the user to specify the timeout for the next attempt instead of the heartbeat default.  This
-     * DOES NOT update locks, so your job should use distributed locking internally to ensure single execution
-     */
-    public void delay( long milliseconds );
-
-    /** Get the current status of the execution */
-    public Status getStatus();
-
-    /** Get the name of the job */
-    public String getJobName();
-
-    /** Get the job id */
-    public UUID getJobId();
-
-    /** Get the current transaction Id from the heartbeat */
-    public UUID getTransactionId();
-
-    public enum Status {
-        NOT_STARTED, IN_PROGRESS, COMPLETED, FAILED, DEAD, DELAYED
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/batch/JobExecutionImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/batch/JobExecutionImpl.java b/stack/core/src/main/java/org/usergrid/batch/JobExecutionImpl.java
deleted file mode 100644
index d5aecfc..0000000
--- a/stack/core/src/main/java/org/usergrid/batch/JobExecutionImpl.java
+++ /dev/null
@@ -1,202 +0,0 @@
-package org.usergrid.batch;
-
-
-import java.util.UUID;
-
-import org.usergrid.batch.repository.JobDescriptor;
-import org.usergrid.batch.service.JobRuntimeService;
-import org.usergrid.persistence.entities.JobData;
-import org.usergrid.persistence.entities.JobStat;
-
-import com.google.common.base.Preconditions;
-
-
-/**
- * Models the execution context of the {@link Job} with state transition methods for job status.
- *
- * @author zznate
- * @author tnine
- */
-public class JobExecutionImpl implements JobExecution, JobRuntime {
-
-    private final UUID jobId;
-    private final UUID runId;
-    private final String jobName;
-    private long duration;
-    private Status status = Status.NOT_STARTED;
-    private long startTime;
-    private JobRuntimeService runtime;
-    private UUID transactionId;
-    private JobData data;
-    private JobStat stats;
-    private long delay = -1;
-
-
-    public JobExecutionImpl( JobDescriptor jobDescriptor ) {
-        this.runId = UUID.randomUUID();
-        this.jobId = jobDescriptor.getJobId();
-        this.runtime = jobDescriptor.getRuntime();
-        this.jobName = jobDescriptor.getJobName();
-        this.transactionId = jobDescriptor.getTransactionId();
-        this.data = jobDescriptor.getData();
-        this.stats = jobDescriptor.getStats();
-    }
-
-
-    public UUID getRunId() {
-        return runId;
-    }
-
-
-    public long getDuration() {
-        return duration;
-    }
-
-
-    /** @param transactionId the transactionId to set */
-    public void setTransactionId( UUID transactionId ) {
-        this.transactionId = transactionId;
-    }
-
-
-    public UUID getJobId() {
-        return jobId;
-    }
-
-
-    /** @return the data */
-    public JobData getJobData() {
-        return data;
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see org.usergrid.batch.JobExecution#getJobStats()
-     */
-    @Override
-    public JobStat getJobStats() {
-        return stats;
-    }
-
-
-    public void start( int maxFailures ) {
-        Preconditions.checkState( this.status.equals( Status.NOT_STARTED ) || this.status.equals( Status.FAILED ),
-                "Attempted to start job in progress" );
-        this.status = Status.IN_PROGRESS;
-
-        stats.incrementRuns();
-
-
-        // use >= in case the threshold lowers after the job has passed the failure
-        // mark
-        if ( maxFailures != FOREVER && stats.getTotalAttempts() > maxFailures ) {
-            status = Status.DEAD;
-        }
-
-        startTime = System.currentTimeMillis();
-        stats.setStartTime( startTime );
-    }
-
-
-    public void completed() {
-        updateState( Status.IN_PROGRESS, "Attempted to complete job not in progress", Status.COMPLETED );
-        stats.setDuration( duration );
-    }
-
-
-    /**
-     * Mark this execution as failed. Also pass the maxium number of possible failures. Set to JobExecution.FOREVER for
-     * no limit
-     */
-    public void failed() {
-        updateState( Status.IN_PROGRESS, "Attempted to fail job not in progress", Status.FAILED );
-    }
-
-
-    /** This job should be killed and not retried */
-    public void killed() {
-        updateState( Status.IN_PROGRESS, "Attempted to fail job not in progress", Status.DEAD );
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see org.usergrid.batch.JobExecution#delay(long)
-     */
-    @Override
-    public void delay( long delay ) {
-        updateState( Status.IN_PROGRESS, "Attempted to delay a job not in progress", Status.DELAYED );
-        stats.incrementDelays();
-        this.delay = delay;
-        runtime.delay( this );
-    }
-
-
-    /** Update our state */
-    private void updateState( Status expected, String message, Status newStatus ) {
-        Preconditions.checkState( this.status.equals( expected ), message );
-        this.status = newStatus;
-        duration = System.currentTimeMillis() - startTime;
-    }
-
-
-    /** Make sure we're in progress and notifiy the scheduler we're still running */
-    public void heartbeat() {
-        Preconditions
-                .checkState( this.status.equals( Status.IN_PROGRESS ), "Attempted to heartbeat job not in progress" );
-        runtime.heartbeat( this );
-    }
-
-
-    /* (non-Javadoc)
-     * @see org.usergrid.batch.JobExecution#heartbeat(long)
-     */
-    @Override
-    public void heartbeat( long milliseconds ) {
-        Preconditions
-                .checkState( this.status.equals( Status.IN_PROGRESS ), "Attempted to heartbeat job not in progress" );
-        runtime.heartbeat( this, milliseconds );
-        this.delay = milliseconds;
-    }
-
-
-    /** @return the startTime */
-    public long getStartTime() {
-        return startTime;
-    }
-
-
-    /** @return the transactionId */
-    public UUID getTransactionId() {
-        return transactionId;
-    }
-
-
-    public Status getStatus() {
-        return this.status;
-    }
-
-
-    /** @return the delay */
-    public long getDelay() {
-        return delay;
-    }
-
-
-    /** @return the jobName */
-    public String getJobName() {
-        return jobName;
-    }
-
-
-    /* (non-Javadoc)
-     * @see org.usergrid.batch.JobRuntime#getExecution()
-     */
-    @Override
-    public JobExecution getExecution() {
-        return this;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/batch/JobFactory.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/batch/JobFactory.java b/stack/core/src/main/java/org/usergrid/batch/JobFactory.java
deleted file mode 100644
index 6154858..0000000
--- a/stack/core/src/main/java/org/usergrid/batch/JobFactory.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package org.usergrid.batch;
-
-
-import java.util.List;
-
-import org.usergrid.batch.repository.JobDescriptor;
-
-
-/**
- * It is up to the implementation how many BulkJob instances to return, but this should be controled by the
- * BulkJobsBuilder
- *
- * @author zznate
- */
-public interface JobFactory {
-
-    /** Return one or more BulkJob ready for execution by a worker thread */
-    List<Job> jobsFrom( JobDescriptor descriptor ) throws JobNotFoundException;
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/batch/JobNotFoundException.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/batch/JobNotFoundException.java b/stack/core/src/main/java/org/usergrid/batch/JobNotFoundException.java
deleted file mode 100644
index 9b806c5..0000000
--- a/stack/core/src/main/java/org/usergrid/batch/JobNotFoundException.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package org.usergrid.batch;
-
-
-/**
- * Created when a job cannot be instantiated.  This usually occurs during the deploy of new code on nodes that don't yet
- * have the job implementation.  Nodes receiving this message should log it and move on.
- *
- * @author tnine
- */
-public class JobNotFoundException extends Exception {
-
-    /**
-     *
-     */
-    private static final long serialVersionUID = -67437852214725320L;
-
-    private static final String DEF_MSG = "Unable to find the job with name %s";
-
-
-    public JobNotFoundException( String jobName ) {
-        super( String.format( DEF_MSG, jobName ) );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/batch/JobRuntime.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/batch/JobRuntime.java b/stack/core/src/main/java/org/usergrid/batch/JobRuntime.java
deleted file mode 100644
index 9244878..0000000
--- a/stack/core/src/main/java/org/usergrid/batch/JobRuntime.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.batch;
-
-
-import java.util.UUID;
-
-
-/**
- * Interface to define all operations possible during a job's specific runtime
- *
- * @author tnine
- */
-public interface JobRuntime {
-
-    /** Set the transaction id for this job's runtime */
-    public void setTransactionId( UUID transactionId );
-
-    /** Get the transaction id of the run time */
-    public UUID getTransactionId();
-
-    /** Get the delay of the run time */
-    public long getDelay();
-
-    /** Get the job execution */
-    public JobExecution getExecution();
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/batch/JobRuntimeException.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/batch/JobRuntimeException.java b/stack/core/src/main/java/org/usergrid/batch/JobRuntimeException.java
deleted file mode 100644
index f641b2f..0000000
--- a/stack/core/src/main/java/org/usergrid/batch/JobRuntimeException.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package org.usergrid.batch;
-
-
-/**
- * Created when a job cannot be instantiated.  This usually occurs during the deploy of new code on nodes that don't yet
- * have the job implementation.  Nodes receiving this message should log it and move on.
- *
- * @author tnine
- */
-public class JobRuntimeException extends RuntimeException {
-
-    /**
-     *
-     */
-    private static final long serialVersionUID = 1;
-
-
-    /**
-     *
-     */
-    public JobRuntimeException() {
-        super();
-    }
-
-
-    /**
-     * @param arg0
-     * @param arg1
-     */
-    public JobRuntimeException( String arg0, Throwable arg1 ) {
-        super( arg0, arg1 );
-    }
-
-
-    /**
-     * @param arg0
-     */
-    public JobRuntimeException( String arg0 ) {
-        super( arg0 );
-    }
-
-
-    /**
-     * @param arg0
-     */
-    public JobRuntimeException( Throwable arg0 ) {
-        super( arg0 );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/batch/UsergridJobFactory.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/batch/UsergridJobFactory.java b/stack/core/src/main/java/org/usergrid/batch/UsergridJobFactory.java
deleted file mode 100644
index 951d10d..0000000
--- a/stack/core/src/main/java/org/usergrid/batch/UsergridJobFactory.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package org.usergrid.batch;
-
-
-import java.util.Collections;
-import java.util.List;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.ApplicationContext;
-import org.usergrid.batch.repository.JobDescriptor;
-
-
-/** @author tnine */
-public class UsergridJobFactory implements JobFactory {
-
-    @Autowired
-    private ApplicationContext context;
-
-    private Logger logger = LoggerFactory.getLogger( UsergridJobFactory.class );
-
-
-    @Override
-    public List<Job> jobsFrom( JobDescriptor descriptor ) throws JobNotFoundException {
-
-        Job job = context.getBean( descriptor.getJobName(), Job.class );
-
-        if ( job == null ) {
-            String error =
-                    String.format( "Could not find job impelmentation for job name %s", descriptor.getJobName() );
-            logger.error( error );
-            throw new JobNotFoundException( error );
-        }
-
-        return Collections.singletonList( job );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/batch/job/OnlyOnceJob.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/batch/job/OnlyOnceJob.java b/stack/core/src/main/java/org/usergrid/batch/job/OnlyOnceJob.java
deleted file mode 100644
index 4b1c3c3..0000000
--- a/stack/core/src/main/java/org/usergrid/batch/job/OnlyOnceJob.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.batch.job;
-
-
-import java.util.concurrent.TimeUnit;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-import org.usergrid.batch.Job;
-import org.usergrid.batch.JobExecution;
-import org.usergrid.locking.Lock;
-import org.usergrid.locking.LockManager;
-
-import static org.usergrid.persistence.cassandra.CassandraService.MANAGEMENT_APPLICATION_ID;
-
-
-/**
- * Simple abstract job class that performs additional locking to ensure that the job is only executing once. This can be
- * used if your job could potentially be too slow to invoke JobExceution.heartbeat() before the timeout passes.
- *
- * @author tnine
- */
-@Component("OnlyOnceJob")
-public abstract class OnlyOnceJob implements Job {
-
-    @Autowired
-    private LockManager lockManager;
-
-
-    /**
-     *
-     */
-    public OnlyOnceJob() {
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see org.usergrid.batch.Job#execute(org.usergrid.batch.JobExecution)
-     */
-    @Override
-    public void execute( JobExecution execution ) throws Exception {
-
-        String lockId = execution.getJobId().toString();
-
-        Lock lock = lockManager.createLock( MANAGEMENT_APPLICATION_ID, String.format( "/jobs/%s", lockId ) );
-
-        // the job is still running somewhere else. Try again in getDelay() milliseconds
-        if ( !lock.tryLock( 0, TimeUnit.MILLISECONDS ) ) {
-            execution.delay( getDelay( execution ) );
-            return;
-        }
-
-        //if we get here we can proceed.  Make sure we unlock no matter what.
-        try {
-
-            doJob( execution );
-        }
-        finally {
-            lock.unlock();
-        }
-    }
-
-
-    /** Delegate the job execution to the subclass */
-    protected abstract void doJob( JobExecution execution ) throws Exception;
-
-    /** Get the delay for the next run if we can't acquire the lock */
-    protected abstract long getDelay( JobExecution execution ) throws Exception;
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/batch/job/package-info.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/batch/job/package-info.java b/stack/core/src/main/java/org/usergrid/batch/job/package-info.java
deleted file mode 100644
index 8095857..0000000
--- a/stack/core/src/main/java/org/usergrid/batch/job/package-info.java
+++ /dev/null
@@ -1,18 +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.usergrid.batch.job;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/batch/repository/JobAccessor.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/batch/repository/JobAccessor.java b/stack/core/src/main/java/org/usergrid/batch/repository/JobAccessor.java
deleted file mode 100644
index bc6e7dd..0000000
--- a/stack/core/src/main/java/org/usergrid/batch/repository/JobAccessor.java
+++ /dev/null
@@ -1,36 +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.usergrid.batch.repository;
-
-
-import java.util.List;
-
-import org.usergrid.batch.JobExecution;
-
-
-public interface JobAccessor {
-
-    /** Get new jobs, with a max return value of size */
-    List<JobDescriptor> getJobs( int size );
-
-    /** Save job execution information */
-    void save( JobExecution bulkJobExecution );
-
-    /** Don't remove the execution, but rather schedule it to be fired after the given delay */
-    void delayRetry( JobExecution execution, long delay );
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/batch/repository/JobDescriptor.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/batch/repository/JobDescriptor.java b/stack/core/src/main/java/org/usergrid/batch/repository/JobDescriptor.java
deleted file mode 100644
index b245a89..0000000
--- a/stack/core/src/main/java/org/usergrid/batch/repository/JobDescriptor.java
+++ /dev/null
@@ -1,80 +0,0 @@
-package org.usergrid.batch.repository;
-
-
-import java.util.UUID;
-
-import org.usergrid.batch.service.JobRuntimeService;
-import org.usergrid.persistence.TypedEntity;
-import org.usergrid.persistence.entities.JobData;
-import org.usergrid.persistence.entities.JobStat;
-
-import me.prettyprint.cassandra.utils.Assert;
-
-
-/**
- * @author zznate
- * @author tnine
- */
-public class JobDescriptor extends TypedEntity {
-
-    private final String jobName;
-    private final UUID jobId;
-    private final UUID transactionId;
-    private final JobData data;
-    private final JobStat stats;
-    private final JobRuntimeService runtime;
-
-
-    public JobDescriptor( String jobName, UUID jobId, UUID transactionId, JobData data, JobStat stats,
-                          JobRuntimeService runtime ) {
-        Assert.notNull( jobName, "Job name cannot be null" );
-        Assert.notNull( jobId != null, "A JobId is required" );
-        Assert.notNull( transactionId != null, "A transactionId is required" );
-        Assert.notNull( data != null, "Data is required" );
-        Assert.notNull( stats != null, "Stats are required" );
-        Assert.notNull( runtime != null, "A scheduler is required" );
-
-        this.jobName = jobName;
-        this.jobId = jobId;
-        this.transactionId = transactionId;
-        this.data = data;
-        this.stats = stats;
-        this.runtime = runtime;
-    }
-
-
-    /** @return the jobName */
-    public String getJobName() {
-        return jobName;
-    }
-
-
-    /** @return the jobId */
-    public UUID getJobId() {
-        return jobId;
-    }
-
-
-    /** @return the transactionId */
-    public UUID getTransactionId() {
-        return transactionId;
-    }
-
-
-    /** @return the data */
-    public JobData getData() {
-        return data;
-    }
-
-
-    /** @return the scheduler */
-    public JobRuntimeService getRuntime() {
-        return runtime;
-    }
-
-
-    /** @return the stats */
-    public JobStat getStats() {
-        return stats;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/batch/repository/package-info.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/batch/repository/package-info.java b/stack/core/src/main/java/org/usergrid/batch/repository/package-info.java
deleted file mode 100644
index ec6565a..0000000
--- a/stack/core/src/main/java/org/usergrid/batch/repository/package-info.java
+++ /dev/null
@@ -1,18 +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.usergrid.batch.repository;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/batch/service/App.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/batch/service/App.java b/stack/core/src/main/java/org/usergrid/batch/service/App.java
deleted file mode 100644
index ba7eb09..0000000
--- a/stack/core/src/main/java/org/usergrid/batch/service/App.java
+++ /dev/null
@@ -1,70 +0,0 @@
-package org.usergrid.batch.service;
-
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-import org.springframework.context.support.FileSystemXmlApplicationContext;
-
-import com.google.common.base.CharMatcher;
-
-
-/**
- * Entry point for CLI functions of Usergrid batch framework
- * <p/>
- * To run this with the built-in examples, invoke it thusly from the top level of the project directory:
- * <p/>
- * mvn -e exec:java -Dexec.mainClass="org.usergrid.batch.App" -Dexec.args="-appContext
- * src/test/resources/appContext.xml"
- *
- * @author zznate
- */
-public class App {
-
-    private static Logger logger = LoggerFactory.getLogger( App.class );
-
-    private ApplicationContext appContext;
-    private final org.usergrid.batch.AppArgs appArgs;
-
-
-    public static void main( String[] args ) {
-        org.usergrid.batch.AppArgs appArgs = org.usergrid.batch.AppArgs.parseArgs( args );
-        if ( logger.isDebugEnabled() ) {
-            logger.debug( "Invoked App with appArgs: {}", appArgs.toString() );
-        }
-
-        App app = new App( appArgs );
-
-        app.loadContext();
-
-        logger.info( "Context loaded, invoking execute() ..." );
-        app.doExecute();
-    }
-
-
-    App( org.usergrid.batch.AppArgs appArgs ) {
-        this.appArgs = appArgs;
-    }
-
-
-    private void loadContext() {
-        logger.info( "loading context" );
-        // spring context
-        int index = CharMatcher.is( ':' ).indexIn( appArgs.getAppContext() );
-        if ( index > 0 ) {
-            appContext = new ClassPathXmlApplicationContext( appArgs.getAppContext().substring( ++index ) );
-        }
-        else {
-            appContext = new FileSystemXmlApplicationContext( appArgs.getAppContext() );
-        }
-    }
-
-
-    private void doExecute() {
-        JobSchedulerService bjss = appContext.getBean( "bulkJobScheduledService", JobSchedulerService.class );
-        logger.info( "starting scheduledService..." );
-        bjss.startAndWait();
-        logger.info( "scheduledService started." );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/batch/service/JobListener.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/batch/service/JobListener.java b/stack/core/src/main/java/org/usergrid/batch/service/JobListener.java
deleted file mode 100644
index 9e0a8b2..0000000
--- a/stack/core/src/main/java/org/usergrid/batch/service/JobListener.java
+++ /dev/null
@@ -1,50 +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.usergrid.batch.service;
-
-
-import org.usergrid.batch.JobExecution;
-
-
-/**
- * Job callbacks in the @{link #SchedularService} are propagated to
- * registered implementations of this JobListener.
- */
-public interface JobListener {
-
-    /**
-     * Submission of job execution notified onSubmit.
-     *
-     * @param execution the submitted JobExecution
-     */
-    void onSubmit( JobExecution execution );
-
-    /**
-     * Successful executions of a Job notify onSuccess.
-     *
-     * @param execution the JobExection associated with the Job
-     */
-    void onSuccess( JobExecution execution );
-
-    /**
-     * Execution failures of a Job notify onFailure.
-     *
-     * @param execution the JobExection associated with the Job
-     */
-    void onFailure( JobExecution execution );
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/batch/service/JobRuntimeService.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/batch/service/JobRuntimeService.java b/stack/core/src/main/java/org/usergrid/batch/service/JobRuntimeService.java
deleted file mode 100644
index 3a4f191..0000000
--- a/stack/core/src/main/java/org/usergrid/batch/service/JobRuntimeService.java
+++ /dev/null
@@ -1,49 +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.usergrid.batch.service;
-
-
-import org.usergrid.batch.JobRuntime;
-
-
-/**
- * Methods to allow job executions to interact with the distributed runtime.
- */
-public interface JobRuntimeService {
-
-    /**
-     * Perform any heartbeat operations required.  Update jobExecution with the appropriate data
-     *
-     * @param execution The job execution to update
-     * @param delay The delay
-     */
-    void heartbeat( JobRuntime execution, long delay );
-
-    /**
-     * Heartbeat with the system defaults.  Update jobExecution with the appropriate data
-     *
-     * @param execution The execution
-     */
-    void heartbeat( JobRuntime execution );
-
-    /**
-     * Delay this execution.
-     *
-     * @param execution the execution to delay
-     */
-    void delay( JobRuntime execution );
-}


[10/96] [abbrv] [partial] Change package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/cassandra/Setup.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/cassandra/Setup.java b/stack/core/src/main/java/org/usergrid/persistence/cassandra/Setup.java
deleted file mode 100644
index 9c73648..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/cassandra/Setup.java
+++ /dev/null
@@ -1,206 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.cassandra;
-
-
-import java.util.UUID;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.usergrid.mq.cassandra.QueuesCF;
-import org.usergrid.persistence.entities.Application;
-
-import me.prettyprint.hector.api.ddl.ComparatorType;
-
-import static me.prettyprint.hector.api.factory.HFactory.createColumnFamilyDefinition;
-import static org.usergrid.persistence.cassandra.CassandraPersistenceUtils.getCfDefs;
-import static org.usergrid.persistence.cassandra.CassandraService.APPLICATIONS_CF;
-import static org.usergrid.persistence.cassandra.CassandraService.DEFAULT_APPLICATION;
-import static org.usergrid.persistence.cassandra.CassandraService.DEFAULT_APPLICATION_ID;
-import static org.usergrid.persistence.cassandra.CassandraService.DEFAULT_ORGANIZATION;
-import static org.usergrid.persistence.cassandra.CassandraService.MANAGEMENT_APPLICATION;
-import static org.usergrid.persistence.cassandra.CassandraService.MANAGEMENT_APPLICATION_ID;
-import static org.usergrid.persistence.cassandra.CassandraService.PRINCIPAL_TOKEN_CF;
-import static org.usergrid.persistence.cassandra.CassandraService.PROPERTIES_CF;
-import static org.usergrid.persistence.cassandra.CassandraService.STATIC_APPLICATION_KEYSPACE;
-import static org.usergrid.persistence.cassandra.CassandraService.SYSTEM_KEYSPACE;
-import static org.usergrid.persistence.cassandra.CassandraService.TOKENS_CF;
-import static org.usergrid.persistence.cassandra.CassandraService.USE_VIRTUAL_KEYSPACES;
-import static org.usergrid.persistence.cassandra.CassandraService.keyspaceForApplication;
-
-
-/**
- * Cassandra-specific setup utilities.
- *
- * @author edanuff
- */
-public class Setup {
-
-    private static final Logger logger = LoggerFactory.getLogger( Setup.class );
-
-    private final org.usergrid.persistence.EntityManagerFactory emf;
-    private final CassandraService cass;
-
-
-    /**
-     * Instantiates a new setup object.
-     *
-     * @param emf the emf
-     */
-    public Setup( EntityManagerFactoryImpl emf, CassandraService cass ) {
-        this.emf = emf;
-        this.cass = cass;
-    }
-
-
-    /**
-     * Initialize.
-     *
-     * @throws Exception the exception
-     */
-    public synchronized void setup() throws Exception {
-        init();
-
-        setupSystemKeyspace();
-
-        setupStaticKeyspace();
-
-        createDefaultApplications();
-    }
-
-
-    public void init() throws Exception {
-        cass.init();
-    }
-
-
-    public void createDefaultApplications() throws Exception {
-        // TODO unique check?
-        ( ( EntityManagerFactoryImpl ) emf )
-                .initializeApplication( DEFAULT_ORGANIZATION, DEFAULT_APPLICATION_ID, DEFAULT_APPLICATION, null );
-
-        ( ( EntityManagerFactoryImpl ) emf )
-                .initializeApplication( DEFAULT_ORGANIZATION, MANAGEMENT_APPLICATION_ID, MANAGEMENT_APPLICATION, null );
-    }
-
-
-    /**
-     * Initialize system keyspace.
-     *
-     * @throws Exception the exception
-     */
-    public void setupSystemKeyspace() throws Exception {
-
-        logger.info( "Initialize system keyspace" );
-
-        cass.createColumnFamily( SYSTEM_KEYSPACE,
-                createColumnFamilyDefinition( SYSTEM_KEYSPACE, APPLICATIONS_CF, ComparatorType.BYTESTYPE ) );
-
-        cass.createColumnFamily( SYSTEM_KEYSPACE,
-                createColumnFamilyDefinition( SYSTEM_KEYSPACE, PROPERTIES_CF, ComparatorType.BYTESTYPE ) );
-
-        cass.createColumnFamily( SYSTEM_KEYSPACE,
-                createColumnFamilyDefinition( SYSTEM_KEYSPACE, TOKENS_CF, ComparatorType.BYTESTYPE ) );
-
-        cass.createColumnFamily( SYSTEM_KEYSPACE,
-                createColumnFamilyDefinition( SYSTEM_KEYSPACE, PRINCIPAL_TOKEN_CF, ComparatorType.UUIDTYPE ) );
-
-        logger.info( "System keyspace initialized" );
-    }
-
-
-    /**
-     * Initialize application keyspace.
-     *
-     * @param applicationId the application id
-     * @param applicationName the application name
-     *
-     * @throws Exception the exception
-     */
-    public void setupApplicationKeyspace( final UUID applicationId, String applicationName ) throws Exception {
-
-        if ( !USE_VIRTUAL_KEYSPACES ) {
-            String app_keyspace = keyspaceForApplication( applicationId );
-
-            logger.info( "Creating application keyspace " + app_keyspace + " for " + applicationName + " application" );
-
-            cass.createColumnFamily( app_keyspace,
-                    createColumnFamilyDefinition( SYSTEM_KEYSPACE, APPLICATIONS_CF, ComparatorType.BYTESTYPE ) );
-
-            cass.createColumnFamilies( app_keyspace, getCfDefs( ApplicationCF.class, app_keyspace ) );
-            cass.createColumnFamilies( app_keyspace, getCfDefs( QueuesCF.class, app_keyspace ) );
-        }
-    }
-
-
-    public void setupStaticKeyspace() throws Exception {
-
-        if ( USE_VIRTUAL_KEYSPACES ) {
-
-            logger.info( "Creating static application keyspace " + STATIC_APPLICATION_KEYSPACE );
-
-            cass.createColumnFamily( STATIC_APPLICATION_KEYSPACE,
-                    createColumnFamilyDefinition( STATIC_APPLICATION_KEYSPACE, APPLICATIONS_CF,
-                            ComparatorType.BYTESTYPE ) );
-
-            cass.createColumnFamilies( STATIC_APPLICATION_KEYSPACE,
-                    getCfDefs( ApplicationCF.class, STATIC_APPLICATION_KEYSPACE ) );
-            cass.createColumnFamilies( STATIC_APPLICATION_KEYSPACE,
-                    getCfDefs( QueuesCF.class, STATIC_APPLICATION_KEYSPACE ) );
-        }
-    }
-
-
-    public boolean keyspacesExist() {
-        return cass.checkKeyspacesExist();
-    }
-
-
-    public static void logCFPermissions() {
-        System.out.println( SYSTEM_KEYSPACE + "." + APPLICATIONS_CF + ".<rw>=usergrid" );
-        System.out.println( SYSTEM_KEYSPACE + "." + PROPERTIES_CF + ".<rw>=usergrid" );
-        for ( CFEnum cf : ApplicationCF.values() ) {
-            System.out.println( STATIC_APPLICATION_KEYSPACE + "." + cf + ".<rw>=usergrid" );
-        }
-        for ( CFEnum cf : QueuesCF.values() ) {
-            System.out.println( STATIC_APPLICATION_KEYSPACE + "." + cf + ".<rw>=usergrid" );
-        }
-    }
-
-
-    /** @return staticly constructed reference to the management application */
-    public static Application getManagementApp() {
-        return SystemDefaults.managementApp;
-    }
-
-
-    /** @return statically constructed reference to the default application */
-    public static Application getDefaultApp() {
-        return SystemDefaults.defaultApp;
-    }
-
-
-    static class SystemDefaults {
-        private static final Application managementApp = new Application( MANAGEMENT_APPLICATION_ID );
-        private static final Application defaultApp = new Application( DEFAULT_APPLICATION_ID );
-
-
-        static {
-            managementApp.setName( MANAGEMENT_APPLICATION );
-            defaultApp.setName( DEFAULT_APPLICATION );
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/cassandra/SimpleIndexBucketLocatorImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/cassandra/SimpleIndexBucketLocatorImpl.java b/stack/core/src/main/java/org/usergrid/persistence/cassandra/SimpleIndexBucketLocatorImpl.java
deleted file mode 100644
index c8d105c..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/cassandra/SimpleIndexBucketLocatorImpl.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.cassandra;
-
-
-import java.math.BigInteger;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.UUID;
-
-import org.usergrid.persistence.IndexBucketLocator;
-
-import static org.apache.commons.codec.digest.DigestUtils.md5;
-import static org.usergrid.utils.ConversionUtils.bytes;
-
-
-/**
- * Simple implementation that does static hashing across 100 rows. Future implementations should be smarter and create
- * new tokens as required when buckets become too large for an entity property within an application for the given index
- * type.
- *
- * @author tnine
- */
-public class SimpleIndexBucketLocatorImpl implements IndexBucketLocator {
-
-    public static final BigInteger MINIMUM = BigInteger.ZERO;
-    public static final BigInteger MAXIMUM = new BigInteger( "" + 2 ).pow( 127 );
-
-    private final List<BigInteger> buckets = new ArrayList<BigInteger>( 100 );
-    private final List<String> bucketsString = new ArrayList<String>( 100 );
-    private final int size;
-
-
-    /** Create a bucket locator with the specified size */
-    public SimpleIndexBucketLocatorImpl( int size ) {
-        for ( int i = 0; i < size; i++ ) {
-            BigInteger integer = initialToken( size, i );
-            buckets.add( integer );
-            bucketsString.add( String.format( "%039d", integer ) );
-        }
-
-        this.size = size;
-    }
-
-
-    /** Base constructor that creates a ring of 100 tokens */
-    public SimpleIndexBucketLocatorImpl() {
-        this( 100 );
-    }
-
-
-    /** Get a token */
-    private static BigInteger initialToken( int size, int position ) {
-        BigInteger decValue = MINIMUM;
-        if ( position != 0 ) {
-            decValue = MAXIMUM.divide( new BigInteger( "" + size ) ).multiply( new BigInteger( "" + position ) )
-                              .subtract( BigInteger.ONE );
-        }
-        return decValue;
-    }
-
-
-    /** Get the next token in the ring for this big int. */
-    private String getClosestToken( UUID entityId ) {
-        BigInteger location = new BigInteger( md5( bytes( entityId ) ) );
-        location = location.abs();
-
-        int index = Collections.binarySearch( buckets, location );
-
-        if ( index < 0 ) {
-            index = ( index + 1 ) * -1;
-        }
-
-        // mod if we need to wrap
-        index = index % size;
-
-        return bucketsString.get( index );
-    }
-
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see
-     * org.usergrid.persistence.IndexBucketLocator#getBucket(java.util.UUID,
-     * org.usergrid.persistence.IndexBucketLocator.IndexType, java.util.UUID,
-     * java.lang.String[])
-     */
-    @Override
-    public String getBucket( UUID applicationId, IndexType type, UUID entityId, String... components ) {
-        return getClosestToken( entityId );
-    }
-
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see
-     * org.usergrid.persistence.IndexBucketLocator#getBuckets(java.util.UUID,
-     * org.usergrid.persistence.IndexBucketLocator.IndexType,
-     * java.lang.String[])
-     */
-    @Override
-    public List<String> getBuckets( UUID applicationId, IndexType type, String... components ) {
-        return bucketsString;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/cassandra/index/ConnectedIndexScanner.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/cassandra/index/ConnectedIndexScanner.java b/stack/core/src/main/java/org/usergrid/persistence/cassandra/index/ConnectedIndexScanner.java
deleted file mode 100644
index 265dc4d..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/cassandra/index/ConnectedIndexScanner.java
+++ /dev/null
@@ -1,232 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.cassandra.index;
-
-
-import java.nio.ByteBuffer;
-import java.util.Iterator;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.UUID;
-
-import org.springframework.util.Assert;
-import org.usergrid.persistence.cassandra.CassandraService;
-
-import com.yammer.metrics.annotation.Metered;
-
-import me.prettyprint.hector.api.beans.HColumn;
-
-import static org.usergrid.persistence.cassandra.ApplicationCF.ENTITY_COMPOSITE_DICTIONARIES;
-import static org.usergrid.persistence.cassandra.CassandraPersistenceUtils.key;
-
-
-/** @author tnine */
-public class ConnectedIndexScanner implements IndexScanner {
-
-    private final CassandraService cass;
-    private final UUID applicationId;
-    private final boolean reversed;
-    private final int pageSize;
-    private final String dictionaryType;
-    private final UUID entityId;
-    private final Iterator<String> connectionTypes;
-
-    /** Pointer to our next start read */
-    private ByteBuffer start;
-
-    /** Set to the original value to start scanning from */
-    private ByteBuffer scanStart;
-
-    /** Iterator for our results from the last page load */
-    private LinkedHashSet<HColumn<ByteBuffer, ByteBuffer>> lastResults;
-
-    /** True if our last load loaded a full page size. */
-    private boolean hasMore = true;
-
-    private String currentConnectionType;
-
-
-    public ConnectedIndexScanner( CassandraService cass, String dictionaryType, UUID applicationId, UUID entityId,
-                                  Iterator<String> connectionTypes, ByteBuffer start, boolean reversed, int pageSize ) {
-
-        Assert.notNull( entityId, "Entity id for row key construction must be specified when searching graph indexes" );
-        // create our start and end ranges
-        this.scanStart = start;
-        this.cass = cass;
-        this.applicationId = applicationId;
-        this.entityId = entityId;
-        this.start = scanStart;
-        this.reversed = reversed;
-        this.pageSize = pageSize;
-        this.dictionaryType = dictionaryType;
-        this.connectionTypes = connectionTypes;
-
-
-        if ( connectionTypes.hasNext() ) {
-            currentConnectionType = connectionTypes.next();
-        }
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see org.usergrid.persistence.cassandra.index.IndexScanner#reset()
-     */
-    @Override
-    public void reset() {
-        hasMore = true;
-        start = scanStart;
-    }
-
-
-    /**
-     * Search the collection index using all the buckets for the given collection. Load the next page. Return false if
-     * nothing was loaded, true otherwise
-     */
-
-    public boolean load() throws Exception {
-
-        // nothing left to load
-        if ( !hasMore ) {
-            return false;
-        }
-
-
-        lastResults = new LinkedHashSet<HColumn<ByteBuffer, ByteBuffer>>();
-
-        //go through each connection type until we exhaust the result sets
-        while ( currentConnectionType != null ) {
-
-            //only load a delta size to get this next page
-            int selectSize = pageSize + 1 - lastResults.size();
-
-            Object key = key( entityId, dictionaryType, currentConnectionType );
-
-
-            List<HColumn<ByteBuffer, ByteBuffer>> results =
-                    cass.getColumns( cass.getApplicationKeyspace( applicationId ), ENTITY_COMPOSITE_DICTIONARIES, key,
-                            start, null, selectSize, reversed );
-
-            lastResults.addAll( results );
-
-            // we loaded a full page, there might be more
-            if ( results.size() == selectSize ) {
-                hasMore = true;
-
-                // set the bytebuffer for the next pass
-                start = results.get( results.size() - 1 ).getName();
-
-                lastResults.remove( lastResults.size() - 1 );
-
-                //we've loaded a full page
-                break;
-            }
-            else {
-
-                //we're done, there's no more connection types and we've loaded all cols for this type.
-                if ( !connectionTypes.hasNext() ) {
-                    hasMore = false;
-                    currentConnectionType = null;
-                    break;
-                }
-
-                //we have more connection types, but we've reached the end of this type,
-                // keep going in the loop to load the next page
-
-                currentConnectionType = connectionTypes.next();
-            }
-        }
-
-
-        return lastResults != null && lastResults.size() > 0;
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see java.lang.Iterable#iterator()
-     */
-    @Override
-    public Iterator<Set<HColumn<ByteBuffer, ByteBuffer>>> iterator() {
-        return this;
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see java.util.Iterator#hasNext()
-     */
-    @Override
-    public boolean hasNext() {
-
-        // We've either 1) paged everything we should and have 1 left from our
-        // "next page" pointer
-        // Our currently buffered results don't exist or don't have a next. Try to
-        // load them again if they're less than the page size
-        if ( lastResults == null && hasMore ) {
-            try {
-                return load();
-            }
-            catch ( Exception e ) {
-                throw new RuntimeException( "Error loading next page of indexbucket scanner", e );
-            }
-        }
-
-        return false;
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see java.util.Iterator#next()
-     */
-    @Override
-    @Metered(group = "core", name = "IndexBucketScanner_load")
-    public Set<HColumn<ByteBuffer, ByteBuffer>> next() {
-        Set<HColumn<ByteBuffer, ByteBuffer>> returnVal = lastResults;
-
-        lastResults = null;
-
-        return returnVal;
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see java.util.Iterator#remove()
-     */
-    @Override
-    public void remove() {
-        throw new UnsupportedOperationException( "You can't remove from a result set, only advance" );
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see org.usergrid.persistence.cassandra.index.IndexScanner#getPageSize()
-     */
-    @Override
-    public int getPageSize() {
-        return pageSize;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/cassandra/index/IndexBucketScanner.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/cassandra/index/IndexBucketScanner.java b/stack/core/src/main/java/org/usergrid/persistence/cassandra/index/IndexBucketScanner.java
deleted file mode 100644
index 1a0776a..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/cassandra/index/IndexBucketScanner.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.cassandra.index;
-
-
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.NavigableSet;
-import java.util.Set;
-import java.util.TreeSet;
-import java.util.UUID;
-
-import org.usergrid.persistence.IndexBucketLocator;
-import org.usergrid.persistence.IndexBucketLocator.IndexType;
-import org.usergrid.persistence.cassandra.ApplicationCF;
-import org.usergrid.persistence.cassandra.CassandraService;
-
-import com.yammer.metrics.annotation.Metered;
-
-import me.prettyprint.hector.api.beans.HColumn;
-
-import static org.usergrid.persistence.cassandra.CassandraPersistenceUtils.key;
-
-
-/**
- * A simple class to make working with index buckets easier. Scans all buckets and merges the results into a single
- * column list to allow easy backwards compatibility with existing code
- *
- * @author tnine
- */
-public class IndexBucketScanner implements IndexScanner {
-
-    private final CassandraService cass;
-    private final IndexBucketLocator indexBucketLocator;
-    private final UUID applicationId;
-    private final Object keyPrefix;
-    private final ApplicationCF columnFamily;
-    private final Object finish;
-    private final boolean reversed;
-    private final int pageSize;
-    private final String[] indexPath;
-    private final IndexType indexType;
-
-    /** Pointer to our next start read */
-    private Object start;
-
-    /** Set to the original value to start scanning from */
-    private Object scanStart;
-
-    /** Iterator for our results from the last page load */
-    private TreeSet<HColumn<ByteBuffer, ByteBuffer>> lastResults;
-
-    /** True if our last load loaded a full page size. */
-    private boolean hasMore = true;
-
-
-    public IndexBucketScanner( CassandraService cass, IndexBucketLocator locator, ApplicationCF columnFamily,
-                               UUID applicationId, IndexType indexType, Object keyPrefix, Object start, Object finish,
-                               boolean reversed, int pageSize, String... indexPath ) {
-        this.cass = cass;
-        this.indexBucketLocator = locator;
-        this.applicationId = applicationId;
-        this.keyPrefix = keyPrefix;
-        this.columnFamily = columnFamily;
-        this.start = start;
-        this.finish = finish;
-        this.reversed = reversed;
-        this.pageSize = pageSize;
-        this.indexPath = indexPath;
-        this.indexType = indexType;
-        this.scanStart = start;
-    }
-
-
-    /* (non-Javadoc)
-     * @see org.usergrid.persistence.cassandra.index.IndexScanner#reset()
-     */
-    @Override
-    public void reset() {
-        hasMore = true;
-        start = scanStart;
-    }
-
-
-    /**
-     * Search the collection index using all the buckets for the given collection. Load the next page. Return false if
-     * nothing was loaded, true otherwise
-     *
-     * @return True if the data could be loaded
-     */
-
-    public boolean load() throws Exception {
-
-        // nothing left to load
-        if ( !hasMore ) {
-            return false;
-        }
-
-        List<String> keys = indexBucketLocator.getBuckets( applicationId, indexType, indexPath );
-
-        List<Object> cassKeys = new ArrayList<Object>( keys.size() );
-
-        for ( String bucket : keys ) {
-            cassKeys.add( key( keyPrefix, bucket ) );
-        }
-
-        //if we skip the first we need to set the load to page size +2, since we'll discard the first
-        //and start paging at the next entity, otherwise we'll just load the page size we need
-        int selectSize = pageSize + 1;
-
-        TreeSet<HColumn<ByteBuffer, ByteBuffer>> resultsTree = IndexMultiBucketSetLoader
-                .load( cass, columnFamily, applicationId, cassKeys, start, finish, selectSize, reversed );
-
-        // we loaded a full page, there might be more
-        if ( resultsTree.size() == selectSize ) {
-            hasMore = true;
-
-            // set the bytebuffer for the next pass
-            start = resultsTree.last().getName();
-
-            resultsTree.remove( resultsTree.last() );
-        }
-        else {
-            hasMore = false;
-        }
-
-        lastResults = resultsTree;
-
-        return lastResults != null && lastResults.size() > 0;
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see java.lang.Iterable#iterator()
-     */
-    @Override
-    public Iterator<Set<HColumn<ByteBuffer, ByteBuffer>>> iterator() {
-        return this;
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see java.util.Iterator#hasNext()
-     */
-    @Override
-    public boolean hasNext() {
-
-        // We've either 1) paged everything we should and have 1 left from our
-        // "next page" pointer
-        // Our currently buffered results don't exist or don't have a next. Try to
-        // load them again if they're less than the page size
-        if ( lastResults == null && hasMore ) {
-            try {
-                return load();
-            }
-            catch ( Exception e ) {
-                throw new RuntimeException( "Error loading next page of indexbucket scanner", e );
-            }
-        }
-
-        return false;
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see java.util.Iterator#next()
-     */
-    @Override
-    @Metered(group = "core", name = "IndexBucketScanner_load")
-    public NavigableSet<HColumn<ByteBuffer, ByteBuffer>> next() {
-        NavigableSet<HColumn<ByteBuffer, ByteBuffer>> returnVal = lastResults;
-
-        lastResults = null;
-
-        return returnVal;
-    }
-
-
-    /*
-     * (non-Javadoc)
-     *
-     * @see java.util.Iterator#remove()
-     */
-    @Override
-    public void remove() {
-        throw new UnsupportedOperationException( "You can't remove from a result set, only advance" );
-    }
-
-
-    /* (non-Javadoc)
-     * @see org.usergrid.persistence.cassandra.index.IndexScanner#getPageSize()
-     */
-    @Override
-    public int getPageSize() {
-        return pageSize;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/cassandra/index/IndexMultiBucketSetLoader.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/cassandra/index/IndexMultiBucketSetLoader.java b/stack/core/src/main/java/org/usergrid/persistence/cassandra/index/IndexMultiBucketSetLoader.java
deleted file mode 100644
index 7a26d66..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/cassandra/index/IndexMultiBucketSetLoader.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.cassandra.index;
-
-
-import java.nio.ByteBuffer;
-import java.util.Comparator;
-import java.util.List;
-import java.util.Map;
-import java.util.TreeSet;
-import java.util.UUID;
-
-import org.usergrid.persistence.cassandra.ApplicationCF;
-import org.usergrid.persistence.cassandra.CassandraService;
-
-import org.apache.cassandra.db.marshal.AbstractType;
-import org.apache.cassandra.db.marshal.TypeParser;
-
-import me.prettyprint.hector.api.beans.HColumn;
-
-
-/** @author tnine */
-public class IndexMultiBucketSetLoader {
-
-
-    /**
-     *
-     */
-    private static final long serialVersionUID = 1L;
-
-
-    /**
-     * Loads and sorts columns from each bucket in memory.  This will return a contiguous set of columns as if they'd
-     * been
-     * read from a single row
-     */
-    public static TreeSet<HColumn<ByteBuffer, ByteBuffer>> load( CassandraService cass, ApplicationCF columnFamily,
-                                                                 UUID applicationId, List<Object> rowKeys, Object start,
-                                                                 Object finish, int resultSize, boolean reversed )
-            throws Exception {
-        Map<ByteBuffer, List<HColumn<ByteBuffer, ByteBuffer>>> results =
-                cass.multiGetColumns( cass.getApplicationKeyspace( applicationId ), columnFamily, rowKeys, start,
-                        finish, resultSize, reversed );
-
-        final Comparator<ByteBuffer> comparator = reversed ? new DynamicCompositeReverseComparator( columnFamily ) :
-                                                  new DynamicCompositeForwardComparator( columnFamily );
-
-        TreeSet<HColumn<ByteBuffer, ByteBuffer>> resultsTree =
-                new TreeSet<HColumn<ByteBuffer, ByteBuffer>>( new Comparator<HColumn<ByteBuffer, ByteBuffer>>() {
-
-                    @Override
-                    public int compare( HColumn<ByteBuffer, ByteBuffer> first,
-                                        HColumn<ByteBuffer, ByteBuffer> second ) {
-
-                        return comparator.compare( first.getName(), second.getName() );
-                    }
-                } );
-
-        for ( List<HColumn<ByteBuffer, ByteBuffer>> cols : results.values() ) {
-
-            for ( HColumn<ByteBuffer, ByteBuffer> col : cols ) {
-                resultsTree.add( col );
-
-                // trim if we're over size
-                if ( resultsTree.size() > resultSize ) {
-                    resultsTree.pollLast();
-                }
-            }
-        }
-
-        return resultsTree;
-    }
-
-
-    private static abstract class DynamicCompositeComparator implements Comparator<ByteBuffer> {
-        @SuppressWarnings("rawtypes")
-        protected final AbstractType dynamicComposite;
-
-
-        protected DynamicCompositeComparator( ApplicationCF cf ) {
-            // should never happen, this will blow up during development if this fails
-            try {
-                dynamicComposite = TypeParser.parse( cf.getComparator() );
-            }
-            catch ( Exception e ) {
-                throw new RuntimeException( e );
-            }
-        }
-    }
-
-
-    private static class DynamicCompositeForwardComparator extends DynamicCompositeComparator {
-
-        /**
-         * @param cf
-         */
-        protected DynamicCompositeForwardComparator( ApplicationCF cf ) {
-            super( cf );
-        }
-
-
-        @SuppressWarnings("unchecked")
-        @Override
-        public int compare( ByteBuffer o1, ByteBuffer o2 ) {
-            return dynamicComposite.compare( o1, o2 );
-        }
-    }
-
-
-    private static class DynamicCompositeReverseComparator extends DynamicCompositeComparator {
-        /**
-         * @param cf
-         */
-        protected DynamicCompositeReverseComparator( ApplicationCF cf ) {
-            super( cf );
-        }
-
-
-        @SuppressWarnings("unchecked")
-        @Override
-        public int compare( ByteBuffer o1, ByteBuffer o2 ) {
-            return dynamicComposite.compare( o2, o1 );
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/cassandra/index/IndexScanner.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/cassandra/index/IndexScanner.java b/stack/core/src/main/java/org/usergrid/persistence/cassandra/index/IndexScanner.java
deleted file mode 100644
index d87f37a..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/cassandra/index/IndexScanner.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.cassandra.index;
-
-
-import java.nio.ByteBuffer;
-import java.util.Iterator;
-import java.util.Set;
-
-import me.prettyprint.hector.api.beans.HColumn;
-
-
-/**
- * Interface for scanning all index buckets.
- *
- * @author tnine
- */
-public interface IndexScanner
-        extends Iterable<Set<HColumn<ByteBuffer, ByteBuffer>>>, Iterator<Set<HColumn<ByteBuffer, ByteBuffer>>> {
-
-    /** Reset the scanner back to the start */
-    public void reset();
-
-    public int getPageSize();
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/cassandra/index/NoOpIndexScanner.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/cassandra/index/NoOpIndexScanner.java b/stack/core/src/main/java/org/usergrid/persistence/cassandra/index/NoOpIndexScanner.java
deleted file mode 100644
index d948af8..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/cassandra/index/NoOpIndexScanner.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.cassandra.index;
-
-
-import java.nio.ByteBuffer;
-import java.util.Iterator;
-import java.util.NavigableSet;
-import java.util.Set;
-
-import me.prettyprint.hector.api.beans.HColumn;
-
-
-/**
- * Index scanner that doesn't return anything.  This is used if our cursor has advanced beyond the end of all scannable
- * ranges
- *
- * @author tnine
- */
-public class NoOpIndexScanner implements IndexScanner {
-
-    /**
-     *
-     */
-    public NoOpIndexScanner() {
-    }
-
-
-    /* (non-Javadoc)
-     * @see java.lang.Iterable#iterator()
-     */
-    @Override
-    public Iterator<Set<HColumn<ByteBuffer, ByteBuffer>>> iterator() {
-        return this;
-    }
-
-
-    /* (non-Javadoc)
-     * @see java.util.Iterator#hasNext()
-     */
-    @Override
-    public boolean hasNext() {
-        return false;
-    }
-
-
-    /* (non-Javadoc)
-     * @see org.usergrid.persistence.cassandra.index.IndexScanner#reset()
-     */
-    @Override
-    public void reset() {
-        //no op
-    }
-
-
-    /* (non-Javadoc)
-     * @see java.util.Iterator#next()
-     */
-    @Override
-    public NavigableSet<HColumn<ByteBuffer, ByteBuffer>> next() {
-        return null;
-    }
-
-
-    /* (non-Javadoc)
-     * @see java.util.Iterator#remove()
-     */
-    @Override
-    public void remove() {
-        throw new UnsupportedOperationException( "Remove is not supported" );
-    }
-
-
-    /* (non-Javadoc)
-     * @see org.usergrid.persistence.cassandra.index.IndexScanner#getPageSize()
-     */
-    @Override
-    public int getPageSize() {
-        return 0;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/cassandra/util/Slf4jTraceTagReporter.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/cassandra/util/Slf4jTraceTagReporter.java b/stack/core/src/main/java/org/usergrid/persistence/cassandra/util/Slf4jTraceTagReporter.java
deleted file mode 100644
index 753b149..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/cassandra/util/Slf4jTraceTagReporter.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package org.usergrid.persistence.cassandra.util;
-
-
-import java.util.Date;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-/**
- * Simple reporter which dumps to class logger at info level.
- * <p/>
- * You can configure a logger with the name "TraceTagReporter" explicitly which, if not in a logging context, then the
- * class level logger will be used.
- *
- * @author zznate
- */
-public class Slf4jTraceTagReporter implements TraceTagReporter {
-    private Logger logger;
-
-
-    public Slf4jTraceTagReporter() {
-        logger = LoggerFactory.getLogger( "TraceTagReporter" );
-        if ( logger == null ) {
-            logger = LoggerFactory.getLogger( Slf4jTraceTagReporter.class );
-        }
-    }
-
-
-    @Override
-    public void report( TraceTag traceTag ) {
-        logger.info( "TraceTag: {}", traceTag.getTraceName() );
-        for ( TimedOpTag timedOpTag : traceTag ) {
-            logger.info( "----opId: {} opName: {} startTime: {} elapsed: {}", new Object[] {
-                    timedOpTag.getOpTag(), timedOpTag.getTagName(), new Date( timedOpTag.getStart() ),
-                    timedOpTag.getElapsed()
-            } );
-        }
-        logger.info( "------" );
-    }
-
-
-    @Override
-    public void reportUnattached( TimedOpTag timedOpTag ) {
-        logger.info( "--[unattached]-- {}", timedOpTag );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/cassandra/util/TaggedOpTimer.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/cassandra/util/TaggedOpTimer.java b/stack/core/src/main/java/org/usergrid/persistence/cassandra/util/TaggedOpTimer.java
deleted file mode 100644
index d0cef79..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/cassandra/util/TaggedOpTimer.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package org.usergrid.persistence.cassandra.util;
-
-
-import me.prettyprint.cassandra.connection.HOpTimer;
-
-
-/**
- * Trace the timed execution of a 'tag' over the course of a number of operations. Facilitates integration with
- * Dapper-style trace logging infrastructure.
- *
- * @author zznate
- */
-public class TaggedOpTimer implements HOpTimer {
-
-    private TraceTagManager traceTagManager;
-
-
-    public TaggedOpTimer( TraceTagManager traceTagManager ) {
-        this.traceTagManager = traceTagManager;
-    }
-
-
-    @Override
-    public Object start( String tagName ) {
-        // look for our threadLocal. if not present, return this.
-        return traceTagManager.timerInstance();
-    }
-
-
-    @Override
-    public void stop( Object timedOpTag, String opTagName, boolean success ) {
-        if ( timedOpTag instanceof TimedOpTag ) {
-            TimedOpTag t = ( ( TimedOpTag ) timedOpTag );
-            t.stopAndApply( opTagName, success );
-            traceTagManager.addTimer( t );
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/cassandra/util/TimedOpTag.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/cassandra/util/TimedOpTag.java b/stack/core/src/main/java/org/usergrid/persistence/cassandra/util/TimedOpTag.java
deleted file mode 100644
index d30c2f2..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/cassandra/util/TimedOpTag.java
+++ /dev/null
@@ -1,101 +0,0 @@
-package org.usergrid.persistence.cassandra.util;
-
-
-import java.util.UUID;
-
-import org.usergrid.utils.UUIDUtils;
-
-import com.google.common.base.Objects;
-
-
-/**
- * Simple struct holding timer information for an operation and an arbitrary tag for spanning 0 or more operations
- *
- * @author zznate
- */
-public class TimedOpTag {
-
-    private final UUID opTag;
-    private final String traceTagName;
-    private String tagName;
-    private long elapsed = 0;
-    private boolean status;
-
-
-    private TimedOpTag( TraceTag trace ) {
-        this.opTag = UUIDUtils.newTimeUUID();
-        this.traceTagName = ( trace != null ? trace.getTraceName() : "-NONE-" );
-    }
-
-
-    /**
-     * Get an instance with the current start timer set to 'now'
-     *
-     * @param traceTag can be null for single op timing
-     */
-    public static TimedOpTag instance( TraceTag traceTag ) {
-        return new TimedOpTag( traceTag );
-    }
-
-
-    /** Apply tagName only if not already applied */
-    public void stopAndApply( String tName, boolean opStatus ) {
-        if ( elapsed == 0 ) {
-            // extract from uuid and calculate
-            elapsed = System.currentTimeMillis() - UUIDUtils.getTimestampInMillis( opTag );
-        }
-        if ( tName != null ) {
-            this.tagName = tName;
-            this.status = opStatus;
-        }
-    }
-
-
-    /** Elapsed time of this op in milliseconds. */
-    public long getElapsed() {
-        return elapsed;
-    }
-
-
-    /**
-     * The start time of this operation as represented by the timestamp embedded in the type-1 UUID of the opTag
-     * property
-     */
-    public long getStart() {
-        return UUIDUtils.getTimestampInMillis( opTag );
-    }
-
-
-    /** The tag for this specific operation */
-    public UUID getOpTag() {
-        return opTag;
-    }
-
-
-    /** A tag which may span 0 or more operations */
-    public String getTraceTagName() {
-        return traceTagName;
-    }
-
-
-    /** @return the tagName - null if never applied */
-    public String getTagName() {
-        return tagName;
-    }
-
-
-    /**
-     * @return whether or not the operation was 'successful' Could still be false if {@link #stopAndApply(String,
-     *         boolean)} was never called
-     */
-    public boolean getOpSuccessful() {
-        return status;
-    }
-
-
-    @Override
-    public String toString() {
-        return Objects.toStringHelper( this ).add( "traceTag", traceTagName ).add( "opTag", opTag.toString() )
-                      .add( "tagName", tagName ).add( "start", getStart() ).add( "elapsed", elapsed ).toString();
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/cassandra/util/TraceParticipant.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/cassandra/util/TraceParticipant.java b/stack/core/src/main/java/org/usergrid/persistence/cassandra/util/TraceParticipant.java
deleted file mode 100644
index 3f8b9d9..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/cassandra/util/TraceParticipant.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package org.usergrid.persistence.cassandra.util;
-
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-
-/**
- * Mark a method as able to participate in a trace session
- *
- * @author zznate
- */
-@Target(value = { ElementType.METHOD })
-@Retention(RetentionPolicy.RUNTIME)
-public @interface TraceParticipant {
-
-    String name() default "";
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/cassandra/util/TraceTag.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/cassandra/util/TraceTag.java b/stack/core/src/main/java/org/usergrid/persistence/cassandra/util/TraceTag.java
deleted file mode 100644
index 0c6250f..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/cassandra/util/TraceTag.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package org.usergrid.persistence.cassandra.util;
-
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.UUID;
-
-
-/** @author zznate */
-public class TraceTag implements Iterable<TimedOpTag> {
-
-    private final UUID tag;
-    private final String name;
-    private final String traceName;
-    private final List<TimedOpTag> timedOps;
-    private final boolean metered;
-
-
-    private TraceTag( UUID tag, String name, boolean metered ) {
-        this.tag = tag;
-        this.name = name;
-        this.metered = metered;
-        traceName = new StringBuilder( this.tag.toString() ).append( "-" ).append( this.metered ).append( "-" )
-                                                            .append( this.name ).toString();
-        timedOps = new ArrayList<TimedOpTag>();
-    }
-
-
-    public static TraceTag getInstance( UUID tag, String name ) {
-        return new TraceTag( tag, name, false );
-    }
-
-
-    public static TraceTag getMeteredInstance( UUID tag, String name ) {
-        return new TraceTag( tag, name, true );
-    }
-
-
-    public String getTraceName() {
-        return traceName;
-    }
-
-
-    public void add( TimedOpTag timedOpTag ) {
-        timedOps.add( timedOpTag );
-    }
-
-
-    public boolean getMetered() {
-        return metered;
-    }
-
-
-    @Override
-    public String toString() {
-        return getTraceName();
-    }
-
-
-    @Override
-    public Iterator iterator() {
-        return timedOps.iterator();
-    }
-
-
-    /** The number of {@link TimedOpTag} instances currently held */
-    public int getOpCount() {
-        return timedOps.size();
-    }
-
-
-    /** Remove the currently held {@link TimedOpTag} instances */
-    public void removeOps() {
-        timedOps.clear();
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/cassandra/util/TraceTagAspect.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/cassandra/util/TraceTagAspect.java b/stack/core/src/main/java/org/usergrid/persistence/cassandra/util/TraceTagAspect.java
deleted file mode 100644
index 30166d7..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/cassandra/util/TraceTagAspect.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package org.usergrid.persistence.cassandra.util;
-
-
-import javax.annotation.Resource;
-
-import org.aspectj.lang.ProceedingJoinPoint;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-/**
- * Use Aspects to apply a trace
- *
- * @author zznate
- */
-public class TraceTagAspect {
-    private static final Logger logger = LoggerFactory.getLogger( TraceTagAspect.class );
-
-    @Resource
-    private TraceTagManager traceTagManager;
-
-
-    public Object applyTrace( ProceedingJoinPoint pjp ) throws Throwable {
-        String tagName = pjp.toLongString();
-        logger.debug( "Applyng trace on {}", tagName );
-        TimedOpTag timedOpTag = traceTagManager.timerInstance();
-        boolean success = true;
-        try {
-            return pjp.proceed();
-        }
-        catch ( Exception e ) {
-            success = false;
-            throw e;
-        }
-        finally {
-            timedOpTag.stopAndApply( tagName, success );
-            traceTagManager.addTimer( timedOpTag );
-            logger.debug( "TimedOpTag added in Aspect on {}", tagName );
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/cassandra/util/TraceTagManager.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/cassandra/util/TraceTagManager.java b/stack/core/src/main/java/org/usergrid/persistence/cassandra/util/TraceTagManager.java
deleted file mode 100644
index 6cdeb3a..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/cassandra/util/TraceTagManager.java
+++ /dev/null
@@ -1,156 +0,0 @@
-package org.usergrid.persistence.cassandra.util;
-
-
-import javax.annotation.Resource;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.usergrid.utils.UUIDUtils;
-
-import com.google.common.base.Preconditions;
-
-
-/**
- * Keeps the TraceTag as a ThreadLocal
- *
- * @author zznate
- */
-public class TraceTagManager {
-    private Logger logger = LoggerFactory.getLogger( TraceTagManager.class );
-
-    private static ThreadLocal<TraceTag> localTraceTag = new ThreadLocal<TraceTag>();
-
-    private boolean traceEnabled;
-
-    private boolean reportUnattached;
-
-    private boolean explicitOnly;
-
-    private int flushAtOpCount = 100;
-
-    @Resource
-    private TraceTagReporter traceTagReporter;
-
-
-    /** Enable tracing. Off by default. */
-    public void setTraceEnabled( boolean traceEnabled ) {
-        this.traceEnabled = traceEnabled;
-    }
-
-
-    public boolean getTraceEnabled() {
-        return traceEnabled;
-    }
-
-
-    /**
-     * The maximum number of o TimedOpTag objects we can attach to a tracing instance. Excess of this will for a
-     * blocking flush on the current thread to the configured reporter instance.
-     * <p/>
-     * The default is 100. If you have other ThreadLocal variables, you should probably lower this value.
-     */
-    public int getFlushAtOpCount() {
-        return flushAtOpCount;
-    }
-
-
-    public void setFlushAtOpCount( int flushAtOpCount ) {
-        this.flushAtOpCount = flushAtOpCount;
-    }
-
-
-    /** If set to true we log all TimedOpTag objects not attached to a Trace */
-    public void setReportUnattached( boolean reportUnattached ) {
-        this.reportUnattached = reportUnattached;
-    }
-
-
-    /**
-     * Allow for/check against traces in piecemeal. Use this when {@link #setTraceEnabled(boolean)} is set to false and
-     * you want callers to control whether or not to initiate a trace. An example would be initiating traces in a
-     * ServletFilter by looking for a header or parameter as tracing all requests would be expensive.
-     */
-    public boolean getExplicitOnly() {
-        return explicitOnly;
-    }
-
-
-    public void setExplicitOnly( boolean explicitOnly ) {
-        this.explicitOnly = explicitOnly;
-    }
-
-
-    /** Get the tag from a ThreadLocal. Will return null if no tag is attached. */
-    public TraceTag acquire() {
-        return localTraceTag.get();
-    }
-
-
-    public TimedOpTag timerInstance() {
-        return TimedOpTag.instance( acquire() );
-    }
-
-
-    /**
-     * Add this TimedOpTag to the underlying trace if there is one. Optionally log it's contents if no trace is active.
-     * If an active trace was found and {@link org.usergrid.persistence.cassandra.util.TraceTag#getOpCount()} exceeded
-     * {@link #getFlushAtOpCount()}, then the trace is dumped to the reporter and {@link
-     * org.usergrid.persistence.cassandra.util.TraceTag#removeOps()} is invoked. The TraceTag stay attached with the
-     * same name and ID, but now with no pending ops.
-     */
-    public void addTimer( TimedOpTag timedOpTag ) {
-        if ( isActive() ) {
-            TraceTag tag = acquire();
-            if ( tag.getOpCount() >= flushAtOpCount ) {
-                traceTagReporter.report( tag );
-                tag.removeOps();
-            }
-            tag.add( timedOpTag );
-
-            // if TraceTag#metered, send to meter by tag name
-        }
-        else {
-            if ( reportUnattached ) {
-                traceTagReporter.reportUnattached( timedOpTag );
-            }
-        }
-    }
-
-
-    /** Returns true if there is a trace in progress */
-    public boolean isActive() {
-        return acquire() != null;
-    }
-
-
-    /**
-     * Attache the tag to the current Thread. Will throw an IllegalStateException if there is already a trace in
-     * progress.
-     */
-    public void attach( TraceTag traceTag ) {
-        Preconditions.checkState( !isActive(), "Attempt to attach on already active trace" );
-        localTraceTag.set( traceTag );
-        logger.debug( "Attached TraceTag {} to thread", traceTag );
-    }
-
-
-    /** Detach the tag from the current thread. Throws an IllegalStateException if there is no trace in progress. */
-    public TraceTag detach() {
-        TraceTag traceTag = localTraceTag.get();
-        Preconditions.checkState( isActive(), "Attempt to detach on no active trace" );
-        localTraceTag.remove();
-        logger.debug( "Detached TraceTag {} from thread", traceTag );
-        return traceTag;
-    }
-
-
-    /** Create a TraceTag */
-    public TraceTag create( String tagName ) {
-        return TraceTag.getInstance( UUIDUtils.newTimeUUID(), tagName );
-    }
-
-
-    public TraceTag createMetered( String tagName ) {
-        return TraceTag.getMeteredInstance( UUIDUtils.newTimeUUID(), tagName );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/cassandra/util/TraceTagReporter.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/cassandra/util/TraceTagReporter.java b/stack/core/src/main/java/org/usergrid/persistence/cassandra/util/TraceTagReporter.java
deleted file mode 100644
index d10e18c..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/cassandra/util/TraceTagReporter.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package org.usergrid.persistence.cassandra.util;
-
-
-/** @author zznate */
-public interface TraceTagReporter {
-
-    void report( TraceTag traceTag );
-
-    void reportUnattached( TimedOpTag timedOpTag );
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/entities/Activity.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/entities/Activity.java b/stack/core/src/main/java/org/usergrid/persistence/entities/Activity.java
deleted file mode 100644
index 81b77cb..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/entities/Activity.java
+++ /dev/null
@@ -1,685 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.entities;
-
-
-import java.util.Arrays;
-import java.util.Date;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeMap;
-import java.util.UUID;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-import org.codehaus.jackson.annotate.JsonAnyGetter;
-import org.codehaus.jackson.annotate.JsonAnySetter;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
-import org.usergrid.persistence.Entity;
-import org.usergrid.persistence.EntityRef;
-import org.usergrid.persistence.TypedEntity;
-import org.usergrid.persistence.annotations.EntityDictionary;
-import org.usergrid.persistence.annotations.EntityProperty;
-
-import static org.usergrid.utils.StringUtils.toStringFormat;
-
-
-/**
- * An entity type for representing activity stream actions. These are similar to the more generic message entity type
- * except provide the necessary properties for supporting activity stream implementations.
- *
- * @see http://activitystrea.ms/specs/json/1.0/
- */
-@XmlRootElement
-public class Activity extends TypedEntity {
-
-    public static final String ENTITY_TYPE = "activity";
-
-    public static final String PROPERTY_OBJECT_NAME = "objectName";
-    public static final String PROPERTY_OBJECT_ENTITY_TYPE = "objectEntityType";
-    public static final String PROPERTY_ACTOR_NAME = "actorName";
-    public static final String PROPERTY_OBJECT = "object";
-    public static final String PROPERTY_ACTOR = "actor";
-    public static final String PROPERTY_TITLE = "title";
-    public static final String PROPERTY_CONTENT = "content";
-    public static final String PROPERTY_CATEGORY = "category";
-    public static final String PROPERTY_VERB = "verb";
-    public static final String PROPERTY_UUID = "uuid";
-    public static final String PROPERTY_ENTITY_TYPE = "entityType";
-    public static final String PROPERTY_OBJECT_TYPE = "objectType";
-    public static final String PROPERTY_DISPLAY_NAME = "displayName";
-
-    public static final String VERB_ADD = "add";
-    public static final String VERB_CANCEL = "cancel";
-    public static final String VERB_CHECKIN = "checkin";
-    public static final String VERB_DELETE = "delete";
-    public static final String VERB_FAVORITE = "favorite";
-    public static final String VERB_FOLLOW = "follow";
-    public static final String VERB_GIVE = "give";
-    public static final String VERB_IGNORE = "ignore";
-    public static final String VERB_INVITE = "invite";
-    public static final String VERB_JOIN = "join";
-    public static final String VERB_LEAVE = "leave";
-    public static final String VERB_LIKE = "like";
-    public static final String VERB_MAKE_FRIEND = "make-friend";
-    public static final String VERB_PLAY = "play";
-    public static final String VERB_POST = "post";
-    public static final String VERB_RECEIVE = "receive";
-    public static final String VERB_REMOVE = "remove";
-    public static final String VERB_REMOVE_FRIEND = "remove-friend";
-    public static final String VERB_REQUEST_FRIEND = "request-friend";
-    public static final String VERB_RSVP_MAYBE = "rsvp-maybe";
-    public static final String VERB_RSVP_NO = "rsvp-no";
-    public static final String VERB_RSVP_YES = "rsvp-yes";
-    public static final String VERB_SAVE = "save";
-    public static final String VERB_SHARE = "share";
-    public static final String VERB_STOP_FOLLOWING = "stop-following";
-    public static final String VERB_TAG = "tag";
-    public static final String VERB_UNFAVORITE = "unfavorite";
-    public static final String VERB_UNLIKE = "unlike";
-    public static final String VERB_UNSAVE = "unsave";
-    public static final String VERB_UPDATE = "update";
-
-    public static final String OBJECT_TYPE_ARTICLE = "article";
-    public static final String OBJECT_TYPE_AUDIO = "audio";
-    public static final String OBJECT_TYPE_BADGE = "badge";
-    public static final String OBJECT_TYPE_BOOKMARK = "bookmark";
-    public static final String OBJECT_TYPE_COLLECTION = "collection";
-    public static final String OBJECT_TYPE_COMMENT = "comment";
-    public static final String OBJECT_TYPE_EVENT = "event";
-    public static final String OBJECT_TYPE_FILE = "file";
-    public static final String OBJECT_TYPE_GROUP = "group";
-    public static final String OBJECT_TYPE_IMAGE = "image";
-    public static final String OBJECT_TYPE_NOTE = "note";
-    public static final String OBJECT_TYPE_PERSON = "person";
-    public static final String OBJECT_TYPE_PLACE = "place";
-    public static final String OBJECT_TYPE_PRODUCT = "product";
-    public static final String OBJECT_TYPE_QUESTION = "question";
-    public static final String OBJECT_TYPE_REVIEW = "review";
-    public static final String OBJECT_TYPE_SERVICE = "service";
-    public static final String OBJECT_TYPE_VIDEO = "video";
-
-    @EntityProperty(required = true, mutable = false, indexed = true)
-    ActivityObject actor;
-
-    @EntityProperty(indexed = true, fulltextIndexed = true, required = false, mutable = false)
-    protected String content;
-
-    ActivityObject generator;
-
-    @EntityProperty(indexed = false, fulltextIndexed = false, required = false, mutable = false)
-    protected MediaLink icon;
-
-    @EntityProperty(fulltextIndexed = false, required = false, mutable = false, indexed = true)
-    String category;
-
-    @EntityProperty(fulltextIndexed = false, required = true, mutable = false, indexed = true)
-    String verb;
-
-    @EntityProperty(indexed = true, required = true, mutable = false, timestamp = true)
-    protected Long published;
-
-    @EntityProperty(indexed = false, required = false, mutable = false)
-    ActivityObject object;
-
-    @EntityProperty(indexed = true, fulltextIndexed = true, required = false, mutable = false)
-    protected String title;
-
-    @EntityDictionary(keyType = java.lang.String.class)
-    protected Set<String> connections;
-
-
-    public Activity() {
-        // id = UUIDUtils.newTimeUUID();
-    }
-
-
-    public Activity( UUID id ) {
-        uuid = id;
-    }
-
-
-    public static Activity newActivity( String verb, String title, String content, String category, Entity user,
-                                        EntityRef object, String objectType, String objectName, String objectContent )
-            throws Exception {
-
-        Activity activity = new Activity();
-        activity.setVerb( verb );
-        activity.setCategory( category );
-        activity.setContent( content );
-        activity.setTitle( title );
-
-        ActivityObject actor = new ActivityObject();
-        actor.setObjectType( "person" );
-        if ( user != null ) {
-            actor.setDisplayName( ( String ) user.getProperty( "name" ) );
-            actor.setEntityType( user.getType() );
-            actor.setUuid( user.getUuid() );
-        }
-        activity.setActor( actor );
-
-        ActivityObject obj = new ActivityObject();
-        obj.setDisplayName( objectName );
-        obj.setObjectType( objectType );
-        if ( object != null ) {
-            obj.setEntityType( object.getType() );
-            obj.setUuid( object.getUuid() );
-        }
-        if ( objectContent != null ) {
-            obj.setContent( objectContent );
-        }
-        else {
-            obj.setContent( content );
-        }
-        activity.setObject( obj );
-
-        return activity;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public ActivityObject getActor() {
-        return actor;
-    }
-
-
-    public void setActor( ActivityObject actor ) {
-        this.actor = actor;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public ActivityObject getGenerator() {
-        return generator;
-    }
-
-
-    public void setGenerator( ActivityObject generator ) {
-        this.generator = generator;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public String getCategory() {
-        return category;
-    }
-
-
-    public void setCategory( String category ) {
-        this.category = category;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public String getVerb() {
-        return verb;
-    }
-
-
-    public void setVerb( String verb ) {
-        this.verb = verb;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public Long getPublished() {
-        return published;
-    }
-
-
-    public void setPublished( Long published ) {
-        this.published = published;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public ActivityObject getObject() {
-        return object;
-    }
-
-
-    public void setObject( ActivityObject object ) {
-        this.object = object;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public String getTitle() {
-        return title;
-    }
-
-
-    public void setTitle( String title ) {
-        this.title = title;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public MediaLink getIcon() {
-        return icon;
-    }
-
-
-    public void setIcon( MediaLink icon ) {
-        this.icon = icon;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public String getContent() {
-        return content;
-    }
-
-
-    public void setContent( String content ) {
-        this.content = content;
-    }
-
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public Set<String> getConnections() {
-        return connections;
-    }
-
-
-    public void setConnections( Set<String> connections ) {
-        this.connections = connections;
-    }
-
-
-    @XmlRootElement
-    static public class MediaLink {
-
-        int duration;
-
-        int height;
-
-        String url;
-
-        int width;
-
-        protected Map<String, Object> dynamic_properties = new TreeMap<String, Object>( String.CASE_INSENSITIVE_ORDER );
-
-
-        public MediaLink() {
-        }
-
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public int getDuration() {
-            return duration;
-        }
-
-
-        public void setDuration( int duration ) {
-            this.duration = duration;
-        }
-
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public int getHeight() {
-            return height;
-        }
-
-
-        public void setHeight( int height ) {
-            this.height = height;
-        }
-
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public String getUrl() {
-            return url;
-        }
-
-
-        public void setUrl( String url ) {
-            this.url = url;
-        }
-
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public int getWidth() {
-            return width;
-        }
-
-
-        public void setWidth( int width ) {
-            this.width = width;
-        }
-
-
-        @JsonAnySetter
-        public void setDynamicProperty( String key, Object value ) {
-            dynamic_properties.put( key, value );
-        }
-
-
-        @JsonAnyGetter
-        public Map<String, Object> getDynamicProperties() {
-            return dynamic_properties;
-        }
-
-
-        @Override
-        public String toString() {
-            return "MediaLink [duration=" + duration + ", height=" + height + ", url=" + url + ", width=" + width
-                    + ", dynamic_properties=" + dynamic_properties + "]";
-        }
-    }
-
-
-    @XmlRootElement
-    static public class ActivityObject {
-
-        ActivityObject[] attachments;
-
-        ActivityObject author;
-
-        String content;
-
-        String displayName;
-
-        String[] downstreamDuplicates;
-
-        String id;
-
-        MediaLink image;
-
-        String objectType;
-
-        Date published;
-
-        String summary;
-
-        String updated;
-
-        String upstreamDuplicates;
-
-        String url;
-
-        UUID uuid;
-
-        String entityType;
-
-        protected Map<String, Object> dynamic_properties = new TreeMap<String, Object>( String.CASE_INSENSITIVE_ORDER );
-
-
-        public ActivityObject() {
-        }
-
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public ActivityObject[] getAttachments() {
-            return attachments;
-        }
-
-
-        public void setAttachments( ActivityObject[] attachments ) {
-            this.attachments = attachments;
-        }
-
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public ActivityObject getAuthor() {
-            return author;
-        }
-
-
-        public void setAuthor( ActivityObject author ) {
-            this.author = author;
-        }
-
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public String getContent() {
-            return content;
-        }
-
-
-        public void setContent( String content ) {
-            this.content = content;
-        }
-
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public String getDisplayName() {
-            return displayName;
-        }
-
-
-        public void setDisplayName( String displayName ) {
-            this.displayName = displayName;
-        }
-
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public String[] getDownstreamDuplicates() {
-            return downstreamDuplicates;
-        }
-
-
-        public void setDownstreamDuplicates( String[] downstreamDuplicates ) {
-            this.downstreamDuplicates = downstreamDuplicates;
-        }
-
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public String getId() {
-            return id;
-        }
-
-
-        public void setId( String id ) {
-            this.id = id;
-        }
-
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public MediaLink getImage() {
-            return image;
-        }
-
-
-        public void setImage( MediaLink image ) {
-            this.image = image;
-        }
-
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public String getObjectType() {
-            return objectType;
-        }
-
-
-        public void setObjectType( String objectType ) {
-            this.objectType = objectType;
-        }
-
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public Date getPublished() {
-            return published;
-        }
-
-
-        public void setPublished( Date published ) {
-            this.published = published;
-        }
-
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public String getSummary() {
-            return summary;
-        }
-
-
-        public void setSummary( String summary ) {
-            this.summary = summary;
-        }
-
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public String getUpdated() {
-            return updated;
-        }
-
-
-        public void setUpdated( String updated ) {
-            this.updated = updated;
-        }
-
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public String getUpstreamDuplicates() {
-            return upstreamDuplicates;
-        }
-
-
-        public void setUpstreamDuplicates( String upstreamDuplicates ) {
-            this.upstreamDuplicates = upstreamDuplicates;
-        }
-
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public String getUrl() {
-            return url;
-        }
-
-
-        public void setUrl( String url ) {
-            this.url = url;
-        }
-
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public UUID getUuid() {
-            return uuid;
-        }
-
-
-        public void setUuid( UUID uuid ) {
-            this.uuid = uuid;
-        }
-
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public String getEntityType() {
-            return entityType;
-        }
-
-
-        public void setEntityType( String entityType ) {
-            this.entityType = entityType;
-        }
-
-
-        @JsonAnySetter
-        public void setDynamicProperty( String key, Object value ) {
-            dynamic_properties.put( key, value );
-        }
-
-
-        @JsonAnyGetter
-        public Map<String, Object> getDynamicProperties() {
-            return dynamic_properties;
-        }
-
-
-        @Override
-        public String toString() {
-            return "ActivityObject [" + toStringFormat( attachments, "attachments=%s, " ) + toStringFormat( author,
-                    "author=%s, " ) + toStringFormat( content, "content=%s, " ) + toStringFormat( displayName,
-                    "displayName=%s, " ) + toStringFormat( downstreamDuplicates, "downstreamDuplicates=%s, " )
-                    + toStringFormat( id, "id=%s, " ) + toStringFormat( image, "image=%s, " ) + toStringFormat(
-                    objectType, "objectType=%s, " ) + toStringFormat( published, "published=%s, " ) + toStringFormat(
-                    summary, "summary=%s, " ) + toStringFormat( updated, "updated=%s, " ) + toStringFormat(
-                    upstreamDuplicates, "upstreamDuplicates=%s, " ) + toStringFormat( url, "url=%s, " )
-                    + toStringFormat( uuid, "uuid=%s, " ) + toStringFormat( entityType, "entityType=%s, " )
-                    + toStringFormat( dynamic_properties, "dynamic_properties=%s" ) + "]";
-        }
-    }
-
-
-    @XmlRootElement
-    static public class ActivityCollection {
-
-        int totalItems;
-
-        ActivityObject[] items;
-
-        String url;
-
-        protected Map<String, Object> dynamic_properties = new TreeMap<String, Object>( String.CASE_INSENSITIVE_ORDER );
-
-
-        public ActivityCollection() {
-        }
-
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public int getTotalItems() {
-            return totalItems;
-        }
-
-
-        public void setTotalItems( int totalItems ) {
-            this.totalItems = totalItems;
-        }
-
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public ActivityObject[] getItems() {
-            return items;
-        }
-
-
-        public void setItems( ActivityObject[] items ) {
-            this.items = items;
-        }
-
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public String getUrl() {
-            return url;
-        }
-
-
-        public void setUrl( String url ) {
-            this.url = url;
-        }
-
-
-        @JsonAnySetter
-        public void setDynamicProperty( String key, Object value ) {
-            dynamic_properties.put( key, value );
-        }
-
-
-        @JsonAnyGetter
-        public Map<String, Object> getDynamicProperties() {
-            return dynamic_properties;
-        }
-
-
-        @Override
-        public String toString() {
-            return "ActivityCollection [totalItems=" + totalItems + ", items=" + Arrays.toString( items ) + ", url="
-                    + url + ", dynamic_properties=" + dynamic_properties + "]";
-        }
-    }
-}


[86/96] [abbrv] USERGRID-2 package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/class-use/Client.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/class-use/Client.html b/sdks/android/doc/org/usergrid/android/client/class-use/Client.html
index 6e8b3c1..52f8d0a 100644
--- a/sdks/android/doc/org/usergrid/android/client/class-use/Client.html
+++ b/sdks/android/doc/org/usergrid/android/client/class-use/Client.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Class org.usergrid.android.client.Client
+Uses of Class org.apache.usergrid.android.client.Client
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Class org.usergrid.android.client.Client
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Class org.usergrid.android.client.Client";
+        parent.document.title="Uses of Class org.apache.usergrid.android.client.Client";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,26 +81,26 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Class<br>org.usergrid.android.client.Client</B></H2>
+<B>Uses of Class<br>org.apache.usergrid.android.client.Client</B></H2>
 </CENTER>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Packages that use <A HREF="../../../../../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A></FONT></TH>
+Packages that use <A HREF="../../../../../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client"><B>org.usergrid.android.client</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client"><B>org.apache.usergrid.android.client</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A> in <A HREF="../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A></FONT></TH>
+Uses of <A HREF="../../../../../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A> in <A HREF="../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -108,11 +108,11 @@ Uses of <A HREF="../../../../../org/usergrid/android/client/Client.html" title="
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A> that return <A HREF="../../../../../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A> that return <A HREF="../../../../../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../org/usergrid/android/client/Client.html#withApiUrl(java.lang.String)">withApiUrl</A></B>(java.lang.String&nbsp;apiUrl)</CODE>
 
 <BR>
@@ -120,7 +120,7 @@ Uses of <A HREF="../../../../../org/usergrid/android/client/Client.html" title="
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../org/usergrid/android/client/Client.html#withApplicationId(java.lang.String)">withApplicationId</A></B>(java.lang.String&nbsp;applicationId)</CODE>
 
 <BR>
@@ -128,7 +128,7 @@ Uses of <A HREF="../../../../../org/usergrid/android/client/Client.html" title="
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../org/usergrid/android/client/Client.html#withClientId(java.lang.String)">withClientId</A></B>(java.lang.String&nbsp;clientId)</CODE>
 
 <BR>
@@ -136,7 +136,7 @@ Uses of <A HREF="../../../../../org/usergrid/android/client/Client.html" title="
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../org/usergrid/android/client/Client.html#withClientSecret(java.lang.String)">withClientSecret</A></B>(java.lang.String&nbsp;clientSecret)</CODE>
 
 <BR>
@@ -159,7 +159,7 @@ Uses of <A HREF="../../../../../org/usergrid/android/client/Client.html" title="
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/entities/Activity.ActivityCollection.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/entities/Activity.ActivityCollection.html b/sdks/android/doc/org/usergrid/android/client/entities/Activity.ActivityCollection.html
index 71fa6e4..25ba3ef 100644
--- a/sdks/android/doc/org/usergrid/android/client/entities/Activity.ActivityCollection.html
+++ b/sdks/android/doc/org/usergrid/android/client/entities/Activity.ActivityCollection.html
@@ -55,8 +55,8 @@ function windowTitle()
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/entities/Activity.ActivityCollection.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="Activity.ActivityCollection.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
@@ -88,15 +88,15 @@ DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&n
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client.entities</FONT>
+org.apache.usergrid.android.client.entities</FONT>
 <BR>
 Class Activity.ActivityCollection</H2>
 <PRE>
 java.lang.Object
-  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.usergrid.android.client.entities.Activity.ActivityCollection</B>
+  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.usergrid.android.client.entities.Activity.ActivityCollection</B>
 </PRE>
 <DL>
-<DT><B>Enclosing class:</B><DD><A HREF="../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A></DD>
+<DT><B>Enclosing class:</B><DD><A HREF="../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A></DD>
 </DL>
 <HR>
 <DL>
@@ -142,7 +142,7 @@ java.lang.Object
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>[]</CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>[]</CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityCollection.html#getItems()">getItems</A></B>()</CODE>
 
 <BR>
@@ -176,7 +176,7 @@ java.lang.Object
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityCollection.html#setItems(org.usergrid.android.client.entities.Activity.ActivityObject[])">setItems</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>[]&nbsp;items)</CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityCollection.html#setItems(org.apache.usergrid.android.client.entities.Activity.ActivityObject[])">setItems</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>[]&nbsp;items)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -270,7 +270,7 @@ public void <B>setTotalItems</B>(int&nbsp;totalItems)</PRE>
 <A NAME="getItems()"><!-- --></A><H3>
 getItems</H3>
 <PRE>
-public <A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>[] <B>getItems</B>()</PRE>
+public <A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>[] <B>getItems</B>()</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -278,10 +278,10 @@ public <A HREF="../../../../../org/usergrid/android/client/entities/Activity.Act
 </DL>
 <HR>
 
-<A NAME="setItems(org.usergrid.android.client.entities.Activity.ActivityObject[])"><!-- --></A><H3>
+<A NAME="setItems(org.apache.usergrid.android.client.entities.Activity.ActivityObject[])"><!-- --></A><H3>
 setItems</H3>
 <PRE>
-public void <B>setItems</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>[]&nbsp;items)</PRE>
+public void <B>setItems</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>[]&nbsp;items)</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -377,8 +377,8 @@ public java.lang.String <B>toString</B>()</PRE>
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/entities/Activity.ActivityCollection.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="Activity.ActivityCollection.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/entities/Activity.ActivityObject.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/entities/Activity.ActivityObject.html b/sdks/android/doc/org/usergrid/android/client/entities/Activity.ActivityObject.html
index f637c9d..8064315 100644
--- a/sdks/android/doc/org/usergrid/android/client/entities/Activity.ActivityObject.html
+++ b/sdks/android/doc/org/usergrid/android/client/entities/Activity.ActivityObject.html
@@ -55,8 +55,8 @@ function windowTitle()
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.apache.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/entities/Activity.ActivityObject.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="Activity.ActivityObject.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
@@ -88,15 +88,15 @@ DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&n
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client.entities</FONT>
+org.apache.usergrid.android.client.entities</FONT>
 <BR>
 Class Activity.ActivityObject</H2>
 <PRE>
 java.lang.Object
-  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.usergrid.android.client.entities.Activity.ActivityObject</B>
+  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.usergrid.android.client.entities.Activity.ActivityObject</B>
 </PRE>
 <DL>
-<DT><B>Enclosing class:</B><DD><A HREF="../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A></DD>
+<DT><B>Enclosing class:</B><DD><A HREF="../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A></DD>
 </DL>
 <HR>
 <DL>
@@ -134,7 +134,7 @@ java.lang.Object
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>[]</CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>[]</CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html#getAttachments()">getAttachments</A></B>()</CODE>
 
 <BR>
@@ -142,7 +142,7 @@ java.lang.Object
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html#getAuthor()">getAuthor</A></B>()</CODE>
 
 <BR>
@@ -198,7 +198,7 @@ java.lang.Object
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A></CODE></FONT></TD>
 <TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html#getImage()">getImage</A></B>()</CODE>
 
 <BR>
@@ -263,7 +263,7 @@ java.lang.Object
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html#setAttachments(org.usergrid.android.client.entities.Activity.ActivityObject[])">setAttachments</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>[]&nbsp;attachments)</CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html#setAttachments(org.apache.usergrid.android.client.entities.Activity.ActivityObject[])">setAttachments</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>[]&nbsp;attachments)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -271,7 +271,7 @@ java.lang.Object
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html#setAuthor(org.usergrid.android.client.entities.Activity.ActivityObject)">setAuthor</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>&nbsp;author)</CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html#setAuthor(org.apache.usergrid.android.client.entities.Activity.ActivityObject)">setAuthor</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>&nbsp;author)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -328,7 +328,7 @@ java.lang.Object
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html#setImage(org.usergrid.android.client.entities.Activity.MediaLink)">setImage</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A>&nbsp;image)</CODE>
+<TD><CODE><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html#setImage(org.apache.usergrid.android.client.entities.Activity.MediaLink)">setImage</A></B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A>&nbsp;image)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -440,7 +440,7 @@ public <B>Activity.ActivityObject</B>()</PRE>
 <A NAME="getAttachments()"><!-- --></A><H3>
 getAttachments</H3>
 <PRE>
-public <A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>[] <B>getAttachments</B>()</PRE>
+public <A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>[] <B>getAttachments</B>()</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -448,10 +448,10 @@ public <A HREF="../../../../../org/usergrid/android/client/entities/Activity.Act
 </DL>
 <HR>
 
-<A NAME="setAttachments(org.usergrid.android.client.entities.Activity.ActivityObject[])"><!-- --></A><H3>
+<A NAME="setAttachments(org.apache.usergrid.android.client.entities.Activity.ActivityObject[])"><!-- --></A><H3>
 setAttachments</H3>
 <PRE>
-public void <B>setAttachments</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>[]&nbsp;attachments)</PRE>
+public void <B>setAttachments</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>[]&nbsp;attachments)</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -462,7 +462,7 @@ public void <B>setAttachments</B>(<A HREF="../../../../../org/usergrid/android/c
 <A NAME="getAuthor()"><!-- --></A><H3>
 getAuthor</H3>
 <PRE>
-public <A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A> <B>getAuthor</B>()</PRE>
+public <A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A> <B>getAuthor</B>()</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -470,10 +470,10 @@ public <A HREF="../../../../../org/usergrid/android/client/entities/Activity.Act
 </DL>
 <HR>
 
-<A NAME="setAuthor(org.usergrid.android.client.entities.Activity.ActivityObject)"><!-- --></A><H3>
+<A NAME="setAuthor(org.apache.usergrid.android.client.entities.Activity.ActivityObject)"><!-- --></A><H3>
 setAuthor</H3>
 <PRE>
-public void <B>setAuthor</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A>&nbsp;author)</PRE>
+public void <B>setAuthor</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A>&nbsp;author)</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -572,7 +572,7 @@ public void <B>setId</B>(java.lang.String&nbsp;id)</PRE>
 <A NAME="getImage()"><!-- --></A><H3>
 getImage</H3>
 <PRE>
-public <A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A> <B>getImage</B>()</PRE>
+public <A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A> <B>getImage</B>()</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -580,10 +580,10 @@ public <A HREF="../../../../../org/usergrid/android/client/entities/Activity.Med
 </DL>
 <HR>
 
-<A NAME="setImage(org.usergrid.android.client.entities.Activity.MediaLink)"><!-- --></A><H3>
+<A NAME="setImage(org.apache.usergrid.android.client.entities.Activity.MediaLink)"><!-- --></A><H3>
 setImage</H3>
 <PRE>
-public void <B>setImage</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A>&nbsp;image)</PRE>
+public void <B>setImage</B>(<A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A>&nbsp;image)</PRE>
 <DL>
 <DD><DL>
 </DL>
@@ -833,8 +833,8 @@ public java.lang.String <B>toString</B>()</PRE>
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.apache.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/entities/Activity.ActivityObject.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="Activity.ActivityObject.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/entities/Activity.MediaLink.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/entities/Activity.MediaLink.html b/sdks/android/doc/org/usergrid/android/client/entities/Activity.MediaLink.html
index 1d6b4ba..a8139b5 100644
--- a/sdks/android/doc/org/usergrid/android/client/entities/Activity.MediaLink.html
+++ b/sdks/android/doc/org/usergrid/android/client/entities/Activity.MediaLink.html
@@ -55,8 +55,8 @@ function windowTitle()
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/entities/Activity.MediaLink.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="Activity.MediaLink.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
@@ -88,15 +88,15 @@ DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&n
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client.entities</FONT>
+org.apache.usergrid.android.client.entities</FONT>
 <BR>
 Class Activity.MediaLink</H2>
 <PRE>
 java.lang.Object
-  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.usergrid.android.client.entities.Activity.MediaLink</B>
+  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.usergrid.android.client.entities.Activity.MediaLink</B>
 </PRE>
 <DL>
-<DT><B>Enclosing class:</B><DD><A HREF="../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A></DD>
+<DT><B>Enclosing class:</B><DD><A HREF="../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A></DD>
 </DL>
 <HR>
 <DL>
@@ -415,8 +415,8 @@ public java.lang.String <B>toString</B>()</PRE>
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/entities/Activity.MediaLink.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="Activity.MediaLink.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;


[55/96] [abbrv] USERGRID-2 package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/usergrid/java/client/Client.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/usergrid/java/client/Client.java b/sdks/java/src/main/java/org/usergrid/java/client/Client.java
deleted file mode 100644
index afd93dc..0000000
--- a/sdks/java/src/main/java/org/usergrid/java/client/Client.java
+++ /dev/null
@@ -1,1276 +0,0 @@
-package org.usergrid.java.client;
-
-import static org.springframework.util.StringUtils.arrayToDelimitedString;
-import static org.springframework.util.StringUtils.tokenizeToStringArray;
-import static org.usergrid.java.client.utils.JsonUtils.parse;
-import static org.usergrid.java.client.utils.ObjectUtils.isEmpty;
-import static org.usergrid.java.client.utils.UrlUtils.addQueryParams;
-import static org.usergrid.java.client.utils.UrlUtils.encodeParams;
-import static org.usergrid.java.client.utils.UrlUtils.path;
-
-import java.util.Collections;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
-import java.util.concurrent.ConcurrentHashMap;
-
-import com.fasterxml.jackson.databind.node.JsonNodeFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.http.HttpEntity;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.HttpMethod;
-import org.springframework.http.MediaType;
-import org.springframework.http.ResponseEntity;
-import org.springframework.web.client.HttpClientErrorException;
-import org.springframework.web.client.RestTemplate;
-import org.usergrid.java.client.entities.Activity;
-import org.usergrid.java.client.entities.Device;
-import org.usergrid.java.client.entities.Entity;
-import org.usergrid.java.client.entities.Group;
-import org.usergrid.java.client.entities.User;
-import org.usergrid.java.client.response.ApiResponse;
-
-/**
- * The Client class for accessing the Usergrid API. Start by instantiating this
- * class though the appropriate constructor.
- * 
- */
-public class Client {
-
-    private static final Logger log = LoggerFactory.getLogger(Client.class);
-
-    public static boolean FORCE_PUBLIC_API = false;
-
-    // Public API
-    public static String PUBLIC_API_URL = "http://api.usergrid.com";
-
-    // Local API of standalone server
-    public static String LOCAL_STANDALONE_API_URL = "http://localhost:8080";
-
-    // Local API of Tomcat server in Eclipse
-    public static String LOCAL_TOMCAT_API_URL = "http://localhost:8080/ROOT";
-
-    // Local API
-    public static String LOCAL_API_URL = LOCAL_STANDALONE_API_URL;
-
-    private String apiUrl = PUBLIC_API_URL;
-
-    private String organizationId;
-    private String applicationId;
-    private String clientId;
-    private String clientSecret;
-
-    private User loggedInUser = null;
-
-    private String accessToken = null;
-
-    private String currentOrganization = null;
-
-    static RestTemplate restTemplate = new RestTemplate();
-
-    /**
-     * Default constructor for instantiating a client.
-     */
-    public Client() {
-        init();
-    }
-
-    /**
-     * Instantiate client for a specific app
-     * 
-     * @param applicationId
-     *            the application id or name
-     */
-    public Client(String organizationId, String applicationId) {
-        init();
-        this.organizationId = organizationId;
-        this.applicationId = applicationId;
-    }
-
-    public void init() {
-
-    }
-
-    /**
-     * @return the Usergrid API url (default: http://api.usergrid.com)
-     */
-    public String getApiUrl() {
-        return apiUrl;
-    }
-
-    /**
-     * @param apiUrl
-     *            the Usergrid API url (default: http://api.usergrid.com)
-     */
-    public void setApiUrl(String apiUrl) {
-        this.apiUrl = apiUrl;
-    }
-
-    /**
-     * @param apiUrl
-     *            the Usergrid API url (default: http://api.usergrid.com)
-     * @return Client object for method call chaining
-     */
-    public Client withApiUrl(String apiUrl) {
-        this.apiUrl = apiUrl;
-        return this;
-    }
-    
-    
-    /**
-     * the organizationId to set
-     * @param organizationId
-     * @return
-     */
-    public Client withOrganizationId(String organizationId){
-        this.organizationId = organizationId;
-        return this;
-    }
-    
-    
-
-    /**
-     * @return the organizationId
-     */
-    public String getOrganizationId() {
-        return organizationId;
-    }
-
-    /**
-     * @param organizationId the organizationId to set
-     */
-    public void setOrganizationId(String organizationId) {
-        this.organizationId = organizationId;
-    }
-
-    /**
-     * @return the application id or name
-     */
-    public String getApplicationId() {
-        return applicationId;
-    }
-
-    /**
-     * @param applicationId
-     *            the application id or name
-     */
-    public void setApplicationId(String applicationId) {
-        this.applicationId = applicationId;
-    }
-   
-
-    /**
-     * @param applicationId
-     *            the application id or name
-     * @return Client object for method call chaining
-     */
-    public Client withApplicationId(String applicationId) {
-        this.applicationId = applicationId;
-        return this;
-    }
-
-    /**
-     * @return the client key id for making calls as the application-owner. Not
-     *         safe for most mobile use.
-     */
-    public String getClientId() {
-        return clientId;
-    }
-
-    /**
-     * @param clientId
-     *            the client key id for making calls as the application-owner.
-     *            Not safe for most mobile use.
-     */
-    public void setClientId(String clientId) {
-        this.clientId = clientId;
-    }
-
-    /**
-     * @param clientId
-     *            the client key id for making calls as the application-owner.
-     *            Not safe for most mobile use.
-     * @return Client object for method call chaining
-     */
-    public Client withClientId(String clientId) {
-        this.clientId = clientId;
-        return this;
-    }
-
-    /**
-     * @return the client key id for making calls as the application-owner. Not
-     *         safe for most mobile use.
-     */
-    public String getClientSecret() {
-        return clientSecret;
-    }
-
-    /**
-     * @param clientSecret
-     *            the client key id for making calls as the application-owner.
-     *            Not safe for most mobile use.
-     */
-    public void setClientSecret(String clientSecret) {
-        this.clientSecret = clientSecret;
-    }
-
-    /**
-     * @param clientSecret
-     *            the client key id for making calls as the application-owner.
-     *            Not safe for most mobile use.
-     * @return Client object for method call chaining
-     */
-    public Client withClientSecret(String clientSecret) {
-        this.clientSecret = clientSecret;
-        return this;
-    }
-
-    /**
-     * @return the logged-in user after a successful authorizeAppUser request
-     */
-    public User getLoggedInUser() {
-        return loggedInUser;
-    }
-
-    /**
-     * @param loggedInUser
-     *            the logged-in user, usually not set by host application
-     */
-    public void setLoggedInUser(User loggedInUser) {
-        this.loggedInUser = loggedInUser;
-    }
-
-    /**
-     * @return the OAuth2 access token after a successful authorize request
-     */
-    public String getAccessToken() {
-        return accessToken;
-    }
-
-    /**
-     * @param accessToken
-     *            an OAuth2 access token. Usually not set by host application
-     */
-    public void setAccessToken(String accessToken) {
-        this.accessToken = accessToken;
-    }
-
-    /**
-     * @return the currentOrganization
-     */
-    public String getCurrentOrganization() {
-        return currentOrganization;
-    }
-
-    /**
-     * @param currentOrganization
-     */
-    public void setCurrentOrganization(String currentOrganization) {
-        this.currentOrganization = currentOrganization;
-    }
-
-    /**
-     * Low-level HTTP request method. Synchronous, blocks till response or
-     * timeout.
-     * 
-     * @param method
-     *            HttpMethod method
-     * @param cls
-     *            class for the return type
-     * @param params
-     *            parameters to encode as querystring or body parameters
-     * @param data
-     *            JSON data to put in body
-     * @param segments
-     *            REST url path segments (i.e. /segment1/segment2/segment3)
-     * @return results marshalled into class specified in cls parameter
-     */
-    public <T> T httpRequest(HttpMethod method, Class<T> cls,
-            Map<String, Object> params, Object data, String... segments) {
-        HttpHeaders requestHeaders = new HttpHeaders();
-        requestHeaders.setAccept(Collections
-                .singletonList(MediaType.APPLICATION_JSON));
-        if (accessToken != null) {
-            String auth = "Bearer " + accessToken;
-            requestHeaders.set("Authorization", auth);
-            log.info("Authorization: " + auth);
-        }
-        String url = path(apiUrl, segments);
-
-        MediaType contentType = MediaType.APPLICATION_JSON;
-        if (method.equals(HttpMethod.POST) && isEmpty(data) && !isEmpty(params)) {
-            data = encodeParams(params);
-            contentType = MediaType.APPLICATION_FORM_URLENCODED;
-        } else {
-            url = addQueryParams(url, params);
-        }
-        requestHeaders.setContentType(contentType);
-        HttpEntity<?> requestEntity = null;
-
-        if (method.equals(HttpMethod.POST) || method.equals(HttpMethod.PUT)) {
-            if (isEmpty(data)) {
-                data = JsonNodeFactory.instance.objectNode();
-            }
-            requestEntity = new HttpEntity<Object>(data, requestHeaders);
-        } else {
-            requestEntity = new HttpEntity<Object>(requestHeaders);
-        }
-        log.info("Client.httpRequest(): url: " + url);
-        ResponseEntity<T> responseEntity = restTemplate.exchange(url, method,
-                requestEntity, cls);
-        log.info("Client.httpRequest(): reponse body: "
-                + responseEntity.getBody().toString());
-        return responseEntity.getBody();
-    }
-
-    /**
-     * High-level Usergrid API request.
-     * 
-     * @param method
-     * @param params
-     * @param data
-     * @param segments
-     * @return
-     */
-    public ApiResponse apiRequest(HttpMethod method,
-            Map<String, Object> params, Object data, String... segments) {
-        ApiResponse response = null;
-        try {
-            response = httpRequest(method, ApiResponse.class, params, data,
-                    segments);
-            log.info("Client.apiRequest(): Response: " + response);
-        } catch (HttpClientErrorException e) {
-            log.error("Client.apiRequest(): HTTP error: "
-                    + e.getLocalizedMessage());
-            response = parse(e.getResponseBodyAsString(), ApiResponse.class);
-            if ((response != null) && !isEmpty(response.getError())) {
-                log.error("Client.apiRequest(): Response error: "
-                        + response.getError());
-                if (!isEmpty(response.getException())) {
-                    log.error("Client.apiRequest(): Response exception: "
-                            + response.getException());
-                }
-            }
-        }
-        return response;
-    }
-
-    protected void assertValidApplicationId() {
-        if (isEmpty(applicationId)) {
-            throw new IllegalArgumentException("No application id specified");
-        }
-    }
-
-    /**
-     * Log the user in and get a valid access token.
-     * 
-     * @param email
-     * @param password
-     * @return non-null ApiResponse if request succeeds, check getError() for
-     *         "invalid_grant" to see if access is denied.
-     */
-    public ApiResponse authorizeAppUser(String email, String password) {
-        validateNonEmptyParam(email, "email");
-        validateNonEmptyParam(password,"password");
-        assertValidApplicationId();
-        loggedInUser = null;
-        accessToken = null;
-        currentOrganization = null;
-        Map<String, Object> formData = new HashMap<String, Object>();
-        formData.put("grant_type", "password");
-        formData.put("username", email);
-        formData.put("password", password);
-        ApiResponse response = apiRequest(HttpMethod.POST, formData, null,
-                organizationId, applicationId, "token");
-        if (response == null) {
-            return response;
-        }
-        if (!isEmpty(response.getAccessToken()) && (response.getUser() != null)) {
-            loggedInUser = response.getUser();
-            accessToken = response.getAccessToken();
-            currentOrganization = null;
-            log.info("Client.authorizeAppUser(): Access token: " + accessToken);
-        } else {
-            log.info("Client.authorizeAppUser(): Response: " + response);
-        }
-        return response;
-    }
-
-    /**
-     * Change the password for the currently logged in user. You must supply the
-     * old password and the new password.
-     * 
-     * @param username
-     * @param oldPassword
-     * @param newPassword
-     * @return
-     */
-    public ApiResponse changePassword(String username, String oldPassword,
-            String newPassword) {
-
-        Map<String, Object> data = new HashMap<String, Object>();
-        data.put("newpassword", newPassword);
-        data.put("oldpassword", oldPassword);
-
-        return apiRequest(HttpMethod.POST, null, data, organizationId,  applicationId, "users",
-                username, "password");
-
-    }
-
-    /**
-     * Log the user in with their numeric pin-code and get a valid access token.
-     * 
-     * @param email
-     * @param pin
-     * @return non-null ApiResponse if request succeeds, check getError() for
-     *         "invalid_grant" to see if access is denied.
-     */
-    public ApiResponse authorizeAppUserViaPin(String email, String pin) {
-        validateNonEmptyParam(email, "email");
-        validateNonEmptyParam(pin, "pin");
-        assertValidApplicationId();
-        loggedInUser = null;
-        accessToken = null;
-        currentOrganization = null;
-        Map<String, Object> formData = new HashMap<String, Object>();
-        formData.put("grant_type", "pin");
-        formData.put("username", email);
-        formData.put("pin", pin);
-        ApiResponse response = apiRequest(HttpMethod.POST, formData, null,
-                organizationId,  applicationId, "token");
-        if (response == null) {
-            return response;
-        }
-        if (!isEmpty(response.getAccessToken()) && (response.getUser() != null)) {
-            loggedInUser = response.getUser();
-            accessToken = response.getAccessToken();
-            currentOrganization = null;
-            log.info("Client.authorizeAppUser(): Access token: " + accessToken);
-        } else {
-            log.info("Client.authorizeAppUser(): Response: " + response);
-        }
-        return response;
-    }
-
-    /**
-     * Log the user in with their Facebook access token retrived via Facebook
-     * OAuth.
-     * 
-     * @param email
-     * @param pin
-     * @return non-null ApiResponse if request succeeds, check getError() for
-     *         "invalid_grant" to see if access is denied.
-     */
-    public ApiResponse authorizeAppUserViaFacebook(String fb_access_token) {
-        validateNonEmptyParam(fb_access_token, "Facebook token");
-        assertValidApplicationId();
-        loggedInUser = null;
-        accessToken = null;
-        currentOrganization = null;
-        Map<String, Object> formData = new HashMap<String, Object>();
-        formData.put("fb_access_token", fb_access_token);
-        ApiResponse response = apiRequest(HttpMethod.POST, formData, null,
-                organizationId,  applicationId, "auth", "facebook");
-        if (response == null) {
-            return response;
-        }
-        if (!isEmpty(response.getAccessToken()) && (response.getUser() != null)) {
-            loggedInUser = response.getUser();
-            accessToken = response.getAccessToken();
-            currentOrganization = null;
-            log.info("Client.authorizeAppUserViaFacebook(): Access token: "
-                    + accessToken);
-        } else {
-            log.info("Client.authorizeAppUserViaFacebook(): Response: "
-                    + response);
-        }
-        return response;
-    }
-
-    /**
-     * Log the app in with it's client id and client secret key. Not recommended
-     * for production apps.
-     * 
-     * @param email
-     * @param pin
-     * @return non-null ApiResponse if request succeeds, check getError() for
-     *         "invalid_grant" to see if access is denied.
-     */
-    public ApiResponse authorizeAppClient(String clientId, String clientSecret) {
-        validateNonEmptyParam(clientId, "client identifier");
-        validateNonEmptyParam(clientSecret, "client secret");
-        assertValidApplicationId();
-        loggedInUser = null;
-        accessToken = null;
-        currentOrganization = null;
-        Map<String, Object> formData = new HashMap<String, Object>();
-        formData.put("grant_type", "client_credentials");
-        formData.put("client_id", clientId);
-        formData.put("client_secret", clientSecret);
-        ApiResponse response = apiRequest(HttpMethod.POST, formData, null,
-                organizationId, applicationId, "token");
-        if (response == null) {
-            return response;
-        }
-        if (!isEmpty(response.getAccessToken())) {
-            loggedInUser = null;
-            accessToken = response.getAccessToken();
-            currentOrganization = null;
-            log.info("Client.authorizeAppClient(): Access token: "
-                    + accessToken);
-        } else {
-            log.info("Client.authorizeAppClient(): Response: " + response);
-        }
-        return response;
-    }
-
-    private void validateNonEmptyParam(Object param, String paramName) {
-        if ( isEmpty(param) ) {
-            throw new IllegalArgumentException(paramName + " cannot be null or empty");
-        }
-    }
-
-    /**
-     * Registers a device using the device's unique device ID.
-     * 
-     * @param context
-     * @param properties
-     * @return a Device object if success
-     */
-    public Device registerDevice(UUID deviceId, Map<String, Object> properties) {
-        assertValidApplicationId();
-        if (properties == null) {
-            properties = new HashMap<String, Object>();
-        }
-        properties.put("refreshed", System.currentTimeMillis());
-        ApiResponse response = apiRequest(HttpMethod.PUT, null, properties,
-                organizationId, applicationId, "devices", deviceId.toString());
-        return response.getFirstEntity(Device.class);
-    }
-
-    /**
-     * Registers a device using the device's unique device ID.
-     *
-     * @param context
-     * @param properties
-     * @return a Device object if success
-     */
-    public Device registerDeviceForPush(UUID deviceId,
-                                        String notifier,
-                                        String token,
-                                        Map<String, Object> properties) {
-      if (properties == null) {
-          properties = new HashMap<String, Object>();
-      }
-      String notifierKey = notifier + ".notifier.id";
-      properties.put(notifierKey, token);
-      return registerDevice(deviceId, properties);
-    }
-
-    /**
-     * Create a new entity on the server.
-     * 
-     * @param entity
-     * @return an ApiResponse with the new entity in it.
-     */
-    public ApiResponse createEntity(Entity entity) {
-        assertValidApplicationId();
-        if (isEmpty(entity.getType())) {
-            throw new IllegalArgumentException("Missing entity type");
-        }
-        ApiResponse response = apiRequest(HttpMethod.POST, null, entity,
-                organizationId, applicationId, entity.getType());
-        return response;
-    }
-
-    /**
-     * Create a new entity on the server from a set of properties. Properties
-     * must include a "type" property.
-     * 
-     * @param properties
-     * @return an ApiResponse with the new entity in it.
-     */
-    public ApiResponse createEntity(Map<String, Object> properties) {
-        assertValidApplicationId();
-        if (isEmpty(properties.get("type"))) {
-            throw new IllegalArgumentException("Missing entity type");
-        }
-        ApiResponse response = apiRequest(HttpMethod.POST, null, properties,
-                organizationId, applicationId, properties.get("type").toString());
-        return response;
-    }
-
-    /**
-     * Creates a user.
-     * 
-     * @param username
-     *            required
-     * @param name
-     * @param email
-     * @param password
-     * @return
-     */
-    public ApiResponse createUser(String username, String name, String email,
-            String password) {
-        Map<String, Object> properties = new HashMap<String, Object>();
-        properties.put("type", "user");
-        if (username != null) {
-            properties.put("username", username);
-        }
-        if (name != null) {
-            properties.put("name", name);
-        }
-        if (email != null) {
-            properties.put("email", email);
-        }
-        if (password != null) {
-            properties.put("password", password);
-        }
-        return createEntity(properties);
-    }
-
-    /**
-     * Get the groups for the user.
-     * 
-     * @param userId
-     * @return a map with the group path as the key and the Group entity as the
-     *         value
-     */
-    public Map<String, Group> getGroupsForUser(String userId) {
-        ApiResponse response = apiRequest(HttpMethod.GET, null, null,
-                organizationId, applicationId, "users", userId, "groups");
-        Map<String, Group> groupMap = new HashMap<String, Group>();
-        if (response != null) {
-            List<Group> groups = response.getEntities(Group.class);
-            for (Group group : groups) {
-                groupMap.put(group.getPath(), group);
-            }
-        }
-        return groupMap;
-    }
-
-    /**
-     * Get a user's activity feed. Returned as a query to ease paging.
-     * 
-     * @param userId
-     * @return
-     */
-    public Query queryActivityFeedForUser(String userId) {
-        Query q = queryEntitiesRequest(HttpMethod.GET, null, null,
-                organizationId, applicationId, "users", userId, "feed");
-        return q;
-    }
-
-    /**
-     * Posts an activity to a user. Activity must already be created.
-     * 
-     * @param userId
-     * @param activity
-     * @return
-     */
-    public ApiResponse postUserActivity(String userId, Activity activity) {
-        return apiRequest(HttpMethod.POST, null, activity,  organizationId, applicationId, "users",
-                userId, "activities");
-    }
-
-    /**
-     * Creates and posts an activity to a user.
-     * 
-     * @param verb
-     * @param title
-     * @param content
-     * @param category
-     * @param user
-     * @param object
-     * @param objectType
-     * @param objectName
-     * @param objectContent
-     * @return
-     */
-    public ApiResponse postUserActivity(String verb, String title,
-            String content, String category, User user, Entity object,
-            String objectType, String objectName, String objectContent) {
-        Activity activity = Activity.newActivity(verb, title, content,
-                category, user, object, objectType, objectName, objectContent);
-        return postUserActivity(user.getUuid().toString(), activity);
-    }
-
-    /**
-     * Posts an activity to a group. Activity must already be created.
-     * 
-     * @param userId
-     * @param activity
-     * @return
-     */
-    public ApiResponse postGroupActivity(String groupId, Activity activity) {
-        return apiRequest(HttpMethod.POST, null, activity, organizationId, applicationId, "groups",
-                groupId, "activities");
-    }
-
-    /**
-     * Creates and posts an activity to a group.
-     * 
-     * @param groupId
-     * @param verb
-     * @param title
-     * @param content
-     * @param category
-     * @param user
-     * @param object
-     * @param objectType
-     * @param objectName
-     * @param objectContent
-     * @return
-     */
-    public ApiResponse postGroupActivity(String groupId, String verb, String title,
-            String content, String category, User user, Entity object,
-            String objectType, String objectName, String objectContent) {
-        Activity activity = Activity.newActivity(verb, title, content,
-                category, user, object, objectType, objectName, objectContent);
-        return postGroupActivity(groupId, activity);
-    }
-
-    /**
-     * Post an activity to the stream.
-     * 
-     * @param activity
-     * @return
-     */
-    public ApiResponse postActivity(Activity activity) {
-        return createEntity(activity);
-    }
-
-    /**
-     * Creates and posts an activity to a group.
-     * 
-     * @param verb
-     * @param title
-     * @param content
-     * @param category
-     * @param user
-     * @param object
-     * @param objectType
-     * @param objectName
-     * @param objectContent
-     * @return
-     */
-    public ApiResponse postActivity(String verb, String title,
-            String content, String category, User user, Entity object,
-            String objectType, String objectName, String objectContent) {
-        Activity activity = Activity.newActivity(verb, title, content,
-                category, user, object, objectType, objectName, objectContent);
-        return createEntity(activity);
-    }
-    
-    /**
-     * Get a group's activity feed. Returned as a query to ease paging.
-     * 
-     * @param userId
-     * @return
-     */
-    public Query queryActivity() {
-        Query q = queryEntitiesRequest(HttpMethod.GET, null, null,
-               organizationId, applicationId, "activities");
-        return q;
-    }
-
-    
-
-    /**
-     * Get a group's activity feed. Returned as a query to ease paging.
-     * 
-     * @param userId
-     * @return
-     */
-    public Query queryActivityFeedForGroup(String groupId) {
-        Query q = queryEntitiesRequest(HttpMethod.GET, null, null,
-                organizationId,  applicationId, "groups", groupId, "feed");
-        return q;
-    }
-
-    /**
-     * Perform a query request and return a query object. The Query object
-     * provides a simple way of dealing with result sets that need to be
-     * iterated or paged through.
-     * 
-     * @param method
-     * @param params
-     * @param data
-     * @param segments
-     * @return
-     */
-    public Query queryEntitiesRequest(HttpMethod method,
-            Map<String, Object> params, Object data, String... segments) {
-        ApiResponse response = apiRequest(method, params, data, segments);
-        return new EntityQuery(response, method, params, data, segments);
-    }
-
-    /**
-     * Perform a query of the users collection.
-     * 
-     * @return
-     */
-    public Query queryUsers() {
-        Query q = queryEntitiesRequest(HttpMethod.GET, null, null,
-                organizationId,  applicationId, "users");
-        return q;
-    }
-
-    /**
-     * Perform a query of the users collection using the provided query command.
-     * For example: "name contains 'ed'".
-     * 
-     * @param ql
-     * @return
-     */
-    public Query queryUsers(String ql) {
-        Map<String, Object> params = new HashMap<String, Object>();
-        params.put("ql", ql);
-        Query q = queryEntitiesRequest(HttpMethod.GET, params, null,organizationId,
-                applicationId, "users");
-        return q;
-    }
-
-    /**
-     * Perform a query of the users collection within the specified distance of
-     * the specified location and optionally using the provided query command.
-     * For example: "name contains 'ed'".
-     * 
-     * @param distance
-     * @param location
-     * @param ql
-     * @return
-     */
-    public Query queryUsersWithinLocation(float distance, float lattitude,
-            float longitude, String ql) {
-        Map<String, Object> params = new HashMap<String, Object>();
-        params.put("ql",
-                this.makeLocationQL(distance, lattitude, longitude, ql));
-        Query q = queryEntitiesRequest(HttpMethod.GET, params, null, organizationId,
-                applicationId, "users");
-        return q;
-    }
-
-    /**
-     * Queries the users for the specified group.
-     * 
-     * @param groupId
-     * @return
-     */
-    public Query queryUsersForGroup(String groupId) {
-        Query q = queryEntitiesRequest(HttpMethod.GET, null, null, organizationId,
-                applicationId, "groups", groupId, "users");
-        return q;
-    }
-
-    /**
-     * Adds a user to the specified groups.
-     * 
-     * @param userId
-     * @param groupId
-     * @return
-     */
-    public ApiResponse addUserToGroup(String userId, String groupId) {
-        return apiRequest(HttpMethod.POST, null, null, organizationId,  applicationId, "groups",
-                groupId, "users", userId);
-    }
-
-    /**
-     * Creates a group with the specified group path. Group paths can be slash
-     * ("/") delimited like file paths for hierarchical group relationships.
-     * 
-     * @param groupPath
-     * @return
-     */
-    public ApiResponse createGroup(String groupPath) {
-        return createGroup(groupPath, null);
-    }
-
-    /**
-     * Creates a group with the specified group path and group title. Group
-     * paths can be slash ("/") delimited like file paths for hierarchical group
-     * relationships.
-     * 
-     * @param groupPath
-     * @param groupTitle
-     * @return
-     */
-    public ApiResponse createGroup(String groupPath, String groupTitle) {
-     return createGroup(groupPath, groupTitle, null);  
-    }
-    
-    /**
-     * Create a group with a path, title and name
-     * @param groupPath
-     * @param groupTitle
-     * @param groupName
-     * @return
-     */
-    public ApiResponse createGroup(String groupPath, String groupTitle, String groupName){
-        Map<String, Object> data = new HashMap<String, Object>();
-        data.put("type", "group");
-        data.put("path", groupPath);
-        
-        if (groupTitle != null) {
-            data.put("title", groupTitle);
-        }
-        
-        if(groupName != null){
-            data.put("name", groupName);
-        }
-        
-        return apiRequest(HttpMethod.POST, null, data,  organizationId, applicationId, "groups");
-    }
-    
-    /**
-     * Perform a query of the users collection using the provided query command.
-     * For example: "name contains 'ed'".
-     * 
-     * @param ql
-     * @return
-     */
-    public Query queryGroups(String ql) {
-        Map<String, Object> params = new HashMap<String, Object>();
-        params.put("ql", ql);
-        Query q = queryEntitiesRequest(HttpMethod.GET, params, null, organizationId,
-                applicationId, "groups");
-        return q;
-    }
-
-    
-
-    /**
-     * Connect two entities together.
-     * 
-     * @param connectingEntityType
-     * @param connectingEntityId
-     * @param connectionType
-     * @param connectedEntityId
-     * @return
-     */
-    public ApiResponse connectEntities(String connectingEntityType,
-            String connectingEntityId, String connectionType,
-            String connectedEntityId) {
-        return apiRequest(HttpMethod.POST, null, null,  organizationId, applicationId,
-                connectingEntityType, connectingEntityId, connectionType,
-                connectedEntityId);
-    }
-
-    /**
-     * Disconnect two entities.
-     * 
-     * @param connectingEntityType
-     * @param connectingEntityId
-     * @param connectionType
-     * @param connectedEntityId
-     * @return
-     */
-    public ApiResponse disconnectEntities(String connectingEntityType,
-            String connectingEntityId, String connectionType,
-            String connectedEntityId) {
-        return apiRequest(HttpMethod.DELETE, null, null,  organizationId, applicationId,
-                connectingEntityType, connectingEntityId, connectionType,
-                connectedEntityId);
-    }
-
-    /**
-     * Query the connected entities.
-     * 
-     * @param connectingEntityType
-     * @param connectingEntityId
-     * @param connectionType
-     * @param ql
-     * @return
-     */
-    public Query queryEntityConnections(String connectingEntityType,
-            String connectingEntityId, String connectionType, String ql) {
-        Map<String, Object> params = new HashMap<String, Object>();
-        params.put("ql", ql);
-        Query q = queryEntitiesRequest(HttpMethod.GET, params, null,
-                organizationId, applicationId, connectingEntityType, connectingEntityId,
-                connectionType);
-        return q;
-    }
-
-    protected String makeLocationQL(float distance, double lattitude,
-            double longitude, String ql) {
-        String within = String.format("within %d of %d , %d", distance,
-                lattitude, longitude);
-        ql = ql == null ? within : within + " and " + ql;
-        return ql;
-    }
-
-    /**
-     * Query the connected entities within distance of a specific point.
-     * 
-     * @param connectingEntityType
-     * @param connectingEntityId
-     * @param connectionType
-     * @param distance
-     * @param latitude
-     * @param longitude
-     * @return
-     */
-    public Query queryEntityConnectionsWithinLocation(
-            String connectingEntityType, String connectingEntityId,
-            String connectionType, float distance, float lattitude,
-            float longitude, String ql) {
-        Map<String, Object> params = new HashMap<String, Object>();
-        params.put("ql", makeLocationQL(distance, lattitude, longitude, ql));
-        Query q = queryEntitiesRequest(HttpMethod.GET, params, null, organizationId,
-                applicationId, connectingEntityType, connectingEntityId,
-                connectionType);
-        return q;
-    }
-
-    public interface Query {
-
-        public ApiResponse getResponse();
-
-        public boolean more();
-
-        public Query next();
-
-    }
-
-    /**
-     * Query object
-     * 
-     */
-    private class EntityQuery implements Query {
-        final HttpMethod method;
-        final Map<String, Object> params;
-        final Object data;
-        final String[] segments;
-        final ApiResponse response;
-
-        private EntityQuery(ApiResponse response, HttpMethod method,
-                Map<String, Object> params, Object data, String[] segments) {
-            this.response = response;
-            this.method = method;
-            this.params = params;
-            this.data = data;
-            this.segments = segments;
-        }
-
-        private EntityQuery(ApiResponse response, EntityQuery q) {
-            this.response = response;
-            method = q.method;
-            params = q.params;
-            data = q.data;
-            segments = q.segments;
-        }
-
-        /**
-         * @return the api response of the last request
-         */
-        public ApiResponse getResponse() {
-            return response;
-        }
-
-        /**
-         * @return true if the server indicates more results are available
-         */
-        public boolean more() {
-            if ((response != null) && (response.getCursor() != null)
-                    && (response.getCursor().length() > 0)) {
-                return true;
-            }
-            return false;
-        }
-
-        /**
-         * Performs a request for the next set of results
-         * 
-         * @return query that contains results and where to get more from.
-         */
-        public Query next() {
-            if (more()) {
-                Map<String, Object> nextParams = null;
-                if (params != null) {
-                    nextParams = new HashMap<String, Object>(params);
-                } else {
-                    nextParams = new HashMap<String, Object>();
-                }
-                nextParams.put("cursor", response.getCursor());
-                ApiResponse nextResponse = apiRequest(method, nextParams, data,
-                        segments);
-                return new EntityQuery(nextResponse, this);
-            }
-            return null;
-        }
-
-    }
-
-    private String normalizeQueuePath(String path) {
-        return arrayToDelimitedString(
-                tokenizeToStringArray(path, "/", true, true), "/");
-    }
-
-    public ApiResponse postMessage(String path, Map<String, Object> message) {
-        return apiRequest(HttpMethod.POST, null, message, organizationId,  applicationId,
-                "queues", normalizeQueuePath(path));
-    }
-
-    public ApiResponse postMessage(String path,
-            List<Map<String, Object>> messages) {
-        return apiRequest(HttpMethod.POST, null, messages,  organizationId, applicationId,
-                "queues", normalizeQueuePath(path));
-    }
-
-    public enum QueuePosition {
-        START("start"), END("end"), LAST("last"), CONSUMER("consumer");
-
-        private final String shortName;
-
-        QueuePosition(String shortName) {
-            this.shortName = shortName;
-        }
-
-        static Map<String, QueuePosition> nameMap = new ConcurrentHashMap<String, QueuePosition>();
-
-        static {
-            for (QueuePosition op : EnumSet.allOf(QueuePosition.class)) {
-                if (op.shortName != null) {
-                    nameMap.put(op.shortName, op);
-                }
-            }
-        }
-
-        public static QueuePosition find(String s) {
-            if (s == null) {
-                return null;
-            }
-            return nameMap.get(s);
-        }
-
-        @Override
-        public String toString() {
-            return shortName;
-        }
-    }
-
-    public ApiResponse getMessages(String path, String consumer, UUID last,
-            Long time, Integer prev, Integer next, Integer limit,
-            QueuePosition pos, Boolean update, Boolean sync) {
-        Map<String, Object> params = new HashMap<String, Object>();
-        if (consumer != null) {
-            params.put("consumer", consumer);
-        }
-        if (last != null) {
-            params.put("last", last);
-        }
-        if (time != null) {
-            params.put("time", time);
-        }
-        if (prev != null) {
-            params.put("prev", prev);
-        }
-        if (next != null) {
-            params.put("next", next);
-        }
-        if (limit != null) {
-            params.put("limit", limit);
-        }
-        if (pos != null) {
-            params.put("pos", pos.toString());
-        }
-        if (update != null) {
-            params.put("update", update);
-        }
-        if (sync != null) {
-            params.put("synchronized", sync);
-        }
-        return apiRequest(HttpMethod.GET, params, null,  organizationId, applicationId,
-                "queues", normalizeQueuePath(path));
-    }
-
-    public ApiResponse addSubscriber(String publisherQueue,
-            String subscriberQueue) {
-        return apiRequest(HttpMethod.POST, null, null, organizationId,  applicationId, "queues",
-                normalizeQueuePath(publisherQueue), "subscribers",
-                normalizeQueuePath(subscriberQueue));
-    }
-
-    public ApiResponse removeSubscriber(String publisherQueue,
-            String subscriberQueue) {
-        return apiRequest(HttpMethod.DELETE, null, null, organizationId,  applicationId,
-                "queues", normalizeQueuePath(publisherQueue), "subscribers",
-                normalizeQueuePath(subscriberQueue));
-    }
-
-    private class QueueQuery implements Query {
-        final HttpMethod method;
-        final Map<String, Object> params;
-        final Object data;
-        final String queuePath;
-        final ApiResponse response;
-
-        private QueueQuery(ApiResponse response, HttpMethod method,
-                Map<String, Object> params, Object data, String queuePath) {
-            this.response = response;
-            this.method = method;
-            this.params = params;
-            this.data = data;
-            this.queuePath = normalizeQueuePath(queuePath);
-        }
-
-        private QueueQuery(ApiResponse response, QueueQuery q) {
-            this.response = response;
-            method = q.method;
-            params = q.params;
-            data = q.data;
-            queuePath = q.queuePath;
-        }
-
-        /**
-         * @return the api response of the last request
-         */
-        public ApiResponse getResponse() {
-            return response;
-        }
-
-        /**
-         * @return true if the server indicates more results are available
-         */
-        public boolean more() {
-            if ((response != null) && (response.getCursor() != null)
-                    && (response.getCursor().length() > 0)) {
-                return true;
-            }
-            return false;
-        }
-
-        /**
-         * Performs a request for the next set of results
-         * 
-         * @return query that contains results and where to get more from.
-         */
-        public Query next() {
-            if (more()) {
-                Map<String, Object> nextParams = null;
-                if (params != null) {
-                    nextParams = new HashMap<String, Object>(params);
-                } else {
-                    nextParams = new HashMap<String, Object>();
-                }
-                nextParams.put("start", response.getCursor());
-                ApiResponse nextResponse = apiRequest(method, nextParams, data,
-                        queuePath);
-                return new QueueQuery(nextResponse, this);
-            }
-            return null;
-        }
-
-    }
-
-    public Query queryQueuesRequest(HttpMethod method,
-            Map<String, Object> params, Object data, String queuePath) {
-        ApiResponse response = apiRequest(method, params, data, queuePath);
-        return new QueueQuery(response, method, params, data, queuePath);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/usergrid/java/client/entities/Activity.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/usergrid/java/client/entities/Activity.java b/sdks/java/src/main/java/org/usergrid/java/client/entities/Activity.java
deleted file mode 100644
index 8889646..0000000
--- a/sdks/java/src/main/java/org/usergrid/java/client/entities/Activity.java
+++ /dev/null
@@ -1,627 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2011 Ed Anuff and Usergrid, all rights reserved.
- * http://www.usergrid.com
- * 
- * This file is part of Usergrid Core.
- * 
- * Usergrid Core is free software: you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation, either version 3 of the License, or (at your option) any later
- * version.
- * 
- * Usergrid Core is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License along with
- * Usergrid Core. If not, see <http://www.gnu.org/licenses/>.
- ******************************************************************************/
-package org.usergrid.java.client.entities;
-
-
-import static org.usergrid.java.client.utils.JsonUtils.getStringProperty;
-
-import java.util.Arrays;
-import java.util.Date;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeMap;
-import java.util.UUID;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-import com.fasterxml.jackson.annotation.JsonAnyGetter;
-import com.fasterxml.jackson.annotation.JsonAnySetter;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion;
-
-/**
- * An entity type for representing activity stream actions. These are similar to
- * the more generic message entity type except provide the necessary properties
- * for supporting activity stream implementations.
- * 
- * @see http://activitystrea.ms/specs/json/1.0/
- */
-public class Activity extends Entity {
-
-    public static final String ENTITY_TYPE = "activity";
-
-    public static final String PROP_ACTOR = "actor";
-
-    public static final String VERB_ADD = "add";
-    public static final String VERB_CANCEL = "cancel";
-    public static final String VERB_CHECKIN = "checkin";
-    public static final String VERB_DELETE = "delete";
-    public static final String VERB_FAVORITE = "favorite";
-    public static final String VERB_FOLLOW = "follow";
-    public static final String VERB_GIVE = "give";
-    public static final String VERB_IGNORE = "ignore";
-    public static final String VERB_INVITE = "invite";
-    public static final String VERB_JOIN = "join";
-    public static final String VERB_LEAVE = "leave";
-    public static final String VERB_LIKE = "like";
-    public static final String VERB_MAKE_FRIEND = "make-friend";
-    public static final String VERB_PLAY = "play";
-    public static final String VERB_POST = "post";
-    public static final String VERB_RECEIVE = "receive";
-    public static final String VERB_REMOVE = "remove";
-    public static final String VERB_REMOVE_FRIEND = "remove-friend";
-    public static final String VERB_REQUEST_FRIEND = "request-friend";
-    public static final String VERB_RSVP_MAYBE = "rsvp-maybe";
-    public static final String VERB_RSVP_NO = "rsvp-no";
-    public static final String VERB_RSVP_YES = "rsvp-yes";
-    public static final String VERB_SAVE = "save";
-    public static final String VERB_SHARE = "share";
-    public static final String VERB_STOP_FOLLOWING = "stop-following";
-    public static final String VERB_TAG = "tag";
-    public static final String VERB_UNFAVORITE = "unfavorite";
-    public static final String VERB_UNLIKE = "unlike";
-    public static final String VERB_UNSAVE = "unsave";
-    public static final String VERB_UPDATE = "update";
-
-    public static final String OBJECT_TYPE_ARTICLE = "article";
-    public static final String OBJECT_TYPE_AUDIO = "audio";
-    public static final String OBJECT_TYPE_BADGE = "badge";
-    public static final String OBJECT_TYPE_BOOKMARK = "bookmark";
-    public static final String OBJECT_TYPE_COLLECTION = "collection";
-    public static final String OBJECT_TYPE_COMMENT = "comment";
-    public static final String OBJECT_TYPE_EVENT = "event";
-    public static final String OBJECT_TYPE_FILE = "file";
-    public static final String OBJECT_TYPE_GROUP = "group";
-    public static final String OBJECT_TYPE_IMAGE = "image";
-    public static final String OBJECT_TYPE_NOTE = "note";
-    public static final String OBJECT_TYPE_PERSON = "person";
-    public static final String OBJECT_TYPE_PLACE = "place";
-    public static final String OBJECT_TYPE_PRODUCT = "product";
-    public static final String OBJECT_TYPE_QUESTION = "question";
-    public static final String OBJECT_TYPE_REVIEW = "review";
-    public static final String OBJECT_TYPE_SERVICE = "service";
-    public static final String OBJECT_TYPE_VIDEO = "video";
-
-    protected ActivityObject actor;
-
-    protected String content;
-
-    protected ActivityObject generator;
-
-    protected MediaLink icon;
-
-    protected String category;
-
-    protected String verb;
-
-    protected Long published;
-
-    protected ActivityObject object;
-
-    // protected
-    // String objectType;
-
-    // protected
-    // String objectEntityType;
-
-    // protected
-    // String objectName;
-
-    protected String title;
-
-    protected Set<String> connections;
-
-    public Activity() {
-        setType("activity");
-    }
-
-    public Activity(UUID id) {
-        this();
-        setUuid(id);
-    }
-
-    public static Activity newActivity(String verb, String title,
-            String content, String category, Entity user, Entity object,
-            String objectType, String objectName, String objectContent){
-
-        Activity activity = new Activity();
-        activity.setVerb(verb);
-        activity.setCategory(category);
-        activity.setContent(content);
-        activity.setTitle(title);
-        
-        ActivityObject actor = new ActivityObject();
-        actor.setObjectType("person");
-        
-        if (user != null) {
-            actor.setDisplayName(getStringProperty(user.properties, "name"));
-            actor.setEntityType(user.getType());
-            actor.setUuid(user.getUuid());
-        }
-        
-        activity.setActor(actor);
-
-        ActivityObject obj = new ActivityObject();
-        obj.setDisplayName(objectName);
-        obj.setObjectType(objectType);
-        if (object != null) {
-            obj.setEntityType(object.getType());
-            obj.setUuid(object.getUuid());
-        }
-        if (objectContent != null) {
-            obj.setContent(objectContent);
-        } else {
-            obj.setContent(content);
-        }
-        activity.setObject(obj);
-
-        return activity;
-    }
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public ActivityObject getActor() {
-        return actor;
-    }
-
-    public void setActor(ActivityObject actor) {
-        this.actor = actor;
-    }
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public ActivityObject getGenerator() {
-        return generator;
-    }
-
-    public void setGenerator(ActivityObject generator) {
-        this.generator = generator;
-    }
-
-    /*
-     * @JsonSerialize(include = Inclusion.NON_NULL) public String getActorName()
-     * { return actorName; }
-     * 
-     * public void setActorName(String actorName) { this.actorName = actorName;
-     * }
-     */
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public String getCategory() {
-        return category;
-    }
-
-    public void setCategory(String category) {
-        this.category = category;
-    }
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public String getVerb() {
-        return verb;
-    }
-
-    public void setVerb(String verb) {
-        this.verb = verb;
-    }
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public Long getPublished() {
-        return published;
-    }
-
-    public void setPublished(Long published) {
-        this.published = published;
-    }
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public ActivityObject getObject() {
-        return object;
-    }
-
-    public void setObject(ActivityObject object) {
-        this.object = object;
-    }
-
-    /*
-     * @JsonSerialize(include = Inclusion.NON_NULL) public String
-     * getObjectType() { return objectType; }
-     * 
-     * public void setObjectType(String objectType) { this.objectType =
-     * objectType; }
-     * 
-     * @JsonSerialize(include = Inclusion.NON_NULL) public String
-     * getObjectEntityType() { return objectEntityType; }
-     * 
-     * public void setObjectEntityType(String objectEntityType) {
-     * this.objectEntityType = objectEntityType; }
-     * 
-     * @JsonSerialize(include = Inclusion.NON_NULL) public String
-     * getObjectName() { return objectName; }
-     * 
-     * public void setObjectName(String objectName) { this.objectName =
-     * objectName; }
-     */
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public String getTitle() {
-        return title;
-    }
-
-    public void setTitle(String title) {
-        this.title = title;
-    }
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public MediaLink getIcon() {
-        return icon;
-    }
-
-    public void setIcon(MediaLink icon) {
-        this.icon = icon;
-    }
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public String getContent() {
-        return content;
-    }
-
-    public void setContent(String content) {
-        this.content = content;
-    }
-
-    @JsonSerialize(include = Inclusion.NON_NULL)
-    public Set<String> getConnections() {
-        return connections;
-    }
-
-    public void setConnections(Set<String> connections) {
-        this.connections = connections;
-    }
-
-    @XmlRootElement
-    static public class MediaLink {
-
-        int duration;
-
-        int height;
-
-        String url;
-
-        int width;
-
-        protected Map<String, Object> dynamic_properties = new TreeMap<String, Object>(
-                String.CASE_INSENSITIVE_ORDER);
-
-        public MediaLink() {
-        }
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public int getDuration() {
-            return duration;
-        }
-
-        public void setDuration(int duration) {
-            this.duration = duration;
-        }
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public int getHeight() {
-            return height;
-        }
-
-        public void setHeight(int height) {
-            this.height = height;
-        }
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public String getUrl() {
-            return url;
-        }
-
-        public void setUrl(String url) {
-            this.url = url;
-        }
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public int getWidth() {
-            return width;
-        }
-
-        public void setWidth(int width) {
-            this.width = width;
-        }
-
-        @JsonAnySetter
-        public void setDynamicProperty(String key, Object value) {
-            dynamic_properties.put(key, value);
-        }
-
-        @JsonAnyGetter
-        public Map<String, Object> getDynamicProperties() {
-            return dynamic_properties;
-        }
-
-        @Override
-        public String toString() {
-            return "MediaLink [duration=" + duration + ", height=" + height
-                    + ", url=" + url + ", width=" + width
-                    + ", dynamic_properties=" + dynamic_properties + "]";
-        }
-
-    }
-
-    @XmlRootElement
-    static public class ActivityObject {
-
-        ActivityObject[] attachments;
-
-        ActivityObject author;
-
-        String content;
-
-        String displayName;
-
-        String[] downstreamDuplicates;
-
-        String id;
-
-        MediaLink image;
-
-        String objectType;
-
-        Date published;
-
-        String summary;
-
-        String updated;
-
-        String upstreamDuplicates;
-
-        String url;
-
-        UUID uuid;
-
-        String entityType;
-
-        protected Map<String, Object> dynamic_properties = new TreeMap<String, Object>(
-                String.CASE_INSENSITIVE_ORDER);
-
-        public ActivityObject() {
-        }
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public ActivityObject[] getAttachments() {
-            return attachments;
-        }
-
-        public void setAttachments(ActivityObject[] attachments) {
-            this.attachments = attachments;
-        }
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public ActivityObject getAuthor() {
-            return author;
-        }
-
-        public void setAuthor(ActivityObject author) {
-            this.author = author;
-        }
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public String getContent() {
-            return content;
-        }
-
-        public void setContent(String content) {
-            this.content = content;
-        }
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public String getDisplayName() {
-            return displayName;
-        }
-
-        public void setDisplayName(String displayName) {
-            this.displayName = displayName;
-        }
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public String[] getDownstreamDuplicates() {
-            return downstreamDuplicates;
-        }
-
-        public void setDownstreamDuplicates(String[] downstreamDuplicates) {
-            this.downstreamDuplicates = downstreamDuplicates;
-        }
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public String getId() {
-            return id;
-        }
-
-        public void setId(String id) {
-            this.id = id;
-        }
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public MediaLink getImage() {
-            return image;
-        }
-
-        public void setImage(MediaLink image) {
-            this.image = image;
-        }
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public String getObjectType() {
-            return objectType;
-        }
-
-        public void setObjectType(String objectType) {
-            this.objectType = objectType;
-        }
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public Date getPublished() {
-            return published;
-        }
-
-        public void setPublished(Date published) {
-            this.published = published;
-        }
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public String getSummary() {
-            return summary;
-        }
-
-        public void setSummary(String summary) {
-            this.summary = summary;
-        }
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public String getUpdated() {
-            return updated;
-        }
-
-        public void setUpdated(String updated) {
-            this.updated = updated;
-        }
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public String getUpstreamDuplicates() {
-            return upstreamDuplicates;
-        }
-
-        public void setUpstreamDuplicates(String upstreamDuplicates) {
-            this.upstreamDuplicates = upstreamDuplicates;
-        }
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public String getUrl() {
-            return url;
-        }
-
-        public void setUrl(String url) {
-            this.url = url;
-        }
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public UUID getUuid() {
-            return uuid;
-        }
-
-        public void setUuid(UUID uuid) {
-            this.uuid = uuid;
-        }
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public String getEntityType() {
-            return entityType;
-        }
-
-        public void setEntityType(String entityType) {
-            this.entityType = entityType;
-        }
-
-        @JsonAnySetter
-        public void setDynamicProperty(String key, Object value) {
-            dynamic_properties.put(key, value);
-        }
-
-        @JsonAnyGetter
-        public Map<String, Object> getDynamicProperties() {
-            return dynamic_properties;
-        }
-
-        @Override
-        public String toString() {
-            return "ActivityObject [attachments="
-                    + Arrays.toString(attachments) + ", author=" + author
-                    + ", content=" + content + ", displayName=" + displayName
-                    + ", downstreamDuplicates="
-                    + Arrays.toString(downstreamDuplicates) + ", id=" + id
-                    + ", image=" + image + ", objectType=" + objectType
-                    + ", published=" + published + ", summary=" + summary
-                    + ", updated=" + updated + ", upstreamDuplicates="
-                    + upstreamDuplicates + ", url=" + url + ", uuid=" + uuid
-                    + ", entityType=" + entityType + ", dynamic_properties="
-                    + dynamic_properties + "]";
-        }
-
-    }
-
-    @XmlRootElement
-    static public class ActivityCollection {
-
-        int totalItems;
-
-        ActivityObject[] items;
-
-        String url;
-
-        protected Map<String, Object> dynamic_properties = new TreeMap<String, Object>(
-                String.CASE_INSENSITIVE_ORDER);
-
-        public ActivityCollection() {
-        }
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public int getTotalItems() {
-            return totalItems;
-        }
-
-        public void setTotalItems(int totalItems) {
-            this.totalItems = totalItems;
-        }
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public ActivityObject[] getItems() {
-            return items;
-        }
-
-        public void setItems(ActivityObject[] items) {
-            this.items = items;
-        }
-
-        @JsonSerialize(include = Inclusion.NON_NULL)
-        public String getUrl() {
-            return url;
-        }
-
-        public void setUrl(String url) {
-            this.url = url;
-        }
-
-        @JsonAnySetter
-        public void setDynamicProperty(String key, Object value) {
-            dynamic_properties.put(key, value);
-        }
-
-        @JsonAnyGetter
-        public Map<String, Object> getDynamicProperties() {
-            return dynamic_properties;
-        }
-
-        @Override
-        public String toString() {
-            return "ActivityCollection [totalItems=" + totalItems + ", items="
-                    + Arrays.toString(items) + ", url=" + url
-                    + ", dynamic_properties=" + dynamic_properties + "]";
-        }
-
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/usergrid/java/client/entities/Device.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/usergrid/java/client/entities/Device.java b/sdks/java/src/main/java/org/usergrid/java/client/entities/Device.java
deleted file mode 100644
index f0cf3f0..0000000
--- a/sdks/java/src/main/java/org/usergrid/java/client/entities/Device.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package org.usergrid.java.client.entities;
-
-import static com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL;
-import static org.usergrid.java.client.utils.JsonUtils.getStringProperty;
-import static org.usergrid.java.client.utils.JsonUtils.setStringProperty;
-
-import java.util.List;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-
-public class Device extends Entity {
-
-	public final static String ENTITY_TYPE = "device";
-
-	public final static String PROPERTY_NAME = "name";
-
-	public Device() {
-		super();
-		setType(ENTITY_TYPE);
-	}
-
-	public Device(Entity entity) {
-		super();
-		properties = entity.properties;
-		setType(ENTITY_TYPE);
-	}
-
-	@Override
-	@JsonIgnore
-	public String getNativeType() {
-		return ENTITY_TYPE;
-	}
-
-	@Override
-	@JsonIgnore
-	public List<String> getPropertyNames() {
-		List<String> properties = super.getPropertyNames();
-		properties.add(PROPERTY_NAME);
-		return properties;
-	}
-
-	@JsonSerialize(include = NON_NULL)
-	public String getName() {
-		return getStringProperty(properties, PROPERTY_NAME);
-	}
-
-	public void setName(String name) {
-		setStringProperty(properties, PROPERTY_NAME, name);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/usergrid/java/client/entities/Entity.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/usergrid/java/client/entities/Entity.java b/sdks/java/src/main/java/org/usergrid/java/client/entities/Entity.java
deleted file mode 100644
index 55b4697..0000000
--- a/sdks/java/src/main/java/org/usergrid/java/client/entities/Entity.java
+++ /dev/null
@@ -1,175 +0,0 @@
-package org.usergrid.java.client.entities;
-
-import static org.usergrid.java.client.utils.JsonUtils.getStringProperty;
-import static org.usergrid.java.client.utils.JsonUtils.getUUIDProperty;
-import static org.usergrid.java.client.utils.JsonUtils.setStringProperty;
-import static org.usergrid.java.client.utils.JsonUtils.*;
-import static org.usergrid.java.client.utils.MapUtils.newMapWithoutKeys;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
-
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.annotation.JsonAnyGetter;
-import com.fasterxml.jackson.annotation.JsonAnySetter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-
-public class Entity {
-
-    public final static String PROPERTY_UUID = "uuid";
-    public final static String PROPERTY_TYPE = "type";
-
-    protected Map<String, JsonNode> properties = new HashMap<String, JsonNode>();
-
-    public static Map<String, Class<? extends Entity>> CLASS_FOR_ENTITY_TYPE = new HashMap<String, Class<? extends Entity>>();
-    static {
-        CLASS_FOR_ENTITY_TYPE.put(User.ENTITY_TYPE, User.class);
-    }
-
-    public Entity() {
-    }
-
-    public Entity(String type) {
-        setType(type);
-    }
-
-    @JsonIgnore
-    public String getNativeType() {
-        return getType();
-    }
-
-    @JsonIgnore
-    public List<String> getPropertyNames() {
-        List<String> properties = new ArrayList<String>();
-        properties.add(PROPERTY_TYPE);
-        properties.add(PROPERTY_UUID);
-        return properties;
-    }
-
-    public String getType() {
-        return getStringProperty(properties, PROPERTY_TYPE);
-    }
-
-    public void setType(String type) {
-        setStringProperty(properties, PROPERTY_TYPE, type);
-    }
-
-    public UUID getUuid() {
-        return getUUIDProperty(properties, PROPERTY_UUID);
-    }
-
-    public void setUuid(UUID uuid) {
-        setUUIDProperty(properties, PROPERTY_UUID, uuid);
-    }
-
-    @JsonAnyGetter
-    public Map<String, JsonNode> getProperties() {
-        return newMapWithoutKeys(properties, getPropertyNames());
-    }
-
-    @JsonAnySetter
-    public void setProperty(String name, JsonNode value) {
-        if (value == null) {
-            properties.remove(name);
-        } else {
-            properties.put(name, value);
-        }
-    }
-
-  
-    /**
-     * Set the property
-     * 
-     * @param name
-     * @param value
-     */
-    public void setProperty(String name, String value) {
-        setStringProperty(properties, name, value);
-    }
-
-    /**
-     * Set the property
-     * 
-     * @param name
-     * @param value
-     */
-    public void setProperty(String name, boolean value) {
-        setBooleanProperty(properties, name, value);
-    }
-
-    /**
-     * Set the property
-     * 
-     * @param name
-     * @param value
-     */
-    public void setProperty(String name, long value) {
-        setLongProperty(properties, name, value);
-    }
-
-    /**
-     * Set the property
-     * 
-     * @param name
-     * @param value
-     */
-    public void setProperty(String name, int value) {
-        setProperty(name, (long) value);
-    }
-
-    /**
-     * Set the property
-     * 
-     * @param name
-     * @param value
-     */
-    public void setProperty(String name, float value) {
-        setFloatProperty(properties, name, value);
-    }
-
-    @Override
-    public String toString() {
-        return toJsonString(this);
-    }
-
-    public <T extends Entity> T toType(Class<T> t) {
-        return toType(this, t);
-    }
-
-    public static <T extends Entity> T toType(Entity entity, Class<T> t) {
-        if (entity == null) {
-            return null;
-        }
-        T newEntity = null;
-        if (entity.getClass().isAssignableFrom(t)) {
-            try {
-                newEntity = (t.newInstance());
-                if ((newEntity.getNativeType() != null)
-                        && newEntity.getNativeType().equals(entity.getType())) {
-                    newEntity.properties = entity.properties;
-                }
-            } catch (Exception e) {
-                e.printStackTrace();
-            }
-        }
-        return newEntity;
-    }
-
-    public static <T extends Entity> List<T> toType(List<Entity> entities,
-            Class<T> t) {
-        List<T> l = new ArrayList<T>(entities != null ? entities.size() : 0);
-        if (entities != null) {
-            for (Entity entity : entities) {
-                T newEntity = entity.toType(t);
-                if (newEntity != null) {
-                    l.add(newEntity);
-                }
-            }
-        }
-        return l;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/usergrid/java/client/entities/Group.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/usergrid/java/client/entities/Group.java b/sdks/java/src/main/java/org/usergrid/java/client/entities/Group.java
deleted file mode 100644
index 9fa7ddf..0000000
--- a/sdks/java/src/main/java/org/usergrid/java/client/entities/Group.java
+++ /dev/null
@@ -1,63 +0,0 @@
-package org.usergrid.java.client.entities;
-
-import static com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL;
-import static org.usergrid.java.client.utils.JsonUtils.getStringProperty;
-import static org.usergrid.java.client.utils.JsonUtils.setStringProperty;
-
-import java.util.List;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-
-public class Group extends Entity {
-
-	public final static String ENTITY_TYPE = "group";
-
-	public final static String PROPERTY_PATH = "path";
-	public final static String PROPERTY_TITLE = "title";
-
-	public Group() {
-		super();
-		setType(ENTITY_TYPE);
-	}
-
-	public Group(Entity entity) {
-		super();
-		properties = entity.properties;
-		setType(ENTITY_TYPE);
-	}
-
-	@Override
-	@JsonIgnore
-	public String getNativeType() {
-		return ENTITY_TYPE;
-	}
-
-	@Override
-	@JsonIgnore
-	public List<String> getPropertyNames() {
-		List<String> properties = super.getPropertyNames();
-		properties.add(PROPERTY_PATH);
-		properties.add(PROPERTY_TITLE);
-		return properties;
-	}
-
-	@JsonSerialize(include = NON_NULL)
-	public String getPath() {
-		return getStringProperty(properties, PROPERTY_PATH);
-	}
-
-	public void setPath(String path) {
-		setStringProperty(properties, PROPERTY_PATH, path);
-	}
-
-	@JsonSerialize(include = NON_NULL)
-	public String getTitle() {
-		return getStringProperty(properties, PROPERTY_TITLE);
-	}
-
-	public void setTitle(String title) {
-		setStringProperty(properties, PROPERTY_TITLE, title);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/usergrid/java/client/entities/Message.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/usergrid/java/client/entities/Message.java b/sdks/java/src/main/java/org/usergrid/java/client/entities/Message.java
deleted file mode 100644
index 90f7c09..0000000
--- a/sdks/java/src/main/java/org/usergrid/java/client/entities/Message.java
+++ /dev/null
@@ -1,132 +0,0 @@
-package org.usergrid.java.client.entities;
-
-import static com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL;
-import static org.usergrid.java.client.utils.JsonUtils.getBooleanProperty;
-import static org.usergrid.java.client.utils.JsonUtils.getLongProperty;
-import static org.usergrid.java.client.utils.JsonUtils.getStringProperty;
-import static org.usergrid.java.client.utils.JsonUtils.getUUIDProperty;
-import static org.usergrid.java.client.utils.JsonUtils.setBooleanProperty;
-import static org.usergrid.java.client.utils.JsonUtils.setLongProperty;
-import static org.usergrid.java.client.utils.JsonUtils.setStringProperty;
-import static org.usergrid.java.client.utils.JsonUtils.setUUIDProperty;
-
-import java.util.List;
-import java.util.UUID;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion;
-
-public class Message extends Entity {
-
-	public static final String ENTITY_TYPE = "message";
-
-	public static final String PROPERTY_CORRELATION_ID = "correlation_id";
-	public static final String PROPERTY_DESTINATION = "destination";
-	public static final String PROPERTY_REPLY_TO = "reply_to";
-	public static final String PROPERTY_TIMESTAMP = "timestamp";
-	public static final String PROPERTY_TYPE = "type";
-	public static final String PROPERTY_CATEGORY = "category";
-	public static final String PROPERTY_INDEXED = "indexed";
-	public static final String PROPERTY_PERSISTENT = "persistent";
-
-	public Message() {
-		super();
-		setType(ENTITY_TYPE);
-	}
-
-	public Message(Entity entity) {
-		super();
-		properties = entity.properties;
-		setType(ENTITY_TYPE);
-	}
-
-	@Override
-	@JsonIgnore
-	public String getNativeType() {
-		return ENTITY_TYPE;
-	}
-
-	@Override
-	@JsonIgnore
-	public List<String> getPropertyNames() {
-		List<String> properties = super.getPropertyNames();
-		properties.add(PROPERTY_CORRELATION_ID);
-		properties.add(PROPERTY_DESTINATION);
-		properties.add(PROPERTY_REPLY_TO);
-		properties.add(PROPERTY_TIMESTAMP);
-		properties.add(PROPERTY_CATEGORY);
-		properties.add(PROPERTY_INDEXED);
-		properties.add(PROPERTY_PERSISTENT);
-		return properties;
-	}
-
-	@JsonSerialize(include = NON_NULL)
-	@JsonProperty(PROPERTY_CORRELATION_ID)
-	public UUID getCorrelationId() {
-		return getUUIDProperty(properties, PROPERTY_CORRELATION_ID);
-	}
-
-	@JsonProperty(PROPERTY_CORRELATION_ID)
-	public void setCorrelationId(UUID uuid) {
-		setUUIDProperty(properties, PROPERTY_CORRELATION_ID, uuid);
-	}
-
-	@JsonSerialize(include = NON_NULL)
-	public String getDestination() {
-		return getStringProperty(properties, PROPERTY_DESTINATION);
-	}
-
-	public void setDestination(String destination) {
-		setStringProperty(properties, PROPERTY_DESTINATION, destination);
-	}
-
-	@JsonSerialize(include = NON_NULL)
-	@JsonProperty(PROPERTY_REPLY_TO)
-	public String getReplyTo() {
-		return getStringProperty(properties, PROPERTY_DESTINATION);
-	}
-
-	@JsonProperty(PROPERTY_REPLY_TO)
-	public void setReplyTo(String replyTo) {
-		setStringProperty(properties, PROPERTY_DESTINATION, replyTo);
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public Long getTimestamp() {
-		return getLongProperty(properties, PROPERTY_TIMESTAMP);
-	}
-
-	public void setTimestamp(Long timestamp) {
-		setLongProperty(properties, PROPERTY_TIMESTAMP, timestamp);
-	}
-
-	@JsonSerialize(include = NON_NULL)
-	public String getCategory() {
-		return getStringProperty(properties, PROPERTY_CATEGORY);
-	}
-
-	public void setCategory(String category) {
-		setStringProperty(properties, PROPERTY_CATEGORY, category);
-	}
-
-	@JsonSerialize(include = NON_NULL)
-	public Boolean isIndexed() {
-		return getBooleanProperty(properties, PROPERTY_INDEXED);
-	}
-
-	public void setIndexed(Boolean indexed) {
-		setBooleanProperty(properties, PROPERTY_INDEXED, indexed);
-	}
-
-	@JsonSerialize(include = NON_NULL)
-	public Boolean isPersistent() {
-		return getBooleanProperty(properties, PROPERTY_INDEXED);
-	}
-
-	public void setPersistent(Boolean persistent) {
-		setBooleanProperty(properties, PROPERTY_INDEXED, persistent);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/usergrid/java/client/entities/User.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/usergrid/java/client/entities/User.java b/sdks/java/src/main/java/org/usergrid/java/client/entities/User.java
deleted file mode 100644
index 455fe16..0000000
--- a/sdks/java/src/main/java/org/usergrid/java/client/entities/User.java
+++ /dev/null
@@ -1,142 +0,0 @@
-package org.usergrid.java.client.entities;
-
-import static com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL;
-import static org.usergrid.java.client.utils.JsonUtils.getBooleanProperty;
-import static org.usergrid.java.client.utils.JsonUtils.getStringProperty;
-import static org.usergrid.java.client.utils.JsonUtils.setBooleanProperty;
-import static org.usergrid.java.client.utils.JsonUtils.setStringProperty;
-
-import java.util.List;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-
-public class User extends Entity {
-
-	public final static String ENTITY_TYPE = "user";
-
-	public final static String PROPERTY_USERNAME = "username";
-	public final static String PROPERTY_EMAIL = "email";
-	public final static String PROPERTY_NAME = "name";
-	public final static String PROPERTY_FIRSTNAME = "firstname";
-	public final static String PROPERTY_MIDDLENAME = "middlename";
-	public final static String PROPERTY_LASTNAME = "lastname";
-	public final static String PROPERTY_ACTIVATED = "activated";
-	public final static String PROPERTY_PICTURE = "picture";
-	public final static String PROPERTY_DISABLED = "disabled";
-
-	public User() {
-		super();
-		setType(ENTITY_TYPE);
-	}
-
-	public User(Entity entity) {
-		super();
-		properties = entity.properties;
-		setType(ENTITY_TYPE);
-	}
-
-	@Override
-	@JsonIgnore
-	public String getNativeType() {
-		return ENTITY_TYPE;
-	}
-
-	@Override
-	@JsonIgnore
-	public List<String> getPropertyNames() {
-		List<String> properties = super.getPropertyNames();
-		properties.add(PROPERTY_USERNAME);
-		properties.add(PROPERTY_EMAIL);
-		properties.add(PROPERTY_NAME);
-		properties.add(PROPERTY_FIRSTNAME);
-		properties.add(PROPERTY_MIDDLENAME);
-		properties.add(PROPERTY_LASTNAME);
-		properties.add(PROPERTY_ACTIVATED);
-		properties.add(PROPERTY_PICTURE);
-		properties.add(PROPERTY_DISABLED);
-		return properties;
-	}
-
-	@JsonSerialize(include = NON_NULL)
-	public String getUsername() {
-		return getStringProperty(properties, PROPERTY_USERNAME);
-	}
-
-	public void setUsername(String username) {
-		setStringProperty(properties, PROPERTY_USERNAME, username);
-	}
-
-	@JsonSerialize(include = NON_NULL)
-	public String getName() {
-		return getStringProperty(properties, PROPERTY_NAME);
-	}
-
-	public void setName(String name) {
-		setStringProperty(properties, PROPERTY_NAME, name);
-	}
-
-	@JsonSerialize(include = NON_NULL)
-	public String getEmail() {
-		return getStringProperty(properties, PROPERTY_EMAIL);
-	}
-
-	public void setEmail(String email) {
-		setStringProperty(properties, PROPERTY_EMAIL, email);
-	}
-
-	@JsonSerialize(include = NON_NULL)
-	public Boolean isActivated() {
-		return getBooleanProperty(properties, PROPERTY_ACTIVATED);
-	}
-
-	public void setActivated(Boolean activated) {
-		setBooleanProperty(properties, PROPERTY_ACTIVATED, activated);
-	}
-
-	@JsonSerialize(include = NON_NULL)
-	public Boolean isDisabled() {
-		return getBooleanProperty(properties, PROPERTY_DISABLED);
-	}
-
-	public void setDisabled(Boolean disabled) {
-		setBooleanProperty(properties, PROPERTY_DISABLED, disabled);
-	}
-
-	@JsonSerialize(include = NON_NULL)
-	public String getFirstname() {
-		return getStringProperty(properties, PROPERTY_FIRSTNAME);
-	}
-
-	public void setFirstname(String firstname) {
-		setStringProperty(properties, PROPERTY_FIRSTNAME, firstname);
-	}
-
-	@JsonSerialize(include = NON_NULL)
-	public String getMiddlename() {
-		return getStringProperty(properties, PROPERTY_MIDDLENAME);
-	}
-
-	public void setMiddlename(String middlename) {
-		setStringProperty(properties, PROPERTY_MIDDLENAME, middlename);
-	}
-
-	@JsonSerialize(include = NON_NULL)
-	public String getLastname() {
-		return getStringProperty(properties, PROPERTY_LASTNAME);
-	}
-
-	public void setLastname(String lastname) {
-		setStringProperty(properties, PROPERTY_LASTNAME, lastname);
-	}
-
-	@JsonSerialize(include = NON_NULL)
-	public String getPicture() {
-		return getStringProperty(properties, PROPERTY_PICTURE);
-	}
-
-	public void setPicture(String picture) {
-		setStringProperty(properties, PROPERTY_PICTURE, picture);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/usergrid/java/client/exception/ClientException.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/usergrid/java/client/exception/ClientException.java b/sdks/java/src/main/java/org/usergrid/java/client/exception/ClientException.java
deleted file mode 100644
index 151a99a..0000000
--- a/sdks/java/src/main/java/org/usergrid/java/client/exception/ClientException.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- * 
- * 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.usergrid.java.client.exception;
-
-/**
- * Simple wrapper for client exceptions
- * @author tnine
- *
- */
-public class ClientException extends RuntimeException{
-
-    /**
-     * 
-     */
-    private static final long serialVersionUID = 1L;
-
-    /**
-     * @param message
-     * @param cause
-     */
-    public ClientException(String message, Throwable cause) {
-        super(message, cause);
-    }
-    
-    
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/usergrid/java/client/response/AggregateCounter.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/usergrid/java/client/response/AggregateCounter.java b/sdks/java/src/main/java/org/usergrid/java/client/response/AggregateCounter.java
deleted file mode 100644
index 0e350d4..0000000
--- a/sdks/java/src/main/java/org/usergrid/java/client/response/AggregateCounter.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package org.usergrid.java.client.response;
-
-import static org.usergrid.java.client.utils.JsonUtils.toJsonString;
-
-public class AggregateCounter {
-
-	private long timestamp;
-	private long value;
-
-	public AggregateCounter(long timestamp, long value) {
-		this.timestamp = timestamp;
-		this.value = value;
-	}
-
-	public long getTimestamp() {
-		return timestamp;
-	}
-
-	public void setTimestamp(long timestamp) {
-		this.timestamp = timestamp;
-	}
-
-	public long getValue() {
-		return value;
-	}
-
-	public void setValue(long value) {
-		this.value = value;
-	}
-
-	@Override
-	public String toString() {
-		return toJsonString(this);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/usergrid/java/client/response/AggregateCounterSet.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/usergrid/java/client/response/AggregateCounterSet.java b/sdks/java/src/main/java/org/usergrid/java/client/response/AggregateCounterSet.java
deleted file mode 100644
index 651d395..0000000
--- a/sdks/java/src/main/java/org/usergrid/java/client/response/AggregateCounterSet.java
+++ /dev/null
@@ -1,95 +0,0 @@
-package org.usergrid.java.client.response;
-
-import static org.usergrid.java.client.utils.JsonUtils.toJsonString;
-
-import java.util.List;
-import java.util.UUID;
-
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion;
-
-public class AggregateCounterSet {
-	private String name;
-	private UUID user;
-	private UUID group;
-	private UUID queue;
-	private String category;
-	private List<AggregateCounter> values;
-
-	public AggregateCounterSet(String name, UUID user, UUID group,
-			String category, List<AggregateCounter> values) {
-		this.name = name;
-		this.user = user;
-		this.group = group;
-		this.category = category;
-		this.values = values;
-	}
-
-	public AggregateCounterSet(String name, UUID queue, String category,
-			List<AggregateCounter> values) {
-		this.name = name;
-		setQueue(queue);
-		this.category = category;
-		this.values = values;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public UUID getUser() {
-		return user;
-	}
-
-	public void setUser(UUID user) {
-		this.user = user;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public UUID getGroup() {
-		return group;
-	}
-
-	public void setGroup(UUID group) {
-		this.group = group;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public String getCategory() {
-		return category;
-	}
-
-	public void setCategory(String category) {
-		this.category = category;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public String getName() {
-		return name;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public List<AggregateCounter> getValues() {
-		return values;
-	}
-
-	public void setValues(List<AggregateCounter> values) {
-		this.values = values;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public UUID getQueue() {
-		return queue;
-	}
-
-	public void setQueue(UUID queue) {
-		this.queue = queue;
-	}
-
-	@Override
-	public String toString() {
-		return toJsonString(this);
-	}
-
-}


[75/96] [abbrv] USERGRID-2 package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/usergrid/java/client/response/ApiResponse.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/usergrid/java/client/response/ApiResponse.java b/sdks/java/src/main/java/org/usergrid/java/client/response/ApiResponse.java
deleted file mode 100644
index 4ee3cf3..0000000
--- a/sdks/java/src/main/java/org/usergrid/java/client/response/ApiResponse.java
+++ /dev/null
@@ -1,405 +0,0 @@
-package org.usergrid.java.client.response;
-
-import static org.usergrid.java.client.utils.JsonUtils.toJsonString;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
-
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.annotation.JsonAnyGetter;
-import com.fasterxml.jackson.annotation.JsonAnySetter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion;
-import org.usergrid.java.client.entities.Entity;
-import org.usergrid.java.client.entities.Message;
-import org.usergrid.java.client.entities.User;
-
-public class ApiResponse {
-
-	private String accessToken;
-
-	private String error;
-	private String errorDescription;
-	private String errorUri;
-	private String exception;
-
-	private String path;
-	private String uri;
-	private String status;
-	private long timestamp;
-	private UUID application;
-	private List<Entity> entities;
-	private UUID next;
-	private String cursor;
-	private String action;
-	private List<Object> list;
-	private Object data;
-	private Map<String, UUID> applications;
-	private Map<String, JsonNode> metadata;
-	private Map<String, List<String>> params;
-	private List<AggregateCounterSet> counters;
-	private ClientCredentialsInfo credentials;
-
-	private List<Message> messages;
-	private List<QueueInfo> queues;
-	private UUID last;
-	private UUID queue;
-	private UUID consumer;
-
-	private User user;
-
-	private final Map<String, JsonNode> properties = new HashMap<String, JsonNode>();
-
-	public ApiResponse() {
-	}
-
-	@JsonAnyGetter
-	public Map<String, JsonNode> getProperties() {
-		return properties;
-	}
-
-	@JsonAnySetter
-	public void setProperty(String key, JsonNode value) {
-		properties.put(key, value);
-	}
-
-	@JsonProperty("access_token")
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public String getAccessToken() {
-		return accessToken;
-	}
-
-	@JsonProperty("access_token")
-	public void setAccessToken(String accessToken) {
-		this.accessToken = accessToken;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public String getError() {
-		return error;
-	}
-
-	public void setError(String error) {
-		this.error = error;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	@JsonProperty("error_description")
-	public String getErrorDescription() {
-		return errorDescription;
-	}
-
-	@JsonProperty("error_description")
-	public void setErrorDescription(String errorDescription) {
-		this.errorDescription = errorDescription;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	@JsonProperty("error_uri")
-	public String getErrorUri() {
-		return errorUri;
-	}
-
-	@JsonProperty("error_uri")
-	public void setErrorUri(String errorUri) {
-		this.errorUri = errorUri;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public String getException() {
-		return exception;
-	}
-
-	public void setException(String exception) {
-		this.exception = exception;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public String getPath() {
-		return path;
-	}
-
-	public void setPath(String path) {
-		this.path = path;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public String getUri() {
-		return uri;
-	}
-
-	public void setUri(String uri) {
-		this.uri = uri;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public String getStatus() {
-		return status;
-	}
-
-	public void setStatus(String status) {
-		this.status = status;
-	}
-
-	public long getTimestamp() {
-		return timestamp;
-	}
-
-	public void setTimestamp(long timestamp) {
-		this.timestamp = timestamp;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public UUID getApplication() {
-		return application;
-	}
-
-	public void setApplication(UUID application) {
-		this.application = application;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public List<Entity> getEntities() {
-		return entities;
-	}
-
-	public void setEntities(List<Entity> entities) {
-		this.entities = entities;
-	}
-
-	public int getEntityCount() {
-		if (entities == null) {
-			return 0;
-		}
-		return entities.size();
-	}
-
-	public Entity getFirstEntity() {
-		if ((entities != null) && (entities.size() > 0)) {
-			return entities.get(0);
-		}
-		return null;
-	}
-
-	public <T extends Entity> T getFirstEntity(Class<T> t) {
-		return Entity.toType(getFirstEntity(), t);
-	}
-
-	public Entity getLastEntity() {
-		if ((entities != null) && (entities.size() > 0)) {
-			return entities.get(entities.size() - 1);
-		}
-		return null;
-	}
-
-	public <T extends Entity> T getLastEntity(Class<T> t) {
-		return Entity.toType(getLastEntity(), t);
-	}
-
-	public <T extends Entity> List<T> getEntities(Class<T> t) {
-		return Entity.toType(entities, t);
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public UUID getNext() {
-		return next;
-	}
-
-	public void setNext(UUID next) {
-		this.next = next;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public String getCursor() {
-		return cursor;
-	}
-
-	public void setCursor(String cursor) {
-		this.cursor = cursor;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public String getAction() {
-		return action;
-	}
-
-	public void setAction(String action) {
-		this.action = action;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public List<Object> getList() {
-		return list;
-	}
-
-	public void setList(List<Object> list) {
-		this.list = list;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public Object getData() {
-		return data;
-	}
-
-	public void setData(Object data) {
-		this.data = data;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public Map<String, UUID> getApplications() {
-		return applications;
-	}
-
-	public void setApplications(Map<String, UUID> applications) {
-		this.applications = applications;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public Map<String, JsonNode> getMetadata() {
-		return metadata;
-	}
-
-	public void setMetadata(Map<String, JsonNode> metadata) {
-		this.metadata = metadata;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public Map<String, List<String>> getParams() {
-		return params;
-	}
-
-	public void setParams(Map<String, List<String>> params) {
-		this.params = params;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public List<AggregateCounterSet> getCounters() {
-		return counters;
-	}
-
-	public void setCounters(List<AggregateCounterSet> counters) {
-		this.counters = counters;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public ClientCredentialsInfo getCredentials() {
-		return credentials;
-	}
-
-	public void setCredentials(ClientCredentialsInfo credentials) {
-		this.credentials = credentials;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public User getUser() {
-		return user;
-	}
-
-	public void setUser(User user) {
-		this.user = user;
-	}
-
-	@Override
-	public String toString() {
-		return toJsonString(this);
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public List<Message> getMessages() {
-		return messages;
-	}
-
-	public void setMessages(List<Message> messages) {
-		this.messages = messages;
-	}
-
-	@JsonIgnore
-	public int getMessageCount() {
-		if (messages == null) {
-			return 0;
-		}
-		return messages.size();
-	}
-
-	@JsonIgnore
-	public Message getFirstMessage() {
-		if ((messages != null) && (messages.size() > 0)) {
-			return messages.get(0);
-		}
-		return null;
-	}
-
-	@JsonIgnore
-	public Entity getLastMessage() {
-		if ((messages != null) && (messages.size() > 0)) {
-			return messages.get(messages.size() - 1);
-		}
-		return null;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public UUID getLast() {
-		return last;
-	}
-
-	public void setLast(UUID last) {
-		this.last = last;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public List<QueueInfo> getQueues() {
-		return queues;
-	}
-
-	public void setQueues(List<QueueInfo> queues) {
-		this.queues = queues;
-	}
-
-	@JsonIgnore
-	public QueueInfo getFirstQueue() {
-		if ((queues != null) && (queues.size() > 0)) {
-			return queues.get(0);
-		}
-		return null;
-	}
-
-	@JsonIgnore
-	public QueueInfo getLastQueue() {
-		if ((queues != null) && (queues.size() > 0)) {
-			return queues.get(queues.size() - 1);
-		}
-		return null;
-	}
-
-	@JsonIgnore
-	public UUID getLastQueueId() {
-		QueueInfo q = getLastQueue();
-		if (q != null) {
-			return q.getQueue();
-		}
-		return null;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public UUID getQueue() {
-		return queue;
-	}
-
-	public void setQueue(UUID queue) {
-		this.queue = queue;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public UUID getConsumer() {
-		return consumer;
-	}
-
-	public void setConsumer(UUID consumer) {
-		this.consumer = consumer;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/usergrid/java/client/response/ClientCredentialsInfo.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/usergrid/java/client/response/ClientCredentialsInfo.java b/sdks/java/src/main/java/org/usergrid/java/client/response/ClientCredentialsInfo.java
deleted file mode 100644
index 2724977..0000000
--- a/sdks/java/src/main/java/org/usergrid/java/client/response/ClientCredentialsInfo.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package org.usergrid.java.client.response;
-
-import static org.usergrid.java.client.utils.JsonUtils.toJsonString;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-public class ClientCredentialsInfo {
-
-	private String id;
-	private String secret;
-
-	public ClientCredentialsInfo(String id, String secret) {
-		this.id = id;
-		this.secret = secret;
-	}
-
-	@JsonProperty("client_id")
-	public String getId() {
-		return id;
-	}
-
-	@JsonProperty("client_id")
-	public void setId(String id) {
-		this.id = id;
-	}
-
-	@JsonProperty("client_secret")
-	public String getSecret() {
-		return secret;
-	}
-
-	@JsonProperty("client_secret")
-	public void setSecret(String secret) {
-		this.secret = secret;
-	}
-
-	@Override
-	public String toString() {
-		return toJsonString(this);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/usergrid/java/client/response/QueueInfo.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/usergrid/java/client/response/QueueInfo.java b/sdks/java/src/main/java/org/usergrid/java/client/response/QueueInfo.java
deleted file mode 100644
index d4963c2..0000000
--- a/sdks/java/src/main/java/org/usergrid/java/client/response/QueueInfo.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package org.usergrid.java.client.response;
-
-import java.util.UUID;
-
-public class QueueInfo {
-
-	String path;
-	UUID queue;
-
-	public QueueInfo() {
-	}
-
-	public String getPath() {
-		return path;
-	}
-
-	public void setPath(String path) {
-		this.path = path;
-	}
-
-	public UUID getQueue() {
-		return queue;
-	}
-
-	public void setQueue(UUID queue) {
-		this.queue = queue;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/usergrid/java/client/utils/JsonUtils.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/usergrid/java/client/utils/JsonUtils.java b/sdks/java/src/main/java/org/usergrid/java/client/utils/JsonUtils.java
deleted file mode 100644
index 00b95f3..0000000
--- a/sdks/java/src/main/java/org/usergrid/java/client/utils/JsonUtils.java
+++ /dev/null
@@ -1,166 +0,0 @@
-package org.usergrid.java.client.utils;
-
-import java.io.IOException;
-import java.util.Map;
-import java.util.UUID;
-
-import com.fasterxml.jackson.core.JsonGenerationException;
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.JsonMappingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.node.JsonNodeFactory;
-import org.usergrid.java.client.exception.ClientException;
-
-public class JsonUtils {
-
-
-	static ObjectMapper mapper = new ObjectMapper();
-
-	public static String getStringProperty(Map<String, JsonNode> properties,
-			String name) {
-		JsonNode value = properties.get(name);
-		if (value != null) {
-			return value.asText();
-		}
-		return null;
-	}
-
-	public static void setStringProperty(Map<String, JsonNode> properties,
-			String name, String value) {
-		if (value == null) {
-			properties.remove(name);
-		} else {
-			properties.put(name, JsonNodeFactory.instance.textNode(value));
-		}
-	}
-
-	public static Long getLongProperty(Map<String, JsonNode> properties,
-			String name) {
-		JsonNode value = properties.get(name);
-		if (value != null) {
-			return value.asLong(0);
-		}
-		return null;
-	}
-
-	public static void setLongProperty(Map<String, JsonNode> properties,
-			String name, Long value) {
-		if (value == null) {
-			properties.remove(name);
-		} else {
-			properties.put(name, JsonNodeFactory.instance.numberNode(value));
-		}
-	}
-
-	public static void setFloatProperty(Map<String, JsonNode> properties, String name, Float value){
-	    if(value == null){
-	        properties.remove(name);
-	    }else{
-	        properties.put(name, JsonNodeFactory.instance.numberNode(value));
-	    }
-	}
-	
-	public static Boolean getBooleanProperty(Map<String, JsonNode> properties,
-			String name) {
-		JsonNode value = properties.get(name);
-		if (value != null) {
-			return value.asBoolean();
-		}
-		return false;
-	}
-
-	public static void setBooleanProperty(Map<String, JsonNode> properties,
-			String name, Boolean value) {
-		if (value == null) {
-			properties.remove(name);
-		} else {
-			properties.put(name, JsonNodeFactory.instance.booleanNode(value));
-		}
-	}
-
-	public static UUID getUUIDProperty(Map<String, JsonNode> properties,
-			String name) {
-		JsonNode value = properties.get(name);
-		if (value != null) {
-			UUID uuid = null;
-			try {
-				uuid = UUID.fromString(value.asText());
-			} catch (Exception e) {
-			}
-			return uuid;
-		}
-		return null;
-	}
-
-	public static void setUUIDProperty(Map<String, JsonNode> properties,
-			String name, UUID value) {
-		if (value == null) {
-			properties.remove(name);
-		} else {
-			properties.put(name,
-					JsonNodeFactory.instance.textNode(value.toString()));
-		}
-	}
-
-	public static String toJsonString(Object obj) {
-		try {
-			return mapper.writeValueAsString(obj);
-		} catch (JsonGenerationException e) {
-			throw new ClientException("Unable to generate json", e);
-		} catch (JsonMappingException e) {
-		    throw new ClientException("Unable to map json", e);
-		} catch (IOException e) {
-		    throw new ClientException("IO error", e);
-		}
-	}
-
-	public static <T> T parse(String json, Class<T> c) {
-		try {
-			return mapper.readValue(json, c);
-		} catch (JsonGenerationException e) {
-            throw new ClientException("Unable to generate json", e);
-        } catch (JsonMappingException e) {
-            throw new ClientException("Unable to map json", e);
-        } catch (IOException e) {
-            throw new ClientException("IO error", e);
-        }
-	}
-
-	public static JsonNode toJsonNode(Object obj) {
-		return mapper.convertValue(obj, JsonNode.class);
-	}
-
-	public static <T> T fromJsonNode(JsonNode json, Class<T> c) {
-		try {
-			JsonParser jp = json.traverse();
-			return mapper.readValue(jp, c);
-		} catch (JsonGenerationException e) {
-            throw new ClientException("Unable to generate json", e);
-        } catch (JsonMappingException e) {
-            throw new ClientException("Unable to map json", e);
-        } catch (IOException e) {
-            throw new ClientException("IO error", e);
-        }
-	}
-
-	public static <T> T getObjectProperty(Map<String, JsonNode> properties,
-			String name, Class<T> c) {
-		JsonNode value = properties.get(name);
-		if (value != null) {
-			return fromJsonNode(value, c);
-		}
-		return null;
-	}
-
-	public static void setObjectProperty(Map<String, JsonNode> properties,
-			String name, Object value) {
-		if (value == null) {
-			properties.remove(name);
-		} else {
-			properties.put(name,
-					JsonNodeFactory.instance.textNode(value.toString()));
-		}
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/usergrid/java/client/utils/MapUtils.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/usergrid/java/client/utils/MapUtils.java b/sdks/java/src/main/java/org/usergrid/java/client/utils/MapUtils.java
deleted file mode 100644
index af04a6c..0000000
--- a/sdks/java/src/main/java/org/usergrid/java/client/utils/MapUtils.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package org.usergrid.java.client.utils;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-public class MapUtils {
-
-	public static <T> Map<String, T> newMapWithoutKeys(Map<String, T> map,
-			List<String> keys) {
-		Map<String, T> newMap = null;
-		if (map != null) {
-			newMap = new HashMap<String, T>(map);
-		} else {
-			newMap = new HashMap<String, T>();
-		}
-		for (String key : keys) {
-			newMap.remove(key);
-		}
-		return newMap;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/usergrid/java/client/utils/ObjectUtils.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/usergrid/java/client/utils/ObjectUtils.java b/sdks/java/src/main/java/org/usergrid/java/client/utils/ObjectUtils.java
deleted file mode 100644
index 8ef65b1..0000000
--- a/sdks/java/src/main/java/org/usergrid/java/client/utils/ObjectUtils.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package org.usergrid.java.client.utils;
-
-import java.util.Map;
-
-public class ObjectUtils {
-
-	public static boolean isEmpty(Object s) {
-		if (s == null) {
-			return true;
-		}
-		if ((s instanceof String) && (((String) s).trim().length() == 0)) {
-			return true;
-		}
-		if (s instanceof Map) {
-			return ((Map<?, ?>) s).isEmpty();
-		}
-		return false;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/usergrid/java/client/utils/UrlUtils.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/usergrid/java/client/utils/UrlUtils.java b/sdks/java/src/main/java/org/usergrid/java/client/utils/UrlUtils.java
deleted file mode 100644
index a64fb96..0000000
--- a/sdks/java/src/main/java/org/usergrid/java/client/utils/UrlUtils.java
+++ /dev/null
@@ -1,108 +0,0 @@
-package org.usergrid.java.client.utils;
-
-import static java.net.URLEncoder.encode;
-import static org.usergrid.java.client.utils.ObjectUtils.isEmpty;
-
-import java.io.UnsupportedEncodingException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import org.usergrid.java.client.exception.ClientException;
-
-public class UrlUtils {
-
-   
-    public static URL url(String s) {
-        try {
-            return new URL(s);
-        } catch (MalformedURLException e) {
-            throw new ClientException("Incorrect URL format", e);
-        }
-    }
-
-    public static URL url(URL u, String s) {
-        try {
-            return new URL(u, s);
-        } catch (MalformedURLException e) {
-            throw new ClientException("Incorrect URL format", e);
-        }
-    }
-
-    public static String path(Object... segments) {
-        String path = "";
-        boolean first = true;
-        for (Object segment : segments) {
-            if (segment instanceof Object[]) {
-                segment = path((Object[]) segment);
-            }
-            if (!isEmpty(segment)) {
-                if (first) {
-                    path = segment.toString();
-                    first = false;
-                } else {
-                    if (!path.endsWith("/")) {
-                        path += "/";
-                    }
-                    path += segment.toString();
-                }
-            }
-        }
-        return path;
-    }
-
-    @SuppressWarnings("rawtypes")
-    public static String encodeParams(Map<String, Object> params) {
-        if (params == null) {
-            return "";
-        }
-        boolean first = true;
-        StringBuilder results = new StringBuilder();
-        for (Entry<String, Object> entry : params.entrySet()) {
-            if (entry.getValue() instanceof List) {
-                for (Object o : (List) entry.getValue()) {
-                    if (!isEmpty(o)) {
-                        if (!first) {
-                            results.append('&');
-                        }
-                        first = false;
-                        results.append(entry.getKey());
-                        results.append("=");
-                        try {
-                            results.append(encode(o.toString(), "UTF-8"));
-                        } catch (UnsupportedEncodingException e) {
-                            throw new ClientException("Unknown encoding", e);
-                        }
-                    }
-                }
-            } else if (!isEmpty(entry.getValue())) {
-                if (!first) {
-                    results.append('&');
-                }
-                first = false;
-                results.append(entry.getKey());
-                results.append("=");
-                try {
-                    results.append(encode(entry.getValue().toString(), "UTF-8"));
-                } catch (UnsupportedEncodingException e) {
-                    throw new ClientException("Unsupported string encoding", e);
-                }
-            }
-        }
-        return results.toString();
-    }
-
-    public static String addQueryParams(String url, Map<String, Object> params) {
-        if (params == null) {
-            return url;
-        }
-        if (!url.contains("?")) {
-            url += "?";
-        }
-        url += encodeParams(params);
-        return url;
-    }
-
-}


[53/96] [abbrv] git commit: rename antlr package

Posted by sn...@apache.org.
rename antlr package


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

Branch: refs/pull/39/head
Commit: b8c01f3d0ce56f6a1c00003b28ed7a8d4c073a59
Parents: 2c2acbe
Author: Lewis John McGibbney <le...@apache.org>
Authored: Tue Jan 28 21:24:14 2014 +0000
Committer: Lewis John McGibbney <le...@apache.org>
Committed: Tue Jan 28 21:24:14 2014 +0000

----------------------------------------------------------------------
 .../persistence/query/tree/QueryFilter.g        | 311 +++++++++++++++++++
 .../persistence/query/tree/QueryFilter.g        | 311 -------------------
 2 files changed, 311 insertions(+), 311 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/b8c01f3d/stack/core/src/main/antlr3/org/apache/usergrid/persistence/query/tree/QueryFilter.g
----------------------------------------------------------------------
diff --git a/stack/core/src/main/antlr3/org/apache/usergrid/persistence/query/tree/QueryFilter.g b/stack/core/src/main/antlr3/org/apache/usergrid/persistence/query/tree/QueryFilter.g
new file mode 100644
index 0000000..c566ef9
--- /dev/null
+++ b/stack/core/src/main/antlr3/org/apache/usergrid/persistence/query/tree/QueryFilter.g
@@ -0,0 +1,311 @@
+grammar QueryFilter;
+//NOTES:  '^' denotes operator, all others in the string become operands
+
+options {
+    output=AST;
+//    ASTLabelType=CommonTree;
+}
+
+@rulecatch { }
+
+
+@header {
+package org.apache.usergrid.persistence.query.tree;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.apache.usergrid.persistence.Query;
+import org.apache.usergrid.persistence.Query.SortPredicate;
+
+}
+
+
+@members {
+	Query query = new Query();
+
+  private static final Logger logger = LoggerFactory
+      .getLogger(QueryFilterLexer.class);
+
+	@Override
+	public void emitErrorMessage(String msg) {
+		logger.info(msg);
+	}
+}
+
+
+@lexer::header {
+package org.apache.usergrid.persistence.query.tree;
+
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.apache.usergrid.persistence.exceptions.QueryTokenException;
+
+}
+
+@lexer::members {
+
+
+
+  private static final Logger logger = LoggerFactory
+      .getLogger(QueryFilterLexer.class);
+
+
+
+
+	@Override
+	public void emitErrorMessage(String msg) {
+		logger.info(msg);
+	}
+
+	@Override
+    public void recover(RecognitionException e) {
+         //We don't want to recover, we want to re-throw to the user since they passed us invalid input
+         throw new QueryTokenException(e);
+    }
+
+
+}
+
+//these must come before ID. Otherwise lt, lte, eq, etc will be returned as id tokens
+LT  : '<' | 'lt';
+
+LTE : '<=' |  'lte';
+
+EQ  : '=' | 'eq';
+
+GT  : '>' | 'gt';
+
+GTE : '>=' |  'gte';  
+
+
+//keywords before var ids
+BOOLEAN : (TRUE|FALSE);
+
+AND : ('A'|'a')('N'|'n')('D'|'d') | '&&';
+
+OR  : ('O'|'o')('R'|'r') | '||' ;
+
+NOT : ('N'|'n')('O'|'o')('T'|'t');
+
+ASC : ('A'|'a')('S'|'s')('C'|'c');
+
+DESC : ('D'|'d')('E'|'e')('S'|'s')('C'|'c');
+
+CONTAINS : ('C'|'c')('O'|'o')('N'|'n')('T'|'t')('A'|'a')('I'|'i')('N'|'n')('S'|'s');
+
+WITHIN : ('W'|'w')('I'|'i')('T'|'t')('H'|'h')('I'|'i')('N'|'n');
+
+OF : ('O'|'o')('F'|'f');
+
+UUID :  HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT
+  HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT '-' 
+  HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT '-' 
+  HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT '-' 
+  HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT '-' 
+  HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT
+  HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT
+  HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT
+  ;
+
+//ids and values
+ID  :	('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'0'..'9'|'_'|'.'|'-')*
+    ;
+
+LONG :	('-')? '0'..'9'+
+    ;
+
+FLOAT
+    :  ('-')? ( ('0'..'9')+ '.' ('0'..'9')* EXPONENT?
+    |   '.' ('0'..'9')+ EXPONENT?
+    |   ('0'..'9')+ EXPONENT)
+    ;
+    
+STRING
+    :  '\'' ( ESC_SEQ | ~('\\'|'\'') )* '\''
+    ;
+
+
+    
+WS : (' ' | '\t' | '\n' | '\r' | '\f')+  {$channel=HIDDEN;};
+
+
+
+    
+
+
+
+fragment TRUE : ('T'|'t')('R'|'r')('U'|'u')('E'|'e');
+
+fragment FALSE : ('F'|'f')('A'|'a')('L'|'l')('S'|'s')('E'|'e');
+
+
+fragment
+EXPONENT : ('e'|'E') ('+'|'-')? ('0'..'9')+ ;
+
+fragment
+HEX_DIGIT : ('0'..'9'|'a'..'f'|'A'..'F') ;
+
+fragment
+ESC_SEQ
+    :   '\\' ('b'|'t'|'n'|'f'|'r'|'\"'|'\''|'\\')
+    |   UNICODE_ESC
+    |   OCTAL_ESC
+    ;
+
+fragment
+OCTAL_ESC
+    :   '\\' ('0'..'3') ('0'..'7') ('0'..'7')
+    |   '\\' ('0'..'7') ('0'..'7')
+    |   '\\' ('0'..'7')
+    ;
+
+fragment
+UNICODE_ESC
+    :   '\\' 'u' HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT
+    ;
+
+
+
+
+//NE : '!=';
+
+
+
+property :	ID<Property>;
+
+containsproperty : ID<ContainsProperty>;
+
+withinproperty : ID<WithinProperty>;
+	
+booleanliteral: BOOLEAN<BooleanLiteral>;
+
+
+longliteral :
+  LONG<LongLiteral> ;
+
+uuidliteral :
+  UUID<UUIDLiteral>;
+
+stringliteral :
+  STRING<StringLiteral>;
+  
+floatliteral :
+  FLOAT<FloatLiteral> ;
+
+//We delegate to each sub class literal so we can get each type	
+value : 
+  booleanliteral
+  | longliteral
+  | uuidliteral
+  | stringliteral
+  | floatliteral
+  ;
+  
+
+
+//Every operand returns with the name of 'op'.  This is used because all subtrees require operands,
+//this allows us to link the java code easily by using the same name as a converntion
+
+//begin search expressions
+  
+//mathmatical equality operations
+equalityop :
+  property LT<LessThan>^ value
+  |property LTE<LessThanEqual>^ value
+  |property EQ<Equal>^ value
+  |property GT<GreaterThan>^ value
+  |property GTE<GreaterThanEqual>^ value
+  ; 
+
+//geo location search
+locationop :
+  withinproperty WITHIN<WithinOperand>^ (floatliteral|longliteral) OF! (floatliteral|longliteral) ','! (floatliteral|longliteral);
+  
+//string search
+containsop :
+  containsproperty CONTAINS<ContainsOperand>^ stringliteral;
+
+//
+operation :
+ '('! expression ')'!
+   | equalityop 
+   | locationop 
+   | containsop 
+   ;
+
+//negations of expressions
+notexp :
+//only link if we have the not
+ NOT<NotOperand>^ operation  
+ |operation 
+ ;
+
+//and expressions contain operands.  These should always be closer to the leaves of a tree, it allows
+//for faster result intersection sooner in the query execution
+andexp :
+ notexp (AND<AndOperand>^ notexp )*;
+ 
+ 
+//or expression should always be after AND expressions.  This will give us a smaller result set to union when evaluating trees
+//also a root level expression
+expression :
+ andexp (OR<OrOperand>^ andexp )*;
+
+
+
+//end expressions
+
+//begin order clauses
+
+//direction for ordering
+direction  : (ASC | DESC);
+
+//order clause
+order
+  : (property direction?){
+		String property = $property.text; 
+		String direction = $direction.text;
+		query.addSort(new SortPredicate(property, direction));
+    
+  };
+
+//end order clauses
+  
+//Begin select clauses
+
+select_subject
+  : ID {
+
+  query.addSelect($ID.text);
+
+};
+
+ 
+
+select_assign
+  : target=ID ':' source=ID {
+
+  query.addSelect($target.text, $source.text);
+
+};
+
+select_expr 
+  : ('*' | select_subject (',' select_subject) * | '{' select_assign (',' select_assign) * '}');  
+   
+//end select clauses
+
+ql returns [Query query]
+  : ('select'! select_expr!)? ('where'!? expression)? ('order by'! order! (','! order!)*)? {
+
+  if($expression.tree instanceof Operand){
+    query.setRootOperand((Operand)$expression.tree);
+  }
+  
+  retval.query = query;
+
+
+};
+
+
+

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/b8c01f3d/stack/core/src/main/antlr3/org/usergrid/persistence/query/tree/QueryFilter.g
----------------------------------------------------------------------
diff --git a/stack/core/src/main/antlr3/org/usergrid/persistence/query/tree/QueryFilter.g b/stack/core/src/main/antlr3/org/usergrid/persistence/query/tree/QueryFilter.g
deleted file mode 100644
index c566ef9..0000000
--- a/stack/core/src/main/antlr3/org/usergrid/persistence/query/tree/QueryFilter.g
+++ /dev/null
@@ -1,311 +0,0 @@
-grammar QueryFilter;
-//NOTES:  '^' denotes operator, all others in the string become operands
-
-options {
-    output=AST;
-//    ASTLabelType=CommonTree;
-}
-
-@rulecatch { }
-
-
-@header {
-package org.apache.usergrid.persistence.query.tree;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.usergrid.persistence.Query;
-import org.apache.usergrid.persistence.Query.SortPredicate;
-
-}
-
-
-@members {
-	Query query = new Query();
-
-  private static final Logger logger = LoggerFactory
-      .getLogger(QueryFilterLexer.class);
-
-	@Override
-	public void emitErrorMessage(String msg) {
-		logger.info(msg);
-	}
-}
-
-
-@lexer::header {
-package org.apache.usergrid.persistence.query.tree;
-
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.usergrid.persistence.exceptions.QueryTokenException;
-
-}
-
-@lexer::members {
-
-
-
-  private static final Logger logger = LoggerFactory
-      .getLogger(QueryFilterLexer.class);
-
-
-
-
-	@Override
-	public void emitErrorMessage(String msg) {
-		logger.info(msg);
-	}
-
-	@Override
-    public void recover(RecognitionException e) {
-         //We don't want to recover, we want to re-throw to the user since they passed us invalid input
-         throw new QueryTokenException(e);
-    }
-
-
-}
-
-//these must come before ID. Otherwise lt, lte, eq, etc will be returned as id tokens
-LT  : '<' | 'lt';
-
-LTE : '<=' |  'lte';
-
-EQ  : '=' | 'eq';
-
-GT  : '>' | 'gt';
-
-GTE : '>=' |  'gte';  
-
-
-//keywords before var ids
-BOOLEAN : (TRUE|FALSE);
-
-AND : ('A'|'a')('N'|'n')('D'|'d') | '&&';
-
-OR  : ('O'|'o')('R'|'r') | '||' ;
-
-NOT : ('N'|'n')('O'|'o')('T'|'t');
-
-ASC : ('A'|'a')('S'|'s')('C'|'c');
-
-DESC : ('D'|'d')('E'|'e')('S'|'s')('C'|'c');
-
-CONTAINS : ('C'|'c')('O'|'o')('N'|'n')('T'|'t')('A'|'a')('I'|'i')('N'|'n')('S'|'s');
-
-WITHIN : ('W'|'w')('I'|'i')('T'|'t')('H'|'h')('I'|'i')('N'|'n');
-
-OF : ('O'|'o')('F'|'f');
-
-UUID :  HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT
-  HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT '-' 
-  HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT '-' 
-  HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT '-' 
-  HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT '-' 
-  HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT
-  HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT
-  HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT
-  ;
-
-//ids and values
-ID  :	('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'0'..'9'|'_'|'.'|'-')*
-    ;
-
-LONG :	('-')? '0'..'9'+
-    ;
-
-FLOAT
-    :  ('-')? ( ('0'..'9')+ '.' ('0'..'9')* EXPONENT?
-    |   '.' ('0'..'9')+ EXPONENT?
-    |   ('0'..'9')+ EXPONENT)
-    ;
-    
-STRING
-    :  '\'' ( ESC_SEQ | ~('\\'|'\'') )* '\''
-    ;
-
-
-    
-WS : (' ' | '\t' | '\n' | '\r' | '\f')+  {$channel=HIDDEN;};
-
-
-
-    
-
-
-
-fragment TRUE : ('T'|'t')('R'|'r')('U'|'u')('E'|'e');
-
-fragment FALSE : ('F'|'f')('A'|'a')('L'|'l')('S'|'s')('E'|'e');
-
-
-fragment
-EXPONENT : ('e'|'E') ('+'|'-')? ('0'..'9')+ ;
-
-fragment
-HEX_DIGIT : ('0'..'9'|'a'..'f'|'A'..'F') ;
-
-fragment
-ESC_SEQ
-    :   '\\' ('b'|'t'|'n'|'f'|'r'|'\"'|'\''|'\\')
-    |   UNICODE_ESC
-    |   OCTAL_ESC
-    ;
-
-fragment
-OCTAL_ESC
-    :   '\\' ('0'..'3') ('0'..'7') ('0'..'7')
-    |   '\\' ('0'..'7') ('0'..'7')
-    |   '\\' ('0'..'7')
-    ;
-
-fragment
-UNICODE_ESC
-    :   '\\' 'u' HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT
-    ;
-
-
-
-
-//NE : '!=';
-
-
-
-property :	ID<Property>;
-
-containsproperty : ID<ContainsProperty>;
-
-withinproperty : ID<WithinProperty>;
-	
-booleanliteral: BOOLEAN<BooleanLiteral>;
-
-
-longliteral :
-  LONG<LongLiteral> ;
-
-uuidliteral :
-  UUID<UUIDLiteral>;
-
-stringliteral :
-  STRING<StringLiteral>;
-  
-floatliteral :
-  FLOAT<FloatLiteral> ;
-
-//We delegate to each sub class literal so we can get each type	
-value : 
-  booleanliteral
-  | longliteral
-  | uuidliteral
-  | stringliteral
-  | floatliteral
-  ;
-  
-
-
-//Every operand returns with the name of 'op'.  This is used because all subtrees require operands,
-//this allows us to link the java code easily by using the same name as a converntion
-
-//begin search expressions
-  
-//mathmatical equality operations
-equalityop :
-  property LT<LessThan>^ value
-  |property LTE<LessThanEqual>^ value
-  |property EQ<Equal>^ value
-  |property GT<GreaterThan>^ value
-  |property GTE<GreaterThanEqual>^ value
-  ; 
-
-//geo location search
-locationop :
-  withinproperty WITHIN<WithinOperand>^ (floatliteral|longliteral) OF! (floatliteral|longliteral) ','! (floatliteral|longliteral);
-  
-//string search
-containsop :
-  containsproperty CONTAINS<ContainsOperand>^ stringliteral;
-
-//
-operation :
- '('! expression ')'!
-   | equalityop 
-   | locationop 
-   | containsop 
-   ;
-
-//negations of expressions
-notexp :
-//only link if we have the not
- NOT<NotOperand>^ operation  
- |operation 
- ;
-
-//and expressions contain operands.  These should always be closer to the leaves of a tree, it allows
-//for faster result intersection sooner in the query execution
-andexp :
- notexp (AND<AndOperand>^ notexp )*;
- 
- 
-//or expression should always be after AND expressions.  This will give us a smaller result set to union when evaluating trees
-//also a root level expression
-expression :
- andexp (OR<OrOperand>^ andexp )*;
-
-
-
-//end expressions
-
-//begin order clauses
-
-//direction for ordering
-direction  : (ASC | DESC);
-
-//order clause
-order
-  : (property direction?){
-		String property = $property.text; 
-		String direction = $direction.text;
-		query.addSort(new SortPredicate(property, direction));
-    
-  };
-
-//end order clauses
-  
-//Begin select clauses
-
-select_subject
-  : ID {
-
-  query.addSelect($ID.text);
-
-};
-
- 
-
-select_assign
-  : target=ID ':' source=ID {
-
-  query.addSelect($target.text, $source.text);
-
-};
-
-select_expr 
-  : ('*' | select_subject (',' select_subject) * | '{' select_assign (',' select_assign) * '}');  
-   
-//end select clauses
-
-ql returns [Query query]
-  : ('select'! select_expr!)? ('where'!? expression)? ('order by'! order! (','! order!)*)? {
-
-  if($expression.tree instanceof Operand){
-    query.setRootOperand((Operand)$expression.tree);
-  }
-  
-  retval.query = query;
-
-
-};
-
-
-


[58/96] [abbrv] USERGRID-2 package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/utils/UrlUtils.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/utils/UrlUtils.html b/sdks/android/doc/org/usergrid/android/client/utils/UrlUtils.html
index 8ad714d..5291a91 100644
--- a/sdks/android/doc/org/usergrid/android/client/utils/UrlUtils.html
+++ b/sdks/android/doc/org/usergrid/android/client/utils/UrlUtils.html
@@ -55,7 +55,7 @@ function windowTitle()
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.usergrid.android.client.utils"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.apache.usergrid.android.client.utils"><B>PREV CLASS</B></A>&nbsp;
 &nbsp;NEXT CLASS</FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/utils/UrlUtils.html" target="_top"><B>FRAMES</B></A>  &nbsp;
@@ -88,12 +88,12 @@ DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&n
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client.utils</FONT>
+org.apache.usergrid.android.client.utils</FONT>
 <BR>
 Class UrlUtils</H2>
 <PRE>
 java.lang.Object
-  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.usergrid.android.client.utils.UrlUtils</B>
+  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.usergrid.android.client.utils.UrlUtils</B>
 </PRE>
 <HR>
 <DL>
@@ -297,7 +297,7 @@ public static java.lang.String <B>addQueryParams</B>(java.lang.String&nbsp;url,
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.usergrid.android.client.utils"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.apache.usergrid.android.client.utils"><B>PREV CLASS</B></A>&nbsp;
 &nbsp;NEXT CLASS</FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/utils/UrlUtils.html" target="_top"><B>FRAMES</B></A>  &nbsp;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/utils/class-use/DeviceUuidFactory.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/utils/class-use/DeviceUuidFactory.html b/sdks/android/doc/org/usergrid/android/client/utils/class-use/DeviceUuidFactory.html
index 5f85463..3e92925 100644
--- a/sdks/android/doc/org/usergrid/android/client/utils/class-use/DeviceUuidFactory.html
+++ b/sdks/android/doc/org/usergrid/android/client/utils/class-use/DeviceUuidFactory.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Class org.usergrid.android.client.utils.DeviceUuidFactory
+Uses of Class org.apache.usergrid.android.client.utils.DeviceUuidFactory
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Class org.usergrid.android.client.utils.DeviceUuidFactory
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Class org.usergrid.android.client.utils.DeviceUuidFactory";
+        parent.document.title="Uses of Class org.apache.usergrid.android.client.utils.DeviceUuidFactory";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/utils/DeviceUuidFactory.html" title="class in org.usergrid.android.client.utils"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/utils/DeviceUuidFactory.html" title="class in org.apache.usergrid.android.client.utils"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,9 +81,9 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Class<br>org.usergrid.android.client.utils.DeviceUuidFactory</B></H2>
+<B>Uses of Class<br>org.apache.usergrid.android.client.utils.DeviceUuidFactory</B></H2>
 </CENTER>
-No usage of org.usergrid.android.client.utils.DeviceUuidFactory
+No usage of org.apache.usergrid.android.client.utils.DeviceUuidFactory
 <P>
 <HR>
 
@@ -99,7 +99,7 @@ No usage of org.usergrid.android.client.utils.DeviceUuidFactory
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/utils/DeviceUuidFactory.html" title="class in org.usergrid.android.client.utils"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/utils/DeviceUuidFactory.html" title="class in org.apache.usergrid.android.client.utils"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/utils/class-use/JsonUtils.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/utils/class-use/JsonUtils.html b/sdks/android/doc/org/usergrid/android/client/utils/class-use/JsonUtils.html
index fe4cbf8..d3d1c0a 100644
--- a/sdks/android/doc/org/usergrid/android/client/utils/class-use/JsonUtils.html
+++ b/sdks/android/doc/org/usergrid/android/client/utils/class-use/JsonUtils.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Class org.usergrid.android.client.utils.JsonUtils
+Uses of Class org.apache.usergrid.android.client.utils.JsonUtils
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Class org.usergrid.android.client.utils.JsonUtils
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Class org.usergrid.android.client.utils.JsonUtils";
+        parent.document.title="Uses of Class org.apache.usergrid.android.client.utils.JsonUtils";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.usergrid.android.client.utils"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.apache.usergrid.android.client.utils"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,9 +81,9 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Class<br>org.usergrid.android.client.utils.JsonUtils</B></H2>
+<B>Uses of Class<br>org.apache.usergrid.android.client.utils.JsonUtils</B></H2>
 </CENTER>
-No usage of org.usergrid.android.client.utils.JsonUtils
+No usage of org.apache.usergrid.android.client.utils.JsonUtils
 <P>
 <HR>
 
@@ -99,7 +99,7 @@ No usage of org.usergrid.android.client.utils.JsonUtils
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.usergrid.android.client.utils"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.apache.usergrid.android.client.utils"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/utils/class-use/MapUtils.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/utils/class-use/MapUtils.html b/sdks/android/doc/org/usergrid/android/client/utils/class-use/MapUtils.html
index 8fe5aec..b5a94a0 100644
--- a/sdks/android/doc/org/usergrid/android/client/utils/class-use/MapUtils.html
+++ b/sdks/android/doc/org/usergrid/android/client/utils/class-use/MapUtils.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Class org.usergrid.android.client.utils.MapUtils
+Uses of Class org.apache.usergrid.android.client.utils.MapUtils
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Class org.usergrid.android.client.utils.MapUtils
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Class org.usergrid.android.client.utils.MapUtils";
+        parent.document.title="Uses of Class org.apache.usergrid.android.client.utils.MapUtils";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/utils/MapUtils.html" title="class in org.usergrid.android.client.utils"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/utils/MapUtils.html" title="class in org.apache.usergrid.android.client.utils"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,9 +81,9 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Class<br>org.usergrid.android.client.utils.MapUtils</B></H2>
+<B>Uses of Class<br>org.apache.usergrid.android.client.utils.MapUtils</B></H2>
 </CENTER>
-No usage of org.usergrid.android.client.utils.MapUtils
+No usage of org.apache.usergrid.android.client.utils.MapUtils
 <P>
 <HR>
 
@@ -99,7 +99,7 @@ No usage of org.usergrid.android.client.utils.MapUtils
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/utils/MapUtils.html" title="class in org.usergrid.android.client.utils"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/utils/MapUtils.html" title="class in org.apache.usergrid.android.client.utils"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/utils/class-use/ObjectUtils.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/utils/class-use/ObjectUtils.html b/sdks/android/doc/org/usergrid/android/client/utils/class-use/ObjectUtils.html
index 161fca8..2d19ee4 100644
--- a/sdks/android/doc/org/usergrid/android/client/utils/class-use/ObjectUtils.html
+++ b/sdks/android/doc/org/usergrid/android/client/utils/class-use/ObjectUtils.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Class org.usergrid.android.client.utils.ObjectUtils
+Uses of Class org.apache.usergrid.android.client.utils.ObjectUtils
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Class org.usergrid.android.client.utils.ObjectUtils
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Class org.usergrid.android.client.utils.ObjectUtils";
+        parent.document.title="Uses of Class org.apache.usergrid.android.client.utils.ObjectUtils";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.usergrid.android.client.utils"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.apache.usergrid.android.client.utils"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,9 +81,9 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Class<br>org.usergrid.android.client.utils.ObjectUtils</B></H2>
+<B>Uses of Class<br>org.apache.usergrid.android.client.utils.ObjectUtils</B></H2>
 </CENTER>
-No usage of org.usergrid.android.client.utils.ObjectUtils
+No usage of org.apache.usergrid.android.client.utils.ObjectUtils
 <P>
 <HR>
 
@@ -99,7 +99,7 @@ No usage of org.usergrid.android.client.utils.ObjectUtils
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.usergrid.android.client.utils"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.apache.usergrid.android.client.utils"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/utils/class-use/UrlUtils.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/utils/class-use/UrlUtils.html b/sdks/android/doc/org/usergrid/android/client/utils/class-use/UrlUtils.html
index eed0b13..302784e 100644
--- a/sdks/android/doc/org/usergrid/android/client/utils/class-use/UrlUtils.html
+++ b/sdks/android/doc/org/usergrid/android/client/utils/class-use/UrlUtils.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Class org.usergrid.android.client.utils.UrlUtils
+Uses of Class org.apache.usergrid.android.client.utils.UrlUtils
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Class org.usergrid.android.client.utils.UrlUtils
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Class org.usergrid.android.client.utils.UrlUtils";
+        parent.document.title="Uses of Class org.apache.usergrid.android.client.utils.UrlUtils";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/utils/UrlUtils.html" title="class in org.usergrid.android.client.utils"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/utils/UrlUtils.html" title="class in org.apache.usergrid.android.client.utils"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,9 +81,9 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Class<br>org.usergrid.android.client.utils.UrlUtils</B></H2>
+<B>Uses of Class<br>org.apache.usergrid.android.client.utils.UrlUtils</B></H2>
 </CENTER>
-No usage of org.usergrid.android.client.utils.UrlUtils
+No usage of org.apache.usergrid.android.client.utils.UrlUtils
 <P>
 <HR>
 
@@ -99,7 +99,7 @@ No usage of org.usergrid.android.client.utils.UrlUtils
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/utils/UrlUtils.html" title="class in org.usergrid.android.client.utils"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/utils/UrlUtils.html" title="class in org.apache.usergrid.android.client.utils"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/utils/package-frame.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/utils/package-frame.html b/sdks/android/doc/org/usergrid/android/client/utils/package-frame.html
index 2924edf..bbffdf3 100644
--- a/sdks/android/doc/org/usergrid/android/client/utils/package-frame.html
+++ b/sdks/android/doc/org/usergrid/android/client/utils/package-frame.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-org.usergrid.android.client.utils
+org.apache.usergrid.android.client.utils
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -16,22 +16,22 @@ org.usergrid.android.client.utils
 
 <BODY BGCOLOR="white">
 <FONT size="+1" CLASS="FrameTitleFont">
-<A HREF="../../../../../org/usergrid/android/client/utils/package-summary.html" target="classFrame">org.usergrid.android.client.utils</A></FONT>
+<A HREF="../../../../../org/usergrid/android/client/utils/package-summary.html" target="classFrame">org.apache.usergrid.android.client.utils</A></FONT>
 <TABLE BORDER="0" WIDTH="100%" SUMMARY="">
 <TR>
 <TD NOWRAP><FONT size="+1" CLASS="FrameHeadingFont">
 Classes</FONT>&nbsp;
 <FONT CLASS="FrameItemFont">
 <BR>
-<A HREF="DeviceUuidFactory.html" title="class in org.usergrid.android.client.utils" target="classFrame">DeviceUuidFactory</A>
+<A HREF="DeviceUuidFactory.html" title="class in org.apache.usergrid.android.client.utils" target="classFrame">DeviceUuidFactory</A>
 <BR>
-<A HREF="JsonUtils.html" title="class in org.usergrid.android.client.utils" target="classFrame">JsonUtils</A>
+<A HREF="JsonUtils.html" title="class in org.apache.usergrid.android.client.utils" target="classFrame">JsonUtils</A>
 <BR>
-<A HREF="MapUtils.html" title="class in org.usergrid.android.client.utils" target="classFrame">MapUtils</A>
+<A HREF="MapUtils.html" title="class in org.apache.usergrid.android.client.utils" target="classFrame">MapUtils</A>
 <BR>
-<A HREF="ObjectUtils.html" title="class in org.usergrid.android.client.utils" target="classFrame">ObjectUtils</A>
+<A HREF="ObjectUtils.html" title="class in org.apache.usergrid.android.client.utils" target="classFrame">ObjectUtils</A>
 <BR>
-<A HREF="UrlUtils.html" title="class in org.usergrid.android.client.utils" target="classFrame">UrlUtils</A></FONT></TD>
+<A HREF="UrlUtils.html" title="class in org.apache.usergrid.android.client.utils" target="classFrame">UrlUtils</A></FONT></TD>
 </TR>
 </TABLE>
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/utils/package-summary.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/utils/package-summary.html b/sdks/android/doc/org/usergrid/android/client/utils/package-summary.html
index 9954aa1..d9e1fec 100644
--- a/sdks/android/doc/org/usergrid/android/client/utils/package-summary.html
+++ b/sdks/android/doc/org/usergrid/android/client/utils/package-summary.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-org.usergrid.android.client.utils
+org.apache.usergrid.android.client.utils
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ org.usergrid.android.client.utils
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="org.usergrid.android.client.utils";
+        parent.document.title="org.apache.usergrid.android.client.utils";
     }
 }
 </SCRIPT>
@@ -80,7 +80,7 @@ function windowTitle()
 
 <HR>
 <H2>
-Package org.usergrid.android.client.utils
+Package org.apache.usergrid.android.client.utils
 </H2>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
@@ -89,24 +89,24 @@ Package org.usergrid.android.client.utils
 <B>Class Summary</B></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/utils/DeviceUuidFactory.html" title="class in org.usergrid.android.client.utils">DeviceUuidFactory</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/utils/DeviceUuidFactory.html" title="class in org.apache.usergrid.android.client.utils">DeviceUuidFactory</A></B></TD>
 <TD>Tries to get the device ID as a UUID and fallsback to a generated UUID value
  if it doesn't work.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.usergrid.android.client.utils">JsonUtils</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.apache.usergrid.android.client.utils">JsonUtils</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/utils/MapUtils.html" title="class in org.usergrid.android.client.utils">MapUtils</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/utils/MapUtils.html" title="class in org.apache.usergrid.android.client.utils">MapUtils</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.usergrid.android.client.utils">ObjectUtils</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.apache.usergrid.android.client.utils">ObjectUtils</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/utils/UrlUtils.html" title="class in org.usergrid.android.client.utils">UrlUtils</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/utils/UrlUtils.html" title="class in org.apache.usergrid.android.client.utils">UrlUtils</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 </TABLE>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/utils/package-tree.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/utils/package-tree.html b/sdks/android/doc/org/usergrid/android/client/utils/package-tree.html
index 487313a..cbb1863 100644
--- a/sdks/android/doc/org/usergrid/android/client/utils/package-tree.html
+++ b/sdks/android/doc/org/usergrid/android/client/utils/package-tree.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-org.usergrid.android.client.utils Class Hierarchy
+org.apache.usergrid.android.client.utils Class Hierarchy
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ org.usergrid.android.client.utils Class Hierarchy
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="org.usergrid.android.client.utils Class Hierarchy";
+        parent.document.title="org.apache.usergrid.android.client.utils Class Hierarchy";
     }
 }
 </SCRIPT>
@@ -81,7 +81,7 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-Hierarchy For Package org.usergrid.android.client.utils
+Hierarchy For Package org.apache.usergrid.android.client.utils
 </H2>
 </CENTER>
 <DL>
@@ -92,7 +92,7 @@ Class Hierarchy
 </H2>
 <UL>
 <LI TYPE="circle">java.lang.Object<UL>
-<LI TYPE="circle">org.usergrid.android.client.utils.<A HREF="../../../../../org/usergrid/android/client/utils/DeviceUuidFactory.html" title="class in org.usergrid.android.client.utils"><B>DeviceUuidFactory</B></A><LI TYPE="circle">org.usergrid.android.client.utils.<A HREF="../../../../../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.usergrid.android.client.utils"><B>JsonUtils</B></A><LI TYPE="circle">org.usergrid.android.client.utils.<A HREF="../../../../../org/usergrid/android/client/utils/MapUtils.html" title="class in org.usergrid.android.client.utils"><B>MapUtils</B></A><LI TYPE="circle">org.usergrid.android.client.utils.<A HREF="../../../../../org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.usergrid.android.client.utils"><B>ObjectUtils</B></A><LI TYPE="circle">org.usergrid.android.client.utils.<A HREF="../../../../../org/usergrid/android/client/utils/UrlUtils.html" title="class in org.usergrid.android.client.utils"><B>UrlUtils</B>
 </A></UL>
+<LI TYPE="circle">org.apache.usergrid.android.client.utils.<A HREF="../../../../../org/usergrid/android/client/utils/DeviceUuidFactory.html" title="class in org.apache.usergrid.android.client.utils"><B>DeviceUuidFactory</B></A><LI TYPE="circle">org.apache.usergrid.android.client.utils.<A HREF="../../../../../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.apache.usergrid.android.client.utils"><B>JsonUtils</B></A><LI TYPE="circle">org.apache.usergrid.android.client.utils.<A HREF="../../../../../org/usergrid/android/client/utils/MapUtils.html" title="class in org.apache.usergrid.android.client.utils"><B>MapUtils</B></A><LI TYPE="circle">org.apache.usergrid.android.client.utils.<A HREF="../../../../../org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.apache.usergrid.android.client.utils"><B>ObjectUtils</B></A><LI TYPE="circle">org.apache.usergrid.android.client.utils.<A HREF="../../../../../org/usergrid/android/client/utils/UrlUtils.html" tit
 le="class in org.apache.usergrid.android.client.utils"><B>UrlUtils</B></A></UL>
 </UL>
 <HR>
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/utils/package-use.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/utils/package-use.html b/sdks/android/doc/org/usergrid/android/client/utils/package-use.html
index bb730c9..4627ccb 100644
--- a/sdks/android/doc/org/usergrid/android/client/utils/package-use.html
+++ b/sdks/android/doc/org/usergrid/android/client/utils/package-use.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Package org.usergrid.android.client.utils
+Uses of Package org.apache.usergrid.android.client.utils
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Package org.usergrid.android.client.utils
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Package org.usergrid.android.client.utils";
+        parent.document.title="Uses of Package org.apache.usergrid.android.client.utils";
     }
 }
 </SCRIPT>
@@ -81,9 +81,9 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Package<br>org.usergrid.android.client.utils</B></H2>
+<B>Uses of Package<br>org.apache.usergrid.android.client.utils</B></H2>
 </CENTER>
-No usage of org.usergrid.android.client.utils
+No usage of org.apache.usergrid.android.client.utils
 <P>
 <HR>
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/overview-frame.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/overview-frame.html b/sdks/android/doc/overview-frame.html
index 6d87b2d..95171aa 100644
--- a/sdks/android/doc/overview-frame.html
+++ b/sdks/android/doc/overview-frame.html
@@ -30,15 +30,15 @@ Overview List
 <FONT size="+1" CLASS="FrameHeadingFont">
 Packages</FONT>
 <BR>
-<FONT CLASS="FrameItemFont"><A HREF="org/usergrid/android/client/package-frame.html" target="packageFrame">org.usergrid.android.client</A></FONT>
+<FONT CLASS="FrameItemFont"><A HREF="org/usergrid/android/client/package-frame.html" target="packageFrame">org.apache.usergrid.android.client</A></FONT>
 <BR>
-<FONT CLASS="FrameItemFont"><A HREF="org/usergrid/android/client/callbacks/package-frame.html" target="packageFrame">org.usergrid.android.client.callbacks</A></FONT>
+<FONT CLASS="FrameItemFont"><A HREF="org/usergrid/android/client/callbacks/package-frame.html" target="packageFrame">org.apache.usergrid.android.client.callbacks</A></FONT>
 <BR>
-<FONT CLASS="FrameItemFont"><A HREF="org/usergrid/android/client/entities/package-frame.html" target="packageFrame">org.usergrid.android.client.entities</A></FONT>
+<FONT CLASS="FrameItemFont"><A HREF="org/usergrid/android/client/entities/package-frame.html" target="packageFrame">org.apache.usergrid.android.client.entities</A></FONT>
 <BR>
-<FONT CLASS="FrameItemFont"><A HREF="org/usergrid/android/client/response/package-frame.html" target="packageFrame">org.usergrid.android.client.response</A></FONT>
+<FONT CLASS="FrameItemFont"><A HREF="org/usergrid/android/client/response/package-frame.html" target="packageFrame">org.apache.usergrid.android.client.response</A></FONT>
 <BR>
-<FONT CLASS="FrameItemFont"><A HREF="org/usergrid/android/client/utils/package-frame.html" target="packageFrame">org.usergrid.android.client.utils</A></FONT>
+<FONT CLASS="FrameItemFont"><A HREF="org/usergrid/android/client/utils/package-frame.html" target="packageFrame">org.apache.usergrid.android.client.utils</A></FONT>
 <BR>
 </TD>
 </TR>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/overview-summary.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/overview-summary.html b/sdks/android/doc/overview-summary.html
index f45beca..fea6208 100644
--- a/sdks/android/doc/overview-summary.html
+++ b/sdks/android/doc/overview-summary.html
@@ -86,23 +86,23 @@ function windowTitle()
 <B>Packages</B></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="20%"><B><A HREF="org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A></B></TD>
+<TD WIDTH="20%"><B><A HREF="org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="20%"><B><A HREF="org/usergrid/android/client/callbacks/package-summary.html">org.usergrid.android.client.callbacks</A></B></TD>
+<TD WIDTH="20%"><B><A HREF="org/usergrid/android/client/callbacks/package-summary.html">org.apache.usergrid.android.client.callbacks</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="20%"><B><A HREF="org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A></B></TD>
+<TD WIDTH="20%"><B><A HREF="org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="20%"><B><A HREF="org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A></B></TD>
+<TD WIDTH="20%"><B><A HREF="org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="20%"><B><A HREF="org/usergrid/android/client/utils/package-summary.html">org.usergrid.android.client.utils</A></B></TD>
+<TD WIDTH="20%"><B><A HREF="org/usergrid/android/client/utils/package-summary.html">org.apache.usergrid.android.client.utils</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 </TABLE>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/overview-tree.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/overview-tree.html b/sdks/android/doc/overview-tree.html
index ca637d6..2df8305 100644
--- a/sdks/android/doc/overview-tree.html
+++ b/sdks/android/doc/overview-tree.html
@@ -84,25 +84,25 @@ function windowTitle()
 Hierarchy For All Packages</H2>
 </CENTER>
 <DL>
-<DT><B>Package Hierarchies:</B><DD><A HREF="org/usergrid/android/client/package-tree.html">org.usergrid.android.client</A>, <A HREF="org/usergrid/android/client/callbacks/package-tree.html">org.usergrid.android.client.callbacks</A>, <A HREF="org/usergrid/android/client/entities/package-tree.html">org.usergrid.android.client.entities</A>, <A HREF="org/usergrid/android/client/response/package-tree.html">org.usergrid.android.client.response</A>, <A HREF="org/usergrid/android/client/utils/package-tree.html">org.usergrid.android.client.utils</A></DL>
+<DT><B>Package Hierarchies:</B><DD><A HREF="org/usergrid/android/client/package-tree.html">org.apache.usergrid.android.client</A>, <A HREF="org/usergrid/android/client/callbacks/package-tree.html">org.apache.usergrid.android.client.callbacks</A>, <A HREF="org/usergrid/android/client/entities/package-tree.html">org.apache.usergrid.android.client.entities</A>, <A HREF="org/usergrid/android/client/response/package-tree.html">org.apache.usergrid.android.client.response</A>, <A HREF="org/usergrid/android/client/utils/package-tree.html">org.apache.usergrid.android.client.utils</A></DL>
 <HR>
 <H2>
 Class Hierarchy
 </H2>
 <UL>
 <LI TYPE="circle">java.lang.Object<UL>
-<LI TYPE="circle">org.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.usergrid.android.client.entities"><B>Activity.ActivityCollection</B></A><LI TYPE="circle">org.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities"><B>Activity.ActivityObject</B></A><LI TYPE="circle">org.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities"><B>Activity.MediaLink</B></A><LI TYPE="circle">org.usergrid.android.client.response.<A HREF="org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response"><B>AggregateCounter</B></A><LI TYPE="circle">org.usergrid.android.client.response.<A HREF="org/usergrid/android/client/response/AggregateCounterSet.html" title="cla
 ss in org.usergrid.android.client.response"><B>AggregateCounterSet</B></A><LI TYPE="circle">org.usergrid.android.client.response.<A HREF="org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response"><B>ApiResponse</B></A><LI TYPE="circle">android.os.AsyncTask&lt;Params,Progress,Result&gt;<UL>
-<LI TYPE="circle">org.usergrid.android.client.callbacks.<A HREF="org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.usergrid.android.client.callbacks"><B>ClientAsyncTask</B></A>&lt;T&gt;</UL>
-<LI TYPE="circle">org.usergrid.android.client.<A HREF="org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client"><B>Client</B></A><LI TYPE="circle">org.usergrid.android.client.response.<A HREF="org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response"><B>ClientCredentialsInfo</B></A><LI TYPE="circle">org.usergrid.android.client.utils.<A HREF="org/usergrid/android/client/utils/DeviceUuidFactory.html" title="class in org.usergrid.android.client.utils"><B>DeviceUuidFactory</B></A><LI TYPE="circle">org.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities"><B>Entity</B></A><UL>
-<LI TYPE="circle">org.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities"><B>Activity</B></A><LI TYPE="circle">org.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities"><B>Device</B></A><LI TYPE="circle">org.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities"><B>Group</B></A><LI TYPE="circle">org.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities"><B>Message</B></A><LI TYPE="circle">org.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities"><B>User</B></A></UL>
-<LI TYPE="circle">org.usergrid.android.client.utils.<A HREF="org/usergrid/android/client/utils/JsonUtils.html" title="class in org.usergrid.android.client.utils"><B>JsonUtils</B></A><LI TYPE="circle">org.usergrid.android.client.utils.<A HREF="org/usergrid/android/client/utils/MapUtils.html" title="class in org.usergrid.android.client.utils"><B>MapUtils</B></A><LI TYPE="circle">org.usergrid.android.client.utils.<A HREF="org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.usergrid.android.client.utils"><B>ObjectUtils</B></A><LI TYPE="circle">org.usergrid.android.client.response.<A HREF="org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response"><B>QueueInfo</B></A><LI TYPE="circle">org.usergrid.android.client.utils.<A HREF="org/usergrid/android/client/utils/UrlUtils.html" title="class in org.usergrid.android.client.utils"><B>UrlUtils</B></A></UL>
+<LI TYPE="circle">org.apache.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.apache.usergrid.android.client.entities"><B>Activity.ActivityCollection</B></A><LI TYPE="circle">org.apache.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities"><B>Activity.ActivityObject</B></A><LI TYPE="circle">org.apache.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities"><B>Activity.MediaLink</B></A><LI TYPE="circle">org.apache.usergrid.android.client.response.<A HREF="org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response"><B>AggregateCounter</B></A><LI TYPE="circle">org.apache.usergrid.android.client.response.<A HREF="org/usergr
 id/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response"><B>AggregateCounterSet</B></A><LI TYPE="circle">org.apache.usergrid.android.client.response.<A HREF="org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response"><B>ApiResponse</B></A><LI TYPE="circle">android.os.AsyncTask&lt;Params,Progress,Result&gt;<UL>
+<LI TYPE="circle">org.apache.usergrid.android.client.callbacks.<A HREF="org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.apache.usergrid.android.client.callbacks"><B>ClientAsyncTask</B></A>&lt;T&gt;</UL>
+<LI TYPE="circle">org.apache.usergrid.android.client.<A HREF="org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client"><B>Client</B></A><LI TYPE="circle">org.apache.usergrid.android.client.response.<A HREF="org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response"><B>ClientCredentialsInfo</B></A><LI TYPE="circle">org.apache.usergrid.android.client.utils.<A HREF="org/usergrid/android/client/utils/DeviceUuidFactory.html" title="class in org.apache.usergrid.android.client.utils"><B>DeviceUuidFactory</B></A><LI TYPE="circle">org.apache.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities"><B>Entity</B></A><UL>
+<LI TYPE="circle">org.apache.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities"><B>Activity</B></A><LI TYPE="circle">org.apache.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities"><B>Device</B></A><LI TYPE="circle">org.apache.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities"><B>Group</B></A><LI TYPE="circle">org.apache.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities"><B>Message</B></A><LI TYPE="circle">org.apache.usergrid.android.client.entities.<A HREF="org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities"><B>User</B></A></
 UL>
+<LI TYPE="circle">org.apache.usergrid.android.client.utils.<A HREF="org/usergrid/android/client/utils/JsonUtils.html" title="class in org.apache.usergrid.android.client.utils"><B>JsonUtils</B></A><LI TYPE="circle">org.apache.usergrid.android.client.utils.<A HREF="org/usergrid/android/client/utils/MapUtils.html" title="class in org.apache.usergrid.android.client.utils"><B>MapUtils</B></A><LI TYPE="circle">org.apache.usergrid.android.client.utils.<A HREF="org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.apache.usergrid.android.client.utils"><B>ObjectUtils</B></A><LI TYPE="circle">org.apache.usergrid.android.client.response.<A HREF="org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response"><B>QueueInfo</B></A><LI TYPE="circle">org.apache.usergrid.android.client.utils.<A HREF="org/usergrid/android/client/utils/UrlUtils.html" title="class in org.apache.usergrid.android.client.utils"><B>UrlUtils</B></A></UL>
 </UL>
 <H2>
 Interface Hierarchy
 </H2>
 <UL>
-<LI TYPE="circle">org.usergrid.android.client.<A HREF="org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client"><B>Client.Query</B></A><LI TYPE="circle">org.usergrid.android.client.callbacks.<A HREF="org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>ClientCallback</B></A>&lt;T&gt;<UL>
-<LI TYPE="circle">org.usergrid.android.client.callbacks.<A HREF="org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>ApiResponseCallback</B></A><LI TYPE="circle">org.usergrid.android.client.callbacks.<A HREF="org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>DeviceRegistrationCallback</B></A><LI TYPE="circle">org.usergrid.android.client.callbacks.<A HREF="org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>GroupsRetrievedCallback</B></A><LI TYPE="circle">org.usergrid.android.client.callbacks.<A HREF="org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>QueryResultsCallback</B></A></UL>
+<LI TYPE="circle">org.apache.usergrid.android.client.<A HREF="org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client"><B>Client.Query</B></A><LI TYPE="circle">org.apache.usergrid.android.client.callbacks.<A HREF="org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>ClientCallback</B></A>&lt;T&gt;<UL>
+<LI TYPE="circle">org.apache.usergrid.android.client.callbacks.<A HREF="org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>ApiResponseCallback</B></A><LI TYPE="circle">org.apache.usergrid.android.client.callbacks.<A HREF="org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>DeviceRegistrationCallback</B></A><LI TYPE="circle">org.apache.usergrid.android.client.callbacks.<A HREF="org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>GroupsRetrievedCallback</B></A><LI TYPE="circle">org.apache.usergrid.android.client.callbacks.<A HREF="org/usergrid/android/client/callbacks/QueryResultsCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>QueryResultsCallback</B></A></UL>
 </UL>
 <H2>
 Enum Hierarchy
@@ -111,7 +111,7 @@ Enum Hierarchy
 <LI TYPE="circle">java.lang.Object<UL>
 <LI TYPE="circle">java.lang.Enum&lt;E&gt; (implements java.lang.Comparable&lt;T&gt;, java.io.Serializable)
 <UL>
-<LI TYPE="circle">org.usergrid.android.client.<A HREF="org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client"><B>Client.QueuePosition</B></A></UL>
+<LI TYPE="circle">org.apache.usergrid.android.client.<A HREF="org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client"><B>Client.QueuePosition</B></A></UL>
 </UL>
 </UL>
 <HR>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/package-list
----------------------------------------------------------------------
diff --git a/sdks/android/doc/package-list b/sdks/android/doc/package-list
index eb07ee9..0860ea0 100644
--- a/sdks/android/doc/package-list
+++ b/sdks/android/doc/package-list
@@ -1,5 +1,5 @@
-org.usergrid.android.client
-org.usergrid.android.client.callbacks
-org.usergrid.android.client.entities
-org.usergrid.android.client.response
-org.usergrid.android.client.utils
+org.apache.usergrid.android.client
+org.apache.usergrid.android.client.callbacks
+org.apache.usergrid.android.client.entities
+org.apache.usergrid.android.client.response
+org.apache.usergrid.android.client.utils

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/pom.xml
----------------------------------------------------------------------
diff --git a/sdks/android/pom.xml b/sdks/android/pom.xml
index fd23c10..9cfb996 100644
--- a/sdks/android/pom.xml
+++ b/sdks/android/pom.xml
@@ -12,13 +12,13 @@
 	</parent>
 	
 	<modelVersion>4.0.0</modelVersion>
-	<groupId>org.usergrid</groupId>
+	<groupId>org.apache.usergrid</groupId>
 	<artifactId>usergrid-android-client</artifactId>
 	<version>0.0.7-SNAPSHOT</version>
 	
 	<packaging>jar</packaging>
-	<description>A simple java client for usergrid</description>
-	<url>https://github.com/apigee/usergrid-stack-internal</url>
+	<description>A simple android client for Apache Usergrid</description>
+	<url>https://github.com/usergrid/usergrid</url>
 	
 	<licenses>
 		<license>
@@ -42,11 +42,6 @@
 			<name>Scott Ganyo</name>
 		</developer>
 	</developers>
-	<scm>
-		<connection>scm:git:git@github.com:apigee/usergrid-android-sdk.git</connection>
-		<developerConnection>scm:git:git@github.com:apigee/usergrid-android-sdk.git</developerConnection>
-		<url>git@github.com:apigee/usergrid-android-sdk.git</url>
-	</scm>
 	
 	<dependencies>
 		<dependency>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/src/main/java/org/apache/usergrid/android/client/Client.java
----------------------------------------------------------------------
diff --git a/sdks/android/src/main/java/org/apache/usergrid/android/client/Client.java b/sdks/android/src/main/java/org/apache/usergrid/android/client/Client.java
new file mode 100644
index 0000000..fb30277
--- /dev/null
+++ b/sdks/android/src/main/java/org/apache/usergrid/android/client/Client.java
@@ -0,0 +1,591 @@
+package org.apache.usergrid.android.client;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.apache.usergrid.android.client.callbacks.ApiResponseCallback;
+import org.apache.usergrid.android.client.callbacks.ClientAsyncTask;
+import org.apache.usergrid.android.client.callbacks.DeviceRegistrationCallback;
+import org.apache.usergrid.android.client.callbacks.GroupsRetrievedCallback;
+import org.apache.usergrid.android.client.callbacks.QueryResultsCallback;
+import org.apache.usergrid.android.client.utils.DeviceUuidFactory;
+import org.springframework.http.HttpMethod;
+import org.springframework.web.client.RestTemplate;
+import org.usergrid.java.client.entities.Device;
+import org.usergrid.java.client.entities.Entity;
+import org.usergrid.java.client.entities.Group;
+import org.usergrid.java.client.entities.User;
+import org.usergrid.java.client.response.ApiResponse;
+
+import android.content.Context;
+import android.location.Location;
+
+/**
+ * The Client class for accessing the Usergrid API. Start by instantiating this
+ * class though the appropriate constructor.
+ * 
+ */
+public class Client extends org.usergrid.java.client.Client {
+
+	private static final String TAG = "UsergridClient";
+
+	public static boolean FORCE_PUBLIC_API = false;
+
+	// Public API
+	public static String PUBLIC_API_URL = "http://api.usergrid.com";
+
+	// Local API of standalone server
+	public static String LOCAL_STANDALONE_API_URL = "http://localhost:8080";
+
+	// Local API of Tomcat server in Eclipse
+	public static String LOCAL_TOMCAT_API_URL = "http://localhost:8080/ROOT";
+
+	// Local API
+	public static String LOCAL_API_URL = LOCAL_STANDALONE_API_URL;
+
+	
+	static RestTemplate restTemplate = new RestTemplate(true);
+
+	/**
+	 * Default constructor for instantiating a client.
+	 */
+	public Client() {
+		init();
+	}
+
+	/**
+	 * Instantiate client for a specific app
+	 * 
+	 * @param applicationId
+	 *            the application id or name
+	 */
+	public Client(String organizationId, String applicationId) {
+		super(organizationId, applicationId);
+	}
+
+
+	/**
+	 * Log the user in and get a valid access token. Executes asynchronously in
+	 * background and the callbacks are called in the UI thread.
+	 * 
+	 * @param email
+	 * @param password
+	 * @param callback
+	 */
+	public void authorizeAppUserAsync(final String email,
+			final String password, final ApiResponseCallback callback) {
+		(new ClientAsyncTask<ApiResponse>(callback) {
+			@Override
+			public ApiResponse doTask() {
+				return authorizeAppUser(email, password);
+			}
+		}).execute();
+	}
+
+	
+
+	/**
+	 * Log the user in with their numeric pin-code and get a valid access token.
+	 * Executes asynchronously in background and the callbacks are called in the
+	 * UI thread.
+	 * 
+	 * @param email
+	 * @param pin
+	 * @param callback
+	 */
+	public void authorizeAppUserViaPinAsync(final String email,
+			final String pin, final ApiResponseCallback callback) {
+		(new ClientAsyncTask<ApiResponse>(callback) {
+			@Override
+			public ApiResponse doTask() {
+				return authorizeAppUserViaPin(email, pin);
+			}
+		}).execute();
+	}
+
+
+	/**
+	 * Log the user in with their numeric pin-code and get a valid access token.
+	 * Executes asynchronously in background and the callbacks are called in the
+	 * UI thread.
+	 * 
+	 * @param email
+	 * @param pin
+	 * @param callback
+	 */
+	public void authorizeAppUserViaFacebookAsync(final String fb_access_token,
+			final ApiResponseCallback callback) {
+		(new ClientAsyncTask<ApiResponse>(callback) {
+			@Override
+			public ApiResponse doTask() {
+				return authorizeAppUserViaFacebook(fb_access_token);
+			}
+		}).execute();
+	}
+
+	
+
+	/**
+	 * Log the app in with it's client id and client secret key. Not recommended
+	 * for production apps. Executes asynchronously in background and the
+	 * callbacks are called in the UI thread.
+	 * 
+	 * @param clientId
+	 * @param clientSecret
+	 * @param callback
+	 */
+	public void authorizeAppClientAsync(final String clientId,
+			final String clientSecret, final ApiResponseCallback callback) {
+		(new ClientAsyncTask<ApiResponse>(callback) {
+
+			@Override
+			public ApiResponse doTask() {
+				return authorizeAppClient(clientId, clientSecret);
+			}
+		}).execute();
+	}
+
+	
+	/**
+	 * Registers a device using the device's unique device ID. Executes
+	 * asynchronously in background and the callbacks are called in the UI
+	 * thread.
+	 * 
+	 * @param context
+	 * @param properties
+	 * @param callback
+	 */
+	public void registerDeviceAsync(final Context context,
+			final Map<String, Object> properties,
+			final DeviceRegistrationCallback callback) {
+		(new ClientAsyncTask<Device>(callback) {
+			@Override
+			public Device doTask() {
+			    UUID deviceId = new DeviceUuidFactory(context).getDeviceUuid();
+		        
+				return registerDevice(deviceId, properties);
+			}
+		}).execute();
+	}
+
+
+  /**
+   * Registers a device using the device's unique device ID. Executes
+   * asynchronously in background and the callbacks are called in the UI
+   * thread.
+   *
+   * @param context
+   * @param properties
+   * @param callback
+   */
+  public void registerDeviceForPushAsync(final Context context,
+                                         final String notifier,
+                                         final String token,
+                                         final Map<String, Object> properties,
+                                         final DeviceRegistrationCallback callback) {
+    (new ClientAsyncTask<Device>(callback) {
+      @Override
+      public Device doTask() {
+        UUID deviceId = new DeviceUuidFactory(context).getDeviceUuid();
+
+        return registerDeviceForPush(deviceId, notifier, token, properties);
+      }
+    }).execute();
+  }
+
+
+  /**
+	 * Create a new entity on the server. Executes asynchronously in background
+	 * and the callbacks are called in the UI thread.
+	 * 
+	 * @param entity
+	 * @param callback
+	 */
+	public void createEntityAsync(final Entity entity,
+			final ApiResponseCallback callback) {
+		(new ClientAsyncTask<ApiResponse>(callback) {
+			@Override
+			public ApiResponse doTask() {
+				return createEntity(entity);
+			}
+		}).execute();
+	}
+
+	
+	/**
+	 * Create a new entity on the server from a set of properties. Properties
+	 * must include a "type" property. Executes asynchronously in background and
+	 * the callbacks are called in the UI thread.
+	 * 
+	 * @param properties
+	 * @param callback
+	 */
+	public void createEntityAsync(final Map<String, Object> properties,
+			final ApiResponseCallback callback) {
+		(new ClientAsyncTask<ApiResponse>(callback) {
+			@Override
+			public ApiResponse doTask() {
+				return createEntity(properties);
+			}
+		}).execute();
+	}
+
+
+	/**
+	 * Creates a user. Executes asynchronously in background and the callbacks
+	 * are called in the UI thread.
+	 * 
+	 * @param username
+	 * @param name
+	 * @param email
+	 * @param password
+	 * @param callback
+	 */
+	public void createUserAsync(final String username, final String name,
+			final String email, final String password,
+			final ApiResponseCallback callback) {
+		(new ClientAsyncTask<ApiResponse>(callback) {
+			@Override
+			public ApiResponse doTask() {
+				return createUser(username, name, email, password);
+			}
+		}).execute();
+	}
+
+
+
+	/**
+	 * Get the groups for the user. Executes asynchronously in background and
+	 * the callbacks are called in the UI thread.
+	 * 
+	 * @param userId
+	 * @param callback
+	 */
+	public void getGroupsForUserAsync(final String userId,
+			final GroupsRetrievedCallback callback) {
+		(new ClientAsyncTask<Map<String, Group>>(callback) {
+			@Override
+			public Map<String, Group> doTask() {
+				return getGroupsForUser(userId);
+			}
+		}).execute();
+	}
+
+	/**
+	 * Get a user's activity feed. Returned as a query to ease paging. Executes
+	 * asynchronously in background and the callbacks are called in the UI
+	 * thread.
+	 * 
+	 * 
+	 * @param userId
+	 * @param callback
+	 */
+	public void queryActivityFeedForUserAsync(final String userId, final QueryResultsCallback callback) {
+		(new ClientAsyncTask<Query>(callback) {
+			@Override
+			public Query doTask() {
+				return queryActivityFeedForUser(userId);
+			}
+		}).execute();
+	}
+
+	
+	/**
+	 * Creates and posts an activity to a user. Executes asynchronously in
+	 * background and the callbacks are called in the UI thread.
+	 * 
+	 * @param verb
+	 * @param title
+	 * @param content
+	 * @param category
+	 * @param user
+	 * @param object
+	 * @param objectType
+	 * @param objectName
+	 * @param objectContent
+	 * @param callback
+	 */
+	public void postUserActivityAsync(final String verb, final String title,
+			final String content, final String category, final User user,
+			final Entity object, final String objectType,
+			final String objectName, final String objectContent,
+			final ApiResponseCallback callback) {
+		(new ClientAsyncTask<ApiResponse>(callback) {
+			@Override
+			public ApiResponse doTask() {
+				return postUserActivity(verb, title, content, category, user,
+						object, objectType, objectName, objectContent);
+			}
+		}).execute();
+	}
+
+	
+	/**
+	 * Creates and posts an activity to a group. Executes asynchronously in
+	 * background and the callbacks are called in the UI thread.
+	 * 
+	 * @param groupId
+	 * @param verb
+	 * @param title
+	 * @param content
+	 * @param category
+	 * @param user
+	 * @param object
+	 * @param objectType
+	 * @param objectName
+	 * @param objectContent
+	 * @param callback
+	 */
+	public void postGroupActivityAsync(final String groupId, final String verb, final String title,
+			final String content, final String category, final User user,
+			final Entity object, final String objectType,
+			final String objectName, final String objectContent,
+			final ApiResponseCallback callback) {
+		(new ClientAsyncTask<ApiResponse>(callback) {
+			@Override
+			public ApiResponse doTask() {
+				return postGroupActivity(groupId, verb, title, content, category, user,
+						object, objectType, objectName, objectContent);
+			}
+		}).execute();
+	}
+
+
+	/**
+	 * Get a group's activity feed. Returned as a query to ease paging. Executes
+	 * asynchronously in background and the callbacks are called in the UI
+	 * thread.
+	 * 
+	 * 
+	 * @param userId
+	 * @param callback
+	 */
+	public void queryActivityFeedForGroupAsync(final String groupId,
+			final QueryResultsCallback callback) {
+		(new ClientAsyncTask<Query>(callback) {
+			@Override
+			public Query doTask() {
+				return queryActivityFeedForGroup(groupId);
+			}
+		}).execute();
+	}
+
+
+	/**
+	 * Perform a query request and return a query object. The Query object
+	 * provides a simple way of dealing with result sets that need to be
+	 * iterated or paged through. Executes asynchronously in background and the
+	 * callbacks are called in the UI thread.
+	 * 
+	 * @param callback
+	 * @param method
+	 * @param params
+	 * @param data
+	 * @param segments
+	 */
+	public void queryEntitiesRequestAsync(final QueryResultsCallback callback,
+			final HttpMethod method, final Map<String, Object> params,
+			final Object data, final String... segments) {
+		(new ClientAsyncTask<Query>(callback) {
+			@Override
+			public Query doTask() {
+				return queryEntitiesRequest(method, params, data, segments);
+			}
+		}).execute();
+	}
+
+
+	/**
+	 * Perform a query of the users collection. Executes asynchronously in
+	 * background and the callbacks are called in the UI thread.
+	 * 
+	 * @param callback
+	 */
+	public void queryUsersAsync(QueryResultsCallback callback) {
+		queryEntitiesRequestAsync(callback, HttpMethod.GET, null, null,
+				getApplicationId(), "users");
+	}
+
+	/**
+	 * Perform a query of the users collection using the provided query command.
+	 * For example: "name contains 'ed'". Executes asynchronously in background
+	 * and the callbacks are called in the UI thread.
+	 * 
+	 * @param ql
+	 * @param callback
+	 */
+	public void queryUsersAsync(String ql, QueryResultsCallback callback) {
+		Map<String, Object> params = new HashMap<String, Object>();
+		params.put("ql", ql);
+		queryEntitiesRequestAsync(callback, HttpMethod.GET, params, null,
+				getApplicationId(), "users");
+	}
+
+	
+	/**
+	 * Queries the users for the specified group. Executes asynchronously in
+	 * background and the callbacks are called in the UI thread.
+	 * 
+	 * @param groupId
+	 * @param callback
+	 */
+	public void queryUsersForGroupAsync(String groupId,
+			QueryResultsCallback callback) {
+		queryEntitiesRequestAsync(callback, HttpMethod.GET, null, null,
+				getApplicationId(), "groups", groupId, "users");
+	}
+
+	/**
+	 * Adds a user to the specified groups. Executes asynchronously in
+	 * background and the callbacks are called in the UI thread.
+	 * 
+	 * @param userId
+	 * @param groupId
+	 * @param callback
+	 */
+	public void addUserToGroupAsync(final String userId, final String groupId,
+			final ApiResponseCallback callback) {
+		(new ClientAsyncTask<ApiResponse>(callback) {
+			@Override
+			public ApiResponse doTask() {
+				return addUserToGroup(userId, groupId);
+			}
+		}).execute();
+	}
+
+
+	/**
+	 * Creates a group with the specified group path. Group paths can be slash
+	 * ("/") delimited like file paths for hierarchical group relationships.
+	 * Executes asynchronously in background and the callbacks are called in the
+	 * UI thread.
+	 * 
+	 * @param groupPath
+	 * @param callback
+	 */
+	public void createGroupAsync(String groupPath,
+			final ApiResponseCallback callback) {
+		createGroupAsync(groupPath, null);
+	}
+
+	
+
+	/**
+	 * Creates a group with the specified group path and group title. Group
+	 * paths can be slash ("/") deliminted like file paths for hierarchical
+	 * group relationships. Executes asynchronously in background and the
+	 * callbacks are called in the UI thread.
+	 * 
+	 * @param groupPath
+	 * @param groupTitle
+	 * @param callback
+	 */
+	public void createGroupAsync(final String groupPath,
+			final String groupTitle, final ApiResponseCallback callback) {
+		(new ClientAsyncTask<ApiResponse>(callback) {
+			@Override
+			public ApiResponse doTask() {
+				return createGroup(groupPath, groupTitle);
+			}
+		}).execute();
+	}
+
+	
+	/**
+	 * Connect two entities together. Executes asynchronously in background and
+	 * the callbacks are called in the UI thread.
+	 * 
+	 * @param connectingEntityType
+	 * @param connectingEntityId
+	 * @param connectionType
+	 * @param connectedEntityId
+	 * @param callback
+	 */
+	public void connectEntitiesAsync(final String connectingEntityType,
+			final String connectingEntityId, final String connectionType,
+			final String connectedEntityId, final ApiResponseCallback callback) {
+		(new ClientAsyncTask<ApiResponse>(callback) {
+			@Override
+			public ApiResponse doTask() {
+				return connectEntities(connectingEntityType,
+						connectingEntityId, connectionType, connectedEntityId);
+			}
+		}).execute();
+	}
+
+
+
+	/**
+	 * Disconnect two entities. Executes asynchronously in background and the
+	 * callbacks are called in the UI thread.
+	 * 
+	 * @param connectingEntityType
+	 * @param connectingEntityId
+	 * @param connectionType
+	 * @param connectedEntityId
+	 * @param callback
+	 */
+	public void disconnectEntitiesAsync(final String connectingEntityType,
+			final String connectingEntityId, final String connectionType,
+			final String connectedEntityId, final ApiResponseCallback callback) {
+		(new ClientAsyncTask<ApiResponse>(callback) {
+			@Override
+			public ApiResponse doTask() {
+				return connectEntities(connectingEntityType,
+						connectingEntityId, connectionType, connectedEntityId);
+			}
+		}).execute();
+	}
+
+
+
+	/**
+	 * Query the connected entities. Executes asynchronously in background and
+	 * the callbacks are called in the UI thread.
+	 * 
+	 * @param connectingEntityType
+	 * @param connectingEntityId
+	 * @param connectionType
+	 * @param ql
+	 * @param callback
+	 */
+	public void queryEntityConnectionsAsync(String connectingEntityType,
+			String connectingEntityId, String connectionType, String ql,
+			QueryResultsCallback callback) {
+		Map<String, Object> params = new HashMap<String, Object>();
+		params.put("ql", ql);
+		queryEntitiesRequestAsync(callback, HttpMethod.GET, params, null,
+				getApplicationId(), connectingEntityType, connectingEntityId,
+				connectionType);
+	}
+
+
+	/**
+	 * Query the connected entities within distance of a specific point. .
+	 * Executes asynchronously in background and the callbacks are called in the
+	 * UI thread.
+	 * 
+	 * @param connectingEntityType
+	 * @param connectingEntityId
+	 * @param connectionType
+	 * @param distance
+	 * @param latitude
+	 * @param longitude
+	 * @param callback
+	 */
+	public void queryEntityConnectionsWithinLocationAsync(
+			String connectingEntityType, String connectingEntityId,
+			String connectionType, float distance, Location location,
+			String ql, QueryResultsCallback callback) {
+		Map<String, Object> params = new HashMap<String, Object>();
+		params.put("ql", makeLocationQL(distance, location.getLatitude(), location.getLongitude(), ql));
+		params.put("ql", ql);
+		queryEntitiesRequestAsync(callback, HttpMethod.GET, params, null,
+				getApplicationId(), connectingEntityType, connectingEntityId,
+				connectionType);
+	}
+
+	
+	
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/src/main/java/org/apache/usergrid/android/client/callbacks/ApiResponseCallback.java
----------------------------------------------------------------------
diff --git a/sdks/android/src/main/java/org/apache/usergrid/android/client/callbacks/ApiResponseCallback.java b/sdks/android/src/main/java/org/apache/usergrid/android/client/callbacks/ApiResponseCallback.java
new file mode 100644
index 0000000..59d58b6
--- /dev/null
+++ b/sdks/android/src/main/java/org/apache/usergrid/android/client/callbacks/ApiResponseCallback.java
@@ -0,0 +1,10 @@
+package org.apache.usergrid.android.client.callbacks;
+
+import org.usergrid.java.client.response.ApiResponse;
+
+
+public interface ApiResponseCallback extends ClientCallback<ApiResponse> {
+
+	public void onResponse(ApiResponse response);
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/src/main/java/org/apache/usergrid/android/client/callbacks/ClientAsyncTask.java
----------------------------------------------------------------------
diff --git a/sdks/android/src/main/java/org/apache/usergrid/android/client/callbacks/ClientAsyncTask.java b/sdks/android/src/main/java/org/apache/usergrid/android/client/callbacks/ClientAsyncTask.java
new file mode 100644
index 0000000..e4d4d82
--- /dev/null
+++ b/sdks/android/src/main/java/org/apache/usergrid/android/client/callbacks/ClientAsyncTask.java
@@ -0,0 +1,38 @@
+package org.apache.usergrid.android.client.callbacks;
+
+import android.os.AsyncTask;
+
+public abstract class ClientAsyncTask<T> extends AsyncTask<Void, Exception, T> {
+
+	ClientCallback<T> callback;
+
+	public ClientAsyncTask(ClientCallback<T> callback) {
+		this.callback = callback;
+	}
+
+	@Override
+	protected T doInBackground(Void... v) {
+		try {
+			return doTask();
+		} catch (Exception e) {
+			this.publishProgress(e);
+		}
+		return null;
+	}
+
+	public abstract T doTask();
+
+	@Override
+	protected void onPostExecute(T response) {
+		if (callback != null) {
+			callback.onResponse(response);
+		}
+	}
+
+	@Override
+	protected void onProgressUpdate(Exception... e) {
+		if ((callback != null) && (e != null) && (e.length > 0)) {
+			callback.onException(e[0]);
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/src/main/java/org/apache/usergrid/android/client/callbacks/ClientCallback.java
----------------------------------------------------------------------
diff --git a/sdks/android/src/main/java/org/apache/usergrid/android/client/callbacks/ClientCallback.java b/sdks/android/src/main/java/org/apache/usergrid/android/client/callbacks/ClientCallback.java
new file mode 100644
index 0000000..559b3b9
--- /dev/null
+++ b/sdks/android/src/main/java/org/apache/usergrid/android/client/callbacks/ClientCallback.java
@@ -0,0 +1,9 @@
+package org.apache.usergrid.android.client.callbacks;
+
+public interface ClientCallback<T> {
+
+	public void onResponse(T response);
+
+	public void onException(Exception e);
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/src/main/java/org/apache/usergrid/android/client/callbacks/DeviceRegistrationCallback.java
----------------------------------------------------------------------
diff --git a/sdks/android/src/main/java/org/apache/usergrid/android/client/callbacks/DeviceRegistrationCallback.java b/sdks/android/src/main/java/org/apache/usergrid/android/client/callbacks/DeviceRegistrationCallback.java
new file mode 100644
index 0000000..66ded57
--- /dev/null
+++ b/sdks/android/src/main/java/org/apache/usergrid/android/client/callbacks/DeviceRegistrationCallback.java
@@ -0,0 +1,9 @@
+package org.apache.usergrid.android.client.callbacks;
+
+import org.usergrid.java.client.entities.Device;
+
+public interface DeviceRegistrationCallback extends ClientCallback<Device> {
+
+	public void onDeviceRegistration(Device device);
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/src/main/java/org/apache/usergrid/android/client/callbacks/GroupsRetrievedCallback.java
----------------------------------------------------------------------
diff --git a/sdks/android/src/main/java/org/apache/usergrid/android/client/callbacks/GroupsRetrievedCallback.java b/sdks/android/src/main/java/org/apache/usergrid/android/client/callbacks/GroupsRetrievedCallback.java
new file mode 100644
index 0000000..4558cf6
--- /dev/null
+++ b/sdks/android/src/main/java/org/apache/usergrid/android/client/callbacks/GroupsRetrievedCallback.java
@@ -0,0 +1,13 @@
+package org.apache.usergrid.android.client.callbacks;
+
+import java.util.Map;
+
+import org.usergrid.java.client.entities.Group;
+
+
+public interface GroupsRetrievedCallback extends
+		ClientCallback<Map<String, Group>> {
+
+	public void onGroupsRetrieved(Map<String, Group> groups);
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/src/main/java/org/apache/usergrid/android/client/callbacks/QueryResultsCallback.java
----------------------------------------------------------------------
diff --git a/sdks/android/src/main/java/org/apache/usergrid/android/client/callbacks/QueryResultsCallback.java b/sdks/android/src/main/java/org/apache/usergrid/android/client/callbacks/QueryResultsCallback.java
new file mode 100644
index 0000000..13f325e
--- /dev/null
+++ b/sdks/android/src/main/java/org/apache/usergrid/android/client/callbacks/QueryResultsCallback.java
@@ -0,0 +1,9 @@
+package org.apache.usergrid.android.client.callbacks;
+
+import org.usergrid.java.client.Client.Query;
+
+public interface QueryResultsCallback extends ClientCallback<Query> {
+
+	public void onQueryResults(Query query);
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/src/main/java/org/apache/usergrid/android/client/utils/DeviceUuidFactory.java
----------------------------------------------------------------------
diff --git a/sdks/android/src/main/java/org/apache/usergrid/android/client/utils/DeviceUuidFactory.java b/sdks/android/src/main/java/org/apache/usergrid/android/client/utils/DeviceUuidFactory.java
new file mode 100644
index 0000000..1eec3c3
--- /dev/null
+++ b/sdks/android/src/main/java/org/apache/usergrid/android/client/utils/DeviceUuidFactory.java
@@ -0,0 +1,154 @@
+package org.apache.usergrid.android.client.utils;
+
+import static org.apache.usergrid.android.client.utils.ObjectUtils.isEmpty;
+
+import java.io.UnsupportedEncodingException;
+import java.util.UUID;
+
+import android.content.Context;
+import android.content.SharedPreferences;
+import android.net.wifi.WifiManager;
+import android.os.Build;
+import android.provider.Settings.Secure;
+import android.telephony.TelephonyManager;
+
+/**
+ * Tries to get the device ID as a UUID and fallsback to a generated UUID value
+ * if it doesn't work.
+ * 
+ * @see http 
+ *      ://stackoverflow.com/questions/2785485/is-there-a-unique-android-device
+ *      -id
+ * 
+ */
+public class DeviceUuidFactory {
+	protected static final String PREFS_FILE = "device_id.xml";
+	protected static final String PREFS_DEVICE_ID = "device_id";
+
+	protected static UUID uuid;
+
+	public DeviceUuidFactory(Context context) {
+
+		if (uuid == null) {
+			synchronized (DeviceUuidFactory.class) {
+				if (uuid == null) {
+					final SharedPreferences prefs = context
+							.getSharedPreferences(PREFS_FILE, 0);
+					final String id = prefs.getString(PREFS_DEVICE_ID, null);
+
+					if (id != null) {
+						// Use the ids previously computed and stored in the
+						// prefs file
+						uuid = UUID.fromString(id);
+
+					} else {
+
+						final String androidId = Secure
+								.getString(context.getContentResolver(),
+										Secure.ANDROID_ID);
+
+						// Use the Android ID unless it's broken, in which case
+						// fallback on deviceId,
+						// unless it's not available, then fallback on a random
+						// number which we store
+						// to a prefs file
+						try {
+							if (!"9774d56d682e549c".equals(androidId)) {
+								uuid = UUID.nameUUIDFromBytes(androidId
+										.getBytes("utf8"));
+							} else {
+								final String deviceId = ((TelephonyManager) context
+										.getSystemService(Context.TELEPHONY_SERVICE))
+										.getDeviceId();
+								uuid = deviceId != null ? UUID
+										.nameUUIDFromBytes(deviceId
+												.getBytes("utf8"))
+										: generateDeviceUuid(context);
+							}
+						} catch (UnsupportedEncodingException e) {
+							throw new RuntimeException(e);
+						}
+
+						// Write the value out to the prefs file
+						prefs.edit()
+								.putString(PREFS_DEVICE_ID, uuid.toString())
+								.commit();
+
+					}
+
+				}
+			}
+		}
+
+	}
+
+	private UUID generateDeviceUuid(Context context) {
+
+		// Get some of the hardware information
+		String buildParams = Build.BOARD + Build.BRAND + Build.CPU_ABI
+				+ Build.DEVICE + Build.DISPLAY + Build.FINGERPRINT + Build.HOST
+				+ Build.ID + Build.MANUFACTURER + Build.MODEL + Build.PRODUCT
+				+ Build.TAGS + Build.TYPE + Build.USER;
+
+		// Requires READ_PHONE_STATE
+		TelephonyManager tm = (TelephonyManager) context
+				.getSystemService(Context.TELEPHONY_SERVICE);
+
+		// gets the imei (GSM) or MEID/ESN (CDMA)
+		String imei = tm.getDeviceId();
+
+		// gets the android-assigned id
+		String androidId = Secure.getString(context.getContentResolver(),
+				Secure.ANDROID_ID);
+
+		// requires ACCESS_WIFI_STATE
+		WifiManager wm = (WifiManager) context
+				.getSystemService(Context.WIFI_SERVICE);
+
+		// gets the MAC address
+		String mac = wm.getConnectionInfo().getMacAddress();
+
+		// if we've got nothing, return a random UUID
+		if (isEmpty(imei) && isEmpty(androidId) && isEmpty(mac)) {
+			return UUID.randomUUID();
+		}
+
+		// concatenate the string
+		String fullHash = buildParams.toString() + imei + androidId + mac;
+
+		return UUID.nameUUIDFromBytes(fullHash.getBytes());
+	}
+
+	/**
+	 * Returns a unique UUID for the current android device. As with all UUIDs,
+	 * this unique ID is "very highly likely" to be unique across all Android
+	 * devices. Much more so than ANDROID_ID is.
+	 * 
+	 * The UUID is generated by using ANDROID_ID as the base key if appropriate,
+	 * falling back on TelephonyManager.getDeviceID() if ANDROID_ID is known to
+	 * be incorrect, and finally falling back on a random UUID that's persisted
+	 * to SharedPreferences if getDeviceID() does not return a usable value.
+	 * 
+	 * In some rare circumstances, this ID may change. In particular, if the
+	 * device is factory reset a new device ID may be generated. In addition, if
+	 * a user upgrades their phone from certain buggy implementations of Android
+	 * 2.2 to a newer, non-buggy version of Android, the device ID may change.
+	 * Or, if a user uninstalls your app on a device that has neither a proper
+	 * Android ID nor a Device ID, this ID may change on reinstallation.
+	 * 
+	 * Note that if the code falls back on using TelephonyManager.getDeviceId(),
+	 * the resulting ID will NOT change after a factory reset. Something to be
+	 * aware of.
+	 * 
+	 * Works around a bug in Android 2.2 for many devices when using ANDROID_ID
+	 * directly.
+	 * 
+	 * @see http://code.google.com/p/android/issues/detail?id=10603
+	 * 
+	 * @return a UUID that may be used to uniquely identify your device for most
+	 *         purposes.
+	 */
+	public UUID getDeviceUuid() {
+		return uuid;
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/src/main/java/org/apache/usergrid/android/client/utils/ObjectUtils.java
----------------------------------------------------------------------
diff --git a/sdks/android/src/main/java/org/apache/usergrid/android/client/utils/ObjectUtils.java b/sdks/android/src/main/java/org/apache/usergrid/android/client/utils/ObjectUtils.java
new file mode 100644
index 0000000..964dd9d
--- /dev/null
+++ b/sdks/android/src/main/java/org/apache/usergrid/android/client/utils/ObjectUtils.java
@@ -0,0 +1,20 @@
+package org.apache.usergrid.android.client.utils;
+
+import java.util.Map;
+
+public class ObjectUtils {
+
+	public static boolean isEmpty(Object s) {
+		if (s == null) {
+			return true;
+		}
+		if ((s instanceof String) && (((String) s).trim().length() == 0)) {
+			return true;
+		}
+		if (s instanceof Map) {
+			return ((Map<?, ?>) s).isEmpty();
+		}
+		return false;
+	}
+
+}
\ No newline at end of file


[96/96] [abbrv] git commit: Merge 3ccbfd8a68dceebd8d19af40586c38a4d74ed2c3 into 800c501c48fe61883750bb2dd091da5f60088874

Posted by sn...@apache.org.
Merge 3ccbfd8a68dceebd8d19af40586c38a4d74ed2c3 into 800c501c48fe61883750bb2dd091da5f60088874


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

Branch: refs/pull/39/merge
Commit: 71a08e406bc0c5a6fc46aac5fcf025b0e238ff0f
Parents: 800c501 3ccbfd8
Author: Lewis John McGibbney <le...@gmail.com>
Authored: Tue Jan 28 13:44:21 2014 -0800
Committer: Lewis John McGibbney <le...@gmail.com>
Committed: Tue Jan 28 13:44:21 2014 -0800

----------------------------------------------------------------------
 sdks/android/README.txt                         |      4 +-
 sdks/android/doc/allclasses-frame.html          |     56 +-
 sdks/android/doc/allclasses-noframe.html        |     56 +-
 sdks/android/doc/constant-values.html           |    180 +-
 sdks/android/doc/index-files/index-1.html       |     72 +-
 sdks/android/doc/index-files/index-10.html      |      6 +-
 sdks/android/doc/index-files/index-11.html      |     14 +-
 sdks/android/doc/index-files/index-12.html      |      8 +-
 sdks/android/doc/index-files/index-13.html      |     60 +-
 sdks/android/doc/index-files/index-14.html      |     96 +-
 sdks/android/doc/index-files/index-15.html      |     62 +-
 sdks/android/doc/index-files/index-16.html      |      8 +-
 sdks/android/doc/index-files/index-17.html      |    238 +-
 sdks/android/doc/index-files/index-18.html      |     30 +-
 sdks/android/doc/index-files/index-19.html      |     16 +-
 sdks/android/doc/index-files/index-2.html       |     54 +-
 sdks/android/doc/index-files/index-20.html      |     64 +-
 sdks/android/doc/index-files/index-21.html      |      8 +-
 sdks/android/doc/index-files/index-3.html       |     20 +-
 sdks/android/doc/index-files/index-4.html       |     18 +-
 sdks/android/doc/index-files/index-5.html       |      6 +-
 sdks/android/doc/index-files/index-6.html       |    280 +-
 sdks/android/doc/index-files/index-7.html       |      2 +-
 sdks/android/doc/index-files/index-8.html       |     12 +-
 sdks/android/doc/index-files/index-9.html       |      4 +-
 .../usergrid/android/client/Client.Query.html   |     20 +-
 .../android/client/Client.QueuePosition.html    |     38 +-
 .../doc/org/usergrid/android/client/Client.html |    440 +-
 .../client/callbacks/ApiResponseCallback.html   |     20 +-
 .../client/callbacks/ClientAsyncTask.html       |     18 +-
 .../client/callbacks/ClientCallback.html        |     12 +-
 .../callbacks/DeviceRegistrationCallback.html   |     22 +-
 .../callbacks/GroupsRetrievedCallback.html      |     20 +-
 .../client/callbacks/QueryResultsCallback.html  |     18 +-
 .../class-use/ApiResponseCallback.html          |     84 +-
 .../callbacks/class-use/ClientAsyncTask.html    |     12 +-
 .../callbacks/class-use/ClientCallback.html     |     32 +-
 .../class-use/DeviceRegistrationCallback.html   |     24 +-
 .../class-use/GroupsRetrievedCallback.html      |     24 +-
 .../class-use/QueryResultsCallback.html         |     52 +-
 .../android/client/callbacks/package-frame.html |     16 +-
 .../client/callbacks/package-summary.html       |     18 +-
 .../android/client/callbacks/package-tree.html  |     12 +-
 .../android/client/callbacks/package-use.html   |     30 +-
 .../android/client/class-use/Client.Query.html  |     52 +-
 .../client/class-use/Client.QueuePosition.html  |     34 +-
 .../android/client/class-use/Client.html        |     28 +-
 .../entities/Activity.ActivityCollection.html   |     24 +-
 .../entities/Activity.ActivityObject.html       |     44 +-
 .../client/entities/Activity.MediaLink.html     |     14 +-
 .../android/client/entities/Activity.html       |    206 +-
 .../android/client/entities/Device.html         |     36 +-
 .../android/client/entities/Entity.html         |     40 +-
 .../usergrid/android/client/entities/Group.html |     38 +-
 .../android/client/entities/Message.html        |     50 +-
 .../usergrid/android/client/entities/User.html  |     48 +-
 .../class-use/Activity.ActivityCollection.html  |     12 +-
 .../class-use/Activity.ActivityObject.html      |     46 +-
 .../entities/class-use/Activity.MediaLink.html  |     30 +-
 .../client/entities/class-use/Activity.html     |     48 +-
 .../client/entities/class-use/Device.html       |     32 +-
 .../client/entities/class-use/Entity.html       |    156 +-
 .../client/entities/class-use/Group.html        |     32 +-
 .../client/entities/class-use/Message.html      |     30 +-
 .../android/client/entities/class-use/User.html |     88 +-
 .../android/client/entities/package-frame.html  |     22 +-
 .../client/entities/package-summary.html        |     24 +-
 .../android/client/entities/package-tree.html   |     10 +-
 .../android/client/entities/package-use.html    |     62 +-
 .../usergrid/android/client/package-frame.html  |     10 +-
 .../android/client/package-summary.html         |     12 +-
 .../usergrid/android/client/package-tree.html   |     12 +-
 .../usergrid/android/client/package-use.html    |     28 +-
 .../client/response/AggregateCounter.html       |      8 +-
 .../client/response/AggregateCounterSet.html    |     28 +-
 .../android/client/response/ApiResponse.html    |    100 +-
 .../client/response/ClientCredentialsInfo.html  |     12 +-
 .../android/client/response/QueueInfo.html      |      8 +-
 .../response/class-use/AggregateCounter.html    |     32 +-
 .../response/class-use/AggregateCounterSet.html |     26 +-
 .../client/response/class-use/ApiResponse.html  |    102 +-
 .../class-use/ClientCredentialsInfo.html        |     26 +-
 .../client/response/class-use/QueueInfo.html    |     32 +-
 .../android/client/response/package-frame.html  |     14 +-
 .../client/response/package-summary.html        |     16 +-
 .../android/client/response/package-tree.html   |      8 +-
 .../android/client/response/package-use.html    |     38 +-
 .../android/client/utils/DeviceUuidFactory.html |      8 +-
 .../android/client/utils/JsonUtils.html         |     12 +-
 .../usergrid/android/client/utils/MapUtils.html |     12 +-
 .../android/client/utils/ObjectUtils.html       |     12 +-
 .../usergrid/android/client/utils/UrlUtils.html |      8 +-
 .../utils/class-use/DeviceUuidFactory.html      |     12 +-
 .../client/utils/class-use/JsonUtils.html       |     12 +-
 .../client/utils/class-use/MapUtils.html        |     12 +-
 .../client/utils/class-use/ObjectUtils.html     |     12 +-
 .../client/utils/class-use/UrlUtils.html        |     12 +-
 .../android/client/utils/package-frame.html     |     14 +-
 .../android/client/utils/package-summary.html   |     16 +-
 .../android/client/utils/package-tree.html      |      8 +-
 .../android/client/utils/package-use.html       |      8 +-
 sdks/android/doc/overview-frame.html            |     10 +-
 sdks/android/doc/overview-summary.html          |     10 +-
 sdks/android/doc/overview-tree.html             |     18 +-
 sdks/android/doc/package-list                   |     10 +-
 sdks/android/pom.xml                            |     11 +-
 .../apache/usergrid/android/client/Client.java  |    591 +
 .../client/callbacks/ApiResponseCallback.java   |     10 +
 .../client/callbacks/ClientAsyncTask.java       |     38 +
 .../client/callbacks/ClientCallback.java        |      9 +
 .../callbacks/DeviceRegistrationCallback.java   |      9 +
 .../callbacks/GroupsRetrievedCallback.java      |     13 +
 .../client/callbacks/QueryResultsCallback.java  |      9 +
 .../android/client/utils/DeviceUuidFactory.java |    154 +
 .../android/client/utils/ObjectUtils.java       |     20 +
 .../org/usergrid/android/client/Client.java     |    590 -
 .../client/callbacks/ApiResponseCallback.java   |     10 -
 .../client/callbacks/ClientAsyncTask.java       |     38 -
 .../client/callbacks/ClientCallback.java        |      9 -
 .../callbacks/DeviceRegistrationCallback.java   |      9 -
 .../callbacks/GroupsRetrievedCallback.java      |     13 -
 .../client/callbacks/QueryResultsCallback.java  |      9 -
 .../android/client/utils/DeviceUuidFactory.java |    154 -
 .../android/client/utils/ObjectUtils.java       |     20 -
 sdks/java/README.txt                            |      5 +-
 sdks/java/pom.xml                               |      9 +-
 .../org/apache/usergrid/java/client/Client.java |   1277 +
 .../usergrid/java/client/entities/Activity.java |    627 +
 .../usergrid/java/client/entities/Device.java   |     52 +
 .../usergrid/java/client/entities/Entity.java   |    172 +
 .../usergrid/java/client/entities/Group.java    |     63 +
 .../usergrid/java/client/entities/Message.java  |    132 +
 .../usergrid/java/client/entities/User.java     |    142 +
 .../java/client/exception/ClientException.java  |     40 +
 .../java/client/response/AggregateCounter.java  |     36 +
 .../client/response/AggregateCounterSet.java    |     95 +
 .../java/client/response/ApiResponse.java       |    406 +
 .../client/response/ClientCredentialsInfo.java  |     42 +
 .../java/client/response/QueueInfo.java         |     28 +
 .../usergrid/java/client/utils/JsonUtils.java   |    167 +
 .../usergrid/java/client/utils/MapUtils.java    |     23 +
 .../usergrid/java/client/utils/ObjectUtils.java |     20 +
 .../usergrid/java/client/utils/UrlUtils.java    |    108 +
 .../java/org/usergrid/java/client/Client.java   |   1276 -
 .../usergrid/java/client/entities/Activity.java |    627 -
 .../usergrid/java/client/entities/Device.java   |     52 -
 .../usergrid/java/client/entities/Entity.java   |    175 -
 .../usergrid/java/client/entities/Group.java    |     63 -
 .../usergrid/java/client/entities/Message.java  |    132 -
 .../org/usergrid/java/client/entities/User.java |    142 -
 .../java/client/exception/ClientException.java  |     40 -
 .../java/client/response/AggregateCounter.java  |     36 -
 .../client/response/AggregateCounterSet.java    |     95 -
 .../java/client/response/ApiResponse.java       |    405 -
 .../client/response/ClientCredentialsInfo.java  |     42 -
 .../java/client/response/QueueInfo.java         |     28 -
 .../usergrid/java/client/utils/JsonUtils.java   |    166 -
 .../usergrid/java/client/utils/MapUtils.java    |     23 -
 .../usergrid/java/client/utils/ObjectUtils.java |     20 -
 .../usergrid/java/client/utils/UrlUtils.java    |    108 -
 stack/build-tools/pom.xml                       |      2 +-
 .../src/main/resources/usergrid/checkstyle.xml  |      2 +-
 stack/config/pom.xml                            |      2 +-
 stack/config/src/main/resources/log4j.xml       |     14 +-
 .../main/resources/usergrid-default.properties  |      2 +-
 .../config/src/test/resources/log4j.properties  |     14 +-
 stack/config/src/test/resources/log4j.xml       |      4 +-
 stack/core/pom.xml                              |     12 +-
 .../persistence/query/tree/QueryFilter.g        |    311 +
 .../persistence/query/tree/QueryFilter.g        |    311 -
 .../java/org/apache/usergrid/batch/AppArgs.java |     57 +
 .../java/org/apache/usergrid/batch/Job.java     |     20 +
 .../org/apache/usergrid/batch/JobExecution.java |     91 +
 .../apache/usergrid/batch/JobExecutionImpl.java |    202 +
 .../org/apache/usergrid/batch/JobFactory.java   |     19 +
 .../usergrid/batch/JobNotFoundException.java    |     23 +
 .../org/apache/usergrid/batch/JobRuntime.java   |     40 +
 .../usergrid/batch/JobRuntimeException.java     |     49 +
 .../usergrid/batch/UsergridJobFactory.java      |     37 +
 .../apache/usergrid/batch/job/OnlyOnceJob.java  |     85 +
 .../apache/usergrid/batch/job/package-info.java |     18 +
 .../usergrid/batch/repository/JobAccessor.java  |     36 +
 .../batch/repository/JobDescriptor.java         |     80 +
 .../usergrid/batch/repository/package-info.java |     18 +
 .../org/apache/usergrid/batch/service/App.java  |     70 +
 .../usergrid/batch/service/JobListener.java     |     50 +
 .../batch/service/JobRuntimeService.java        |     49 +
 .../batch/service/JobSchedulerService.java      |    315 +
 .../batch/service/SchedulerService.java         |     54 +
 .../batch/service/SchedulerServiceImpl.java     |    427 +
 .../usergrid/batch/service/package-info.java    |     18 +
 .../hazelcast/HazelcastLifecycleMonitor.java    |     78 +
 .../apache/usergrid/count/AbstractBatcher.java  |    176 +
 .../apache/usergrid/count/BatchSubmitter.java   |     30 +
 .../java/org/apache/usergrid/count/Batcher.java |     35 +
 .../usergrid/count/CassandraCounterStore.java   |     99 +
 .../usergrid/count/CassandraSubmitter.java      |     77 +
 .../apache/usergrid/count/CountProducer.java    |     25 +
 .../CounterProcessingUnavailableException.java  |     38 +
 .../org/apache/usergrid/count/CounterStore.java |     30 +
 .../apache/usergrid/count/SimpleBatcher.java    |     39 +
 .../usergrid/count/Slf4JBatchSubmitter.java     |     77 +
 .../org/apache/usergrid/count/common/Count.java |    139 +
 .../usergrid/count/common/CountSerDeUtils.java  |     51 +
 .../common/CountTransportSerDeException.java    |     38 +
 .../org/apache/usergrid/count/package-info.java |      1 +
 .../usergrid/exception/JsonReadException.java   |     27 +
 .../usergrid/exception/JsonWriteException.java  |     27 +
 .../exception/NotImplementedException.java      |     58 +
 .../java/org/apache/usergrid/locking/Lock.java  |     44 +
 .../org/apache/usergrid/locking/LockHelper.java |     50 +
 .../apache/usergrid/locking/LockManager.java    |     40 +
 .../usergrid/locking/LockPathBuilder.java       |     68 +
 .../locking/cassandra/HectorLockImpl.java       |     85 +
 .../cassandra/HectorLockManagerImpl.java        |    141 +
 .../locking/exception/UGLockException.java      |     49 +
 .../usergrid/locking/noop/NoOpLockImpl.java     |     61 +
 .../locking/noop/NoOpLockManagerImpl.java       |     40 +
 .../locking/singlenode/SingleNodeLockImpl.java  |     70 +
 .../singlenode/SingleNodeLockManagerImpl.java   |     93 +
 .../zookeeper/ZooKeeperLockManagerImpl.java     |    114 +
 .../locking/zookeeper/ZookeeperLockImpl.java    |     87 +
 .../org/apache/usergrid/mq/CounterQuery.java    |    314 +
 .../java/org/apache/usergrid/mq/Message.java    |    512 +
 .../main/java/org/apache/usergrid/mq/Query.java |   1856 +
 .../apache/usergrid/mq/QueryFilterLexer.java    |   1842 +
 .../apache/usergrid/mq/QueryFilterParser.java   |   1102 +
 .../org/apache/usergrid/mq/QueryProcessor.java  |    560 +
 .../main/java/org/apache/usergrid/mq/Queue.java |    289 +
 .../org/apache/usergrid/mq/QueueManager.java    |    130 +
 .../apache/usergrid/mq/QueueManagerFactory.java |     41 +
 .../org/apache/usergrid/mq/QueuePosition.java   |     59 +
 .../java/org/apache/usergrid/mq/QueueQuery.java |    305 +
 .../org/apache/usergrid/mq/QueueResults.java    |    128 +
 .../java/org/apache/usergrid/mq/QueueSet.java   |    192 +
 .../usergrid/mq/cassandra/CassandraMQUtils.java |    277 +
 .../mq/cassandra/MessageIndexUpdate.java        |    119 +
 .../usergrid/mq/cassandra/QueueIndexUpdate.java |    347 +
 .../mq/cassandra/QueueManagerFactoryImpl.java   |     85 +
 .../usergrid/mq/cassandra/QueueManagerImpl.java |   1390 +
 .../apache/usergrid/mq/cassandra/QueuesCF.java  |    155 +
 .../mq/cassandra/io/AbstractSearch.java         |    357 +
 .../mq/cassandra/io/ConsumerTransaction.java    |    470 +
 .../usergrid/mq/cassandra/io/EndSearch.java     |     69 +
 .../usergrid/mq/cassandra/io/FilterSearch.java  |    258 +
 .../mq/cassandra/io/NoTransactionSearch.java    |    131 +
 .../usergrid/mq/cassandra/io/QueueBounds.java   |     91 +
 .../usergrid/mq/cassandra/io/QueueSearch.java   |     29 +
 .../usergrid/mq/cassandra/io/StartSearch.java   |     68 +
 .../usergrid/persistence/AbstractEntity.java    |    342 +
 .../usergrid/persistence/AggregateCounter.java  |     48 +
 .../persistence/AggregateCounterSet.java        |    116 +
 .../persistence/AssociatedEntityRef.java        |     21 +
 .../usergrid/persistence/CollectionRef.java     |     26 +
 .../persistence/ConnectedEntityRef.java         |     22 +
 .../usergrid/persistence/ConnectionRef.java     |     34 +
 .../usergrid/persistence/CounterQuery.java      |    313 +
 .../usergrid/persistence/CounterResolution.java |     84 +
 .../usergrid/persistence/CredentialsInfo.java   |    176 +
 .../usergrid/persistence/DynamicEntity.java     |    111 +
 .../org/apache/usergrid/persistence/Entity.java |    103 +
 .../usergrid/persistence/EntityFactory.java     |    131 +
 .../usergrid/persistence/EntityManager.java     |    605 +
 .../persistence/EntityManagerFactory.java       |    108 +
 .../persistence/EntityPropertyComparator.java   |     55 +
 .../apache/usergrid/persistence/EntityRef.java  |     37 +
 .../usergrid/persistence/EntityUtils.java       |     53 +
 .../apache/usergrid/persistence/Identifier.java |    226 +
 .../persistence/IndexBucketLocator.java         |     75 +
 .../persistence/MultiQueryIterator.java         |    106 +
 .../persistence/PagingResultsIterator.java      |    109 +
 .../apache/usergrid/persistence/PathQuery.java  |    115 +
 .../org/apache/usergrid/persistence/Query.java  |   1309 +
 .../apache/usergrid/persistence/QueryUtils.java |     34 +
 .../usergrid/persistence/RelationManager.java   |    113 +
 .../apache/usergrid/persistence/Results.java    |   1294 +
 .../apache/usergrid/persistence/RoleRef.java    |     31 +
 .../org/apache/usergrid/persistence/Schema.java |   1786 +
 .../persistence/SimpleCollectionRef.java        |     84 +
 .../usergrid/persistence/SimpleEntityRef.java   |    149 +
 .../usergrid/persistence/SimpleRoleRef.java     |    125 +
 .../usergrid/persistence/TypedEntity.java       |     37 +
 .../org/apache/usergrid/persistence/Update.java |     75 +
 .../annotations/EntityCollection.java           |     43 +
 .../annotations/EntityDictionary.java           |     38 +
 .../persistence/annotations/EntityProperty.java |     54 +
 .../persistence/cassandra/ApplicationCF.java    |    159 +
 .../usergrid/persistence/cassandra/CFEnum.java  |     37 +
 .../cassandra/CassandraPersistenceUtils.java    |    483 +
 .../persistence/cassandra/CassandraService.java |   1134 +
 .../cassandra/ConnectedEntityRefImpl.java       |     61 +
 .../cassandra/ConnectionRefImpl.java            |    627 +
 .../persistence/cassandra/CounterUtils.java     |    397 +
 .../persistence/cassandra/CursorCache.java      |    120 +
 .../cassandra/EntityManagerFactoryImpl.java     |    408 +
 .../cassandra/EntityManagerImpl.java            |   2856 +
 .../cassandra/EntityValueSerializer.java        |     51 +
 .../persistence/cassandra/GeoIndexManager.java  |    322 +
 .../persistence/cassandra/IndexUpdate.java      |    448 +
 .../persistence/cassandra/QueryProcessor.java   |    719 +
 .../cassandra/RelationManagerImpl.java          |   2337 +
 .../usergrid/persistence/cassandra/Setup.java   |    205 +
 .../cassandra/SimpleIndexBucketLocatorImpl.java |    121 +
 .../cassandra/index/ConnectedIndexScanner.java  |    231 +
 .../cassandra/index/IndexBucketScanner.java     |    217 +
 .../index/IndexMultiBucketSetLoader.java        |    137 +
 .../cassandra/index/IndexScanner.java           |     39 +
 .../cassandra/index/NoOpIndexScanner.java       |     94 +
 .../cassandra/util/Slf4jTraceTagReporter.java   |     47 +
 .../cassandra/util/TaggedOpTimer.java           |     38 +
 .../persistence/cassandra/util/TimedOpTag.java  |    101 +
 .../cassandra/util/TraceParticipant.java        |     20 +
 .../persistence/cassandra/util/TraceTag.java    |     77 +
 .../cassandra/util/TraceTagAspect.java          |     41 +
 .../cassandra/util/TraceTagManager.java         |    156 +
 .../cassandra/util/TraceTagReporter.java        |     10 +
 .../usergrid/persistence/entities/Activity.java |    685 +
 .../persistence/entities/Application.java       |    609 +
 .../usergrid/persistence/entities/Asset.java    |     93 +
 .../usergrid/persistence/entities/Device.java   |    105 +
 .../usergrid/persistence/entities/Event.java    |    155 +
 .../usergrid/persistence/entities/Folder.java   |     93 +
 .../usergrid/persistence/entities/Group.java    |    168 +
 .../usergrid/persistence/entities/JobData.java  |     54 +
 .../usergrid/persistence/entities/JobStat.java  |    175 +
 .../usergrid/persistence/entities/Message.java  |     77 +
 .../usergrid/persistence/entities/Role.java     |    153 +
 .../usergrid/persistence/entities/User.java     |    348 +
 .../ApplicationAlreadyExistsException.java      |     37 +
 .../DuplicateUniquePropertyExistsException.java |     52 +
 .../exceptions/EntityNotFoundException.java     |     45 +
 .../exceptions/LockingException.java            |     65 +
 .../exceptions/NoFullTextIndexException.java    |     50 +
 .../exceptions/NoIndexException.java            |     50 +
 .../exceptions/PersistenceException.java        |     45 +
 .../PropertyTypeConversionException.java        |     71 +
 .../exceptions/QueryIterationException.java     |     13 +
 .../exceptions/QueryParseException.java         |     63 +
 .../exceptions/QueryTokenException.java         |     52 +
 .../persistence/exceptions/QueueException.java  |     61 +
 .../RequiredPropertyNotFoundException.java      |     41 +
 .../TransactionNotFoundException.java           |     45 +
 .../UnexpectedEntityTypeException.java          |     45 +
 .../persistence/geo/CollectionGeoSearch.java    |     51 +
 .../persistence/geo/ConnectionGeoSearch.java    |     50 +
 .../persistence/geo/EntityLocationRef.java      |    210 +
 .../EntityLocationRefDistanceComparator.java    |     77 +
 .../persistence/geo/GeoIndexSearcher.java       |    366 +
 .../persistence/geo/GeocellManager.java         |    179 +
 .../usergrid/persistence/geo/GeocellUtils.java  |    539 +
 .../geo/comparator/DoubleTupleComparator.java   |     23 +
 .../persistence/geo/model/BoundingBox.java      |     71 +
 .../persistence/geo/model/CostFunction.java     |     33 +
 .../geo/model/DefaultCostFunction.java          |     34 +
 .../usergrid/persistence/geo/model/Point.java   |     58 +
 .../usergrid/persistence/geo/model/Tuple.java   |     24 +
 .../usergrid/persistence/query/ir/AllNode.java  |     54 +
 .../usergrid/persistence/query/ir/AndNode.java  |     43 +
 .../persistence/query/ir/BooleanNode.java       |     48 +
 .../query/ir/EmailIdentifierNode.java           |     31 +
 .../query/ir/NameIdentifierNode.java            |     28 +
 .../persistence/query/ir/NodeVisitor.java       |     78 +
 .../usergrid/persistence/query/ir/NotNode.java  |     62 +
 .../usergrid/persistence/query/ir/OrNode.java   |     52 +
 .../persistence/query/ir/OrderByNode.java       |     92 +
 .../persistence/query/ir/QueryNode.java         |     28 +
 .../persistence/query/ir/QuerySlice.java        |    343 +
 .../persistence/query/ir/SearchVisitor.java     |    255 +
 .../persistence/query/ir/SliceNode.java         |    168 +
 .../query/ir/UuidIdentifierNode.java            |     32 +
 .../persistence/query/ir/WithinNode.java        |     96 +
 .../query/ir/result/AbstractScanColumn.java     |     70 +
 .../result/CollectionResultsLoaderFactory.java  |     23 +
 .../ir/result/ConnectionIndexSliceParser.java   |     86 +
 .../query/ir/result/ConnectionRefLoader.java    |     65 +
 .../result/ConnectionResultsLoaderFactory.java  |     32 +
 .../ir/result/ConnectionTypesIterator.java      |    178 +
 .../query/ir/result/EmptyIterator.java          |     47 +
 .../query/ir/result/EntityRefLoader.java        |     50 +
 .../query/ir/result/EntityResultsLoader.java    |     46 +
 .../query/ir/result/GeoIterator.java            |    355 +
 .../persistence/query/ir/result/IDLoader.java   |     24 +
 .../query/ir/result/IntersectionIterator.java   |    167 +
 .../query/ir/result/MergeIterator.java          |    137 +
 .../query/ir/result/MultiIterator.java          |     54 +
 .../query/ir/result/OrderByIterator.java        |    251 +
 .../query/ir/result/ResultIterator.java         |     43 +
 .../query/ir/result/ResultsLoader.java          |     29 +
 .../query/ir/result/ResultsLoaderFactory.java   |     21 +
 .../persistence/query/ir/result/ScanColumn.java |     16 +
 .../query/ir/result/ScanColumnTransformer.java  |     23 +
 .../ir/result/SecondaryIndexSliceParser.java    |     60 +
 .../query/ir/result/SliceIterator.java          |    251 +
 .../query/ir/result/SliceParser.java            |     31 +
 .../query/ir/result/StaticIdIterator.java       |     66 +
 .../query/ir/result/SubtractionIterator.java    |    108 +
 .../query/ir/result/UUIDIndexSliceParser.java   |     50 +
 .../query/ir/result/UnionIterator.java          |    252 +
 .../usergrid/persistence/query/tree/.gitignore  |      2 +
 .../persistence/query/tree/AndOperand.java      |     48 +
 .../persistence/query/tree/BooleanLiteral.java  |     48 +
 .../persistence/query/tree/BooleanOperand.java  |     48 +
 .../persistence/query/tree/ContainsOperand.java |     69 +
 .../query/tree/ContainsProperty.java            |     57 +
 .../usergrid/persistence/query/tree/Equal.java  |     52 +
 .../persistence/query/tree/EqualityOperand.java |     88 +
 .../persistence/query/tree/FloatLiteral.java    |     57 +
 .../persistence/query/tree/GreaterThan.java     |     52 +
 .../query/tree/GreaterThanEqual.java            |     56 +
 .../persistence/query/tree/LessThan.java        |     52 +
 .../persistence/query/tree/LessThanEqual.java   |     54 +
 .../persistence/query/tree/Literal.java         |     38 +
 .../persistence/query/tree/LiteralFactory.java  |     58 +
 .../persistence/query/tree/LongLiteral.java     |     64 +
 .../persistence/query/tree/NotOperand.java      |     45 +
 .../persistence/query/tree/NumericLiteral.java  |     24 +
 .../persistence/query/tree/Operand.java         |     47 +
 .../persistence/query/tree/OrOperand.java       |     53 +
 .../persistence/query/tree/Property.java        |     62 +
 .../persistence/query/tree/QueryVisitor.java    |     90 +
 .../persistence/query/tree/StringLiteral.java   |     82 +
 .../persistence/query/tree/UUIDLiteral.java     |     49 +
 .../persistence/query/tree/WithinOperand.java   |    111 +
 .../persistence/query/tree/WithinProperty.java  |     54 +
 .../persistence/schema/CollectionInfo.java      |    207 +
 .../persistence/schema/DictionaryInfo.java      |    117 +
 .../usergrid/persistence/schema/EntityInfo.java |    299 +
 .../persistence/schema/PropertyInfo.java        |    218 +
 .../usergrid/system/UsergridSystemMonitor.java  |     95 +
 .../org/apache/usergrid/utils/AESUtils.java     |     84 +
 .../java/org/apache/usergrid/utils/BCrypt.java  |    627 +
 .../org/apache/usergrid/utils/ClassUtils.java   |     58 +
 .../org/apache/usergrid/utils/CodecUtils.java   |     45 +
 .../apache/usergrid/utils/CompositeUtils.java   |     54 +
 .../apache/usergrid/utils/ConversionUtils.java  |    765 +
 .../org/apache/usergrid/utils/DateUtils.java    |     88 +
 .../org/apache/usergrid/utils/HttpUtils.java    |     51 +
 .../org/apache/usergrid/utils/IndexUtils.java   |    218 +
 .../apache/usergrid/utils/InflectionUtils.java  |     51 +
 .../org/apache/usergrid/utils/Inflector.java    |    553 +
 .../org/apache/usergrid/utils/JsonUtils.java    |    327 +
 .../org/apache/usergrid/utils/ListUtils.java    |    230 +
 .../org/apache/usergrid/utils/MailUtils.java    |    154 +
 .../org/apache/usergrid/utils/MapUtils.java     |    376 +
 .../org/apache/usergrid/utils/NumberUtils.java  |     35 +
 .../apache/usergrid/utils/PasswordUtils.java    |     28 +
 .../org/apache/usergrid/utils/StringUtils.java  |    171 +
 .../org/apache/usergrid/utils/TimeUtils.java    |     88 +
 .../org/apache/usergrid/utils/UUIDUtils.java    |    411 +
 .../java/org/apache/usergrid/utils/Version.java |    428 +
 .../org/apache/usergrid/utils/package-info.java |     18 +
 .../main/java/org/usergrid/batch/AppArgs.java   |     57 -
 .../src/main/java/org/usergrid/batch/Job.java   |     20 -
 .../java/org/usergrid/batch/JobExecution.java   |     91 -
 .../org/usergrid/batch/JobExecutionImpl.java    |    202 -
 .../java/org/usergrid/batch/JobFactory.java     |     19 -
 .../usergrid/batch/JobNotFoundException.java    |     23 -
 .../java/org/usergrid/batch/JobRuntime.java     |     40 -
 .../org/usergrid/batch/JobRuntimeException.java |     49 -
 .../org/usergrid/batch/UsergridJobFactory.java  |     37 -
 .../org/usergrid/batch/job/OnlyOnceJob.java     |     85 -
 .../org/usergrid/batch/job/package-info.java    |     18 -
 .../usergrid/batch/repository/JobAccessor.java  |     36 -
 .../batch/repository/JobDescriptor.java         |     80 -
 .../usergrid/batch/repository/package-info.java |     18 -
 .../java/org/usergrid/batch/service/App.java    |     70 -
 .../org/usergrid/batch/service/JobListener.java |     50 -
 .../batch/service/JobRuntimeService.java        |     49 -
 .../batch/service/JobSchedulerService.java      |    315 -
 .../batch/service/SchedulerService.java         |     54 -
 .../batch/service/SchedulerServiceImpl.java     |    428 -
 .../usergrid/batch/service/package-info.java    |     18 -
 .../hazelcast/HazelcastLifecycleMonitor.java    |     78 -
 .../org/usergrid/count/AbstractBatcher.java     |    175 -
 .../java/org/usergrid/count/BatchSubmitter.java |     30 -
 .../main/java/org/usergrid/count/Batcher.java   |     35 -
 .../usergrid/count/CassandraCounterStore.java   |    100 -
 .../org/usergrid/count/CassandraSubmitter.java  |     77 -
 .../java/org/usergrid/count/CountProducer.java  |     25 -
 .../CounterProcessingUnavailableException.java  |     38 -
 .../java/org/usergrid/count/CounterStore.java   |     30 -
 .../java/org/usergrid/count/SimpleBatcher.java  |     40 -
 .../org/usergrid/count/Slf4JBatchSubmitter.java |     77 -
 .../java/org/usergrid/count/common/Count.java   |    139 -
 .../usergrid/count/common/CountSerDeUtils.java  |     51 -
 .../common/CountTransportSerDeException.java    |     38 -
 .../java/org/usergrid/count/package-info.java   |      0
 .../usergrid/exception/JsonReadException.java   |     27 -
 .../usergrid/exception/JsonWriteException.java  |     27 -
 .../exception/NotImplementedException.java      |     58 -
 .../main/java/org/usergrid/locking/Lock.java    |     44 -
 .../java/org/usergrid/locking/LockHelper.java   |     51 -
 .../java/org/usergrid/locking/LockManager.java  |     40 -
 .../org/usergrid/locking/LockPathBuilder.java   |     68 -
 .../locking/cassandra/HectorLockImpl.java       |     85 -
 .../cassandra/HectorLockManagerImpl.java        |    141 -
 .../locking/exception/UGLockException.java      |     49 -
 .../org/usergrid/locking/noop/NoOpLockImpl.java |     61 -
 .../locking/noop/NoOpLockManagerImpl.java       |     40 -
 .../locking/singlenode/SingleNodeLockImpl.java  |     70 -
 .../singlenode/SingleNodeLockManagerImpl.java   |     93 -
 .../zookeeper/ZooKeeperLockManagerImpl.java     |    114 -
 .../locking/zookeeper/ZookeeperLockImpl.java    |     87 -
 .../main/java/org/usergrid/mq/CounterQuery.java |    314 -
 .../src/main/java/org/usergrid/mq/Message.java  |    512 -
 .../src/main/java/org/usergrid/mq/Query.java    |   1857 -
 .../java/org/usergrid/mq/QueryFilterLexer.java  |   1842 -
 .../java/org/usergrid/mq/QueryFilterParser.java |   1102 -
 .../java/org/usergrid/mq/QueryProcessor.java    |    562 -
 .../src/main/java/org/usergrid/mq/Queue.java    |    291 -
 .../main/java/org/usergrid/mq/QueueManager.java |    130 -
 .../org/usergrid/mq/QueueManagerFactory.java    |     41 -
 .../java/org/usergrid/mq/QueuePosition.java     |     59 -
 .../main/java/org/usergrid/mq/QueueQuery.java   |    306 -
 .../main/java/org/usergrid/mq/QueueResults.java |    128 -
 .../src/main/java/org/usergrid/mq/QueueSet.java |    192 -
 .../usergrid/mq/cassandra/CassandraMQUtils.java |    278 -
 .../mq/cassandra/MessageIndexUpdate.java        |    120 -
 .../usergrid/mq/cassandra/QueueIndexUpdate.java |    349 -
 .../mq/cassandra/QueueManagerFactoryImpl.java   |     85 -
 .../usergrid/mq/cassandra/QueueManagerImpl.java |   1391 -
 .../org/usergrid/mq/cassandra/QueuesCF.java     |    156 -
 .../mq/cassandra/io/AbstractSearch.java         |    358 -
 .../mq/cassandra/io/ConsumerTransaction.java    |    471 -
 .../org/usergrid/mq/cassandra/io/EndSearch.java |     69 -
 .../usergrid/mq/cassandra/io/FilterSearch.java  |    259 -
 .../mq/cassandra/io/NoTransactionSearch.java    |    132 -
 .../usergrid/mq/cassandra/io/QueueBounds.java   |     91 -
 .../usergrid/mq/cassandra/io/QueueSearch.java   |     29 -
 .../usergrid/mq/cassandra/io/StartSearch.java   |     68 -
 .../usergrid/persistence/AbstractEntity.java    |    342 -
 .../usergrid/persistence/AggregateCounter.java  |     48 -
 .../persistence/AggregateCounterSet.java        |    116 -
 .../persistence/AssociatedEntityRef.java        |     21 -
 .../org/usergrid/persistence/CollectionRef.java |     26 -
 .../persistence/ConnectedEntityRef.java         |     22 -
 .../org/usergrid/persistence/ConnectionRef.java |     34 -
 .../org/usergrid/persistence/CounterQuery.java  |    313 -
 .../usergrid/persistence/CounterResolution.java |     84 -
 .../usergrid/persistence/CredentialsInfo.java   |    176 -
 .../org/usergrid/persistence/DynamicEntity.java |    111 -
 .../java/org/usergrid/persistence/Entity.java   |    103 -
 .../org/usergrid/persistence/EntityFactory.java |    131 -
 .../org/usergrid/persistence/EntityManager.java |    620 -
 .../persistence/EntityManagerFactory.java       |    108 -
 .../persistence/EntityPropertyComparator.java   |     55 -
 .../org/usergrid/persistence/EntityRef.java     |     37 -
 .../org/usergrid/persistence/EntityUtils.java   |     53 -
 .../org/usergrid/persistence/Identifier.java    |    226 -
 .../persistence/IndexBucketLocator.java         |     75 -
 .../persistence/MultiQueryIterator.java         |    106 -
 .../persistence/PagingResultsIterator.java      |    109 -
 .../org/usergrid/persistence/PathQuery.java     |    115 -
 .../java/org/usergrid/persistence/Query.java    |   1310 -
 .../org/usergrid/persistence/QueryUtils.java    |     34 -
 .../usergrid/persistence/RelationManager.java   |    113 -
 .../java/org/usergrid/persistence/Results.java  |   1294 -
 .../java/org/usergrid/persistence/RoleRef.java  |     31 -
 .../java/org/usergrid/persistence/Schema.java   |   1788 -
 .../persistence/SimpleCollectionRef.java        |     84 -
 .../usergrid/persistence/SimpleEntityRef.java   |    149 -
 .../org/usergrid/persistence/SimpleRoleRef.java |    125 -
 .../org/usergrid/persistence/TypedEntity.java   |     37 -
 .../java/org/usergrid/persistence/Update.java   |     75 -
 .../annotations/EntityCollection.java           |     43 -
 .../annotations/EntityDictionary.java           |     38 -
 .../persistence/annotations/EntityProperty.java |     54 -
 .../persistence/cassandra/ApplicationCF.java    |    160 -
 .../usergrid/persistence/cassandra/CFEnum.java  |     37 -
 .../cassandra/CassandraPersistenceUtils.java    |    486 -
 .../persistence/cassandra/CassandraService.java |   1135 -
 .../cassandra/ConnectedEntityRefImpl.java       |     61 -
 .../cassandra/ConnectionRefImpl.java            |    628 -
 .../persistence/cassandra/CounterUtils.java     |    400 -
 .../persistence/cassandra/CursorCache.java      |    121 -
 .../cassandra/EntityManagerFactoryImpl.java     |    411 -
 .../cassandra/EntityManagerImpl.java            |   2858 -
 .../cassandra/EntityValueSerializer.java        |     52 -
 .../persistence/cassandra/GeoIndexManager.java  |    323 -
 .../persistence/cassandra/IndexUpdate.java      |    450 -
 .../persistence/cassandra/QueryProcessor.java   |    720 -
 .../cassandra/RelationManagerImpl.java          |   2339 -
 .../usergrid/persistence/cassandra/Setup.java   |    206 -
 .../cassandra/SimpleIndexBucketLocatorImpl.java |    121 -
 .../cassandra/index/ConnectedIndexScanner.java  |    232 -
 .../cassandra/index/IndexBucketScanner.java     |    218 -
 .../index/IndexMultiBucketSetLoader.java        |    138 -
 .../cassandra/index/IndexScanner.java           |     39 -
 .../cassandra/index/NoOpIndexScanner.java       |     94 -
 .../cassandra/util/Slf4jTraceTagReporter.java   |     47 -
 .../cassandra/util/TaggedOpTimer.java           |     38 -
 .../persistence/cassandra/util/TimedOpTag.java  |    101 -
 .../cassandra/util/TraceParticipant.java        |     20 -
 .../persistence/cassandra/util/TraceTag.java    |     77 -
 .../cassandra/util/TraceTagAspect.java          |     41 -
 .../cassandra/util/TraceTagManager.java         |    156 -
 .../cassandra/util/TraceTagReporter.java        |     10 -
 .../usergrid/persistence/entities/Activity.java |    685 -
 .../persistence/entities/Application.java       |    609 -
 .../usergrid/persistence/entities/Asset.java    |     93 -
 .../usergrid/persistence/entities/Device.java   |    105 -
 .../usergrid/persistence/entities/Event.java    |    155 -
 .../usergrid/persistence/entities/Folder.java   |     93 -
 .../usergrid/persistence/entities/Group.java    |    168 -
 .../usergrid/persistence/entities/JobData.java  |     54 -
 .../usergrid/persistence/entities/JobStat.java  |    175 -
 .../usergrid/persistence/entities/Message.java  |     77 -
 .../org/usergrid/persistence/entities/Role.java |    153 -
 .../org/usergrid/persistence/entities/User.java |    348 -
 .../ApplicationAlreadyExistsException.java      |     37 -
 .../DuplicateUniquePropertyExistsException.java |     52 -
 .../exceptions/EntityNotFoundException.java     |     45 -
 .../exceptions/LockingException.java            |     65 -
 .../exceptions/NoFullTextIndexException.java    |     50 -
 .../exceptions/NoIndexException.java            |     50 -
 .../exceptions/PersistenceException.java        |     45 -
 .../PropertyTypeConversionException.java        |     71 -
 .../exceptions/QueryIterationException.java     |     13 -
 .../exceptions/QueryParseException.java         |     63 -
 .../exceptions/QueryTokenException.java         |     52 -
 .../persistence/exceptions/QueueException.java  |     61 -
 .../RequiredPropertyNotFoundException.java      |     41 -
 .../TransactionNotFoundException.java           |     45 -
 .../UnexpectedEntityTypeException.java          |     45 -
 .../persistence/geo/CollectionGeoSearch.java    |     52 -
 .../persistence/geo/ConnectionGeoSearch.java    |     51 -
 .../persistence/geo/EntityLocationRef.java      |    211 -
 .../EntityLocationRefDistanceComparator.java    |     77 -
 .../persistence/geo/GeoIndexSearcher.java       |    368 -
 .../persistence/geo/GeocellManager.java         |    179 -
 .../usergrid/persistence/geo/GeocellUtils.java  |    539 -
 .../geo/comparator/DoubleTupleComparator.java   |     23 -
 .../persistence/geo/model/BoundingBox.java      |     71 -
 .../persistence/geo/model/CostFunction.java     |     33 -
 .../geo/model/DefaultCostFunction.java          |     34 -
 .../usergrid/persistence/geo/model/Point.java   |     58 -
 .../usergrid/persistence/geo/model/Tuple.java   |     24 -
 .../usergrid/persistence/query/ir/AllNode.java  |     54 -
 .../usergrid/persistence/query/ir/AndNode.java  |     43 -
 .../persistence/query/ir/BooleanNode.java       |     48 -
 .../query/ir/EmailIdentifierNode.java           |     31 -
 .../query/ir/NameIdentifierNode.java            |     28 -
 .../persistence/query/ir/NodeVisitor.java       |     78 -
 .../usergrid/persistence/query/ir/NotNode.java  |     62 -
 .../usergrid/persistence/query/ir/OrNode.java   |     52 -
 .../persistence/query/ir/OrderByNode.java       |     92 -
 .../persistence/query/ir/QueryNode.java         |     28 -
 .../persistence/query/ir/QuerySlice.java        |    344 -
 .../persistence/query/ir/SearchVisitor.java     |    255 -
 .../persistence/query/ir/SliceNode.java         |    168 -
 .../query/ir/UuidIdentifierNode.java            |     32 -
 .../persistence/query/ir/WithinNode.java        |     96 -
 .../query/ir/result/AbstractScanColumn.java     |     70 -
 .../result/CollectionResultsLoaderFactory.java  |     23 -
 .../ir/result/ConnectionIndexSliceParser.java   |     86 -
 .../query/ir/result/ConnectionRefLoader.java    |     65 -
 .../result/ConnectionResultsLoaderFactory.java  |     32 -
 .../ir/result/ConnectionTypesIterator.java      |    179 -
 .../query/ir/result/EmptyIterator.java          |     47 -
 .../query/ir/result/EntityRefLoader.java        |     50 -
 .../query/ir/result/EntityResultsLoader.java    |     46 -
 .../query/ir/result/GeoIterator.java            |    355 -
 .../persistence/query/ir/result/IDLoader.java   |     24 -
 .../query/ir/result/IntersectionIterator.java   |    167 -
 .../query/ir/result/MergeIterator.java          |    137 -
 .../query/ir/result/MultiIterator.java          |     54 -
 .../query/ir/result/OrderByIterator.java        |    252 -
 .../query/ir/result/ResultIterator.java         |     43 -
 .../query/ir/result/ResultsLoader.java          |     29 -
 .../query/ir/result/ResultsLoaderFactory.java   |     21 -
 .../persistence/query/ir/result/ScanColumn.java |     16 -
 .../query/ir/result/ScanColumnTransformer.java  |     23 -
 .../ir/result/SecondaryIndexSliceParser.java    |     60 -
 .../query/ir/result/SliceIterator.java          |    251 -
 .../query/ir/result/SliceParser.java            |     31 -
 .../query/ir/result/StaticIdIterator.java       |     66 -
 .../query/ir/result/SubtractionIterator.java    |    108 -
 .../query/ir/result/UUIDIndexSliceParser.java   |     50 -
 .../query/ir/result/UnionIterator.java          |    252 -
 .../usergrid/persistence/query/tree/.gitignore  |      2 -
 .../persistence/query/tree/AndOperand.java      |     48 -
 .../persistence/query/tree/BooleanLiteral.java  |     48 -
 .../persistence/query/tree/BooleanOperand.java  |     48 -
 .../persistence/query/tree/ContainsOperand.java |     69 -
 .../query/tree/ContainsProperty.java            |     57 -
 .../usergrid/persistence/query/tree/Equal.java  |     52 -
 .../persistence/query/tree/EqualityOperand.java |     88 -
 .../persistence/query/tree/FloatLiteral.java    |     57 -
 .../persistence/query/tree/GreaterThan.java     |     52 -
 .../query/tree/GreaterThanEqual.java            |     56 -
 .../persistence/query/tree/LessThan.java        |     52 -
 .../persistence/query/tree/LessThanEqual.java   |     54 -
 .../persistence/query/tree/Literal.java         |     38 -
 .../persistence/query/tree/LiteralFactory.java  |     58 -
 .../persistence/query/tree/LongLiteral.java     |     64 -
 .../persistence/query/tree/NotOperand.java      |     45 -
 .../persistence/query/tree/NumericLiteral.java  |     24 -
 .../persistence/query/tree/Operand.java         |     47 -
 .../persistence/query/tree/OrOperand.java       |     53 -
 .../persistence/query/tree/Property.java        |     62 -
 .../persistence/query/tree/QueryVisitor.java    |     90 -
 .../persistence/query/tree/StringLiteral.java   |     82 -
 .../persistence/query/tree/UUIDLiteral.java     |     49 -
 .../persistence/query/tree/WithinOperand.java   |    111 -
 .../persistence/query/tree/WithinProperty.java  |     54 -
 .../persistence/schema/CollectionInfo.java      |    207 -
 .../persistence/schema/DictionaryInfo.java      |    117 -
 .../usergrid/persistence/schema/EntityInfo.java |    299 -
 .../persistence/schema/PropertyInfo.java        |    218 -
 .../usergrid/system/UsergridSystemMonitor.java  |     95 -
 .../main/java/org/usergrid/utils/AESUtils.java  |     84 -
 .../main/java/org/usergrid/utils/BCrypt.java    |    627 -
 .../java/org/usergrid/utils/ClassUtils.java     |     58 -
 .../java/org/usergrid/utils/CodecUtils.java     |     45 -
 .../java/org/usergrid/utils/CompositeUtils.java |     54 -
 .../org/usergrid/utils/ConversionUtils.java     |    765 -
 .../main/java/org/usergrid/utils/DateUtils.java |     88 -
 .../main/java/org/usergrid/utils/HttpUtils.java |     51 -
 .../java/org/usergrid/utils/IndexUtils.java     |    218 -
 .../org/usergrid/utils/InflectionUtils.java     |     51 -
 .../main/java/org/usergrid/utils/Inflector.java |    553 -
 .../main/java/org/usergrid/utils/JsonUtils.java |    329 -
 .../main/java/org/usergrid/utils/ListUtils.java |    230 -
 .../main/java/org/usergrid/utils/MailUtils.java |    154 -
 .../main/java/org/usergrid/utils/MapUtils.java  |    377 -
 .../java/org/usergrid/utils/NumberUtils.java    |     35 -
 .../java/org/usergrid/utils/PasswordUtils.java  |     28 -
 .../java/org/usergrid/utils/StringUtils.java    |    172 -
 .../main/java/org/usergrid/utils/TimeUtils.java |     88 -
 .../main/java/org/usergrid/utils/UUIDUtils.java |    412 -
 .../main/java/org/usergrid/utils/Version.java   |    428 -
 .../java/org/usergrid/utils/package-info.java   |     18 -
 .../main/resources/usergrid-core-context.xml    |     52 +-
 .../resources/usergrid-scheduler-context.xml    |      8 +-
 stack/core/src/test/java/io/baas/Simple.java    |     19 -
 .../org/apache/usergrid/AbstractCoreIT.java     |     45 +
 .../java/org/apache/usergrid/Application.java   |    124 +
 .../apache/usergrid/ConcurrentCoreITSuite.java  |     50 +
 .../usergrid/ConcurrentCoreIteratorITSuite.java |     62 +
 .../usergrid/ConcurrentCoreTestSuite.java       |     33 +
 .../org/apache/usergrid/CoreApplication.java    |    171 +
 .../java/org/apache/usergrid/CoreITSetup.java   |     43 +
 .../org/apache/usergrid/CoreITSetupImpl.java    |    145 +
 .../java/org/apache/usergrid/CoreITSuite.java   |     34 +
 .../java/org/apache/usergrid/CoreTestSuite.java |     47 +
 .../org/apache/usergrid/batch/AppArgsTest.java  |     53 +
 .../batch/BulkJobExecutionUnitTest.java         |    211 +
 .../apache/usergrid/batch/BulkTestUtils.java    |     41 +
 .../batch/ConcurrentSchedulerITSuite.java       |     31 +
 .../batch/ConcurrentSchedulerTestSuite.java     |     19 +
 .../apache/usergrid/batch/SchedulerITSuite.java |     34 +
 .../usergrid/batch/SchedulerTestSuite.java      |     18 +
 .../usergrid/batch/UsergridJobFactoryTest.java  |     33 +
 .../batch/job/AbstractSchedulerRuntimeIT.java   |     77 +
 .../usergrid/batch/job/CountdownLatchJob.java   |     67 +
 .../usergrid/batch/job/DelayExecution.java      |    104 +
 .../usergrid/batch/job/DelayHeartbeat.java      |    106 +
 .../batch/job/FailureJobExceuction.java         |     74 +
 .../usergrid/batch/job/OnlyOnceExceution.java   |    117 +
 .../job/OnlyOnceUnlockOnFailExceution.java      |    127 +
 .../usergrid/batch/job/SchedulerRuntime1IT.java |     70 +
 .../usergrid/batch/job/SchedulerRuntime2IT.java |     98 +
 .../usergrid/batch/job/SchedulerRuntime3IT.java |     70 +
 .../usergrid/batch/job/SchedulerRuntime4IT.java |     67 +
 .../usergrid/batch/job/SchedulerRuntime5IT.java |     68 +
 .../usergrid/batch/job/SchedulerRuntime6IT.java |     96 +
 .../usergrid/batch/job/SchedulerRuntime7IT.java |     73 +
 .../usergrid/batch/job/SchedulerRuntime8IT.java |     94 +
 .../usergrid/batch/job/TestJobListener.java     |    121 +
 .../usergrid/batch/job/TestJobListenerTest.java |    143 +
 .../apache/usergrid/batch/job/package-info.java |     18 +
 .../clustering/hazelcast/HazelcastTest.java     |    111 +
 .../count/BatchCountParallelismTest.java        |    124 +
 .../usergrid/count/SimpleBatcherTest.java       |     52 +
 .../count/common/CountSerDeUtilsTest.java       |     70 +
 .../apache/usergrid/count/common/CountTest.java |     69 +
 .../org/apache/usergrid/io/baas/Simple.java     |     19 +
 .../locking/cassandra/HectorLockManagerIT.java  |    186 +
 .../SingleNodeLockTestSingleNode.java           |    169 +
 .../zookeeper/AbstractZooKeeperTest.java        |    126 +
 .../usergrid/locking/zookeeper/ZooPut.java      |    113 +
 .../zookeeper/ZookeeperLockManagerTest.java     |    183 +
 .../java/org/apache/usergrid/mq/MessagesIT.java |    285 +
 .../org/apache/usergrid/mq/QueuePathsTest.java  |     48 +
 .../usergrid/persistence/CollectionIT.java      |   1644 +
 .../usergrid/persistence/CoreSchemaManager.java |     66 +
 .../apache/usergrid/persistence/CounterIT.java  |    240 +
 .../persistence/EntityConnectionsIT.java        |    296 +
 .../persistence/EntityDictionaryIT.java         |    136 +
 .../usergrid/persistence/EntityManagerIT.java   |    569 +
 .../EntityPropertyComparatorTest.java           |    208 +
 .../apache/usergrid/persistence/EntityTest.java |    104 +
 .../org/apache/usergrid/persistence/GeoIT.java  |    529 +
 .../apache/usergrid/persistence/IndexIT.java    |    465 +
 .../usergrid/persistence/PathQueryIT.java       |    170 +
 .../usergrid/persistence/PermissionsIT.java     |    194 +
 .../apache/usergrid/persistence/QueryTest.java  |    312 +
 .../usergrid/persistence/QueryUtilsTest.java    |     42 +
 .../apache/usergrid/persistence/SchemaTest.java |    127 +
 .../apache/usergrid/persistence/UtilsTest.java  |     39 +
 .../cassandra/EntityManagerFactoryImplIT.java   |    176 +
 .../cassandra/QueryProcessorTest.java           |    727 +
 .../SimpleIndexBucketLocatorImplTest.java       |    177 +
 .../cassandra/util/TraceTagUnitTest.java        |     43 +
 .../persistence/entities/SampleEntity.java      |     58 +
 ...EntityLocationRefDistanceComparatorTest.java |    104 +
 .../query/AbstractIteratingQueryIT.java         |   1299 +
 .../persistence/query/AllInCollectionIT.java    |     28 +
 .../persistence/query/AllInConnectionIT.java    |     28 +
 .../query/AllInConnectionNoTypeIT.java          |     55 +
 .../query/IntersectionUnionPagingIT.java        |    163 +
 .../query/MultiOrderByCollectionIT.java         |     28 +
 .../MultiOrderByComplexUnionCollectionIT.java   |     28 +
 .../MultiOrderByComplexUnionConnectionIT.java   |     28 +
 .../query/MultiOrderByConnectionIT.java         |     31 +
 .../query/NotOrderByCollectionIT.java           |     28 +
 .../query/NotOrderByConnectionIT.java           |     28 +
 ...gleOrderByBoundRangeScanAscCollectionIT.java |     28 +
 ...gleOrderByBoundRangeScanAscConnectionIT.java |     28 +
 ...leOrderByBoundRangeScanDescCollectionIT.java |     28 +
 ...leOrderByBoundRangeScanDescConnectionIT.java |     28 +
 ...eOrderByComplexIntersectionCollectionIT.java |     28 +
 ...eOrderByComplexIntersectionConnectionIT.java |     29 +
 .../SingleOrderByComplexUnionCollectionIT.java  |     28 +
 .../SingleOrderByComplexUnionConnectionIT.java  |     28 +
 .../SingleOrderByIntersectionCollectionIT.java  |     30 +
 .../SingleOrderByIntersectionConnectionIT.java  |     30 +
 .../SingleOrderByLessThanLimitCollectionIT.java |     28 +
 .../SingleOrderByLessThanLimitConnectionIT.java |     28 +
 .../SingleOrderByMaxLimitCollectionIT.java      |     29 +
 .../SingleOrderByMaxLimitConnectionIT.java      |     29 +
 ...SingleOrderByNoIntersectionCollectionIT.java |     28 +
 ...SingleOrderByNoIntersectionConnectionIT.java |     28 +
 .../query/SingleOrderByNotCollectionIT.java     |     28 +
 .../query/SingleOrderByNotConnectionIT.java     |     28 +
 ...OrderBySameRangeScanGreaterCollectionIT.java |     28 +
 ...OrderBySameRangeScanGreaterConnectionIT.java |     28 +
 ...meRangeScanGreaterThanEqualCollectionIT.java |     28 +
 ...gleOrderBySameRangeScanLessCollectionIT.java |     28 +
 ...gleOrderBySameRangeScanLessConnectionIT.java |     28 +
 ...ySameRangeScanLessThanEqualCollectionIT.java |     28 +
 ...ySameRangeScanLessThanEqualConnectionIT.java |     28 +
 .../query/ir/result/AbstractScanColumnTest.java |     85 +
 .../query/ir/result/InOrderIterator.java        |    118 +
 .../ir/result/IntersectionIteratorTest.java     |    306 +
 .../query/ir/result/IteratorHelper.java         |     21 +
 .../ir/result/SubtractionIteratorTest.java      |    182 +
 .../query/ir/result/UnionIteratorTest.java      |    379 +
 .../persistence/query/tree/GrammarTreeTest.java |    607 +
 .../persistence/query/tree/LongLiteralTest.java |     62 +
 .../query/tree/StringLiteralTest.java           |     88 +
 .../system/UsergridSystemMonitorIT.java         |     51 +
 .../usergrid/utils/ConversionUtilsTest.java     |     50 +
 .../apache/usergrid/utils/IndexUtilsTest.java   |     71 +
 .../apache/usergrid/utils/JsonUtilsTest.java    |     88 +
 .../apache/usergrid/utils/ListUtilsTest.java    |     55 +
 .../apache/usergrid/utils/MailUtilsTest.java    |     92 +
 .../org/apache/usergrid/utils/MapUtilsTest.java |     43 +
 .../apache/usergrid/utils/TestInflector.java    |     82 +
 .../apache/usergrid/utils/TimeUtilsTest.java    |     61 +
 .../apache/usergrid/utils/UUIDUtilsTest.java    |    371 +
 .../org/apache/usergrid/utils/package-info.java |     18 +
 .../test/java/org/usergrid/AbstractCoreIT.java  |     45 -
 .../src/test/java/org/usergrid/Application.java |    124 -
 .../org/usergrid/ConcurrentCoreITSuite.java     |     50 -
 .../usergrid/ConcurrentCoreIteratorITSuite.java |     62 -
 .../org/usergrid/ConcurrentCoreTestSuite.java   |     33 -
 .../test/java/org/usergrid/CoreApplication.java |    171 -
 .../src/test/java/org/usergrid/CoreITSetup.java |     43 -
 .../test/java/org/usergrid/CoreITSetupImpl.java |    145 -
 .../src/test/java/org/usergrid/CoreITSuite.java |     34 -
 .../test/java/org/usergrid/CoreTestSuite.java   |     47 -
 .../java/org/usergrid/batch/AppArgsTest.java    |     52 -
 .../batch/BulkJobExecutionUnitTest.java         |    209 -
 .../java/org/usergrid/batch/BulkTestUtils.java  |     38 -
 .../batch/ConcurrentSchedulerITSuite.java       |     31 -
 .../batch/ConcurrentSchedulerTestSuite.java     |     19 -
 .../org/usergrid/batch/SchedulerITSuite.java    |     34 -
 .../org/usergrid/batch/SchedulerTestSuite.java  |     18 -
 .../usergrid/batch/UsergridJobFactoryTest.java  |     31 -
 .../batch/job/AbstractSchedulerRuntimeIT.java   |     78 -
 .../usergrid/batch/job/CountdownLatchJob.java   |     67 -
 .../org/usergrid/batch/job/DelayExecution.java  |    104 -
 .../org/usergrid/batch/job/DelayHeartbeat.java  |    106 -
 .../batch/job/FailureJobExceuction.java         |     74 -
 .../usergrid/batch/job/OnlyOnceExceution.java   |    116 -
 .../job/OnlyOnceUnlockOnFailExceution.java      |    126 -
 .../usergrid/batch/job/SchedulerRuntime1IT.java |     70 -
 .../usergrid/batch/job/SchedulerRuntime2IT.java |     98 -
 .../usergrid/batch/job/SchedulerRuntime3IT.java |     71 -
 .../usergrid/batch/job/SchedulerRuntime4IT.java |     68 -
 .../usergrid/batch/job/SchedulerRuntime5IT.java |     69 -
 .../usergrid/batch/job/SchedulerRuntime6IT.java |     97 -
 .../usergrid/batch/job/SchedulerRuntime7IT.java |     74 -
 .../usergrid/batch/job/SchedulerRuntime8IT.java |     95 -
 .../org/usergrid/batch/job/TestJobListener.java |    121 -
 .../usergrid/batch/job/TestJobListenerTest.java |    144 -
 .../org/usergrid/batch/job/package-info.java    |     18 -
 .../clustering/hazelcast/HazelcastTest.java     |    111 -
 .../count/BatchCountParallelismTest.java        |    122 -
 .../org/usergrid/count/SimpleBatcherTest.java   |     51 -
 .../count/common/CountSerDeUtilsTest.java       |     68 -
 .../org/usergrid/count/common/CountTest.java    |     68 -
 .../locking/cassandra/HectorLockManagerIT.java  |    185 -
 .../SingleNodeLockTestSingleNode.java           |    168 -
 .../zookeeper/AbstractZooKeeperTest.java        |    126 -
 .../org/usergrid/locking/zookeeper/ZooPut.java  |    113 -
 .../zookeeper/ZookeeperLockManagerTest.java     |    182 -
 .../test/java/org/usergrid/mq/MessagesIT.java   |    278 -
 .../java/org/usergrid/mq/QueuePathsTest.java    |     48 -
 .../org/usergrid/persistence/CollectionIT.java  |   1637 -
 .../usergrid/persistence/CoreSchemaManager.java |     66 -
 .../org/usergrid/persistence/CounterIT.java     |    235 -
 .../persistence/EntityConnectionsIT.java        |    292 -
 .../persistence/EntityDictionaryIT.java         |    133 -
 .../usergrid/persistence/EntityManagerIT.java   |    563 -
 .../EntityPropertyComparatorTest.java           |    206 -
 .../org/usergrid/persistence/EntityTest.java    |    100 -
 .../java/org/usergrid/persistence/GeoIT.java    |    524 -
 .../java/org/usergrid/persistence/IndexIT.java  |    462 -
 .../org/usergrid/persistence/PathQueryIT.java   |    164 -
 .../org/usergrid/persistence/PermissionsIT.java |    191 -
 .../org/usergrid/persistence/QueryTest.java     |    311 -
 .../usergrid/persistence/QueryUtilsTest.java    |     41 -
 .../org/usergrid/persistence/SchemaTest.java    |    127 -
 .../org/usergrid/persistence/UtilsTest.java     |     38 -
 .../cassandra/EntityManagerFactoryImplIT.java   |    175 -
 .../cassandra/QueryProcessorTest.java           |    726 -
 .../SimpleIndexBucketLocatorImplTest.java       |    176 -
 .../cassandra/util/TraceTagUnitTest.java        |     38 -
 .../persistence/entities/SampleEntity.java      |     58 -
 ...EntityLocationRefDistanceComparatorTest.java |    102 -
 .../query/AbstractIteratingQueryIT.java         |   1299 -
 .../persistence/query/AllInCollectionIT.java    |     28 -
 .../persistence/query/AllInConnectionIT.java    |     28 -
 .../query/AllInConnectionNoTypeIT.java          |     55 -
 .../query/IntersectionUnionPagingIT.java        |    163 -
 .../query/MultiOrderByCollectionIT.java         |     28 -
 .../MultiOrderByComplexUnionCollectionIT.java   |     28 -
 .../MultiOrderByComplexUnionConnectionIT.java   |     28 -
 .../query/MultiOrderByConnectionIT.java         |     31 -
 .../query/NotOrderByCollectionIT.java           |     28 -
 .../query/NotOrderByConnectionIT.java           |     28 -
 ...gleOrderByBoundRangeScanAscCollectionIT.java |     28 -
 ...gleOrderByBoundRangeScanAscConnectionIT.java |     28 -
 ...leOrderByBoundRangeScanDescCollectionIT.java |     28 -
 ...leOrderByBoundRangeScanDescConnectionIT.java |     28 -
 ...eOrderByComplexIntersectionCollectionIT.java |     28 -
 ...eOrderByComplexIntersectionConnectionIT.java |     29 -
 .../SingleOrderByComplexUnionCollectionIT.java  |     28 -
 .../SingleOrderByComplexUnionConnectionIT.java  |     28 -
 .../SingleOrderByIntersectionCollectionIT.java  |     30 -
 .../SingleOrderByIntersectionConnectionIT.java  |     30 -
 .../SingleOrderByLessThanLimitCollectionIT.java |     28 -
 .../SingleOrderByLessThanLimitConnectionIT.java |     28 -
 .../SingleOrderByMaxLimitCollectionIT.java      |     29 -
 .../SingleOrderByMaxLimitConnectionIT.java      |     29 -
 ...SingleOrderByNoIntersectionCollectionIT.java |     28 -
 ...SingleOrderByNoIntersectionConnectionIT.java |     28 -
 .../query/SingleOrderByNotCollectionIT.java     |     28 -
 .../query/SingleOrderByNotConnectionIT.java     |     28 -
 ...OrderBySameRangeScanGreaterCollectionIT.java |     28 -
 ...OrderBySameRangeScanGreaterConnectionIT.java |     28 -
 ...meRangeScanGreaterThanEqualCollectionIT.java |     28 -
 ...gleOrderBySameRangeScanLessCollectionIT.java |     28 -
 ...gleOrderBySameRangeScanLessConnectionIT.java |     28 -
 ...ySameRangeScanLessThanEqualCollectionIT.java |     28 -
 ...ySameRangeScanLessThanEqualConnectionIT.java |     28 -
 .../query/ir/result/AbstractScanColumnTest.java |     84 -
 .../query/ir/result/InOrderIterator.java        |    115 -
 .../ir/result/IntersectionIteratorTest.java     |    304 -
 .../query/ir/result/IteratorHelper.java         |     18 -
 .../ir/result/SubtractionIteratorTest.java      |    180 -
 .../query/ir/result/UnionIteratorTest.java      |    378 -
 .../persistence/query/tree/GrammarTreeTest.java |    592 -
 .../persistence/query/tree/LongLiteralTest.java |     61 -
 .../query/tree/StringLiteralTest.java           |     87 -
 .../system/UsergridSystemMonitorIT.java         |     51 -
 .../org/usergrid/utils/ConversionUtilsTest.java |     49 -
 .../java/org/usergrid/utils/IndexUtilsTest.java |     71 -
 .../java/org/usergrid/utils/JsonUtilsTest.java  |     85 -
 .../java/org/usergrid/utils/ListUtilsTest.java  |     53 -
 .../java/org/usergrid/utils/MailUtilsTest.java  |     90 -
 .../java/org/usergrid/utils/MapUtilsTest.java   |     41 -
 .../java/org/usergrid/utils/TestInflector.java  |     81 -
 .../java/org/usergrid/utils/TimeUtilsTest.java  |     60 -
 .../java/org/usergrid/utils/UUIDUtilsTest.java  |    371 -
 .../java/org/usergrid/utils/package-info.java   |     18 -
 stack/core/src/test/resources/log4j.properties  |     16 +-
 .../test/resources/usergrid-test-context.xml    |      4 +-
 stack/launcher/pom.xml                          |     10 +-
 .../java/org/apache/usergrid/launcher/App.java  |    288 +
 .../apache/usergrid/launcher/AppleUtils.java    |     38 +
 .../launcher/ClasspathStaticHttpHandler.java    |    320 +
 .../launcher/CustomJSPTemplateProcessor.java    |    137 +
 .../usergrid/launcher/EmbeddedServerHelper.java |    193 +
 .../org/apache/usergrid/launcher/JarMain.java   |     40 +
 .../apache/usergrid/launcher/LauncherFrame.java |    461 +
 .../usergrid/launcher/LogViewerFrame.java       |    104 +
 .../org/apache/usergrid/launcher/Server.java    |    618 +
 .../apache/usergrid/launcher/package-info.java  |     18 +
 .../main/java/org/usergrid/launcher/App.java    |    288 -
 .../java/org/usergrid/launcher/AppleUtils.java  |     38 -
 .../launcher/ClasspathStaticHttpHandler.java    |    320 -
 .../launcher/CustomJSPTemplateProcessor.java    |    137 -
 .../usergrid/launcher/EmbeddedServerHelper.java |    193 -
 .../java/org/usergrid/launcher/JarMain.java     |     40 -
 .../org/usergrid/launcher/LauncherFrame.java    |    461 -
 .../org/usergrid/launcher/LogViewerFrame.java   |    104 -
 .../main/java/org/usergrid/launcher/Server.java |    618 -
 .../org/usergrid/launcher/package-info.java     |     18 -
 .../src/main/resources/log4j.properties         |     14 +-
 .../org/apache/usergrid/launcher/dock_icon.png  |    Bin 0 -> 11592 bytes
 .../org/apache/usergrid/launcher/icon_16.png    |    Bin 0 -> 3273 bytes
 .../org/apache/usergrid/launcher/icon_256.png   |    Bin 0 -> 12578 bytes
 .../org/apache/usergrid/launcher/icon_32.png    |    Bin 0 -> 3862 bytes
 .../org/apache/usergrid/launcher/icon_64.png    |    Bin 0 -> 5079 bytes
 .../org/apache/usergrid/launcher/log_viewer.png |    Bin 0 -> 6610 bytes
 .../org/apache/usergrid/launcher/start.png      |    Bin 0 -> 9253 bytes
 .../apache/usergrid/launcher/start_active.png   |    Bin 0 -> 9334 bytes
 .../apache/usergrid/launcher/status_green.png   |    Bin 0 -> 2048 bytes
 .../org/apache/usergrid/launcher/status_off.png |    Bin 0 -> 1847 bytes
 .../org/apache/usergrid/launcher/status_red.png |    Bin 0 -> 2047 bytes
 .../apache/usergrid/launcher/status_yellow.png  |    Bin 0 -> 2092 bytes
 .../org/apache/usergrid/launcher/stop.png       |    Bin 0 -> 8858 bytes
 .../apache/usergrid/launcher/stop_active.png    |    Bin 0 -> 8844 bytes
 .../apache/usergrid/launcher/web_browser.png    |    Bin 0 -> 4531 bytes
 .../org/usergrid/launcher/dock_icon.png         |    Bin 11592 -> 0 bytes
 .../resources/org/usergrid/launcher/icon_16.png |    Bin 3273 -> 0 bytes
 .../org/usergrid/launcher/icon_256.png          |    Bin 12578 -> 0 bytes
 .../resources/org/usergrid/launcher/icon_32.png |    Bin 3862 -> 0 bytes
 .../resources/org/usergrid/launcher/icon_64.png |    Bin 5079 -> 0 bytes
 .../org/usergrid/launcher/log_viewer.png        |    Bin 6610 -> 0 bytes
 .../resources/org/usergrid/launcher/start.png   |    Bin 9253 -> 0 bytes
 .../org/usergrid/launcher/start_active.png      |    Bin 9334 -> 0 bytes
 .../org/usergrid/launcher/status_green.png      |    Bin 2048 -> 0 bytes
 .../org/usergrid/launcher/status_off.png        |    Bin 1847 -> 0 bytes
 .../org/usergrid/launcher/status_red.png        |    Bin 2047 -> 0 bytes
 .../org/usergrid/launcher/status_yellow.png     |    Bin 2092 -> 0 bytes
 .../resources/org/usergrid/launcher/stop.png    |    Bin 8858 -> 0 bytes
 .../org/usergrid/launcher/stop_active.png       |    Bin 8844 -> 0 bytes
 .../org/usergrid/launcher/web_browser.png       |    Bin 4531 -> 0 bytes
 .../resources/usergrid-standalone-context.xml   |      2 +-
 stack/mongo-emulator/README.txt                 |      2 +-
 stack/mongo-emulator/pom.xml                    |     12 +-
 .../usergrid/mongo/MongoChannelHandler.java     |    143 +
 .../usergrid/mongo/MongoMessageDecoder.java     |    115 +
 .../usergrid/mongo/MongoMessageEncoder.java     |     46 +
 .../org/apache/usergrid/mongo/MongoQuery.java   |     30 +
 .../org/apache/usergrid/mongo/MongoServer.java  |    170 +
 .../mongo/MongoServerPipelineFactory.java       |     54 +
 .../usergrid/mongo/commands/Buildinfo.java      |     43 +
 .../usergrid/mongo/commands/Collstats.java      |     58 +
 .../apache/usergrid/mongo/commands/Count.java   |     65 +
 .../apache/usergrid/mongo/commands/Dbstats.java |     40 +
 .../usergrid/mongo/commands/Getlasterror.java   |     48 +
 .../usergrid/mongo/commands/ListDatabases.java  |     51 +
 .../usergrid/mongo/commands/MongoCommand.java   |     81 +
 .../mongo/commands/ReplSetGetStatus.java        |     37 +
 .../usergrid/mongo/commands/ServerStatus.java   |     63 +
 .../usergrid/mongo/commands/Whatsmyuri.java     |     41 +
 .../apache/usergrid/mongo/protocol/Message.java |    191 +
 .../apache/usergrid/mongo/protocol/OpCrud.java  |     46 +
 .../usergrid/mongo/protocol/OpDelete.java       |    196 +
 .../usergrid/mongo/protocol/OpGetMore.java      |    112 +
 .../usergrid/mongo/protocol/OpInsert.java       |    180 +
 .../usergrid/mongo/protocol/OpKillCursors.java  |    115 +
 .../apache/usergrid/mongo/protocol/OpMsg.java   |     77 +
 .../apache/usergrid/mongo/protocol/OpQuery.java |    446 +
 .../apache/usergrid/mongo/protocol/OpReply.java |    189 +
 .../usergrid/mongo/protocol/OpUpdate.java       |    206 +
 .../usergrid/mongo/query/MongoQueryParser.java  |    291 +
 .../mongo/testproxy/MongoMessageFrame.java      |     55 +
 .../testproxy/MongoProxyInboundHandler.java     |    197 +
 .../testproxy/MongoProxyPipelineFactory.java    |     53 +
 .../mongo/testproxy/MongoProxyServer.java       |     55 +
 .../testproxy/MongoProxyServerHandler.java      |     58 +
 .../apache/usergrid/mongo/utils/BSONUtils.java  |     50 +
 .../org/usergrid/mongo/MongoChannelHandler.java |    144 -
 .../org/usergrid/mongo/MongoMessageDecoder.java |    115 -
 .../org/usergrid/mongo/MongoMessageEncoder.java |     46 -
 .../java/org/usergrid/mongo/MongoQuery.java     |     30 -
 .../java/org/usergrid/mongo/MongoServer.java    |    171 -
 .../mongo/MongoServerPipelineFactory.java       |     55 -
 .../org/usergrid/mongo/commands/Buildinfo.java  |     43 -
 .../org/usergrid/mongo/commands/Collstats.java  |     58 -
 .../java/org/usergrid/mongo/commands/Count.java |     65 -
 .../org/usergrid/mongo/commands/Dbstats.java    |     40 -
 .../usergrid/mongo/commands/Getlasterror.java   |     48 -
 .../usergrid/mongo/commands/ListDatabases.java  |     51 -
 .../usergrid/mongo/commands/MongoCommand.java   |     81 -
 .../mongo/commands/ReplSetGetStatus.java        |     37 -
 .../usergrid/mongo/commands/ServerStatus.java   |     63 -
 .../org/usergrid/mongo/commands/Whatsmyuri.java |     41 -
 .../org/usergrid/mongo/protocol/Message.java    |    191 -
 .../org/usergrid/mongo/protocol/OpCrud.java     |     46 -
 .../org/usergrid/mongo/protocol/OpDelete.java   |    196 -
 .../org/usergrid/mongo/protocol/OpGetMore.java  |    112 -
 .../org/usergrid/mongo/protocol/OpInsert.java   |    180 -
 .../usergrid/mongo/protocol/OpKillCursors.java  |    115 -
 .../java/org/usergrid/mongo/protocol/OpMsg.java |     77 -
 .../org/usergrid/mongo/protocol/OpQuery.java    |    447 -
 .../org/usergrid/mongo/protocol/OpReply.java    |    189 -
 .../org/usergrid/mongo/protocol/OpUpdate.java   |    206 -
 .../usergrid/mongo/query/MongoQueryParser.java  |    291 -
 .../mongo/testproxy/MongoMessageFrame.java      |     55 -
 .../testproxy/MongoProxyInboundHandler.java     |    197 -
 .../testproxy/MongoProxyPipelineFactory.java    |     53 -
 .../mongo/testproxy/MongoProxyServer.java       |     55 -
 .../testproxy/MongoProxyServerHandler.java      |     58 -
 .../org/usergrid/mongo/utils/BSONUtils.java     |     50 -
 .../usergrid/mongo/AbstractMongoTest.java       |     62 +
 .../apache/usergrid/mongo/BasicMongoTest.java   |    340 +
 .../usergrid/mongo/DatabaseInitializer.java     |    145 +
 .../apache/usergrid/mongo/MongoQueryTest.java   |    503 +
 .../org/usergrid/mongo/AbstractMongoTest.java   |     61 -
 .../java/org/usergrid/mongo/BasicMongoTest.java |    340 -
 .../org/usergrid/mongo/DatabaseInitializer.java |    145 -
 .../java/org/usergrid/mongo/MongoQueryTest.java |    503 -
 .../test/resources/usergrid-test-context.xml    |      4 +-
 stack/pom.xml                                   |      4 +-
 stack/query-validator/pom.xml                   |     22 +-
 .../query/validator/ApiServerRunner.java        |     24 +-
 .../usergrid/query/validator/QueryEntity.java   |      4 +-
 .../usergrid/query/validator/QueryRequest.java  |      2 +-
 .../usergrid/query/validator/QueryResponse.java |      4 +-
 .../usergrid/query/validator/QueryRunner.java   |      4 +-
 .../validator/QueryValidationConfiguration.java |      6 +-
 .../query/validator/QueryValidator.java         |      4 +-
 .../usergrid/query/validator/SqliteRunner.java  |      6 +-
 .../usergrid-query-validator-context.xml        |      2 +-
 .../query/validator/QueryValidationTest.java    |      2 +-
 .../query/validator/QueryValidatorRunner.java   |     14 +-
 .../src/test/resources/log4j.properties         |     18 +-
 .../test/resources/usergrid-test-context.xml    |      4 +-
 stack/rest/pom.xml                              |     18 +-
 .../usergrid/rest/AbstractContextResource.java  |    163 +
 .../org/apache/usergrid/rest/ApiResponse.java   |    635 +
 .../rest/JacksonCustomMapperProvider.java       |     65 +
 .../org/apache/usergrid/rest/RootResource.java  |    396 +
 .../rest/ServerEnvironmentProperties.java       |     47 +
 .../apache/usergrid/rest/SwaggerServlet.java    |    170 +
 .../apache/usergrid/rest/SystemResource.java    |    110 +
 .../usergrid/rest/TextToJsonSwapWriter.java     |    119 +
 .../rest/applications/ApplicationResource.java  |    608 +
 .../rest/applications/AuthResource.java         |    249 +
 .../rest/applications/ServiceResource.java      |    660 +
 .../applications/assets/AssetsResource.java     |    190 +
 .../applications/events/EventsResource.java     |     69 +
 .../rest/applications/queues/QueueResource.java |    203 +
 .../queues/QueueSubscriberResource.java         |    157 +
 .../queues/QueueSubscriptionResource.java       |    159 +
 .../queues/QueueTransactionsResource.java       |     99 +
 .../users/AbstractUserExtensionResource.java    |     47 +
 .../rest/applications/users/UserResource.java   |    577 +
 .../rest/applications/users/UsersResource.java  |    263 +
 .../exceptions/AbstractExceptionMapper.java     |    105 +
 .../usergrid/rest/exceptions/AuthErrorInfo.java |    111 +
 .../AuthorizationExceptionMapper.java           |     36 +
 ...cateUniquePropertyExistsExceptionMapper.java |     35 +
 .../EntityNotFoundExceptionMapper.java          |     34 +
 ...orbiddenServiceOperationExceptionMapper.java |     35 +
 .../IllegalArgumentExceptionMapper.java         |     32 +
 .../exceptions/JsonReadExceptionMapper.java     |     35 +
 .../exceptions/JsonWriteExceptionMapper.java    |     35 +
 .../exceptions/ManagementExceptionMapper.java   |     38 +
 .../usergrid/rest/exceptions/NoOpException.java |     50 +
 .../rest/exceptions/NoOpExceptionMapper.java    |     32 +
 .../NotImplementedExceptionMapper.java          |     32 +
 .../exceptions/OAuthProblemExceptionMapper.java |     51 +
 ...rganizationApplicationNotFoundException.java |     39 +
 ...ationApplicationNotFoundExceptionMapper.java |     16 +
 .../exceptions/PersistenceExceptionMapper.java  |     27 +
 .../exceptions/QueryParseExceptionMapper.java   |     33 +
 .../exceptions/QueryTokenExceptionMapper.java   |     35 +
 .../RecentlyUsedPasswordExceptionMapper.java    |     21 +
 .../rest/exceptions/RedirectionException.java   |     27 +
 .../exceptions/RedirectionExceptionMapper.java  |     30 +
 ...RequiredPropertyNotFoundExceptionMapper.java |     35 +
 .../rest/exceptions/SecurityException.java      |     88 +
 .../exceptions/SecurityExceptionMapper.java     |     45 +
 .../rest/exceptions/ServiceExceptionMapper.java |     28 +
 .../ServiceResourceNotFoundExceptionMapper.java |     41 +
 .../rest/exceptions/ThrowableMapper.java        |     26 +
 .../TransactionNotFoundExceptionMapper.java     |     34 +
 .../rest/filters/ContentTypeFilter.java         |    323 +
 .../rest/filters/JSONPCallbackFilter.java       |     66 +
 .../usergrid/rest/filters/MeteringFilter.java   |    343 +
 .../usergrid/rest/filters/TracingFilter.java    |     74 +
 .../rest/management/ManagementResource.java     |    476 +
 .../management/metrics/MetricsResource.java     |     39 +
 .../organizations/OrganizationResource.java     |    254 +
 .../organizations/OrganizationsResource.java    |    191 +
 .../applications/ApplicationResource.java       |    194 +
 .../applications/ApplicationsResource.java      |    158 +
 .../organizations/users/UsersResource.java      |    341 +
 .../rest/management/users/UserResource.java     |    422 +
 .../rest/management/users/UsersResource.java    |    210 +
 .../organizations/OrganizationsResource.java    |    206 +
 .../organizations/OrganizationResource.java     |    158 +
 .../rest/security/CrossOriginRequestFilter.java |     38 +
 .../security/SecuredResourceFilterFactory.java  |    325 +
 .../annotations/RequireAdminUserAccess.java     |     31 +
 .../annotations/RequireApplicationAccess.java   |     34 +
 .../annotations/RequireOrganizationAccess.java  |     34 +
 .../annotations/RequireSystemAccess.java        |     31 +
 .../security/shiro/RestSecurityManager.java     |     59 +
 .../ShiroAuthenticationExceptionMapper.java     |     58 +
 .../shiro/filters/BasicAuthSecurityFilter.java  |    111 +
 .../ClientCredentialsSecurityFilter.java        |     68 +
 .../OAuth2AccessTokenSecurityFilter.java        |    210 +
 .../security/shiro/filters/SecurityFilter.java  |    135 +
 .../session/HttpRequestSessionManager.java      |     87 +
 .../session/HttpServletRequestSession.java      |    132 +
 .../usergrid/rest/test/PropertiesResource.java  |     87 +
 .../apache/usergrid/rest/utils/CORSUtils.java   |    173 +
 .../apache/usergrid/rest/utils/JSONPUtils.java  |    102 +
 .../usergrid/rest/utils/PathingUtils.java       |     35 +
 .../usergrid/rest/AbstractContextResource.java  |    164 -
 .../java/org/usergrid/rest/ApiResponse.java     |    636 -
 .../rest/JacksonCustomMapperProvider.java       |     65 -
 .../java/org/usergrid/rest/RootResource.java    |    397 -
 .../rest/ServerEnvironmentProperties.java       |     47 -
 .../java/org/usergrid/rest/SwaggerServlet.java  |    171 -
 .../java/org/usergrid/rest/SystemResource.java  |    110 -
 .../org/usergrid/rest/TextToJsonSwapWriter.java |    119 -
 .../rest/applications/ApplicationResource.java  |    610 -
 .../rest/applications/AuthResource.java         |    251 -
 .../rest/applications/ServiceResource.java      |    662 -
 .../applications/assets/AssetsResource.java     |    190 -
 .../applications/events/EventsResource.java     |     69 -
 .../rest/applications/queues/QueueResource.java |    204 -
 .../queues/QueueSubscriberResource.java         |    158 -
 .../queues/QueueSubscriptionResource.java       |    160 -
 .../queues/QueueTransactionsResource.java       |     99 -
 .../users/AbstractUserExtensionResource.java    |     47 -
 .../rest/applications/users/UserResource.java   |    580 -
 .../rest/applications/users/UsersResource.java  |    264 -
 .../exceptions/AbstractExceptionMapper.java     |    106 -
 .../usergrid/rest/exceptions/AuthErrorInfo.java |    111 -
 .../AuthorizationExceptionMapper.java           |     36 -
 ...cateUniquePropertyExistsExceptionMapper.java |     35 -
 .../EntityNotFoundExceptionMapper.java          |     34 -
 ...orbiddenServiceOperationExceptionMapper.java |     35 -
 .../IllegalArgumentExceptionMapper.java         |     32 -
 .../exceptions/JsonReadExceptionMapper.java     |     35 -
 .../exceptions/JsonWriteExceptionMapper.java    |     35 -
 .../exceptions/ManagementExceptionMapper.java   |     38 -
 .../usergrid/rest/exceptions/NoOpException.java |     50 -
 .../rest/exceptions/NoOpExceptionMapper.java    |     32 -
 .../NotImplementedExceptionMapper.java          |     32 -
 .../exceptions/OAuthProblemExceptionMapper.java |     51 -
 ...rganizationApplicationNotFoundException.java |     39 -
 ...ationApplicationNotFoundExceptionMapper.java |     16 -
 .../exceptions/PersistenceExceptionMapper.java  |     27 -
 .../exceptions/QueryParseExceptionMapper.java   |     34 -
 .../exceptions/QueryTokenExceptionMapper.java   |     36 -
 .../RecentlyUsedPasswordExceptionMapper.java    |     21 -
 .../rest/exceptions/RedirectionException.java   |     27 -
 .../exceptions/RedirectionExceptionMapper.java  |     30 -
 ...RequiredPropertyNotFoundExceptionMapper.java |     35 -
 .../rest/exceptions/SecurityException.java      |     88 -
 .../exceptions/SecurityExceptionMapper.java     |     45 -
 .../rest/exceptions/ServiceExceptionMapper.java |     28 -
 .../ServiceResourceNotFoundExceptionMapper.java |     41 -
 .../rest/exceptions/ThrowableMapper.java        |     26 -
 .../TransactionNotFoundExceptionMapper.java     |     34 -
 .../rest/filters/ContentTypeFilter.java         |    323 -
 .../rest/filters/JSONPCallbackFilter.java       |     66 -
 .../usergrid/rest/filters/MeteringFilter.java   |    343 -
 .../usergrid/rest/filters/TracingFilter.java    |     74 -
 .../rest/management/ManagementResource.java     |    478 -
 .../management/metrics/MetricsResource.java     |     39 -
 .../organizations/OrganizationResource.java     |    254 -
 .../organizations/OrganizationsResource.java    |    192 -
 .../applications/ApplicationResource.java       |    195 -
 .../applications/ApplicationsResource.java      |    158 -
 .../organizations/users/UsersResource.java      |    341 -
 .../rest/management/users/UserResource.java     |    423 -
 .../rest/management/users/UsersResource.java    |    211 -
 .../organizations/OrganizationsResource.java    |    206 -
 .../organizations/OrganizationResource.java     |    159 -
 .../rest/security/CrossOriginRequestFilter.java |     38 -
 .../security/SecuredResourceFilterFactory.java  |    325 -
 .../annotations/RequireAdminUserAccess.java     |     31 -
 .../annotations/RequireApplicationAccess.java   |     34 -
 .../annotations/RequireOrganizationAccess.java  |     34 -
 .../annotations/RequireSystemAccess.java        |     31 -
 .../security/shiro/RestSecurityManager.java     |     60 -
 .../ShiroAuthenticationExceptionMapper.java     |     59 -
 .../shiro/filters/BasicAuthSecurityFilter.java  |    111 -
 .../ClientCredentialsSecurityFilter.java        |     69 -
 .../OAuth2AccessTokenSecurityFilter.java        |    211 -
 .../security/shiro/filters/SecurityFilter.java  |    136 -
 .../session/HttpRequestSessionManager.java      |     87 -
 .../session/HttpServletRequestSession.java      |    132 -
 .../usergrid/rest/test/PropertiesResource.java  |     87 -
 .../java/org/usergrid/rest/utils/CORSUtils.java |    173 -
 .../org/usergrid/rest/utils/JSONPUtils.java     |    103 -
 .../org/usergrid/rest/utils/PathingUtils.java   |     35 -
 .../main/resources/usergrid-rest-context.xml    |     12 +-
 .../org/usergrid/rest/TestResource/error.jsp    |      2 +-
 .../ApplicationResource/authorize_form.jsp      |      2 +-
 .../applications/ApplicationResource/error.jsp  |      2 +-
 .../applications/users/UserResource/error.jsp   |      2 +-
 .../UserResource/resetpw_email_success.jsp      |      2 +-
 .../users/UserResource/resetpw_set_form.jsp     |      2 +-
 .../users/UserResource/resetpw_set_success.jsp  |      2 +-
 .../applications/users/UsersResource/error.jsp  |      2 +-
 .../UsersResource/resetpw_email_success.jsp     |      2 +-
 .../ManagementResource/authorize_form.jsp       |      2 +-
 .../management/ManagementResource/error.jsp     |      2 +-
 .../OrganizationResource/error.jsp              |      2 +-
 .../management/users/UserResource/error.jsp     |      2 +-
 .../UserResource/resetpw_email_success.jsp      |      2 +-
 .../users/UserResource/resetpw_set_form.jsp     |      2 +-
 .../users/UserResource/resetpw_set_success.jsp  |      2 +-
 .../management/users/UsersResource/error.jsp    |      2 +-
 .../UsersResource/resetpw_email_success.jsp     |      2 +-
 stack/rest/src/main/webapp/WEB-INF/web.xml      |     12 +-
 .../apache/usergrid/rest/AbstractRestIT.java    |    355 +
 .../java/org/apache/usergrid/rest/BasicIT.java  |    310 +
 .../usergrid/rest/ConcurrentRestITSuite.java    |     47 +
 .../usergrid/rest/DatabaseInitializer.java      |    145 +
 .../java/org/apache/usergrid/rest/ITSetup.java  |    166 +
 .../org/apache/usergrid/rest/RestITSuite.java   |     55 +
 .../apache/usergrid/rest/TestContextSetup.java  |     58 +
 .../apache/usergrid/rest/TomcatResource.java    |     73 +
 .../ApplicationRequestCounterIT.java            |     93 +
 .../applications/ApplicationResourceIT.java     |    530 +
 .../rest/applications/DevicesResourceIT.java    |     62 +
 .../applications/assets/AssetResourceIT.java    |    259 +
 .../collection/BadGrammarQueryTest.java         |     60 +
 .../collection/BrowserCompatibilityTest.java    |     86 +
 .../collection/PagingResourceIT.java            |    218 +
 .../collection/activities/AndOrQueryTest.java   |    176 +
 .../collection/activities/OrderByTest.java      |    149 +
 .../activities/PagingEntitiesTest.java          |    118 +
 .../collection/activities/PutTest.java          |     64 +
 .../collection/groups/GeoPagingTest.java        |    124 +
 .../collection/groups/UpdateGroupIT.java        |    106 +
 .../applications/events/EventsResourceIT.java   |    109 +
 .../queues/AbstractQueueResourceIT.java         |    468 +
 .../queues/QueueResourceLong1IT.java            |    130 +
 .../queues/QueueResourceLong2IT.java            |     82 +
 .../queues/QueueResourceLong3IT.java            |    184 +
 .../queues/QueueResourceShortIT.java            |    415 +
 .../applications/users/ActivityResourceIT.java  |    180 +
 .../users/CollectionsResourceIT.java            |    199 +
 .../users/ConnectionResourceTest.java           |    193 +
 .../applications/users/GroupResourceIT.java     |    270 +
 .../applications/users/OwnershipResourceIT.java |    344 +
 .../users/PermissionsResourceIT.java            |    699 +
 .../applications/users/RetrieveUsersTest.java   |     66 +
 .../rest/applications/users/UserResourceIT.java |   1286 +
 .../users/extensions/TestResource.java          |     50 +
 .../rest/applications/utils/TestUtils.java      |     46 +
 .../rest/applications/utils/UserRepo.java       |     65 +
 .../rest/filters/ContentTypeResourceIT.java     |    309 +
 .../rest/management/ManagementResourceIT.java   |    530 +
 .../rest/management/RegistrationIT.java         |    350 +
 .../organizations/AdminEmailEncodingIT.java     |    101 +
 .../organizations/OrganizationResourceIT.java   |     70 +
 .../organizations/OrganizationsResourceIT.java  |    257 +
 .../rest/management/users/MUUserResourceIT.java |    601 +
 .../UsersOrganizationsResourceIT.java           |     56 +
 .../rest/test/PropertiesResourceIT.java         |     75 +
 .../rest/test/resource/CollectionResource.java  |     26 +
 .../usergrid/rest/test/resource/Connection.java |     51 +
 .../rest/test/resource/CustomCollection.java    |     31 +
 .../rest/test/resource/EntityResource.java      |    104 +
 .../apache/usergrid/rest/test/resource/Me.java  |     35 +
 .../rest/test/resource/NamedResource.java       |    185 +
 .../rest/test/resource/ResultsParser.java       |     22 +
 .../rest/test/resource/RootResource.java        |     64 +
 .../rest/test/resource/SetResource.java         |     82 +
 .../rest/test/resource/TestContext.java         |    170 +
 .../rest/test/resource/ValueResource.java       |    307 +
 .../rest/test/resource/app/Application.java     |     72 +
 .../usergrid/rest/test/resource/app/Device.java |     48 +
 .../usergrid/rest/test/resource/app/User.java   |     54 +
 .../rest/test/resource/app/UsersCollection.java |     62 +
 .../resource/app/queue/DevicesCollection.java   |     36 +
 .../rest/test/resource/app/queue/Queue.java     |    183 +
 .../resource/app/queue/QueuesCollection.java    |     35 +
 .../app/queue/SubscribersCollection.java        |     59 +
 .../test/resource/app/queue/Transaction.java    |     76 +
 .../app/queue/TransactionsCollection.java       |     35 +
 .../rest/test/resource/mgmt/Application.java    |     48 +
 .../resource/mgmt/ApplicationsCollection.java   |     51 +
 .../rest/test/resource/mgmt/Management.java     |     93 +
 .../rest/test/resource/mgmt/Organization.java   |     59 +
 .../resource/mgmt/OrganizationsCollection.java  |     54 +
 .../rest/test/security/TestAdminUser.java       |     53 +
 .../rest/test/security/TestAppUser.java         |     53 +
 .../usergrid/rest/test/security/TestUser.java   |    126 +
 .../java/org/usergrid/rest/AbstractRestIT.java  |    355 -
 .../test/java/org/usergrid/rest/BasicIT.java    |    310 -
 .../usergrid/rest/ConcurrentRestITSuite.java    |     47 -
 .../org/usergrid/rest/DatabaseInitializer.java  |    145 -
 .../test/java/org/usergrid/rest/ITSetup.java    |    166 -
 .../java/org/usergrid/rest/RestITSuite.java     |     55 -
 .../org/usergrid/rest/TestContextSetup.java     |     58 -
 .../java/org/usergrid/rest/TomcatResource.java  |     74 -
 .../ApplicationRequestCounterIT.java            |     93 -
 .../applications/ApplicationResourceIT.java     |    531 -
 .../rest/applications/DevicesResourceIT.java    |     62 -
 .../applications/assets/AssetResourceIT.java    |    260 -
 .../collection/BadGrammarQueryTest.java         |     60 -
 .../collection/BrowserCompatibilityTest.java    |     86 -
 .../collection/PagingResourceIT.java            |    218 -
 .../collection/activities/AndOrQueryTest.java   |    176 -
 .../collection/activities/OrderByTest.java      |    149 -
 .../activities/PagingEntitiesTest.java          |    119 -
 .../collection/activities/PutTest.java          |     64 -
 .../collection/groups/GeoPagingTest.java        |    124 -
 .../collection/groups/UpdateGroupIT.java        |    108 -
 .../applications/events/EventsResourceIT.java   |    109 -
 .../queues/AbstractQueueResourceIT.java         |    468 -
 .../queues/QueueResourceLong1IT.java            |    130 -
 .../queues/QueueResourceLong2IT.java            |     82 -
 .../queues/QueueResourceLong3IT.java            |    184 -
 .../queues/QueueResourceShortIT.java            |    415 -
 .../applications/users/ActivityResourceIT.java  |    180 -
 .../users/CollectionsResourceIT.java            |    199 -
 .../users/ConnectionResourceTest.java           |    193 -
 .../applications/users/GroupResourceIT.java     |    270 -
 .../applications/users/OwnershipResourceIT.java |    344 -
 .../users/PermissionsResourceIT.java            |    699 -
 .../applications/users/RetrieveUsersTest.java   |     66 -
 .../rest/applications/users/UserResourceIT.java |   1286 -
 .../users/extensions/TestResource.java          |     50 -
 .../rest/applications/utils/TestUtils.java      |     46 -
 .../rest/applications/utils/UserRepo.java       |     65 -
 .../rest/filters/ContentTypeResourceIT.java     |    310 -
 .../rest/management/ManagementResourceIT.java   |    531 -
 .../rest/management/RegistrationIT.java         |    351 -
 .../organizations/AdminEmailEncodingIT.java     |    101 -
 .../organizations/OrganizationResourceIT.java   |     70 -
 .../organizations/OrganizationsResourceIT.java  |    256 -
 .../rest/management/users/MUUserResourceIT.java |    602 -
 .../UsersOrganizationsResourceIT.java           |     56 -
 .../rest/test/PropertiesResourceIT.java         |     75 -
 .../rest/test/resource/CollectionResource.java  |     26 -
 .../usergrid/rest/test/resource/Connection.java |     51 -
 .../rest/test/resource/CustomCollection.java    |     31 -
 .../rest/test/resource/EntityResource.java      |    104 -
 .../org/usergrid/rest/test/resource/Me.java     |     35 -
 .../rest/test/resource/NamedResource.java       |    185 -
 .../rest/test/resource/ResultsParser.java       |     22 -
 .../rest/test/resource/RootResource.java        |     64 -
 .../rest/test/resource/SetResource.java         |     82 -
 .../rest/test/resource/TestContext.java         |    170 -
 .../rest/test/resource/ValueResource.java       |    307 -
 .../rest/test/resource/app/Application.java     |     72 -
 .../usergrid/rest/test/resource/app/Device.java |     48 -
 .../usergrid/rest/test/resource/app/User.java   |     54 -
 .../rest/test/resource/app/UsersCollection.java |     62 -
 .../resource/app/queue/DevicesCollection.java   |     36 -
 .../rest/test/resource/app/queue/Queue.java     |    183 -
 .../resource/app/queue/QueuesCollection.java    |     35 -
 .../app/queue/SubscribersCollection.java        |     59 -
 .../test/resource/app/queue/Transaction.java    |     76 -
 .../app/queue/TransactionsCollection.java       |     35 -
 .../rest/test/resource/mgmt/Application.java    |     48 -
 .../resource/mgmt/ApplicationsCollection.java   |     51 -
 .../rest/test/resource/mgmt/Management.java     |     93 -
 .../rest/test/resource/mgmt/Organization.java   |     59 -
 .../resource/mgmt/OrganizationsCollection.java  |     54 -
 .../rest/test/security/TestAdminUser.java       |     53 -
 .../rest/test/security/TestAppUser.java         |     53 -
 .../usergrid/rest/test/security/TestUser.java   |    126 -
 stack/rest/src/test/resources/log4j.properties  |     14 +-
 .../test/resources/usergrid-test-context.xml    |     12 +-
 stack/services/groupstest.out                   | 126088 ++++++++--------
 stack/services/pom.xml                          |     12 +-
 .../management/AccountCreationProps.java        |    119 +
 .../usergrid/management/ActivationState.java    |      8 +
 .../usergrid/management/ApplicationCreator.java |     14 +
 .../usergrid/management/ApplicationInfo.java    |    134 +
 .../usergrid/management/ManagementService.java  |    319 +
 .../usergrid/management/OrganizationInfo.java   |    185 +
 .../management/OrganizationOwnerInfo.java       |     53 +
 .../management/OrganizationProfile.java         |     87 +
 .../apache/usergrid/management/UserInfo.java    |    149 +
 .../cassandra/AccountCreationPropsImpl.java     |    111 +
 .../cassandra/ApplicationCreatorImpl.java       |     77 +
 .../cassandra/ManagementServiceImpl.java        |   2907 +
 .../ApplicationCreationException.java           |     26 +
 .../exceptions/DisabledAdminUserException.java  |     42 +
 .../exceptions/DisabledAppUserException.java    |     42 +
 .../exceptions/IncorrectPasswordException.java  |     42 +
 .../exceptions/ManagementException.java         |     42 +
 .../RecentlyUsedPasswordException.java          |     27 +
 .../UnableToLeaveOrganizationException.java     |     42 +
 .../UnactivatedAdminUserException.java          |     42 +
 .../exceptions/UnactivatedAppUserException.java |     42 +
 .../UnactivatedOrganizationException.java       |     42 +
 .../UnconfirmedAdminUserException.java          |     42 +
 .../usergrid/management/utils/AccountUtils.java |     42 +
 .../usergrid/security/AuthPrincipalInfo.java    |     71 +
 .../usergrid/security/AuthPrincipalType.java    |    115 +
 .../security/crypto/EncryptionService.java      |     70 +
 .../security/crypto/EncryptionServiceImpl.java  |    208 +
 .../security/crypto/command/BcryptCommand.java  |     92 +
 .../crypto/command/EncryptionCommand.java       |     49 +
 .../security/crypto/command/Md5HashCommand.java |     60 +
 .../crypto/command/PlainTextCommand.java        |     64 +
 .../crypto/command/SaltedHasherCommand.java     |     67 +
 .../crypto/command/Sha1HashCommand.java         |     73 +
 .../usergrid/security/oauth/AccessInfo.java     |    187 +
 .../security/oauth/ClientCredentialsInfo.java   |     93 +
 .../usergrid/security/oauth/OAuthProxy.java     |     43 +
 .../security/oauth/OAuthProxyFactory.java       |     31 +
 .../security/providers/AbstractProvider.java    |     61 +
 .../security/providers/FacebookProvider.java    |    183 +
 .../security/providers/FoursquareProvider.java  |    159 +
 .../providers/PingIdentityProvider.java         |    143 +
 .../security/providers/SignInAsProvider.java    |     19 +
 .../providers/SignInProviderFactory.java        |     51 +
 .../security/salt/NoOpSaltProvider.java         |     36 +
 .../security/salt/PropertiesSaltProvider.java   |     53 +
 .../usergrid/security/salt/SaltProvider.java    |     31 +
 .../security/shiro/CustomPermission.java        |    224 +
 .../shiro/CustomPermissionResolver.java         |     29 +
 .../shiro/PrincipalCredentialsToken.java        |    139 +
 .../apache/usergrid/security/shiro/Realm.java   |    539 +
 .../AbstractAccessTokenCredentials.java         |     33 +
 .../credentials/AbstractClientCredentials.java  |     28 +
 .../AbstractPasswordCredentials.java            |     33 +
 .../credentials/AccessTokenCredentials.java     |     22 +
 .../shiro/credentials/AdminUserAccessToken.java |     24 +
 .../shiro/credentials/AdminUserCredentials.java |     21 +
 .../shiro/credentials/AdminUserPassword.java    |     24 +
 .../credentials/ApplicationAccessToken.java     |     24 +
 .../ApplicationClientCredentials.java           |     24 +
 .../credentials/ApplicationCredentials.java     |     21 +
 .../shiro/credentials/ApplicationGuest.java     |     24 +
 .../credentials/ApplicationUserAccessToken.java |     24 +
 .../credentials/ApplicationUserCredentials.java |     21 +
 .../credentials/ApplicationUserPassword.java    |     24 +
 .../shiro/credentials/ClientCredentials.java    |     24 +
 .../credentials/OrganizationAccessToken.java    |     24 +
 .../OrganizationClientCredentials.java          |     24 +
 .../credentials/OrganizationCredentials.java    |     21 +
 .../shiro/credentials/PasswordCredentials.java  |     22 +
 .../shiro/credentials/PrincipalCredentials.java |     21 +
 .../shiro/principals/AdminUserPrincipal.java    |     29 +
 .../principals/ApplicationGuestPrincipal.java   |     48 +
 .../shiro/principals/ApplicationPrincipal.java  |     48 +
 .../principals/ApplicationUserPrincipal.java    |     35 +
 .../shiro/principals/OrganizationPrincipal.java |     48 +
 .../shiro/principals/PrincipalIdentifier.java   |     51 +
 .../shiro/principals/UserPrincipal.java         |     69 +
 .../security/shiro/utils/SubjectUtils.java      |    448 +
 .../usergrid/security/tokens/TokenCategory.java |     83 +
 .../usergrid/security/tokens/TokenInfo.java     |    125 +
 .../usergrid/security/tokens/TokenService.java  |     39 +
 .../tokens/cassandra/TokenServiceImpl.java      |    625 +
 .../tokens/exceptions/BadTokenException.java    |     32 +
 .../exceptions/ExpiredTokenException.java       |     32 +
 .../exceptions/InvalidTokenException.java       |     32 +
 .../tokens/exceptions/TokenException.java       |     35 +
 .../services/AbstractCollectionService.java     |    571 +
 .../services/AbstractConnectionsService.java    |    521 +
 .../AbstractPathBasedColllectionService.java    |    149 +
 .../usergrid/services/AbstractService.java      |   1305 +
 .../org/apache/usergrid/services/Service.java   |     49 +
 .../apache/usergrid/services/ServiceAction.java |     21 +
 .../ServiceCollectionEventListener.java         |     22 +
 .../usergrid/services/ServiceContext.java       |    449 +
 .../services/ServiceExecutionEvent.java         |     79 +
 .../services/ServiceExecutionEventListener.java |     22 +
 .../apache/usergrid/services/ServiceInfo.java   |    438 +
 .../usergrid/services/ServiceManager.java       |    430 +
 .../services/ServiceManagerFactory.java         |    131 +
 .../usergrid/services/ServiceParameter.java     |    452 +
 .../usergrid/services/ServicePayload.java       |    198 +
 .../usergrid/services/ServiceRequest.java       |    371 +
 .../usergrid/services/ServiceResults.java       |    304 +
 .../apache/usergrid/services/ServiceUtils.java  |     21 +
 .../services/activities/ActivitiesService.java  |     33 +
 .../applications/ApplicationsService.java       |    214 +
 .../usergrid/services/assets/AssetsService.java |     57 +
 .../services/assets/data/AssetMimeHandler.java  |     89 +
 .../services/assets/data/AssetUtils.java        |    106 +
 .../services/assets/data/BinaryStore.java       |     27 +
 .../assets/data/LocalFileBinaryStore.java       |     84 +
 .../services/assets/data/S3BinaryStore.java     |    201 +
 .../services/devices/DevicesService.java        |     51 +
 .../services/devices/users/UsersService.java    |     32 +
 .../ForbiddenServiceOperationException.java     |     41 +
 .../services/exceptions/ServiceException.java   |     45 +
 .../exceptions/ServiceInvocationException.java  |     83 +
 .../ServiceResourceNotFoundException.java       |     39 +
 .../UndefinedServiceEntityTypeException.java    |     45 +
 .../UnsupportedServiceOperationException.java   |     39 +
 .../generic/GenericCollectionService.java       |     27 +
 .../generic/GenericConnectionsService.java      |     27 +
 .../services/generic/RootCollectionService.java |     27 +
 .../usergrid/services/groups/GroupsService.java |    224 +
 .../groups/activities/ActivitiesService.java    |     74 +
 .../services/groups/roles/RolesService.java     |     32 +
 .../services/groups/users/UsersService.java     |     32 +
 .../users/activities/ActivitiesService.java     |     84 +
 .../groups/users/devices/DevicesService.java    |     32 +
 .../services/messages/MessagesService.java      |     33 +
 .../usergrid/services/roles/RolesService.java   |    236 +
 .../services/roles/groups/GroupsService.java    |     32 +
 .../services/roles/users/UsersService.java      |     84 +
 .../usergrid/services/users/UsersService.java   |    287 +
 .../users/activities/ActivitiesService.java     |    142 +
 .../services/users/devices/DevicesService.java  |     32 +
 .../users/following/FollowingService.java       |     47 +
 .../services/users/groups/GroupsService.java    |     32 +
 .../services/users/roles/RolesService.java      |     84 +
 .../org/apache/usergrid/utils/PythonUtils.java  |    102 +
 .../management/AccountCreationProps.java        |    119 -
 .../usergrid/management/ActivationState.java    |      8 -
 .../usergrid/management/ApplicationCreator.java |     14 -
 .../usergrid/management/ApplicationInfo.java    |    134 -
 .../usergrid/management/ManagementService.java  |    319 -
 .../usergrid/management/OrganizationInfo.java   |    185 -
 .../management/OrganizationOwnerInfo.java       |     53 -
 .../management/OrganizationProfile.java         |     87 -
 .../java/org/usergrid/management/UserInfo.java  |    149 -
 .../cassandra/AccountCreationPropsImpl.java     |    112 -
 .../cassandra/ApplicationCreatorImpl.java       |     77 -
 .../cassandra/ManagementServiceImpl.java        |   2909 -
 .../ApplicationCreationException.java           |     26 -
 .../exceptions/DisabledAdminUserException.java  |     42 -
 .../exceptions/DisabledAppUserException.java    |     42 -
 .../exceptions/IncorrectPasswordException.java  |     42 -
 .../exceptions/ManagementException.java         |     42 -
 .../RecentlyUsedPasswordException.java          |     27 -
 .../UnableToLeaveOrganizationException.java     |     42 -
 .../UnactivatedAdminUserException.java          |     42 -
 .../exceptions/UnactivatedAppUserException.java |     42 -
 .../UnactivatedOrganizationException.java       |     42 -
 .../UnconfirmedAdminUserException.java          |     42 -
 .../usergrid/management/utils/AccountUtils.java |     42 -
 .../usergrid/security/AuthPrincipalInfo.java    |     71 -
 .../usergrid/security/AuthPrincipalType.java    |    115 -
 .../security/crypto/EncryptionService.java      |     70 -
 .../security/crypto/EncryptionServiceImpl.java  |    208 -
 .../security/crypto/command/BcryptCommand.java  |     92 -
 .../crypto/command/EncryptionCommand.java       |     49 -
 .../security/crypto/command/Md5HashCommand.java |     61 -
 .../crypto/command/PlainTextCommand.java        |     64 -
 .../crypto/command/SaltedHasherCommand.java     |     67 -
 .../crypto/command/Sha1HashCommand.java         |     73 -
 .../org/usergrid/security/oauth/AccessInfo.java |    187 -
 .../security/oauth/ClientCredentialsInfo.java   |     93 -
 .../org/usergrid/security/oauth/OAuthProxy.java |     43 -
 .../security/oauth/OAuthProxyFactory.java       |     31 -
 .../security/providers/AbstractProvider.java    |     61 -
 .../security/providers/FacebookProvider.java    |    183 -
 .../security/providers/FoursquareProvider.java  |    159 -
 .../providers/PingIdentityProvider.java         |    143 -
 .../security/providers/SignInAsProvider.java    |     19 -
 .../providers/SignInProviderFactory.java        |     51 -
 .../security/salt/NoOpSaltProvider.java         |     36 -
 .../security/salt/PropertiesSaltProvider.java   |     53 -
 .../usergrid/security/salt/SaltProvider.java    |     31 -
 .../security/shiro/CustomPermission.java        |    225 -
 .../shiro/CustomPermissionResolver.java         |     29 -
 .../shiro/PrincipalCredentialsToken.java        |    139 -
 .../java/org/usergrid/security/shiro/Realm.java |    540 -
 .../AbstractAccessTokenCredentials.java         |     33 -
 .../credentials/AbstractClientCredentials.java  |     28 -
 .../AbstractPasswordCredentials.java            |     33 -
 .../credentials/AccessTokenCredentials.java     |     22 -
 .../shiro/credentials/AdminUserAccessToken.java |     24 -
 .../shiro/credentials/AdminUserCredentials.java |     21 -
 .../shiro/credentials/AdminUserPassword.java    |     24 -
 .../credentials/ApplicationAccessToken.java     |     24 -
 .../ApplicationClientCredentials.java           |     24 -
 .../credentials/ApplicationCredentials.java     |     21 -
 .../shiro/credentials/ApplicationGuest.java     |     24 -
 .../credentials/ApplicationUserAccessToken.java |     24 -
 .../credentials/ApplicationUserCredentials.java |     21 -
 .../credentials/ApplicationUserPassword.java    |     24 -
 .../shiro/credentials/ClientCredentials.java    |     24 -
 .../credentials/OrganizationAccessToken.java    |     24 -
 .../OrganizationClientCredentials.java          |     24 -
 .../credentials/OrganizationCredentials.java    |     21 -
 .../shiro/credentials/PasswordCredentials.java  |     22 -
 .../shiro/credentials/PrincipalCredentials.java |     21 -
 .../shiro/principals/AdminUserPrincipal.java    |     29 -
 .../principals/ApplicationGuestPrincipal.java   |     48 -
 .../shiro/principals/ApplicationPrincipal.java  |     48 -
 .../principals/ApplicationUserPrincipal.java    |     35 -
 .../shiro/principals/OrganizationPrincipal.java |     48 -
 .../shiro/principals/PrincipalIdentifier.java   |     51 -
 .../shiro/principals/UserPrincipal.java         |     69 -
 .../security/shiro/utils/SubjectUtils.java      |    449 -
 .../usergrid/security/tokens/TokenCategory.java |     83 -
 .../org/usergrid/security/tokens/TokenInfo.java |    125 -
 .../usergrid/security/tokens/TokenService.java  |     39 -
 .../tokens/cassandra/TokenServiceImpl.java      |    627 -
 .../tokens/exceptions/BadTokenException.java    |     32 -
 .../exceptions/ExpiredTokenException.java       |     32 -
 .../exceptions/InvalidTokenException.java       |     32 -
 .../tokens/exceptions/TokenException.java       |     35 -
 .../services/AbstractCollectionService.java     |    571 -
 .../services/AbstractConnectionsService.java    |    521 -
 .../AbstractPathBasedColllectionService.java    |    149 -
 .../org/usergrid/services/AbstractService.java  |   1306 -
 .../java/org/usergrid/services/Service.java     |     49 -
 .../org/usergrid/services/ServiceAction.java    |     21 -
 .../ServiceCollectionEventListener.java         |     22 -
 .../org/usergrid/services/ServiceContext.java   |    449 -
 .../services/ServiceExecutionEvent.java         |     79 -
 .../services/ServiceExecutionEventListener.java |     22 -
 .../java/org/usergrid/services/ServiceInfo.java |    438 -
 .../org/usergrid/services/ServiceManager.java   |    431 -
 .../services/ServiceManagerFactory.java         |    131 -
 .../org/usergrid/services/ServiceParameter.java |    452 -
 .../org/usergrid/services/ServicePayload.java   |    199 -
 .../org/usergrid/services/ServiceRequest.java   |    372 -
 .../org/usergrid/services/ServiceResults.java   |    304 -
 .../org/usergrid/services/ServiceUtils.java     |     21 -
 .../services/activities/ActivitiesService.java  |     33 -
 .../applications/ApplicationsService.java       |    215 -
 .../usergrid/services/assets/AssetsService.java |     57 -
 .../services/assets/data/AssetMimeHandler.java  |     90 -
 .../services/assets/data/AssetUtils.java        |    107 -
 .../services/assets/data/BinaryStore.java       |     27 -
 .../assets/data/LocalFileBinaryStore.java       |     85 -
 .../services/assets/data/S3BinaryStore.java     |    202 -
 .../services/devices/DevicesService.java        |     51 -
 .../services/devices/users/UsersService.java    |     32 -
 .../ForbiddenServiceOperationException.java     |     41 -
 .../services/exceptions/ServiceException.java   |     45 -
 .../exceptions/ServiceInvocationException.java  |     83 -
 .../ServiceResourceNotFoundException.java       |     39 -
 .../UndefinedServiceEntityTypeException.java    |     45 -
 .../UnsupportedServiceOperationException.java   |     39 -
 .../generic/GenericCollectionService.java       |     27 -
 .../generic/GenericConnectionsService.java      |     27 -
 .../services/generic/RootCollectionService.java |     27 -
 .../usergrid/services/groups/GroupsService.java |    224 -
 .../groups/activities/ActivitiesService.java    |     74 -
 .../services/groups/roles/RolesService.java     |     32 -
 .../services/groups/users/UsersService.java     |     32 -
 .../users/activities/ActivitiesService.java     |     84 -
 .../groups/users/devices/DevicesService.java    |     32 -
 .../services/messages/MessagesService.java      |     33 -
 .../usergrid/services/roles/RolesService.java   |    236 -
 .../services/roles/groups/GroupsService.java    |     32 -
 .../services/roles/users/UsersService.java      |     84 -
 .../usergrid/services/users/UsersService.java   |    287 -
 .../users/activities/ActivitiesService.java     |    142 -
 .../services/users/devices/DevicesService.java  |     32 -
 .../users/following/FollowingService.java       |     47 -
 .../services/users/groups/GroupsService.java    |     32 -
 .../services/users/roles/RolesService.java      |     84 -
 .../java/org/usergrid/utils/PythonUtils.java    |    102 -
 .../org/apache/usergrid/pyusergrid/__init__.py  |      0
 .../usergrid/pyusergrid/services/__init__.py    |      0
 .../pyusergrid/services/pytest/PytestService.py |     15 +
 .../pyusergrid/services/pytest/__init__.py      |      0
 .../usergrid/pyusergrid/services/pytest/test.py |     13 +
 .../python/org/apache/usergrid/test/__init__.py |      0
 .../python/org/apache/usergrid/test/test.py     |     13 +
 .../src/main/python/pyusergrid/__init__.py      |      0
 .../main/python/pyusergrid/services/__init__.py |      0
 .../pyusergrid/services/pytest/PytestService.py |     15 -
 .../pyusergrid/services/pytest/__init__.py      |      0
 .../python/pyusergrid/services/pytest/test.py   |     13 -
 stack/services/src/main/python/test/__init__.py |      0
 stack/services/src/main/python/test/test.py     |     13 -
 .../resources/usergrid-services-context.xml     |     18 +-
 .../test/java/baas/io/simple/SimpleService.java |     18 -
 .../usergrid/ConcurrentServiceITSuite.java      |     43 +
 .../org/apache/usergrid/ServiceApplication.java |    189 +
 .../org/apache/usergrid/ServiceITSetup.java     |     45 +
 .../org/apache/usergrid/ServiceITSetupImpl.java |    130 +
 .../org/apache/usergrid/ServiceITSuite.java     |     41 +
 .../usergrid/baas/io/simple/SimpleService.java  |     18 +
 .../apache/usergrid/management/EmailFlowIT.java |    421 +
 .../management/ManagementTestHelper.java        |     41 +
 .../usergrid/management/MockImapClient.java     |     83 +
 .../usergrid/management/OrganizationIT.java     |    231 +
 .../org/apache/usergrid/management/RoleIT.java  |     99 +
 .../cassandra/ApplicationCreatorIT.java         |     67 +
 .../cassandra/ManagementServiceIT.java          |    729 +
 .../cassandra/ManagementTestHelperImpl.java     |     85 +
 .../org/apache/usergrid/python/JythonTest.java  |     38 +
 .../usergrid/security/CustomResolverTest.java   |    168 +
 .../crypto/EncryptionServiceImplTest.java       |    171 +
 .../crypto/command/BcryptCommandTest.java       |    166 +
 .../crypto/command/Md5HashCommandTest.java      |     71 +
 .../crypto/command/Sha1HashCommandTest.java     |     68 +
 .../security/providers/FacebookProviderIT.java  |     83 +
 .../providers/PingIdentityProviderIT.java       |     64 +
 .../security/tokens/TokenServiceIT.java         |    442 +
 .../usergrid/services/AbstractServiceIT.java    |     38 +
 .../usergrid/services/ActivitiesServiceIT.java  |    112 +
 .../services/ApplicationsServiceIT.java         |     36 +
 .../usergrid/services/CollectionServiceIT.java  |    292 +
 .../usergrid/services/ConnectionsServiceIT.java |     83 +
 .../usergrid/services/GroupServiceIT.java       |     81 +
 .../usergrid/services/RolesServiceIT.java       |    281 +
 .../usergrid/services/ServiceFactoryIT.java     |     58 +
 .../usergrid/services/ServiceInfoTest.java      |    109 +
 .../usergrid/services/ServiceInvocationIT.java  |    146 +
 .../usergrid/services/ServiceRequestIT.java     |     82 +
 .../usergrid/services/UsersServiceIT.java       |     53 +
 .../services/assets/data/AssetUtilsTest.java    |     45 +
 .../org/usergrid/ConcurrentServiceITSuite.java  |     43 -
 .../java/org/usergrid/ServiceApplication.java   |    188 -
 .../test/java/org/usergrid/ServiceITSetup.java  |     44 -
 .../java/org/usergrid/ServiceITSetupImpl.java   |    129 -
 .../test/java/org/usergrid/ServiceITSuite.java  |     41 -
 .../org/usergrid/management/EmailFlowIT.java    |    419 -
 .../management/ManagementTestHelper.java        |     40 -
 .../org/usergrid/management/MockImapClient.java |     83 -
 .../org/usergrid/management/OrganizationIT.java |    229 -
 .../java/org/usergrid/management/RoleIT.java    |     97 -
 .../cassandra/ApplicationCreatorIT.java         |     66 -
 .../cassandra/ManagementServiceIT.java          |    729 -
 .../cassandra/ManagementTestHelperImpl.java     |     85 -
 .../java/org/usergrid/python/JythonTest.java    |     38 -
 .../usergrid/security/CustomResolverTest.java   |    169 -
 .../crypto/EncryptionServiceImplTest.java       |    170 -
 .../crypto/command/BcryptCommandTest.java       |    165 -
 .../crypto/command/Md5HashCommandTest.java      |     71 -
 .../crypto/command/Sha1HashCommandTest.java     |     67 -
 .../security/providers/FacebookProviderIT.java  |     81 -
 .../providers/PingIdentityProviderIT.java       |     63 -
 .../security/tokens/TokenServiceIT.java         |    440 -
 .../usergrid/services/AbstractServiceIT.java    |     38 -
 .../usergrid/services/ActivitiesServiceIT.java  |    111 -
 .../services/ApplicationsServiceIT.java         |     35 -
 .../usergrid/services/CollectionServiceIT.java  |    290 -
 .../usergrid/services/ConnectionsServiceIT.java |     82 -
 .../org/usergrid/services/GroupServiceIT.java   |     80 -
 .../org/usergrid/services/RolesServiceIT.java   |    279 -
 .../org/usergrid/services/ServiceFactoryIT.java |     57 -
 .../org/usergrid/services/ServiceInfoTest.java  |    108 -
 .../usergrid/services/ServiceInvocationIT.java  |    145 -
 .../org/usergrid/services/ServiceRequestIT.java |     78 -
 .../org/usergrid/services/UsersServiceIT.java   |     52 -
 .../services/assets/data/AssetUtilsTest.java    |     44 -
 .../src/test/resources/log4j.properties         |     14 +-
 .../test/resources/usergrid-test-context.xml    |      8 +-
 stack/test-utils/pom.xml                        |      6 +-
 .../apache/usergrid/NoExitSecurityManager.java  |     64 +
 .../usergrid/cassandra/AvailablePortFinder.java |    211 +
 .../usergrid/cassandra/CassandraResource.java   |    505 +
 .../usergrid/cassandra/ClearShiroSubject.java   |     31 +
 .../apache/usergrid/cassandra/Concurrent.java   |     15 +
 .../cassandra/ConcurrentJunitRunner.java        |     75 +
 .../usergrid/cassandra/ConcurrentSuite.java     |    101 +
 .../apache/usergrid/cassandra/DataControl.java  |     17 +
 .../apache/usergrid/cassandra/DataLoader.java   |      9 +
 .../usergrid/cassandra/SchemaManager.java       |     18 +
 .../org/usergrid/NoExitSecurityManager.java     |     64 -
 .../usergrid/cassandra/AvailablePortFinder.java |    211 -
 .../usergrid/cassandra/CassandraResource.java   |    505 -
 .../usergrid/cassandra/ClearShiroSubject.java   |     31 -
 .../java/org/usergrid/cassandra/Concurrent.java |     15 -
 .../cassandra/ConcurrentJunitRunner.java        |     75 -
 .../org/usergrid/cassandra/ConcurrentSuite.java |    101 -
 .../org/usergrid/cassandra/DataControl.java     |     17 -
 .../java/org/usergrid/cassandra/DataLoader.java |      9 -
 .../org/usergrid/cassandra/SchemaManager.java   |     18 -
 .../cassandra/AnotherCassandraResourceIT.java   |     69 +
 .../cassandra/CassandraResourceITSuite.java     |     28 +
 .../cassandra/CassandraResourceTest.java        |    107 +
 .../usergrid/cassandra/FakeSchemaManager.java   |     33 +
 .../usergrid/cassandra/OkThisIsTheLastIT.java   |     78 +
 .../YetAnotherCassandraResourceIT.java          |     72 +
 .../cassandra/AnotherCassandraResourceIT.java   |     68 -
 .../cassandra/CassandraResourceITSuite.java     |     25 -
 .../cassandra/CassandraResourceTest.java        |    104 -
 .../usergrid/cassandra/FakeSchemaManager.java   |     32 -
 .../usergrid/cassandra/OkThisIsTheLastIT.java   |     76 -
 .../YetAnotherCassandraResourceIT.java          |     70 -
 .../test/resources/usergrid-test-context.xml    |      6 +-
 stack/tools/README.md                           |      4 +-
 stack/tools/pom.xml                             |     12 +-
 .../java/org/apache/usergrid/tools/ApiDoc.java  |    113 +
 .../org/apache/usergrid/tools/AppAudit.java     |    230 +
 .../org/apache/usergrid/tools/AppNameFix.java   |    108 +
 .../java/org/apache/usergrid/tools/Cli.java     |    268 +
 .../java/org/apache/usergrid/tools/Command.java |     99 +
 .../org/apache/usergrid/tools/CredExport.java   |    121 +
 .../apache/usergrid/tools/DupAdminRepair.java   |    309 +
 .../org/apache/usergrid/tools/DupOrgRepair.java |    265 +
 .../apache/usergrid/tools/EntityCleanup.java    |    174 +
 .../usergrid/tools/EntityInsertBenchMark.java   |    271 +
 .../usergrid/tools/EntityReadBenchMark.java     |    358 +
 .../org/apache/usergrid/tools/EntityUpdate.java |    190 +
 .../java/org/apache/usergrid/tools/Export.java  |    430 +
 .../usergrid/tools/ExportDataCreator.java       |    105 +
 .../usergrid/tools/ExportingToolBase.java       |    182 +
 .../java/org/apache/usergrid/tools/Import.java  |    544 +
 .../org/apache/usergrid/tools/ImportFB.java     |    100 +
 .../org/apache/usergrid/tools/IndexRebuild.java |    205 +
 .../java/org/apache/usergrid/tools/Metrics.java |    212 +
 .../usergrid/tools/OrganizationExport.java      |    115 +
 .../apache/usergrid/tools/PopulateSample.java   |    141 +
 .../apache/usergrid/tools/ResetSuperUser.java   |    103 +
 .../java/org/apache/usergrid/tools/SetupDB.java |     57 +
 .../java/org/apache/usergrid/tools/Test.java    |     53 +
 .../org/apache/usergrid/tools/ToolBase.java     |    244 +
 .../usergrid/tools/UniqueIndexCleanup.java      |    379 +
 .../org/apache/usergrid/tools/UserManager.java  |     44 +
 .../apache/usergrid/tools/WarehouseExport.java  |    514 +
 .../apache/usergrid/tools/WarehouseUpsert.java  |    153 +
 .../usergrid/tools/apidoc/swagger/Api.java      |     92 +
 .../tools/apidoc/swagger/ApiListing.java        |    145 +
 .../tools/apidoc/swagger/ApiOperation.java      |    247 +
 .../tools/apidoc/swagger/ApiOperationError.java |     60 +
 .../usergrid/tools/apidoc/swagger/ApiParam.java |    184 +
 .../apidoc/swagger/ApiParamAllowableValues.java |     62 +
 .../apache/usergrid/tools/bean/AppScore.java    |     82 +
 .../apache/usergrid/tools/bean/ExportOrg.java   |     58 +
 .../apache/usergrid/tools/bean/MetricLine.java  |     82 +
 .../apache/usergrid/tools/bean/MetricQuery.java |     93 +
 .../apache/usergrid/tools/bean/MetricSort.java  |     26 +
 .../apache/usergrid/tools/bean/OrgScore.java    |     93 +
 .../main/java/org/usergrid/tools/ApiDoc.java    |    114 -
 .../main/java/org/usergrid/tools/AppAudit.java  |    231 -
 .../java/org/usergrid/tools/AppNameFix.java     |    109 -
 .../src/main/java/org/usergrid/tools/Cli.java   |    269 -
 .../main/java/org/usergrid/tools/Command.java   |     99 -
 .../java/org/usergrid/tools/CredExport.java     |    122 -
 .../java/org/usergrid/tools/DupAdminRepair.java |    310 -
 .../java/org/usergrid/tools/DupOrgRepair.java   |    266 -
 .../java/org/usergrid/tools/EntityCleanup.java  |    176 -
 .../usergrid/tools/EntityInsertBenchMark.java   |    273 -
 .../org/usergrid/tools/EntityReadBenchMark.java |    360 -
 .../java/org/usergrid/tools/EntityUpdate.java   |    191 -
 .../main/java/org/usergrid/tools/Export.java    |    431 -
 .../org/usergrid/tools/ExportDataCreator.java   |    105 -
 .../org/usergrid/tools/ExportingToolBase.java   |    183 -
 .../main/java/org/usergrid/tools/Import.java    |    545 -
 .../main/java/org/usergrid/tools/ImportFB.java  |    101 -
 .../java/org/usergrid/tools/IndexRebuild.java   |    206 -
 .../main/java/org/usergrid/tools/Metrics.java   |    213 -
 .../org/usergrid/tools/OrganizationExport.java  |    117 -
 .../java/org/usergrid/tools/PopulateSample.java |    142 -
 .../java/org/usergrid/tools/ResetSuperUser.java |    105 -
 .../main/java/org/usergrid/tools/SetupDB.java   |     57 -
 .../src/main/java/org/usergrid/tools/Test.java  |     53 -
 .../main/java/org/usergrid/tools/ToolBase.java  |    246 -
 .../org/usergrid/tools/UniqueIndexCleanup.java  |    381 -
 .../java/org/usergrid/tools/UserManager.java    |     45 -
 .../org/usergrid/tools/WarehouseExport.java     |    516 -
 .../org/usergrid/tools/WarehouseUpsert.java     |    153 -
 .../org/usergrid/tools/apidoc/swagger/Api.java  |     92 -
 .../tools/apidoc/swagger/ApiListing.java        |    145 -
 .../tools/apidoc/swagger/ApiOperation.java      |    247 -
 .../tools/apidoc/swagger/ApiOperationError.java |     60 -
 .../usergrid/tools/apidoc/swagger/ApiParam.java |    184 -
 .../apidoc/swagger/ApiParamAllowableValues.java |     62 -
 .../java/org/usergrid/tools/bean/AppScore.java  |     82 -
 .../java/org/usergrid/tools/bean/ExportOrg.java |     58 -
 .../org/usergrid/tools/bean/MetricLine.java     |     82 -
 .../org/usergrid/tools/bean/MetricQuery.java    |     93 -
 .../org/usergrid/tools/bean/MetricSort.java     |     26 -
 .../java/org/usergrid/tools/bean/OrgScore.java  |     93 -
 stack/tools/src/main/resources/log4j.xml        |      2 +-
 stack/websocket/pom.xml                         |     10 +-
 .../websocket/WebSocketChannelHandler.java      |    356 +
 .../usergrid/websocket/WebSocketKeyStore.java   |     49 +
 .../usergrid/websocket/WebSocketServer.java     |    194 +
 .../websocket/WebSocketServerIndexPage.java     |     71 +
 .../WebSocketServerPipelineFactory.java         |     74 +
 .../websocket/WebSocketSslContextFactory.java   |     62 +
 .../websocket/WebSocketChannelHandler.java      |    357 -
 .../usergrid/websocket/WebSocketKeyStore.java   |     49 -
 .../org/usergrid/websocket/WebSocketServer.java |    195 -
 .../websocket/WebSocketServerIndexPage.java     |     71 -
 .../WebSocketServerPipelineFactory.java         |     75 -
 .../websocket/WebSocketSslContextFactory.java   |     62 -
 .../usergrid/websocket/ExampleListener.java     |     41 +
 .../websocket/SimpleMessageProducer.java        |     61 +
 .../usergrid/websocket/WebSocketServerTest.java |     43 +
 .../org/usergrid/websocket/ExampleListener.java |     41 -
 .../websocket/SimpleMessageProducer.java        |     61 -
 .../usergrid/websocket/WebSocketServerTest.java |     42 -
 .../test/resources/testApplicationContext.xml   |     20 +-
 1986 files changed, 200951 insertions(+), 200966 deletions(-)
----------------------------------------------------------------------



[71/96] [abbrv] USERGRID-2 package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/index-files/index-2.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/index-files/index-2.html b/sdks/android/doc/index-files/index-2.html
index 6940394..53cbf2a 100644
--- a/sdks/android/doc/index-files/index-2.html
+++ b/sdks/android/doc/index-files/index-2.html
@@ -83,55 +83,55 @@ function windowTitle()
 <B>C</B></H2>
 <DL>
 <DT><A HREF="../org/usergrid/android/client/entities/Entity.html#CLASS_FOR_ENTITY_TYPE"><B>CLASS_FOR_ENTITY_TYPE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client"><B>Client</B></A> - Class in <A HREF="../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A><DD>The Client class for accessing the Usergrid API.<DT><A HREF="../org/usergrid/android/client/Client.html#Client()"><B>Client()</B></A> - 
-Constructor for class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client"><B>Client</B></A> - Class in <A HREF="../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A><DD>The Client class for accessing the Usergrid API.<DT><A HREF="../org/usergrid/android/client/Client.html#Client()"><B>Client()</B></A> - 
+Constructor for class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Default constructor for instantiating a client.
 <DT><A HREF="../org/usergrid/android/client/Client.html#Client(java.lang.String)"><B>Client(String)</B></A> - 
-Constructor for class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Constructor for class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Instantiate client for a specific app
-<DT><A HREF="../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client"><B>Client.Query</B></A> - Interface in <A HREF="../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client"><B>Client.QueuePosition</B></A> - Enum in <A HREF="../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.usergrid.android.client.callbacks"><B>ClientAsyncTask</B></A>&lt;<A HREF="../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="type parameter in ClientAsyncTask">T</A>&gt; - Class in <A HREF="../org/usergrid/android/client/callbacks/package-summary.html">org.usergrid.android.client.callbacks</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/callbacks/ClientAsyn
 cTask.html#ClientAsyncTask(org.usergrid.android.client.callbacks.ClientCallback)"><B>ClientAsyncTask(ClientCallback&lt;T&gt;)</B></A> - 
-Constructor for class org.usergrid.android.client.callbacks.<A HREF="../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.usergrid.android.client.callbacks">ClientAsyncTask</A>
+<DT><A HREF="../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client"><B>Client.Query</B></A> - Interface in <A HREF="../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client"><B>Client.QueuePosition</B></A> - Enum in <A HREF="../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.apache.usergrid.android.client.callbacks"><B>ClientAsyncTask</B></A>&lt;<A HREF="../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="type parameter in ClientAsyncTask">T</A>&gt; - Class in <A HREF="../org/usergrid/android/client/callbacks/package-summary.html">org.apache.usergrid.android.client.callbacks</A><DD>&nbsp;<DT><A HREF="../org/us
 ergrid/android/client/callbacks/ClientAsyncTask.html#ClientAsyncTask(org.apache.usergrid.android.client.callbacks.ClientCallback)"><B>ClientAsyncTask(ClientCallback&lt;T&gt;)</B></A> - 
+Constructor for class org.apache.usergrid.android.client.callbacks.<A HREF="../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.apache.usergrid.android.client.callbacks">ClientAsyncTask</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>ClientCallback</B></A>&lt;<A HREF="../org/usergrid/android/client/callbacks/ClientCallback.html" title="type parameter in ClientCallback">T</A>&gt; - Interface in <A HREF="../org/usergrid/android/client/callbacks/package-summary.html">org.usergrid.android.client.callbacks</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response"><B>ClientCredentialsInfo</B></A> - Class in <A HREF="../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/response/ClientCredentialsInfo.html#ClientCredentialsInfo(java.lang.String, java.lang.String)"><B>ClientCredentialsInfo(String, String)</B></A> - 
-Constructor for class org.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response">ClientCredentialsInfo</A>
+<DT><A HREF="../org/usergrid/android/client/callbacks/ClientCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>ClientCallback</B></A>&lt;<A HREF="../org/usergrid/android/client/callbacks/ClientCallback.html" title="type parameter in ClientCallback">T</A>&gt; - Interface in <A HREF="../org/usergrid/android/client/callbacks/package-summary.html">org.apache.usergrid.android.client.callbacks</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response"><B>ClientCredentialsInfo</B></A> - Class in <A HREF="../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/response/ClientCredentialsInfo.html#ClientCredentialsInfo(java.lang.String, java.lang.String)"><B>ClientCredentialsInfo(String, String)</B></A> - 
+Constructor for class org.apache.usergrid.android.client.response.<A HREF="../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response">ClientCredentialsInfo</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.html#connectEntities(java.lang.String, java.lang.String, java.lang.String, java.lang.String)"><B>connectEntities(String, String, String, String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Connect two entities together.
-<DT><A HREF="../org/usergrid/android/client/Client.html#connectEntitiesAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)"><B>connectEntitiesAsync(String, String, String, String, ApiResponseCallback)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#connectEntitiesAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)"><B>connectEntitiesAsync(String, String, String, String, ApiResponseCallback)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Connect two entities together.
-<DT><A HREF="../org/usergrid/android/client/Client.html#createEntity(org.usergrid.android.client.entities.Entity)"><B>createEntity(Entity)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#createEntity(org.apache.usergrid.android.client.entities.Entity)"><B>createEntity(Entity)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Create a new entity on the server.
 <DT><A HREF="../org/usergrid/android/client/Client.html#createEntity(java.util.Map)"><B>createEntity(Map&lt;String, Object&gt;)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Create a new entity on the server from a set of properties.
-<DT><A HREF="../org/usergrid/android/client/Client.html#createEntityAsync(org.usergrid.android.client.entities.Entity, org.usergrid.android.client.callbacks.ApiResponseCallback)"><B>createEntityAsync(Entity, ApiResponseCallback)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#createEntityAsync(org.apache.usergrid.android.client.entities.Entity, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)"><B>createEntityAsync(Entity, ApiResponseCallback)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Create a new entity on the server.
-<DT><A HREF="../org/usergrid/android/client/Client.html#createEntityAsync(java.util.Map, org.usergrid.android.client.callbacks.ApiResponseCallback)"><B>createEntityAsync(Map&lt;String, Object&gt;, ApiResponseCallback)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#createEntityAsync(java.util.Map, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)"><B>createEntityAsync(Map&lt;String, Object&gt;, ApiResponseCallback)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Create a new entity on the server from a set of properties.
 <DT><A HREF="../org/usergrid/android/client/Client.html#createGroup(java.lang.String)"><B>createGroup(String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Creates a group with the specified group path.
 <DT><A HREF="../org/usergrid/android/client/Client.html#createGroup(java.lang.String, java.lang.String)"><B>createGroup(String, String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Creates a group with the specified group path and group title.
-<DT><A HREF="../org/usergrid/android/client/Client.html#createGroupAsync(java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)"><B>createGroupAsync(String, ApiResponseCallback)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#createGroupAsync(java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)"><B>createGroupAsync(String, ApiResponseCallback)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Creates a group with the specified group path.
-<DT><A HREF="../org/usergrid/android/client/Client.html#createGroupAsync(java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)"><B>createGroupAsync(String, String, ApiResponseCallback)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#createGroupAsync(java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)"><B>createGroupAsync(String, String, ApiResponseCallback)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Creates a group with the specified group path and group title.
 <DT><A HREF="../org/usergrid/android/client/Client.html#createUser(java.lang.String, java.lang.String, java.lang.String, java.lang.String)"><B>createUser(String, String, String, String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Creates a user.
-<DT><A HREF="../org/usergrid/android/client/Client.html#createUserAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)"><B>createUserAsync(String, String, String, String, ApiResponseCallback)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#createUserAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)"><B>createUserAsync(String, String, String, String, ApiResponseCallback)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Creates a user.
 </DL>
 <HR>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/index-files/index-20.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/index-files/index-20.html b/sdks/android/doc/index-files/index-20.html
index fa79c74..bd547b5 100644
--- a/sdks/android/doc/index-files/index-20.html
+++ b/sdks/android/doc/index-files/index-20.html
@@ -83,101 +83,101 @@ function windowTitle()
 <B>V</B></H2>
 <DL>
 <DT><A HREF="../org/usergrid/android/client/Client.QueuePosition.html#valueOf(java.lang.String)"><B>valueOf(String)</B></A> - 
-Static method in enum org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A>
+Static method in enum org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A>
 <DD>Returns the enum constant of this type with the specified name.
 <DT><A HREF="../org/usergrid/android/client/Client.QueuePosition.html#values()"><B>values()</B></A> - 
-Static method in enum org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A>
+Static method in enum org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A>
 <DD>Returns an array containing the constants of this enum type, in
 the order they are declared.
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_ADD"><B>VERB_ADD</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_CANCEL"><B>VERB_CANCEL</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_CHECKIN"><B>VERB_CHECKIN</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_DELETE"><B>VERB_DELETE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_FAVORITE"><B>VERB_FAVORITE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_FOLLOW"><B>VERB_FOLLOW</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_GIVE"><B>VERB_GIVE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_IGNORE"><B>VERB_IGNORE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_INVITE"><B>VERB_INVITE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_JOIN"><B>VERB_JOIN</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_LEAVE"><B>VERB_LEAVE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_LIKE"><B>VERB_LIKE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_MAKE_FRIEND"><B>VERB_MAKE_FRIEND</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_PLAY"><B>VERB_PLAY</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_POST"><B>VERB_POST</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_RECEIVE"><B>VERB_RECEIVE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_REMOVE"><B>VERB_REMOVE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_REMOVE_FRIEND"><B>VERB_REMOVE_FRIEND</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_REQUEST_FRIEND"><B>VERB_REQUEST_FRIEND</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_RSVP_MAYBE"><B>VERB_RSVP_MAYBE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_RSVP_NO"><B>VERB_RSVP_NO</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_RSVP_YES"><B>VERB_RSVP_YES</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_SAVE"><B>VERB_SAVE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_SHARE"><B>VERB_SHARE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_STOP_FOLLOWING"><B>VERB_STOP_FOLLOWING</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_TAG"><B>VERB_TAG</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_UNFAVORITE"><B>VERB_UNFAVORITE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_UNLIKE"><B>VERB_UNLIKE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_UNSAVE"><B>VERB_UNSAVE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#VERB_UPDATE"><B>VERB_UPDATE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 </DL>
 <HR>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/index-files/index-21.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/index-files/index-21.html b/sdks/android/doc/index-files/index-21.html
index 950615f..e6a1ff0 100644
--- a/sdks/android/doc/index-files/index-21.html
+++ b/sdks/android/doc/index-files/index-21.html
@@ -83,16 +83,16 @@ function windowTitle()
 <B>W</B></H2>
 <DL>
 <DT><A HREF="../org/usergrid/android/client/Client.html#withApiUrl(java.lang.String)"><B>withApiUrl(String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.html#withApplicationId(java.lang.String)"><B>withApplicationId(String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.html#withClientId(java.lang.String)"><B>withClientId(String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.html#withClientSecret(java.lang.String)"><B>withClientSecret(String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 </DL>
 <HR>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/index-files/index-3.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/index-files/index-3.html b/sdks/android/doc/index-files/index-3.html
index 78471fe..641b4d0 100644
--- a/sdks/android/doc/index-files/index-3.html
+++ b/sdks/android/doc/index-files/index-3.html
@@ -82,24 +82,24 @@ function windowTitle()
 <A NAME="_D_"><!-- --></A><H2>
 <B>D</B></H2>
 <DL>
-<DT><A HREF="../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities"><B>Device</B></A> - Class in <A HREF="../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/entities/Device.html#Device()"><B>Device()</B></A> - 
-Constructor for class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities">Device</A>
+<DT><A HREF="../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities"><B>Device</B></A> - Class in <A HREF="../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/entities/Device.html#Device()"><B>Device()</B></A> - 
+Constructor for class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities">Device</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/entities/Device.html#Device(org.usergrid.android.client.entities.Entity)"><B>Device(Entity)</B></A> - 
-Constructor for class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities">Device</A>
+<DT><A HREF="../org/usergrid/android/client/entities/Device.html#Device(org.apache.usergrid.android.client.entities.Entity)"><B>Device(Entity)</B></A> - 
+Constructor for class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities">Device</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.usergrid.android.client.callbacks"><B>DeviceRegistrationCallback</B></A> - Interface in <A HREF="../org/usergrid/android/client/callbacks/package-summary.html">org.usergrid.android.client.callbacks</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/utils/DeviceUuidFactory.html" title="class in org.usergrid.android.client.utils"><B>DeviceUuidFactory</B></A> - Class in <A HREF="../org/usergrid/android/client/utils/package-summary.html">org.usergrid.android.client.utils</A><DD>Tries to get the device ID as a UUID and fallsback to a generated UUID value
+<DT><A HREF="../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html" title="interface in org.apache.usergrid.android.client.callbacks"><B>DeviceRegistrationCallback</B></A> - Interface in <A HREF="../org/usergrid/android/client/callbacks/package-summary.html">org.apache.usergrid.android.client.callbacks</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/utils/DeviceUuidFactory.html" title="class in org.apache.usergrid.android.client.utils"><B>DeviceUuidFactory</B></A> - Class in <A HREF="../org/usergrid/android/client/utils/package-summary.html">org.apache.usergrid.android.client.utils</A><DD>Tries to get the device ID as a UUID and fallsback to a generated UUID value
  if it doesn't work.<DT><A HREF="../org/usergrid/android/client/utils/DeviceUuidFactory.html#DeviceUuidFactory(android.content.Context)"><B>DeviceUuidFactory(Context)</B></A> - 
-Constructor for class org.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/DeviceUuidFactory.html" title="class in org.usergrid.android.client.utils">DeviceUuidFactory</A>
+Constructor for class org.apache.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/DeviceUuidFactory.html" title="class in org.apache.usergrid.android.client.utils">DeviceUuidFactory</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.html#disconnectEntities(java.lang.String, java.lang.String, java.lang.String, java.lang.String)"><B>disconnectEntities(String, String, String, String)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Disconnect two entities.
-<DT><A HREF="../org/usergrid/android/client/Client.html#disconnectEntitiesAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)"><B>disconnectEntitiesAsync(String, String, String, String, ApiResponseCallback)</B></A> - 
-Method in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+<DT><A HREF="../org/usergrid/android/client/Client.html#disconnectEntitiesAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)"><B>disconnectEntitiesAsync(String, String, String, String, ApiResponseCallback)</B></A> - 
+Method in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>Disconnect two entities.
 <DT><A HREF="../org/usergrid/android/client/callbacks/ClientAsyncTask.html#doTask()"><B>doTask()</B></A> - 
-Method in class org.usergrid.android.client.callbacks.<A HREF="../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.usergrid.android.client.callbacks">ClientAsyncTask</A>
+Method in class org.apache.usergrid.android.client.callbacks.<A HREF="../org/usergrid/android/client/callbacks/ClientAsyncTask.html" title="class in org.apache.usergrid.android.client.callbacks">ClientAsyncTask</A>
 <DD>&nbsp;
 </DL>
 <HR>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/index-files/index-4.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/index-files/index-4.html b/sdks/android/doc/index-files/index-4.html
index 351ee7e..fe9fbce 100644
--- a/sdks/android/doc/index-files/index-4.html
+++ b/sdks/android/doc/index-files/index-4.html
@@ -83,28 +83,28 @@ function windowTitle()
 <B>E</B></H2>
 <DL>
 <DT><A HREF="../org/usergrid/android/client/utils/UrlUtils.html#encodeParams(java.util.Map)"><B>encodeParams(Map&lt;String, Object&gt;)</B></A> - 
-Static method in class org.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/UrlUtils.html" title="class in org.usergrid.android.client.utils">UrlUtils</A>
+Static method in class org.apache.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/UrlUtils.html" title="class in org.apache.usergrid.android.client.utils">UrlUtils</A>
 <DD>&nbsp;
-<DT><A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities"><B>Entity</B></A> - Class in <A HREF="../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/entities/Entity.html#Entity()"><B>Entity()</B></A> - 
-Constructor for class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>
+<DT><A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities"><B>Entity</B></A> - Class in <A HREF="../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A><DD>&nbsp;<DT><A HREF="../org/usergrid/android/client/entities/Entity.html#Entity()"><B>Entity()</B></A> - 
+Constructor for class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Entity.html#Entity(java.lang.String)"><B>Entity(String)</B></A> - 
-Constructor for class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>
+Constructor for class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Activity.html#ENTITY_TYPE"><B>ENTITY_TYPE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Device.html#ENTITY_TYPE"><B>ENTITY_TYPE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities">Device</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities">Device</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Group.html#ENTITY_TYPE"><B>ENTITY_TYPE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/Message.html#ENTITY_TYPE"><B>ENTITY_TYPE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/entities/User.html#ENTITY_TYPE"><B>ENTITY_TYPE</B></A> - 
-Static variable in class org.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>
+Static variable in class org.apache.usergrid.android.client.entities.<A HREF="../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>
 <DD>&nbsp;
 </DL>
 <HR>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/index-files/index-5.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/index-files/index-5.html b/sdks/android/doc/index-files/index-5.html
index 8ed5e03..ef86294 100644
--- a/sdks/android/doc/index-files/index-5.html
+++ b/sdks/android/doc/index-files/index-5.html
@@ -83,13 +83,13 @@ function windowTitle()
 <B>F</B></H2>
 <DL>
 <DT><A HREF="../org/usergrid/android/client/Client.QueuePosition.html#find(java.lang.String)"><B>find(String)</B></A> - 
-Static method in enum org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A>
+Static method in enum org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/Client.html#FORCE_PUBLIC_API"><B>FORCE_PUBLIC_API</B></A> - 
-Static variable in class org.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A>
+Static variable in class org.apache.usergrid.android.client.<A HREF="../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A>
 <DD>&nbsp;
 <DT><A HREF="../org/usergrid/android/client/utils/JsonUtils.html#fromJsonNode(org.codehaus.jackson.JsonNode, java.lang.Class)"><B>fromJsonNode(JsonNode, Class&lt;T&gt;)</B></A> - 
-Static method in class org.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.usergrid.android.client.utils">JsonUtils</A>
+Static method in class org.apache.usergrid.android.client.utils.<A HREF="../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.apache.usergrid.android.client.utils">JsonUtils</A>
 <DD>&nbsp;
 </DL>
 <HR>


[54/96] [abbrv] USERGRID-2 package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/usergrid/java/client/response/ApiResponse.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/usergrid/java/client/response/ApiResponse.java b/sdks/java/src/main/java/org/usergrid/java/client/response/ApiResponse.java
deleted file mode 100644
index 4ee3cf3..0000000
--- a/sdks/java/src/main/java/org/usergrid/java/client/response/ApiResponse.java
+++ /dev/null
@@ -1,405 +0,0 @@
-package org.usergrid.java.client.response;
-
-import static org.usergrid.java.client.utils.JsonUtils.toJsonString;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
-
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.annotation.JsonAnyGetter;
-import com.fasterxml.jackson.annotation.JsonAnySetter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion;
-import org.usergrid.java.client.entities.Entity;
-import org.usergrid.java.client.entities.Message;
-import org.usergrid.java.client.entities.User;
-
-public class ApiResponse {
-
-	private String accessToken;
-
-	private String error;
-	private String errorDescription;
-	private String errorUri;
-	private String exception;
-
-	private String path;
-	private String uri;
-	private String status;
-	private long timestamp;
-	private UUID application;
-	private List<Entity> entities;
-	private UUID next;
-	private String cursor;
-	private String action;
-	private List<Object> list;
-	private Object data;
-	private Map<String, UUID> applications;
-	private Map<String, JsonNode> metadata;
-	private Map<String, List<String>> params;
-	private List<AggregateCounterSet> counters;
-	private ClientCredentialsInfo credentials;
-
-	private List<Message> messages;
-	private List<QueueInfo> queues;
-	private UUID last;
-	private UUID queue;
-	private UUID consumer;
-
-	private User user;
-
-	private final Map<String, JsonNode> properties = new HashMap<String, JsonNode>();
-
-	public ApiResponse() {
-	}
-
-	@JsonAnyGetter
-	public Map<String, JsonNode> getProperties() {
-		return properties;
-	}
-
-	@JsonAnySetter
-	public void setProperty(String key, JsonNode value) {
-		properties.put(key, value);
-	}
-
-	@JsonProperty("access_token")
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public String getAccessToken() {
-		return accessToken;
-	}
-
-	@JsonProperty("access_token")
-	public void setAccessToken(String accessToken) {
-		this.accessToken = accessToken;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public String getError() {
-		return error;
-	}
-
-	public void setError(String error) {
-		this.error = error;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	@JsonProperty("error_description")
-	public String getErrorDescription() {
-		return errorDescription;
-	}
-
-	@JsonProperty("error_description")
-	public void setErrorDescription(String errorDescription) {
-		this.errorDescription = errorDescription;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	@JsonProperty("error_uri")
-	public String getErrorUri() {
-		return errorUri;
-	}
-
-	@JsonProperty("error_uri")
-	public void setErrorUri(String errorUri) {
-		this.errorUri = errorUri;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public String getException() {
-		return exception;
-	}
-
-	public void setException(String exception) {
-		this.exception = exception;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public String getPath() {
-		return path;
-	}
-
-	public void setPath(String path) {
-		this.path = path;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public String getUri() {
-		return uri;
-	}
-
-	public void setUri(String uri) {
-		this.uri = uri;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public String getStatus() {
-		return status;
-	}
-
-	public void setStatus(String status) {
-		this.status = status;
-	}
-
-	public long getTimestamp() {
-		return timestamp;
-	}
-
-	public void setTimestamp(long timestamp) {
-		this.timestamp = timestamp;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public UUID getApplication() {
-		return application;
-	}
-
-	public void setApplication(UUID application) {
-		this.application = application;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public List<Entity> getEntities() {
-		return entities;
-	}
-
-	public void setEntities(List<Entity> entities) {
-		this.entities = entities;
-	}
-
-	public int getEntityCount() {
-		if (entities == null) {
-			return 0;
-		}
-		return entities.size();
-	}
-
-	public Entity getFirstEntity() {
-		if ((entities != null) && (entities.size() > 0)) {
-			return entities.get(0);
-		}
-		return null;
-	}
-
-	public <T extends Entity> T getFirstEntity(Class<T> t) {
-		return Entity.toType(getFirstEntity(), t);
-	}
-
-	public Entity getLastEntity() {
-		if ((entities != null) && (entities.size() > 0)) {
-			return entities.get(entities.size() - 1);
-		}
-		return null;
-	}
-
-	public <T extends Entity> T getLastEntity(Class<T> t) {
-		return Entity.toType(getLastEntity(), t);
-	}
-
-	public <T extends Entity> List<T> getEntities(Class<T> t) {
-		return Entity.toType(entities, t);
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public UUID getNext() {
-		return next;
-	}
-
-	public void setNext(UUID next) {
-		this.next = next;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public String getCursor() {
-		return cursor;
-	}
-
-	public void setCursor(String cursor) {
-		this.cursor = cursor;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public String getAction() {
-		return action;
-	}
-
-	public void setAction(String action) {
-		this.action = action;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public List<Object> getList() {
-		return list;
-	}
-
-	public void setList(List<Object> list) {
-		this.list = list;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public Object getData() {
-		return data;
-	}
-
-	public void setData(Object data) {
-		this.data = data;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public Map<String, UUID> getApplications() {
-		return applications;
-	}
-
-	public void setApplications(Map<String, UUID> applications) {
-		this.applications = applications;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public Map<String, JsonNode> getMetadata() {
-		return metadata;
-	}
-
-	public void setMetadata(Map<String, JsonNode> metadata) {
-		this.metadata = metadata;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public Map<String, List<String>> getParams() {
-		return params;
-	}
-
-	public void setParams(Map<String, List<String>> params) {
-		this.params = params;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public List<AggregateCounterSet> getCounters() {
-		return counters;
-	}
-
-	public void setCounters(List<AggregateCounterSet> counters) {
-		this.counters = counters;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public ClientCredentialsInfo getCredentials() {
-		return credentials;
-	}
-
-	public void setCredentials(ClientCredentialsInfo credentials) {
-		this.credentials = credentials;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public User getUser() {
-		return user;
-	}
-
-	public void setUser(User user) {
-		this.user = user;
-	}
-
-	@Override
-	public String toString() {
-		return toJsonString(this);
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public List<Message> getMessages() {
-		return messages;
-	}
-
-	public void setMessages(List<Message> messages) {
-		this.messages = messages;
-	}
-
-	@JsonIgnore
-	public int getMessageCount() {
-		if (messages == null) {
-			return 0;
-		}
-		return messages.size();
-	}
-
-	@JsonIgnore
-	public Message getFirstMessage() {
-		if ((messages != null) && (messages.size() > 0)) {
-			return messages.get(0);
-		}
-		return null;
-	}
-
-	@JsonIgnore
-	public Entity getLastMessage() {
-		if ((messages != null) && (messages.size() > 0)) {
-			return messages.get(messages.size() - 1);
-		}
-		return null;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public UUID getLast() {
-		return last;
-	}
-
-	public void setLast(UUID last) {
-		this.last = last;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public List<QueueInfo> getQueues() {
-		return queues;
-	}
-
-	public void setQueues(List<QueueInfo> queues) {
-		this.queues = queues;
-	}
-
-	@JsonIgnore
-	public QueueInfo getFirstQueue() {
-		if ((queues != null) && (queues.size() > 0)) {
-			return queues.get(0);
-		}
-		return null;
-	}
-
-	@JsonIgnore
-	public QueueInfo getLastQueue() {
-		if ((queues != null) && (queues.size() > 0)) {
-			return queues.get(queues.size() - 1);
-		}
-		return null;
-	}
-
-	@JsonIgnore
-	public UUID getLastQueueId() {
-		QueueInfo q = getLastQueue();
-		if (q != null) {
-			return q.getQueue();
-		}
-		return null;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public UUID getQueue() {
-		return queue;
-	}
-
-	public void setQueue(UUID queue) {
-		this.queue = queue;
-	}
-
-	@JsonSerialize(include = Inclusion.NON_NULL)
-	public UUID getConsumer() {
-		return consumer;
-	}
-
-	public void setConsumer(UUID consumer) {
-		this.consumer = consumer;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/usergrid/java/client/response/ClientCredentialsInfo.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/usergrid/java/client/response/ClientCredentialsInfo.java b/sdks/java/src/main/java/org/usergrid/java/client/response/ClientCredentialsInfo.java
deleted file mode 100644
index 2724977..0000000
--- a/sdks/java/src/main/java/org/usergrid/java/client/response/ClientCredentialsInfo.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package org.usergrid.java.client.response;
-
-import static org.usergrid.java.client.utils.JsonUtils.toJsonString;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-public class ClientCredentialsInfo {
-
-	private String id;
-	private String secret;
-
-	public ClientCredentialsInfo(String id, String secret) {
-		this.id = id;
-		this.secret = secret;
-	}
-
-	@JsonProperty("client_id")
-	public String getId() {
-		return id;
-	}
-
-	@JsonProperty("client_id")
-	public void setId(String id) {
-		this.id = id;
-	}
-
-	@JsonProperty("client_secret")
-	public String getSecret() {
-		return secret;
-	}
-
-	@JsonProperty("client_secret")
-	public void setSecret(String secret) {
-		this.secret = secret;
-	}
-
-	@Override
-	public String toString() {
-		return toJsonString(this);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/usergrid/java/client/response/QueueInfo.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/usergrid/java/client/response/QueueInfo.java b/sdks/java/src/main/java/org/usergrid/java/client/response/QueueInfo.java
deleted file mode 100644
index d4963c2..0000000
--- a/sdks/java/src/main/java/org/usergrid/java/client/response/QueueInfo.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package org.usergrid.java.client.response;
-
-import java.util.UUID;
-
-public class QueueInfo {
-
-	String path;
-	UUID queue;
-
-	public QueueInfo() {
-	}
-
-	public String getPath() {
-		return path;
-	}
-
-	public void setPath(String path) {
-		this.path = path;
-	}
-
-	public UUID getQueue() {
-		return queue;
-	}
-
-	public void setQueue(UUID queue) {
-		this.queue = queue;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/usergrid/java/client/utils/JsonUtils.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/usergrid/java/client/utils/JsonUtils.java b/sdks/java/src/main/java/org/usergrid/java/client/utils/JsonUtils.java
deleted file mode 100644
index 00b95f3..0000000
--- a/sdks/java/src/main/java/org/usergrid/java/client/utils/JsonUtils.java
+++ /dev/null
@@ -1,166 +0,0 @@
-package org.usergrid.java.client.utils;
-
-import java.io.IOException;
-import java.util.Map;
-import java.util.UUID;
-
-import com.fasterxml.jackson.core.JsonGenerationException;
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.JsonMappingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.node.JsonNodeFactory;
-import org.usergrid.java.client.exception.ClientException;
-
-public class JsonUtils {
-
-
-	static ObjectMapper mapper = new ObjectMapper();
-
-	public static String getStringProperty(Map<String, JsonNode> properties,
-			String name) {
-		JsonNode value = properties.get(name);
-		if (value != null) {
-			return value.asText();
-		}
-		return null;
-	}
-
-	public static void setStringProperty(Map<String, JsonNode> properties,
-			String name, String value) {
-		if (value == null) {
-			properties.remove(name);
-		} else {
-			properties.put(name, JsonNodeFactory.instance.textNode(value));
-		}
-	}
-
-	public static Long getLongProperty(Map<String, JsonNode> properties,
-			String name) {
-		JsonNode value = properties.get(name);
-		if (value != null) {
-			return value.asLong(0);
-		}
-		return null;
-	}
-
-	public static void setLongProperty(Map<String, JsonNode> properties,
-			String name, Long value) {
-		if (value == null) {
-			properties.remove(name);
-		} else {
-			properties.put(name, JsonNodeFactory.instance.numberNode(value));
-		}
-	}
-
-	public static void setFloatProperty(Map<String, JsonNode> properties, String name, Float value){
-	    if(value == null){
-	        properties.remove(name);
-	    }else{
-	        properties.put(name, JsonNodeFactory.instance.numberNode(value));
-	    }
-	}
-	
-	public static Boolean getBooleanProperty(Map<String, JsonNode> properties,
-			String name) {
-		JsonNode value = properties.get(name);
-		if (value != null) {
-			return value.asBoolean();
-		}
-		return false;
-	}
-
-	public static void setBooleanProperty(Map<String, JsonNode> properties,
-			String name, Boolean value) {
-		if (value == null) {
-			properties.remove(name);
-		} else {
-			properties.put(name, JsonNodeFactory.instance.booleanNode(value));
-		}
-	}
-
-	public static UUID getUUIDProperty(Map<String, JsonNode> properties,
-			String name) {
-		JsonNode value = properties.get(name);
-		if (value != null) {
-			UUID uuid = null;
-			try {
-				uuid = UUID.fromString(value.asText());
-			} catch (Exception e) {
-			}
-			return uuid;
-		}
-		return null;
-	}
-
-	public static void setUUIDProperty(Map<String, JsonNode> properties,
-			String name, UUID value) {
-		if (value == null) {
-			properties.remove(name);
-		} else {
-			properties.put(name,
-					JsonNodeFactory.instance.textNode(value.toString()));
-		}
-	}
-
-	public static String toJsonString(Object obj) {
-		try {
-			return mapper.writeValueAsString(obj);
-		} catch (JsonGenerationException e) {
-			throw new ClientException("Unable to generate json", e);
-		} catch (JsonMappingException e) {
-		    throw new ClientException("Unable to map json", e);
-		} catch (IOException e) {
-		    throw new ClientException("IO error", e);
-		}
-	}
-
-	public static <T> T parse(String json, Class<T> c) {
-		try {
-			return mapper.readValue(json, c);
-		} catch (JsonGenerationException e) {
-            throw new ClientException("Unable to generate json", e);
-        } catch (JsonMappingException e) {
-            throw new ClientException("Unable to map json", e);
-        } catch (IOException e) {
-            throw new ClientException("IO error", e);
-        }
-	}
-
-	public static JsonNode toJsonNode(Object obj) {
-		return mapper.convertValue(obj, JsonNode.class);
-	}
-
-	public static <T> T fromJsonNode(JsonNode json, Class<T> c) {
-		try {
-			JsonParser jp = json.traverse();
-			return mapper.readValue(jp, c);
-		} catch (JsonGenerationException e) {
-            throw new ClientException("Unable to generate json", e);
-        } catch (JsonMappingException e) {
-            throw new ClientException("Unable to map json", e);
-        } catch (IOException e) {
-            throw new ClientException("IO error", e);
-        }
-	}
-
-	public static <T> T getObjectProperty(Map<String, JsonNode> properties,
-			String name, Class<T> c) {
-		JsonNode value = properties.get(name);
-		if (value != null) {
-			return fromJsonNode(value, c);
-		}
-		return null;
-	}
-
-	public static void setObjectProperty(Map<String, JsonNode> properties,
-			String name, Object value) {
-		if (value == null) {
-			properties.remove(name);
-		} else {
-			properties.put(name,
-					JsonNodeFactory.instance.textNode(value.toString()));
-		}
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/usergrid/java/client/utils/MapUtils.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/usergrid/java/client/utils/MapUtils.java b/sdks/java/src/main/java/org/usergrid/java/client/utils/MapUtils.java
deleted file mode 100644
index af04a6c..0000000
--- a/sdks/java/src/main/java/org/usergrid/java/client/utils/MapUtils.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package org.usergrid.java.client.utils;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-public class MapUtils {
-
-	public static <T> Map<String, T> newMapWithoutKeys(Map<String, T> map,
-			List<String> keys) {
-		Map<String, T> newMap = null;
-		if (map != null) {
-			newMap = new HashMap<String, T>(map);
-		} else {
-			newMap = new HashMap<String, T>();
-		}
-		for (String key : keys) {
-			newMap.remove(key);
-		}
-		return newMap;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/usergrid/java/client/utils/ObjectUtils.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/usergrid/java/client/utils/ObjectUtils.java b/sdks/java/src/main/java/org/usergrid/java/client/utils/ObjectUtils.java
deleted file mode 100644
index 8ef65b1..0000000
--- a/sdks/java/src/main/java/org/usergrid/java/client/utils/ObjectUtils.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package org.usergrid.java.client.utils;
-
-import java.util.Map;
-
-public class ObjectUtils {
-
-	public static boolean isEmpty(Object s) {
-		if (s == null) {
-			return true;
-		}
-		if ((s instanceof String) && (((String) s).trim().length() == 0)) {
-			return true;
-		}
-		if (s instanceof Map) {
-			return ((Map<?, ?>) s).isEmpty();
-		}
-		return false;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/usergrid/java/client/utils/UrlUtils.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/usergrid/java/client/utils/UrlUtils.java b/sdks/java/src/main/java/org/usergrid/java/client/utils/UrlUtils.java
deleted file mode 100644
index a64fb96..0000000
--- a/sdks/java/src/main/java/org/usergrid/java/client/utils/UrlUtils.java
+++ /dev/null
@@ -1,108 +0,0 @@
-package org.usergrid.java.client.utils;
-
-import static java.net.URLEncoder.encode;
-import static org.usergrid.java.client.utils.ObjectUtils.isEmpty;
-
-import java.io.UnsupportedEncodingException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import org.usergrid.java.client.exception.ClientException;
-
-public class UrlUtils {
-
-   
-    public static URL url(String s) {
-        try {
-            return new URL(s);
-        } catch (MalformedURLException e) {
-            throw new ClientException("Incorrect URL format", e);
-        }
-    }
-
-    public static URL url(URL u, String s) {
-        try {
-            return new URL(u, s);
-        } catch (MalformedURLException e) {
-            throw new ClientException("Incorrect URL format", e);
-        }
-    }
-
-    public static String path(Object... segments) {
-        String path = "";
-        boolean first = true;
-        for (Object segment : segments) {
-            if (segment instanceof Object[]) {
-                segment = path((Object[]) segment);
-            }
-            if (!isEmpty(segment)) {
-                if (first) {
-                    path = segment.toString();
-                    first = false;
-                } else {
-                    if (!path.endsWith("/")) {
-                        path += "/";
-                    }
-                    path += segment.toString();
-                }
-            }
-        }
-        return path;
-    }
-
-    @SuppressWarnings("rawtypes")
-    public static String encodeParams(Map<String, Object> params) {
-        if (params == null) {
-            return "";
-        }
-        boolean first = true;
-        StringBuilder results = new StringBuilder();
-        for (Entry<String, Object> entry : params.entrySet()) {
-            if (entry.getValue() instanceof List) {
-                for (Object o : (List) entry.getValue()) {
-                    if (!isEmpty(o)) {
-                        if (!first) {
-                            results.append('&');
-                        }
-                        first = false;
-                        results.append(entry.getKey());
-                        results.append("=");
-                        try {
-                            results.append(encode(o.toString(), "UTF-8"));
-                        } catch (UnsupportedEncodingException e) {
-                            throw new ClientException("Unknown encoding", e);
-                        }
-                    }
-                }
-            } else if (!isEmpty(entry.getValue())) {
-                if (!first) {
-                    results.append('&');
-                }
-                first = false;
-                results.append(entry.getKey());
-                results.append("=");
-                try {
-                    results.append(encode(entry.getValue().toString(), "UTF-8"));
-                } catch (UnsupportedEncodingException e) {
-                    throw new ClientException("Unsupported string encoding", e);
-                }
-            }
-        }
-        return results.toString();
-    }
-
-    public static String addQueryParams(String url, Map<String, Object> params) {
-        if (params == null) {
-            return url;
-        }
-        if (!url.contains("?")) {
-            url += "?";
-        }
-        url += encodeParams(params);
-        return url;
-    }
-
-}


[52/96] [abbrv] git commit: rename antlr package

Posted by sn...@apache.org.
rename antlr package


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

Branch: refs/pull/39/merge
Commit: b8c01f3d0ce56f6a1c00003b28ed7a8d4c073a59
Parents: 2c2acbe
Author: Lewis John McGibbney <le...@apache.org>
Authored: Tue Jan 28 21:24:14 2014 +0000
Committer: Lewis John McGibbney <le...@apache.org>
Committed: Tue Jan 28 21:24:14 2014 +0000

----------------------------------------------------------------------
 .../persistence/query/tree/QueryFilter.g        | 311 +++++++++++++++++++
 .../persistence/query/tree/QueryFilter.g        | 311 -------------------
 2 files changed, 311 insertions(+), 311 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/b8c01f3d/stack/core/src/main/antlr3/org/apache/usergrid/persistence/query/tree/QueryFilter.g
----------------------------------------------------------------------
diff --git a/stack/core/src/main/antlr3/org/apache/usergrid/persistence/query/tree/QueryFilter.g b/stack/core/src/main/antlr3/org/apache/usergrid/persistence/query/tree/QueryFilter.g
new file mode 100644
index 0000000..c566ef9
--- /dev/null
+++ b/stack/core/src/main/antlr3/org/apache/usergrid/persistence/query/tree/QueryFilter.g
@@ -0,0 +1,311 @@
+grammar QueryFilter;
+//NOTES:  '^' denotes operator, all others in the string become operands
+
+options {
+    output=AST;
+//    ASTLabelType=CommonTree;
+}
+
+@rulecatch { }
+
+
+@header {
+package org.apache.usergrid.persistence.query.tree;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.apache.usergrid.persistence.Query;
+import org.apache.usergrid.persistence.Query.SortPredicate;
+
+}
+
+
+@members {
+	Query query = new Query();
+
+  private static final Logger logger = LoggerFactory
+      .getLogger(QueryFilterLexer.class);
+
+	@Override
+	public void emitErrorMessage(String msg) {
+		logger.info(msg);
+	}
+}
+
+
+@lexer::header {
+package org.apache.usergrid.persistence.query.tree;
+
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.apache.usergrid.persistence.exceptions.QueryTokenException;
+
+}
+
+@lexer::members {
+
+
+
+  private static final Logger logger = LoggerFactory
+      .getLogger(QueryFilterLexer.class);
+
+
+
+
+	@Override
+	public void emitErrorMessage(String msg) {
+		logger.info(msg);
+	}
+
+	@Override
+    public void recover(RecognitionException e) {
+         //We don't want to recover, we want to re-throw to the user since they passed us invalid input
+         throw new QueryTokenException(e);
+    }
+
+
+}
+
+//these must come before ID. Otherwise lt, lte, eq, etc will be returned as id tokens
+LT  : '<' | 'lt';
+
+LTE : '<=' |  'lte';
+
+EQ  : '=' | 'eq';
+
+GT  : '>' | 'gt';
+
+GTE : '>=' |  'gte';  
+
+
+//keywords before var ids
+BOOLEAN : (TRUE|FALSE);
+
+AND : ('A'|'a')('N'|'n')('D'|'d') | '&&';
+
+OR  : ('O'|'o')('R'|'r') | '||' ;
+
+NOT : ('N'|'n')('O'|'o')('T'|'t');
+
+ASC : ('A'|'a')('S'|'s')('C'|'c');
+
+DESC : ('D'|'d')('E'|'e')('S'|'s')('C'|'c');
+
+CONTAINS : ('C'|'c')('O'|'o')('N'|'n')('T'|'t')('A'|'a')('I'|'i')('N'|'n')('S'|'s');
+
+WITHIN : ('W'|'w')('I'|'i')('T'|'t')('H'|'h')('I'|'i')('N'|'n');
+
+OF : ('O'|'o')('F'|'f');
+
+UUID :  HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT
+  HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT '-' 
+  HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT '-' 
+  HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT '-' 
+  HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT '-' 
+  HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT
+  HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT
+  HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT
+  ;
+
+//ids and values
+ID  :	('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'0'..'9'|'_'|'.'|'-')*
+    ;
+
+LONG :	('-')? '0'..'9'+
+    ;
+
+FLOAT
+    :  ('-')? ( ('0'..'9')+ '.' ('0'..'9')* EXPONENT?
+    |   '.' ('0'..'9')+ EXPONENT?
+    |   ('0'..'9')+ EXPONENT)
+    ;
+    
+STRING
+    :  '\'' ( ESC_SEQ | ~('\\'|'\'') )* '\''
+    ;
+
+
+    
+WS : (' ' | '\t' | '\n' | '\r' | '\f')+  {$channel=HIDDEN;};
+
+
+
+    
+
+
+
+fragment TRUE : ('T'|'t')('R'|'r')('U'|'u')('E'|'e');
+
+fragment FALSE : ('F'|'f')('A'|'a')('L'|'l')('S'|'s')('E'|'e');
+
+
+fragment
+EXPONENT : ('e'|'E') ('+'|'-')? ('0'..'9')+ ;
+
+fragment
+HEX_DIGIT : ('0'..'9'|'a'..'f'|'A'..'F') ;
+
+fragment
+ESC_SEQ
+    :   '\\' ('b'|'t'|'n'|'f'|'r'|'\"'|'\''|'\\')
+    |   UNICODE_ESC
+    |   OCTAL_ESC
+    ;
+
+fragment
+OCTAL_ESC
+    :   '\\' ('0'..'3') ('0'..'7') ('0'..'7')
+    |   '\\' ('0'..'7') ('0'..'7')
+    |   '\\' ('0'..'7')
+    ;
+
+fragment
+UNICODE_ESC
+    :   '\\' 'u' HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT
+    ;
+
+
+
+
+//NE : '!=';
+
+
+
+property :	ID<Property>;
+
+containsproperty : ID<ContainsProperty>;
+
+withinproperty : ID<WithinProperty>;
+	
+booleanliteral: BOOLEAN<BooleanLiteral>;
+
+
+longliteral :
+  LONG<LongLiteral> ;
+
+uuidliteral :
+  UUID<UUIDLiteral>;
+
+stringliteral :
+  STRING<StringLiteral>;
+  
+floatliteral :
+  FLOAT<FloatLiteral> ;
+
+//We delegate to each sub class literal so we can get each type	
+value : 
+  booleanliteral
+  | longliteral
+  | uuidliteral
+  | stringliteral
+  | floatliteral
+  ;
+  
+
+
+//Every operand returns with the name of 'op'.  This is used because all subtrees require operands,
+//this allows us to link the java code easily by using the same name as a converntion
+
+//begin search expressions
+  
+//mathmatical equality operations
+equalityop :
+  property LT<LessThan>^ value
+  |property LTE<LessThanEqual>^ value
+  |property EQ<Equal>^ value
+  |property GT<GreaterThan>^ value
+  |property GTE<GreaterThanEqual>^ value
+  ; 
+
+//geo location search
+locationop :
+  withinproperty WITHIN<WithinOperand>^ (floatliteral|longliteral) OF! (floatliteral|longliteral) ','! (floatliteral|longliteral);
+  
+//string search
+containsop :
+  containsproperty CONTAINS<ContainsOperand>^ stringliteral;
+
+//
+operation :
+ '('! expression ')'!
+   | equalityop 
+   | locationop 
+   | containsop 
+   ;
+
+//negations of expressions
+notexp :
+//only link if we have the not
+ NOT<NotOperand>^ operation  
+ |operation 
+ ;
+
+//and expressions contain operands.  These should always be closer to the leaves of a tree, it allows
+//for faster result intersection sooner in the query execution
+andexp :
+ notexp (AND<AndOperand>^ notexp )*;
+ 
+ 
+//or expression should always be after AND expressions.  This will give us a smaller result set to union when evaluating trees
+//also a root level expression
+expression :
+ andexp (OR<OrOperand>^ andexp )*;
+
+
+
+//end expressions
+
+//begin order clauses
+
+//direction for ordering
+direction  : (ASC | DESC);
+
+//order clause
+order
+  : (property direction?){
+		String property = $property.text; 
+		String direction = $direction.text;
+		query.addSort(new SortPredicate(property, direction));
+    
+  };
+
+//end order clauses
+  
+//Begin select clauses
+
+select_subject
+  : ID {
+
+  query.addSelect($ID.text);
+
+};
+
+ 
+
+select_assign
+  : target=ID ':' source=ID {
+
+  query.addSelect($target.text, $source.text);
+
+};
+
+select_expr 
+  : ('*' | select_subject (',' select_subject) * | '{' select_assign (',' select_assign) * '}');  
+   
+//end select clauses
+
+ql returns [Query query]
+  : ('select'! select_expr!)? ('where'!? expression)? ('order by'! order! (','! order!)*)? {
+
+  if($expression.tree instanceof Operand){
+    query.setRootOperand((Operand)$expression.tree);
+  }
+  
+  retval.query = query;
+
+
+};
+
+
+

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/b8c01f3d/stack/core/src/main/antlr3/org/usergrid/persistence/query/tree/QueryFilter.g
----------------------------------------------------------------------
diff --git a/stack/core/src/main/antlr3/org/usergrid/persistence/query/tree/QueryFilter.g b/stack/core/src/main/antlr3/org/usergrid/persistence/query/tree/QueryFilter.g
deleted file mode 100644
index c566ef9..0000000
--- a/stack/core/src/main/antlr3/org/usergrid/persistence/query/tree/QueryFilter.g
+++ /dev/null
@@ -1,311 +0,0 @@
-grammar QueryFilter;
-//NOTES:  '^' denotes operator, all others in the string become operands
-
-options {
-    output=AST;
-//    ASTLabelType=CommonTree;
-}
-
-@rulecatch { }
-
-
-@header {
-package org.apache.usergrid.persistence.query.tree;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.usergrid.persistence.Query;
-import org.apache.usergrid.persistence.Query.SortPredicate;
-
-}
-
-
-@members {
-	Query query = new Query();
-
-  private static final Logger logger = LoggerFactory
-      .getLogger(QueryFilterLexer.class);
-
-	@Override
-	public void emitErrorMessage(String msg) {
-		logger.info(msg);
-	}
-}
-
-
-@lexer::header {
-package org.apache.usergrid.persistence.query.tree;
-
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.usergrid.persistence.exceptions.QueryTokenException;
-
-}
-
-@lexer::members {
-
-
-
-  private static final Logger logger = LoggerFactory
-      .getLogger(QueryFilterLexer.class);
-
-
-
-
-	@Override
-	public void emitErrorMessage(String msg) {
-		logger.info(msg);
-	}
-
-	@Override
-    public void recover(RecognitionException e) {
-         //We don't want to recover, we want to re-throw to the user since they passed us invalid input
-         throw new QueryTokenException(e);
-    }
-
-
-}
-
-//these must come before ID. Otherwise lt, lte, eq, etc will be returned as id tokens
-LT  : '<' | 'lt';
-
-LTE : '<=' |  'lte';
-
-EQ  : '=' | 'eq';
-
-GT  : '>' | 'gt';
-
-GTE : '>=' |  'gte';  
-
-
-//keywords before var ids
-BOOLEAN : (TRUE|FALSE);
-
-AND : ('A'|'a')('N'|'n')('D'|'d') | '&&';
-
-OR  : ('O'|'o')('R'|'r') | '||' ;
-
-NOT : ('N'|'n')('O'|'o')('T'|'t');
-
-ASC : ('A'|'a')('S'|'s')('C'|'c');
-
-DESC : ('D'|'d')('E'|'e')('S'|'s')('C'|'c');
-
-CONTAINS : ('C'|'c')('O'|'o')('N'|'n')('T'|'t')('A'|'a')('I'|'i')('N'|'n')('S'|'s');
-
-WITHIN : ('W'|'w')('I'|'i')('T'|'t')('H'|'h')('I'|'i')('N'|'n');
-
-OF : ('O'|'o')('F'|'f');
-
-UUID :  HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT
-  HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT '-' 
-  HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT '-' 
-  HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT '-' 
-  HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT '-' 
-  HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT
-  HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT
-  HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT
-  ;
-
-//ids and values
-ID  :	('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'0'..'9'|'_'|'.'|'-')*
-    ;
-
-LONG :	('-')? '0'..'9'+
-    ;
-
-FLOAT
-    :  ('-')? ( ('0'..'9')+ '.' ('0'..'9')* EXPONENT?
-    |   '.' ('0'..'9')+ EXPONENT?
-    |   ('0'..'9')+ EXPONENT)
-    ;
-    
-STRING
-    :  '\'' ( ESC_SEQ | ~('\\'|'\'') )* '\''
-    ;
-
-
-    
-WS : (' ' | '\t' | '\n' | '\r' | '\f')+  {$channel=HIDDEN;};
-
-
-
-    
-
-
-
-fragment TRUE : ('T'|'t')('R'|'r')('U'|'u')('E'|'e');
-
-fragment FALSE : ('F'|'f')('A'|'a')('L'|'l')('S'|'s')('E'|'e');
-
-
-fragment
-EXPONENT : ('e'|'E') ('+'|'-')? ('0'..'9')+ ;
-
-fragment
-HEX_DIGIT : ('0'..'9'|'a'..'f'|'A'..'F') ;
-
-fragment
-ESC_SEQ
-    :   '\\' ('b'|'t'|'n'|'f'|'r'|'\"'|'\''|'\\')
-    |   UNICODE_ESC
-    |   OCTAL_ESC
-    ;
-
-fragment
-OCTAL_ESC
-    :   '\\' ('0'..'3') ('0'..'7') ('0'..'7')
-    |   '\\' ('0'..'7') ('0'..'7')
-    |   '\\' ('0'..'7')
-    ;
-
-fragment
-UNICODE_ESC
-    :   '\\' 'u' HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT
-    ;
-
-
-
-
-//NE : '!=';
-
-
-
-property :	ID<Property>;
-
-containsproperty : ID<ContainsProperty>;
-
-withinproperty : ID<WithinProperty>;
-	
-booleanliteral: BOOLEAN<BooleanLiteral>;
-
-
-longliteral :
-  LONG<LongLiteral> ;
-
-uuidliteral :
-  UUID<UUIDLiteral>;
-
-stringliteral :
-  STRING<StringLiteral>;
-  
-floatliteral :
-  FLOAT<FloatLiteral> ;
-
-//We delegate to each sub class literal so we can get each type	
-value : 
-  booleanliteral
-  | longliteral
-  | uuidliteral
-  | stringliteral
-  | floatliteral
-  ;
-  
-
-
-//Every operand returns with the name of 'op'.  This is used because all subtrees require operands,
-//this allows us to link the java code easily by using the same name as a converntion
-
-//begin search expressions
-  
-//mathmatical equality operations
-equalityop :
-  property LT<LessThan>^ value
-  |property LTE<LessThanEqual>^ value
-  |property EQ<Equal>^ value
-  |property GT<GreaterThan>^ value
-  |property GTE<GreaterThanEqual>^ value
-  ; 
-
-//geo location search
-locationop :
-  withinproperty WITHIN<WithinOperand>^ (floatliteral|longliteral) OF! (floatliteral|longliteral) ','! (floatliteral|longliteral);
-  
-//string search
-containsop :
-  containsproperty CONTAINS<ContainsOperand>^ stringliteral;
-
-//
-operation :
- '('! expression ')'!
-   | equalityop 
-   | locationop 
-   | containsop 
-   ;
-
-//negations of expressions
-notexp :
-//only link if we have the not
- NOT<NotOperand>^ operation  
- |operation 
- ;
-
-//and expressions contain operands.  These should always be closer to the leaves of a tree, it allows
-//for faster result intersection sooner in the query execution
-andexp :
- notexp (AND<AndOperand>^ notexp )*;
- 
- 
-//or expression should always be after AND expressions.  This will give us a smaller result set to union when evaluating trees
-//also a root level expression
-expression :
- andexp (OR<OrOperand>^ andexp )*;
-
-
-
-//end expressions
-
-//begin order clauses
-
-//direction for ordering
-direction  : (ASC | DESC);
-
-//order clause
-order
-  : (property direction?){
-		String property = $property.text; 
-		String direction = $direction.text;
-		query.addSort(new SortPredicate(property, direction));
-    
-  };
-
-//end order clauses
-  
-//Begin select clauses
-
-select_subject
-  : ID {
-
-  query.addSelect($ID.text);
-
-};
-
- 
-
-select_assign
-  : target=ID ':' source=ID {
-
-  query.addSelect($target.text, $source.text);
-
-};
-
-select_expr 
-  : ('*' | select_subject (',' select_subject) * | '{' select_assign (',' select_assign) * '}');  
-   
-//end select clauses
-
-ql returns [Query query]
-  : ('select'! select_expr!)? ('where'!? expression)? ('order by'! order! (','! order!)*)? {
-
-  if($expression.tree instanceof Operand){
-    query.setRootOperand((Operand)$expression.tree);
-  }
-  
-  retval.query = query;
-
-
-};
-
-
-


[82/96] [abbrv] USERGRID-2 package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/entities/class-use/Message.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/entities/class-use/Message.html b/sdks/android/doc/org/usergrid/android/client/entities/class-use/Message.html
index 4f98dd8..86e7380 100644
--- a/sdks/android/doc/org/usergrid/android/client/entities/class-use/Message.html
+++ b/sdks/android/doc/org/usergrid/android/client/entities/class-use/Message.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Class org.usergrid.android.client.entities.Message
+Uses of Class org.apache.usergrid.android.client.entities.Message
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Class org.usergrid.android.client.entities.Message
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Class org.usergrid.android.client.entities.Message";
+        parent.document.title="Uses of Class org.apache.usergrid.android.client.entities.Message";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,26 +81,26 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Class<br>org.usergrid.android.client.entities.Message</B></H2>
+<B>Uses of Class<br>org.apache.usergrid.android.client.entities.Message</B></H2>
 </CENTER>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Packages that use <A HREF="../../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A></FONT></TH>
+Packages that use <A HREF="../../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client.response"><B>org.usergrid.android.client.response</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client.response"><B>org.apache.usergrid.android.client.response</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client.response"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client.response"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A> in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A></FONT></TH>
+Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A> in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -108,11 +108,11 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Message.
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A> that return <A HREF="../../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A> that return <A HREF="../../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A></CODE></FONT></TD>
 <TD><CODE><B>ApiResponse.</B><B><A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html#getFirstMessage()">getFirstMessage</A></B>()</CODE>
 
 <BR>
@@ -124,11 +124,11 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Message.
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A> that return types with arguments of type <A HREF="../../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A> that return types with arguments of type <A HREF="../../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>&gt;</CODE></FONT></TD>
+<CODE>&nbsp;java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>&gt;</CODE></FONT></TD>
 <TD><CODE><B>ApiResponse.</B><B><A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html#getMessages()">getMessages</A></B>()</CODE>
 
 <BR>
@@ -140,12 +140,12 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Message.
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Method parameters in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A> with type arguments of type <A HREF="../../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Method parameters in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A> with type arguments of type <A HREF="../../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>ApiResponse.</B><B><A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html#setMessages(java.util.List)">setMessages</A></B>(java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A>&gt;&nbsp;messages)</CODE>
+<TD><CODE><B>ApiResponse.</B><B><A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html#setMessages(java.util.List)">setMessages</A></B>(java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A>&gt;&nbsp;messages)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -167,7 +167,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Message.
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/entities/class-use/User.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/entities/class-use/User.html b/sdks/android/doc/org/usergrid/android/client/entities/class-use/User.html
index cc76117..26b30c2 100644
--- a/sdks/android/doc/org/usergrid/android/client/entities/class-use/User.html
+++ b/sdks/android/doc/org/usergrid/android/client/entities/class-use/User.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Class org.usergrid.android.client.entities.User
+Uses of Class org.apache.usergrid.android.client.entities.User
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Class org.usergrid.android.client.entities.User
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Class org.usergrid.android.client.entities.User";
+        parent.document.title="Uses of Class org.apache.usergrid.android.client.entities.User";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,34 +81,34 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Class<br>org.usergrid.android.client.entities.User</B></H2>
+<B>Uses of Class<br>org.apache.usergrid.android.client.entities.User</B></H2>
 </CENTER>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Packages that use <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A></FONT></TH>
+Packages that use <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client"><B>org.usergrid.android.client</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client"><B>org.apache.usergrid.android.client</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client.entities"><B>org.usergrid.android.client.entities</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client.entities"><B>org.apache.usergrid.android.client.entities</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client.response"><B>org.usergrid.android.client.response</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client.response"><B>org.apache.usergrid.android.client.response</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A> in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A></FONT></TH>
+Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A> in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -116,11 +116,11 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/User.htm
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A> that return <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A> that return <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#getLoggedInUser()">getLoggedInUser</A></B>()</CODE>
 
 <BR>
@@ -132,17 +132,17 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/User.htm
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postGroupActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.entities.User, org.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)">postGroupActivity</A></B>(java.lang.String&nbsp;verb,
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postGroupActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.entities.User, org.apache.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)">postGroupActivity</A></B>(java.lang.String&nbsp;verb,
                   java.lang.String&nbsp;title,
                   java.lang.String&nbsp;content,
                   java.lang.String&nbsp;category,
-                  <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>&nbsp;user,
-                  <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;object,
+                  <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>&nbsp;user,
+                  <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;object,
                   java.lang.String&nbsp;objectType,
                   java.lang.String&nbsp;objectName,
                   java.lang.String&nbsp;objectContent)</CODE>
@@ -153,29 +153,29 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/User.htm
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postGroupActivityAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.entities.User, org.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">postGroupActivityAsync</A></B>(java.lang.String&nbsp;verb,
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postGroupActivityAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.entities.User, org.apache.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">postGroupActivityAsync</A></B>(java.lang.String&nbsp;verb,
                        java.lang.String&nbsp;title,
                        java.lang.String&nbsp;content,
                        java.lang.String&nbsp;category,
-                       <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>&nbsp;user,
-                       <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;object,
+                       <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>&nbsp;user,
+                       <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;object,
                        java.lang.String&nbsp;objectType,
                        java.lang.String&nbsp;objectName,
                        java.lang.String&nbsp;objectContent,
-                       <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+                       <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates and posts an activity to a group.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postUserActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.entities.User, org.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)">postUserActivity</A></B>(java.lang.String&nbsp;verb,
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postUserActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.entities.User, org.apache.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)">postUserActivity</A></B>(java.lang.String&nbsp;verb,
                  java.lang.String&nbsp;title,
                  java.lang.String&nbsp;content,
                  java.lang.String&nbsp;category,
-                 <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>&nbsp;user,
-                 <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;object,
+                 <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>&nbsp;user,
+                 <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;object,
                  java.lang.String&nbsp;objectType,
                  java.lang.String&nbsp;objectName,
                  java.lang.String&nbsp;objectContent)</CODE>
@@ -186,16 +186,16 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/User.htm
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postUserActivityAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.entities.User, org.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">postUserActivityAsync</A></B>(java.lang.String&nbsp;verb,
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postUserActivityAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.entities.User, org.apache.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">postUserActivityAsync</A></B>(java.lang.String&nbsp;verb,
                       java.lang.String&nbsp;title,
                       java.lang.String&nbsp;content,
                       java.lang.String&nbsp;category,
-                      <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>&nbsp;user,
-                      <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;object,
+                      <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>&nbsp;user,
+                      <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;object,
                       java.lang.String&nbsp;objectType,
                       java.lang.String&nbsp;objectName,
                       java.lang.String&nbsp;objectContent,
-                      <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+                      <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates and posts an activity to a user.</TD>
@@ -203,7 +203,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/User.htm
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#setLoggedInUser(org.usergrid.android.client.entities.User)">setLoggedInUser</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>&nbsp;loggedInUser)</CODE>
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#setLoggedInUser(org.apache.usergrid.android.client.entities.User)">setLoggedInUser</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>&nbsp;loggedInUser)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -211,11 +211,11 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/User.htm
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client.entities"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client.entities"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A> in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A></FONT></TH>
+Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A> in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -223,17 +223,17 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/User.htm
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>static&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A></CODE></FONT></TD>
-<TD><CODE><B>Activity.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html#newActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.entities.User, org.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)">newActivity</A></B>(java.lang.String&nbsp;verb,
+<CODE>static&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A></CODE></FONT></TD>
+<TD><CODE><B>Activity.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html#newActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.entities.User, org.apache.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)">newActivity</A></B>(java.lang.String&nbsp;verb,
             java.lang.String&nbsp;title,
             java.lang.String&nbsp;content,
             java.lang.String&nbsp;category,
-            <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>&nbsp;user,
-            <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;object,
+            <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>&nbsp;user,
+            <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;object,
             java.lang.String&nbsp;objectType,
             java.lang.String&nbsp;objectName,
             java.lang.String&nbsp;objectContent)</CODE>
@@ -244,11 +244,11 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/User.htm
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client.response"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client.response"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A> in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A></FONT></TH>
+Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A> in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -256,11 +256,11 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/User.htm
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A> that return <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A> that return <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A></CODE></FONT></TD>
 <TD><CODE><B>ApiResponse.</B><B><A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html#getUser()">getUser</A></B>()</CODE>
 
 <BR>
@@ -272,12 +272,12 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/User.htm
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>ApiResponse.</B><B><A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html#setUser(org.usergrid.android.client.entities.User)">setUser</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>&nbsp;user)</CODE>
+<TD><CODE><B>ApiResponse.</B><B><A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html#setUser(org.apache.usergrid.android.client.entities.User)">setUser</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>&nbsp;user)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -299,7 +299,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/User.htm
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/entities/package-frame.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/entities/package-frame.html b/sdks/android/doc/org/usergrid/android/client/entities/package-frame.html
index 61d42d0..78698db 100644
--- a/sdks/android/doc/org/usergrid/android/client/entities/package-frame.html
+++ b/sdks/android/doc/org/usergrid/android/client/entities/package-frame.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-org.usergrid.android.client.entities
+org.apache.usergrid.android.client.entities
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -16,30 +16,30 @@ org.usergrid.android.client.entities
 
 <BODY BGCOLOR="white">
 <FONT size="+1" CLASS="FrameTitleFont">
-<A HREF="../../../../../org/usergrid/android/client/entities/package-summary.html" target="classFrame">org.usergrid.android.client.entities</A></FONT>
+<A HREF="../../../../../org/usergrid/android/client/entities/package-summary.html" target="classFrame">org.apache.usergrid.android.client.entities</A></FONT>
 <TABLE BORDER="0" WIDTH="100%" SUMMARY="">
 <TR>
 <TD NOWRAP><FONT size="+1" CLASS="FrameHeadingFont">
 Classes</FONT>&nbsp;
 <FONT CLASS="FrameItemFont">
 <BR>
-<A HREF="Activity.html" title="class in org.usergrid.android.client.entities" target="classFrame">Activity</A>
+<A HREF="Activity.html" title="class in org.apache.usergrid.android.client.entities" target="classFrame">Activity</A>
 <BR>
-<A HREF="Activity.ActivityCollection.html" title="class in org.usergrid.android.client.entities" target="classFrame">Activity.ActivityCollection</A>
+<A HREF="Activity.ActivityCollection.html" title="class in org.apache.usergrid.android.client.entities" target="classFrame">Activity.ActivityCollection</A>
 <BR>
-<A HREF="Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities" target="classFrame">Activity.ActivityObject</A>
+<A HREF="Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities" target="classFrame">Activity.ActivityObject</A>
 <BR>
-<A HREF="Activity.MediaLink.html" title="class in org.usergrid.android.client.entities" target="classFrame">Activity.MediaLink</A>
+<A HREF="Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities" target="classFrame">Activity.MediaLink</A>
 <BR>
-<A HREF="Device.html" title="class in org.usergrid.android.client.entities" target="classFrame">Device</A>
+<A HREF="Device.html" title="class in org.apache.usergrid.android.client.entities" target="classFrame">Device</A>
 <BR>
-<A HREF="Entity.html" title="class in org.usergrid.android.client.entities" target="classFrame">Entity</A>
+<A HREF="Entity.html" title="class in org.apache.usergrid.android.client.entities" target="classFrame">Entity</A>
 <BR>
-<A HREF="Group.html" title="class in org.usergrid.android.client.entities" target="classFrame">Group</A>
+<A HREF="Group.html" title="class in org.apache.usergrid.android.client.entities" target="classFrame">Group</A>
 <BR>
-<A HREF="Message.html" title="class in org.usergrid.android.client.entities" target="classFrame">Message</A>
+<A HREF="Message.html" title="class in org.apache.usergrid.android.client.entities" target="classFrame">Message</A>
 <BR>
-<A HREF="User.html" title="class in org.usergrid.android.client.entities" target="classFrame">User</A></FONT></TD>
+<A HREF="User.html" title="class in org.apache.usergrid.android.client.entities" target="classFrame">User</A></FONT></TD>
 </TR>
 </TABLE>
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/entities/package-summary.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/entities/package-summary.html b/sdks/android/doc/org/usergrid/android/client/entities/package-summary.html
index e8bcd33..0ea9132 100644
--- a/sdks/android/doc/org/usergrid/android/client/entities/package-summary.html
+++ b/sdks/android/doc/org/usergrid/android/client/entities/package-summary.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-org.usergrid.android.client.entities
+org.apache.usergrid.android.client.entities
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ org.usergrid.android.client.entities
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="org.usergrid.android.client.entities";
+        parent.document.title="org.apache.usergrid.android.client.entities";
     }
 }
 </SCRIPT>
@@ -80,7 +80,7 @@ function windowTitle()
 
 <HR>
 <H2>
-Package org.usergrid.android.client.entities
+Package org.apache.usergrid.android.client.entities
 </H2>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
@@ -89,39 +89,39 @@ Package org.usergrid.android.client.entities
 <B>Class Summary</B></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A></B></TD>
 <TD>An entity type for representing activity stream actions.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.usergrid.android.client.entities">Activity.ActivityCollection</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityCollection</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities">Activity.ActivityObject</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities">Activity.ActivityObject</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities">Activity.MediaLink</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities">Activity.MediaLink</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities">Device</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities">Device</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 </TABLE>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/entities/package-tree.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/entities/package-tree.html b/sdks/android/doc/org/usergrid/android/client/entities/package-tree.html
index 6b1ddf2..defc550 100644
--- a/sdks/android/doc/org/usergrid/android/client/entities/package-tree.html
+++ b/sdks/android/doc/org/usergrid/android/client/entities/package-tree.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-org.usergrid.android.client.entities Class Hierarchy
+org.apache.usergrid.android.client.entities Class Hierarchy
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ org.usergrid.android.client.entities Class Hierarchy
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="org.usergrid.android.client.entities Class Hierarchy";
+        parent.document.title="org.apache.usergrid.android.client.entities Class Hierarchy";
     }
 }
 </SCRIPT>
@@ -81,7 +81,7 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-Hierarchy For Package org.usergrid.android.client.entities
+Hierarchy For Package org.apache.usergrid.android.client.entities
 </H2>
 </CENTER>
 <DL>
@@ -92,8 +92,8 @@ Class Hierarchy
 </H2>
 <UL>
 <LI TYPE="circle">java.lang.Object<UL>
-<LI TYPE="circle">org.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.usergrid.android.client.entities"><B>Activity.ActivityCollection</B></A><LI TYPE="circle">org.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.usergrid.android.client.entities"><B>Activity.ActivityObject</B></A><LI TYPE="circle">org.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.usergrid.android.client.entities"><B>Activity.MediaLink</B></A><LI TYPE="circle">org.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities"><B>Entity</B></A><UL>
-<LI TYPE="circle">org.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities"><B>Activity</B></A><LI TYPE="circle">org.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities"><B>Device</B></A><LI TYPE="circle">org.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities"><B>Group</B></A><LI TYPE="circle">org.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities"><B>Message</B></A><LI TYPE="circle">org.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities"><B>User</B><
 /A></UL>
+<LI TYPE="circle">org.apache.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityCollection.html" title="class in org.apache.usergrid.android.client.entities"><B>Activity.ActivityCollection</B></A><LI TYPE="circle">org.apache.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Activity.ActivityObject.html" title="class in org.apache.usergrid.android.client.entities"><B>Activity.ActivityObject</B></A><LI TYPE="circle">org.apache.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Activity.MediaLink.html" title="class in org.apache.usergrid.android.client.entities"><B>Activity.MediaLink</B></A><LI TYPE="circle">org.apache.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities"><B>Entity</B></A><UL>
+<LI TYPE="circle">org.apache.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities"><B>Activity</B></A><LI TYPE="circle">org.apache.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities"><B>Device</B></A><LI TYPE="circle">org.apache.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities"><B>Group</B></A><LI TYPE="circle">org.apache.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities"><B>Message</B></A><LI TYPE="circle">org.apache.usergrid.android.client.entities.<A HREF="../../../../../org/usergrid/android/client/entities/User.html" tit
 le="class in org.apache.usergrid.android.client.entities"><B>User</B></A></UL>
 </UL>
 </UL>
 <HR>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/entities/package-use.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/entities/package-use.html b/sdks/android/doc/org/usergrid/android/client/entities/package-use.html
index ff2d200..1551186 100644
--- a/sdks/android/doc/org/usergrid/android/client/entities/package-use.html
+++ b/sdks/android/doc/org/usergrid/android/client/entities/package-use.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Package org.usergrid.android.client.entities
+Uses of Package org.apache.usergrid.android.client.entities
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Package org.usergrid.android.client.entities
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Package org.usergrid.android.client.entities";
+        parent.document.title="Uses of Package org.apache.usergrid.android.client.entities";
     }
 }
 </SCRIPT>
@@ -81,65 +81,65 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Package<br>org.usergrid.android.client.entities</B></H2>
+<B>Uses of Package<br>org.apache.usergrid.android.client.entities</B></H2>
 </CENTER>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Packages that use <A HREF="../../../../../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A></FONT></TH>
+Packages that use <A HREF="../../../../../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client"><B>org.usergrid.android.client</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client"><B>org.apache.usergrid.android.client</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client.callbacks"><B>org.usergrid.android.client.callbacks</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client.callbacks"><B>org.apache.usergrid.android.client.callbacks</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client.entities"><B>org.usergrid.android.client.entities</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client.entities"><B>org.apache.usergrid.android.client.entities</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client.response"><B>org.usergrid.android.client.response</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client.response"><B>org.apache.usergrid.android.client.response</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Classes in <A HREF="../../../../../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A> used by <A HREF="../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A></FONT></TH>
+Classes in <A HREF="../../../../../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A> used by <A HREF="../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/Activity.html#org.usergrid.android.client"><B>Activity</B></A></B>
+<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/Activity.html#org.apache.usergrid.android.client"><B>Activity</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;An entity type for representing activity stream actions.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/Device.html#org.usergrid.android.client"><B>Device</B></A></B>
+<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/Device.html#org.apache.usergrid.android.client"><B>Device</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/Entity.html#org.usergrid.android.client"><B>Entity</B></A></B>
+<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/Entity.html#org.apache.usergrid.android.client"><B>Entity</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/Group.html#org.usergrid.android.client"><B>Group</B></A></B>
+<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/Group.html#org.apache.usergrid.android.client"><B>Group</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/User.html#org.usergrid.android.client"><B>User</B></A></B>
+<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/User.html#org.apache.usergrid.android.client"><B>User</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -147,20 +147,20 @@ Classes in <A HREF="../../../../../org/usergrid/android/client/entities/package-
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client.callbacks"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client.callbacks"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Classes in <A HREF="../../../../../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A> used by <A HREF="../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.usergrid.android.client.callbacks</A></FONT></TH>
+Classes in <A HREF="../../../../../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A> used by <A HREF="../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.apache.usergrid.android.client.callbacks</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/Device.html#org.usergrid.android.client.callbacks"><B>Device</B></A></B>
+<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/Device.html#org.apache.usergrid.android.client.callbacks"><B>Device</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/Group.html#org.usergrid.android.client.callbacks"><B>Group</B></A></B>
+<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/Group.html#org.apache.usergrid.android.client.callbacks"><B>Group</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -168,38 +168,38 @@ Classes in <A HREF="../../../../../org/usergrid/android/client/entities/package-
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client.entities"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client.entities"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Classes in <A HREF="../../../../../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A> used by <A HREF="../../../../../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A></FONT></TH>
+Classes in <A HREF="../../../../../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A> used by <A HREF="../../../../../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/Activity.html#org.usergrid.android.client.entities"><B>Activity</B></A></B>
+<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/Activity.html#org.apache.usergrid.android.client.entities"><B>Activity</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;An entity type for representing activity stream actions.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/Activity.ActivityObject.html#org.usergrid.android.client.entities"><B>Activity.ActivityObject</B></A></B>
+<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/Activity.ActivityObject.html#org.apache.usergrid.android.client.entities"><B>Activity.ActivityObject</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/Activity.MediaLink.html#org.usergrid.android.client.entities"><B>Activity.MediaLink</B></A></B>
+<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/Activity.MediaLink.html#org.apache.usergrid.android.client.entities"><B>Activity.MediaLink</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/Entity.html#org.usergrid.android.client.entities"><B>Entity</B></A></B>
+<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/Entity.html#org.apache.usergrid.android.client.entities"><B>Entity</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/User.html#org.usergrid.android.client.entities"><B>User</B></A></B>
+<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/User.html#org.apache.usergrid.android.client.entities"><B>User</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -207,26 +207,26 @@ Classes in <A HREF="../../../../../org/usergrid/android/client/entities/package-
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client.response"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client.response"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Classes in <A HREF="../../../../../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A> used by <A HREF="../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A></FONT></TH>
+Classes in <A HREF="../../../../../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A> used by <A HREF="../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/Entity.html#org.usergrid.android.client.response"><B>Entity</B></A></B>
+<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/Entity.html#org.apache.usergrid.android.client.response"><B>Entity</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/Message.html#org.usergrid.android.client.response"><B>Message</B></A></B>
+<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/Message.html#org.apache.usergrid.android.client.response"><B>Message</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/User.html#org.usergrid.android.client.response"><B>User</B></A></B>
+<TD><B><A HREF="../../../../../org/usergrid/android/client/entities/class-use/User.html#org.apache.usergrid.android.client.response"><B>User</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/package-frame.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/package-frame.html b/sdks/android/doc/org/usergrid/android/client/package-frame.html
index 0ec29f8..9df588e 100644
--- a/sdks/android/doc/org/usergrid/android/client/package-frame.html
+++ b/sdks/android/doc/org/usergrid/android/client/package-frame.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-org.usergrid.android.client
+org.apache.usergrid.android.client
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -16,14 +16,14 @@ org.usergrid.android.client
 
 <BODY BGCOLOR="white">
 <FONT size="+1" CLASS="FrameTitleFont">
-<A HREF="../../../../org/usergrid/android/client/package-summary.html" target="classFrame">org.usergrid.android.client</A></FONT>
+<A HREF="../../../../org/usergrid/android/client/package-summary.html" target="classFrame">org.apache.usergrid.android.client</A></FONT>
 <TABLE BORDER="0" WIDTH="100%" SUMMARY="">
 <TR>
 <TD NOWRAP><FONT size="+1" CLASS="FrameHeadingFont">
 Interfaces</FONT>&nbsp;
 <FONT CLASS="FrameItemFont">
 <BR>
-<A HREF="Client.Query.html" title="interface in org.usergrid.android.client" target="classFrame"><I>Client.Query</I></A></FONT></TD>
+<A HREF="Client.Query.html" title="interface in org.apache.usergrid.android.client" target="classFrame"><I>Client.Query</I></A></FONT></TD>
 </TR>
 </TABLE>
 
@@ -34,7 +34,7 @@ Interfaces</FONT>&nbsp;
 Classes</FONT>&nbsp;
 <FONT CLASS="FrameItemFont">
 <BR>
-<A HREF="Client.html" title="class in org.usergrid.android.client" target="classFrame">Client</A></FONT></TD>
+<A HREF="Client.html" title="class in org.apache.usergrid.android.client" target="classFrame">Client</A></FONT></TD>
 </TR>
 </TABLE>
 
@@ -45,7 +45,7 @@ Classes</FONT>&nbsp;
 Enums</FONT>&nbsp;
 <FONT CLASS="FrameItemFont">
 <BR>
-<A HREF="Client.QueuePosition.html" title="enum in org.usergrid.android.client" target="classFrame">Client.QueuePosition</A></FONT></TD>
+<A HREF="Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client" target="classFrame">Client.QueuePosition</A></FONT></TD>
 </TR>
 </TABLE>
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/package-summary.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/package-summary.html b/sdks/android/doc/org/usergrid/android/client/package-summary.html
index 6e20d78..f1d48a2 100644
--- a/sdks/android/doc/org/usergrid/android/client/package-summary.html
+++ b/sdks/android/doc/org/usergrid/android/client/package-summary.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-org.usergrid.android.client
+org.apache.usergrid.android.client
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ org.usergrid.android.client
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="org.usergrid.android.client";
+        parent.document.title="org.apache.usergrid.android.client";
     }
 }
 </SCRIPT>
@@ -80,7 +80,7 @@ function windowTitle()
 
 <HR>
 <H2>
-Package org.usergrid.android.client
+Package org.apache.usergrid.android.client
 </H2>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
@@ -89,7 +89,7 @@ Package org.usergrid.android.client
 <B>Interface Summary</B></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client">Client.Query</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client">Client.Query</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 </TABLE>
@@ -103,7 +103,7 @@ Package org.usergrid.android.client
 <B>Class Summary</B></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client">Client</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client">Client</A></B></TD>
 <TD>The Client class for accessing the Usergrid API.</TD>
 </TR>
 </TABLE>
@@ -117,7 +117,7 @@ Package org.usergrid.android.client
 <B>Enum Summary</B></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 </TABLE>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/package-tree.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/package-tree.html b/sdks/android/doc/org/usergrid/android/client/package-tree.html
index e6bc752..092eb73 100644
--- a/sdks/android/doc/org/usergrid/android/client/package-tree.html
+++ b/sdks/android/doc/org/usergrid/android/client/package-tree.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-org.usergrid.android.client Class Hierarchy
+org.apache.usergrid.android.client Class Hierarchy
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ org.usergrid.android.client Class Hierarchy
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="org.usergrid.android.client Class Hierarchy";
+        parent.document.title="org.apache.usergrid.android.client Class Hierarchy";
     }
 }
 </SCRIPT>
@@ -81,7 +81,7 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-Hierarchy For Package org.usergrid.android.client
+Hierarchy For Package org.apache.usergrid.android.client
 </H2>
 </CENTER>
 <DL>
@@ -92,13 +92,13 @@ Class Hierarchy
 </H2>
 <UL>
 <LI TYPE="circle">java.lang.Object<UL>
-<LI TYPE="circle">org.usergrid.android.client.<A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.usergrid.android.client"><B>Client</B></A></UL>
+<LI TYPE="circle">org.apache.usergrid.android.client.<A HREF="../../../../org/usergrid/android/client/Client.html" title="class in org.apache.usergrid.android.client"><B>Client</B></A></UL>
 </UL>
 <H2>
 Interface Hierarchy
 </H2>
 <UL>
-<LI TYPE="circle">org.usergrid.android.client.<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.usergrid.android.client"><B>Client.Query</B></A></UL>
+<LI TYPE="circle">org.apache.usergrid.android.client.<A HREF="../../../../org/usergrid/android/client/Client.Query.html" title="interface in org.apache.usergrid.android.client"><B>Client.Query</B></A></UL>
 <H2>
 Enum Hierarchy
 </H2>
@@ -106,7 +106,7 @@ Enum Hierarchy
 <LI TYPE="circle">java.lang.Object<UL>
 <LI TYPE="circle">java.lang.Enum&lt;E&gt; (implements java.lang.Comparable&lt;T&gt;, java.io.Serializable)
 <UL>
-<LI TYPE="circle">org.usergrid.android.client.<A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client"><B>Client.QueuePosition</B></A></UL>
+<LI TYPE="circle">org.apache.usergrid.android.client.<A HREF="../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client"><B>Client.QueuePosition</B></A></UL>
 </UL>
 </UL>
 <HR>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/package-use.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/package-use.html b/sdks/android/doc/org/usergrid/android/client/package-use.html
index 631ed79..4a8661d 100644
--- a/sdks/android/doc/org/usergrid/android/client/package-use.html
+++ b/sdks/android/doc/org/usergrid/android/client/package-use.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Package org.usergrid.android.client
+Uses of Package org.apache.usergrid.android.client
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Package org.usergrid.android.client
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Package org.usergrid.android.client";
+        parent.document.title="Uses of Package org.apache.usergrid.android.client";
     }
 }
 </SCRIPT>
@@ -81,45 +81,45 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Package<br>org.usergrid.android.client</B></H2>
+<B>Uses of Package<br>org.apache.usergrid.android.client</B></H2>
 </CENTER>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Packages that use <A HREF="../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A></FONT></TH>
+Packages that use <A HREF="../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client"><B>org.usergrid.android.client</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client"><B>org.apache.usergrid.android.client</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client.callbacks"><B>org.usergrid.android.client.callbacks</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client.callbacks"><B>org.apache.usergrid.android.client.callbacks</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Classes in <A HREF="../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A> used by <A HREF="../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A></FONT></TH>
+Classes in <A HREF="../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A> used by <A HREF="../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../org/usergrid/android/client/class-use/Client.html#org.usergrid.android.client"><B>Client</B></A></B>
+<TD><B><A HREF="../../../../org/usergrid/android/client/class-use/Client.html#org.apache.usergrid.android.client"><B>Client</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The Client class for accessing the Usergrid API.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../org/usergrid/android/client/class-use/Client.Query.html#org.usergrid.android.client"><B>Client.Query</B></A></B>
+<TD><B><A HREF="../../../../org/usergrid/android/client/class-use/Client.Query.html#org.apache.usergrid.android.client"><B>Client.Query</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../org/usergrid/android/client/class-use/Client.QueuePosition.html#org.usergrid.android.client"><B>Client.QueuePosition</B></A></B>
+<TD><B><A HREF="../../../../org/usergrid/android/client/class-use/Client.QueuePosition.html#org.apache.usergrid.android.client"><B>Client.QueuePosition</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -127,14 +127,14 @@ Classes in <A HREF="../../../../org/usergrid/android/client/package-summary.html
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client.callbacks"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client.callbacks"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Classes in <A HREF="../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A> used by <A HREF="../../../../org/usergrid/android/client/callbacks/package-summary.html">org.usergrid.android.client.callbacks</A></FONT></TH>
+Classes in <A HREF="../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A> used by <A HREF="../../../../org/usergrid/android/client/callbacks/package-summary.html">org.apache.usergrid.android.client.callbacks</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../org/usergrid/android/client/class-use/Client.Query.html#org.usergrid.android.client.callbacks"><B>Client.Query</B></A></B>
+<TD><B><A HREF="../../../../org/usergrid/android/client/class-use/Client.Query.html#org.apache.usergrid.android.client.callbacks"><B>Client.Query</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/response/AggregateCounter.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/response/AggregateCounter.html b/sdks/android/doc/org/usergrid/android/client/response/AggregateCounter.html
index 151df80..5971298 100644
--- a/sdks/android/doc/org/usergrid/android/client/response/AggregateCounter.html
+++ b/sdks/android/doc/org/usergrid/android/client/response/AggregateCounter.html
@@ -56,7 +56,7 @@ function windowTitle()
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 &nbsp;PREV CLASS&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/response/AggregateCounter.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="AggregateCounter.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
@@ -88,12 +88,12 @@ DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&n
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client.response</FONT>
+org.apache.usergrid.android.client.response</FONT>
 <BR>
 Class AggregateCounter</H2>
 <PRE>
 java.lang.Object
-  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.usergrid.android.client.response.AggregateCounter</B>
+  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.usergrid.android.client.response.AggregateCounter</B>
 </PRE>
 <HR>
 <DL>
@@ -299,7 +299,7 @@ public java.lang.String <B>toString</B>()</PRE>
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 &nbsp;PREV CLASS&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/response/AggregateCounter.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="AggregateCounter.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;


[13/96] [abbrv] [partial] Change package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/persistence/cassandra/EntityManagerImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/persistence/cassandra/EntityManagerImpl.java b/stack/core/src/main/java/org/usergrid/persistence/cassandra/EntityManagerImpl.java
deleted file mode 100644
index f7d4069..0000000
--- a/stack/core/src/main/java/org/usergrid/persistence/cassandra/EntityManagerImpl.java
+++ /dev/null
@@ -1,2858 +0,0 @@
-/*******************************************************************************
- * Copyright 2012 Apigee Corporation
- *
- * 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.usergrid.persistence.cassandra;
-
-
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.LinkedHashMap;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeMap;
-import java.util.TreeSet;
-import java.util.UUID;
-
-import javax.annotation.Resource;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.context.ApplicationContext;
-import org.springframework.util.Assert;
-import org.usergrid.locking.Lock;
-import org.usergrid.mq.Message;
-import org.usergrid.mq.QueueManager;
-import org.usergrid.mq.cassandra.QueueManagerFactoryImpl;
-import org.usergrid.persistence.AggregateCounter;
-import org.usergrid.persistence.AggregateCounterSet;
-import org.usergrid.persistence.CollectionRef;
-import org.usergrid.persistence.ConnectedEntityRef;
-import org.usergrid.persistence.ConnectionRef;
-import org.usergrid.persistence.CounterResolution;
-import org.usergrid.persistence.DynamicEntity;
-import org.usergrid.persistence.Entity;
-import org.usergrid.persistence.EntityFactory;
-import org.usergrid.persistence.EntityManager;
-import org.usergrid.persistence.EntityRef;
-import org.usergrid.persistence.Identifier;
-import org.usergrid.persistence.IndexBucketLocator;
-import org.usergrid.persistence.IndexBucketLocator.IndexType;
-import org.usergrid.persistence.Query;
-import org.usergrid.persistence.Query.CounterFilterPredicate;
-import org.usergrid.persistence.Results;
-import org.usergrid.persistence.Results.Level;
-import org.usergrid.persistence.RoleRef;
-import org.usergrid.persistence.Schema;
-import org.usergrid.persistence.SimpleCollectionRef;
-import org.usergrid.persistence.SimpleEntityRef;
-import org.usergrid.persistence.SimpleRoleRef;
-import org.usergrid.persistence.TypedEntity;
-import org.usergrid.persistence.cassandra.CounterUtils.AggregateCounterSelection;
-import org.usergrid.persistence.cassandra.util.TraceParticipant;
-import org.usergrid.persistence.entities.Application;
-import org.usergrid.persistence.entities.Event;
-import org.usergrid.persistence.entities.Group;
-import org.usergrid.persistence.entities.Role;
-import org.usergrid.persistence.entities.User;
-import org.usergrid.persistence.exceptions.DuplicateUniquePropertyExistsException;
-import org.usergrid.persistence.exceptions.EntityNotFoundException;
-import org.usergrid.persistence.exceptions.RequiredPropertyNotFoundException;
-import org.usergrid.persistence.exceptions.UnexpectedEntityTypeException;
-import org.usergrid.persistence.schema.CollectionInfo;
-import org.usergrid.utils.ClassUtils;
-import org.usergrid.utils.CompositeUtils;
-import org.usergrid.utils.UUIDUtils;
-
-import com.google.common.collect.BiMap;
-import com.google.common.collect.HashBiMap;
-import com.yammer.metrics.annotation.Metered;
-
-import me.prettyprint.cassandra.serializers.ByteBufferSerializer;
-import me.prettyprint.cassandra.serializers.LongSerializer;
-import me.prettyprint.cassandra.serializers.StringSerializer;
-import me.prettyprint.cassandra.serializers.UUIDSerializer;
-import me.prettyprint.hector.api.Keyspace;
-import me.prettyprint.hector.api.beans.ColumnSlice;
-import me.prettyprint.hector.api.beans.CounterRow;
-import me.prettyprint.hector.api.beans.CounterRows;
-import me.prettyprint.hector.api.beans.CounterSlice;
-import me.prettyprint.hector.api.beans.DynamicComposite;
-import me.prettyprint.hector.api.beans.HColumn;
-import me.prettyprint.hector.api.beans.HCounterColumn;
-import me.prettyprint.hector.api.beans.Row;
-import me.prettyprint.hector.api.beans.Rows;
-import me.prettyprint.hector.api.factory.HFactory;
-import me.prettyprint.hector.api.mutation.Mutator;
-import me.prettyprint.hector.api.query.MultigetSliceCounterQuery;
-import me.prettyprint.hector.api.query.QueryResult;
-import me.prettyprint.hector.api.query.SliceCounterQuery;
-
-import static java.lang.String.CASE_INSENSITIVE_ORDER;
-import static java.util.Arrays.asList;
-
-import static me.prettyprint.hector.api.factory.HFactory.createCounterSliceQuery;
-import static me.prettyprint.hector.api.factory.HFactory.createMutator;
-import static org.apache.commons.lang.StringUtils.capitalize;
-import static org.apache.commons.lang.StringUtils.isBlank;
-import static org.usergrid.locking.LockHelper.getUniqueUpdateLock;
-import static org.usergrid.persistence.Results.Level.REFS;
-import static org.usergrid.persistence.Results.fromEntities;
-import static org.usergrid.persistence.Schema.COLLECTION_ROLES;
-import static org.usergrid.persistence.Schema.COLLECTION_USERS;
-import static org.usergrid.persistence.Schema.DICTIONARY_COLLECTIONS;
-import static org.usergrid.persistence.Schema.DICTIONARY_PERMISSIONS;
-import static org.usergrid.persistence.Schema.DICTIONARY_PROPERTIES;
-import static org.usergrid.persistence.Schema.DICTIONARY_ROLENAMES;
-import static org.usergrid.persistence.Schema.DICTIONARY_ROLETIMES;
-import static org.usergrid.persistence.Schema.DICTIONARY_SETS;
-import static org.usergrid.persistence.Schema.PROPERTY_ASSOCIATED;
-import static org.usergrid.persistence.Schema.PROPERTY_CREATED;
-import static org.usergrid.persistence.Schema.PROPERTY_INACTIVITY;
-import static org.usergrid.persistence.Schema.PROPERTY_MODIFIED;
-import static org.usergrid.persistence.Schema.PROPERTY_NAME;
-import static org.usergrid.persistence.Schema.PROPERTY_TIMESTAMP;
-import static org.usergrid.persistence.Schema.PROPERTY_TYPE;
-import static org.usergrid.persistence.Schema.PROPERTY_UUID;
-import static org.usergrid.persistence.Schema.TYPE_APPLICATION;
-import static org.usergrid.persistence.Schema.TYPE_CONNECTION;
-import static org.usergrid.persistence.Schema.TYPE_ENTITY;
-import static org.usergrid.persistence.Schema.TYPE_MEMBER;
-import static org.usergrid.persistence.Schema.TYPE_ROLE;
-import static org.usergrid.persistence.Schema.defaultCollectionName;
-import static org.usergrid.persistence.Schema.deserializeEntityProperties;
-import static org.usergrid.persistence.Schema.getDefaultSchema;
-import static org.usergrid.persistence.SimpleEntityRef.getUuid;
-import static org.usergrid.persistence.SimpleEntityRef.ref;
-import static org.usergrid.persistence.SimpleRoleRef.getIdForGroupIdAndRoleName;
-import static org.usergrid.persistence.SimpleRoleRef.getIdForRoleName;
-import static org.usergrid.persistence.cassandra.ApplicationCF.APPLICATION_AGGREGATE_COUNTERS;
-import static org.usergrid.persistence.cassandra.ApplicationCF.ENTITY_COMPOSITE_DICTIONARIES;
-import static org.usergrid.persistence.cassandra.ApplicationCF.ENTITY_COUNTERS;
-import static org.usergrid.persistence.cassandra.ApplicationCF.ENTITY_DICTIONARIES;
-import static org.usergrid.persistence.cassandra.ApplicationCF.ENTITY_ID_SETS;
-import static org.usergrid.persistence.cassandra.ApplicationCF.ENTITY_PROPERTIES;
-import static org.usergrid.persistence.cassandra.ApplicationCF.ENTITY_UNIQUE;
-import static org.usergrid.persistence.cassandra.CassandraPersistenceUtils.addDeleteToMutator;
-import static org.usergrid.persistence.cassandra.CassandraPersistenceUtils.addInsertToMutator;
-import static org.usergrid.persistence.cassandra.CassandraPersistenceUtils.addPropertyToMutator;
-import static org.usergrid.persistence.cassandra.CassandraPersistenceUtils.batchExecute;
-import static org.usergrid.persistence.cassandra.CassandraPersistenceUtils.key;
-import static org.usergrid.persistence.cassandra.CassandraPersistenceUtils.toStorableBinaryValue;
-import static org.usergrid.persistence.cassandra.CassandraService.ALL_COUNT;
-import static org.usergrid.utils.ClassUtils.cast;
-import static org.usergrid.utils.ConversionUtils.bytebuffer;
-import static org.usergrid.utils.ConversionUtils.getLong;
-import static org.usergrid.utils.ConversionUtils.object;
-import static org.usergrid.utils.ConversionUtils.string;
-import static org.usergrid.utils.ConversionUtils.uuid;
-import static org.usergrid.utils.InflectionUtils.singularize;
-import static org.usergrid.utils.UUIDUtils.getTimestampInMicros;
-import static org.usergrid.utils.UUIDUtils.getTimestampInMillis;
-import static org.usergrid.utils.UUIDUtils.isTimeBased;
-import static org.usergrid.utils.UUIDUtils.newTimeUUID;
-
-
-/**
- * Cassandra-specific implementation of Datastore
- *
- * @author edanuff
- * @author tnine
- */
-public class EntityManagerImpl implements EntityManager {
-
-    /** The log4j logger. */
-    private static final Logger logger = LoggerFactory.getLogger( EntityManagerImpl.class );
-    public static final String APPLICATION_COLLECTION = "application.collection.";
-    public static final String APPLICATION_ENTITIES = "application.entities";
-    public static final long ONE_COUNT = 1L;
-    @Resource
-    private EntityManagerFactoryImpl emf;
-    @Resource
-    private QueueManagerFactoryImpl qmf;
-    @Resource
-    private IndexBucketLocator indexBucketLocator;
-
-    private UUID applicationId;
-
-    private Application application;
-    @Resource
-    private CassandraService cass;
-    @Resource
-    private CounterUtils counterUtils;
-
-    private boolean skipAggregateCounters;
-
-    public static final StringSerializer se = new StringSerializer();
-    public static final ByteBufferSerializer be = new ByteBufferSerializer();
-    public static final UUIDSerializer ue = new UUIDSerializer();
-    public static final LongSerializer le = new LongSerializer();
-
-
-    public EntityManagerImpl() {
-    }
-
-
-    public EntityManagerImpl init( EntityManagerFactoryImpl emf, CassandraService cass, CounterUtils counterUtils,
-                                   UUID applicationId, boolean skipAggregateCounters ) {
-        this.emf = emf;
-        this.cass = cass;
-        this.counterUtils = counterUtils;
-        this.applicationId = applicationId;
-        this.skipAggregateCounters = skipAggregateCounters;
-        qmf = ( QueueManagerFactoryImpl ) getApplicationContext().getBean( "queueManagerFactory" );
-        indexBucketLocator = ( IndexBucketLocator ) getApplicationContext().getBean( "indexBucketLocator" );
-        // prime the application entity for the EM
-        try {
-            getApplication();
-        }
-        catch ( Exception ex ) {
-            ex.printStackTrace();
-        }
-        return this;
-    }
-
-
-    public void setApplicationId( UUID applicationId ) {
-        this.applicationId = applicationId;
-    }
-
-
-    public ApplicationContext getApplicationContext() {
-        return emf.applicationContext;
-    }
-
-
-    @Override
-    public EntityRef getApplicationRef() {
-        return ref( TYPE_APPLICATION, applicationId );
-    }
-
-
-    @Override
-    public Application getApplication() throws Exception {
-        if ( application == null ) {
-            application = get( applicationId, Application.class );
-        }
-        return application;
-    }
-
-
-    @Override
-    public void updateApplication( Application app ) throws Exception {
-        update( app );
-        this.application = app;
-    }
-
-
-    @Override
-    public void updateApplication( Map<String, Object> properties ) throws Exception {
-        this.updateProperties( applicationId, properties );
-        this.application = get( applicationId, Application.class );
-    }
-
-
-    @Override
-    public RelationManagerImpl getRelationManager( EntityRef entityRef ) {
-        //RelationManagerImpl rmi = applicationContext.getBean(RelationManagerImpl.class);
-        RelationManagerImpl rmi = new RelationManagerImpl();
-        rmi.init( this, cass, applicationId, entityRef, indexBucketLocator );
-        return rmi;
-    }
-
-
-    /**
-     * Batch dictionary property.
-     *
-     * @param batch The batch to set the property into
-     * @param entity The entity that owns the property
-     * @param propertyName the property name
-     * @param propertyValue the property value
-     * @param timestampUuid The update timestamp as a uuid
-     *
-     * @return batch
-     *
-     * @throws Exception the exception
-     */
-    public Mutator<ByteBuffer> batchSetProperty( Mutator<ByteBuffer> batch, EntityRef entity, String propertyName,
-                                                 Object propertyValue, UUID timestampUuid ) throws Exception {
-        return this.batchSetProperty( batch, entity, propertyName, propertyValue, false, false, timestampUuid );
-    }
-
-
-    public Mutator<ByteBuffer> batchSetProperty( Mutator<ByteBuffer> batch, EntityRef entity, String propertyName,
-                                                 Object propertyValue, boolean force, boolean noRead,
-                                                 UUID timestampUuid ) throws Exception {
-
-        long timestamp = getTimestampInMicros( timestampUuid );
-
-        // propertyName = propertyName.toLowerCase();
-
-        boolean entitySchemaHasProperty = getDefaultSchema().hasProperty( entity.getType(), propertyName );
-
-        propertyValue = getDefaultSchema().validateEntityPropertyValue( entity.getType(), propertyName, propertyValue );
-
-        Schema defaultSchema = Schema.getDefaultSchema();
-
-        if ( PROPERTY_TYPE.equalsIgnoreCase( propertyName ) && ( propertyValue != null ) ) {
-            if ( "entity".equalsIgnoreCase( propertyValue.toString() ) || "dynamicentity"
-                    .equalsIgnoreCase( propertyValue.toString() ) ) {
-                String errorMsg =
-                        "Unable to dictionary entity type to " + propertyValue + " because that is not a valid type.";
-                logger.error( errorMsg );
-                throw new IllegalArgumentException( errorMsg );
-            }
-        }
-
-        if ( entitySchemaHasProperty ) {
-
-            if ( !force ) {
-                if ( !defaultSchema.isPropertyMutable( entity.getType(), propertyName ) ) {
-                    return batch;
-                }
-
-                // Passing null for propertyValue indicates delete the property
-                // so if required property, exit
-                if ( ( propertyValue == null ) && defaultSchema.isRequiredProperty( entity.getType(), propertyName ) ) {
-                    return batch;
-                }
-            }
-
-
-            /**
-             * Unique property, load the old value and remove it, check if it's not a duplicate
-             */
-            if ( defaultSchema.getEntityInfo( entity.getType() ).isPropertyUnique( propertyName ) ) {
-
-                Lock lock = getUniqueUpdateLock( cass.getLockManager(), applicationId, propertyValue, entity.getType(),
-                        propertyName );
-
-                try {
-                    lock.lock();
-
-                    if ( !isPropertyValueUniqueForEntity( entity.getUuid(), entity.getType(), propertyName,
-                            propertyValue ) ) {
-                        throw new DuplicateUniquePropertyExistsException( entity.getType(), propertyName,
-                                propertyValue );
-                    }
-
-
-                    String collectionName = Schema.defaultCollectionName( entity.getType() );
-
-                    uniquePropertyDelete( batch, collectionName, entity.getType(), propertyName, propertyValue,
-                            entity.getUuid(), timestamp - 1 );
-                    uniquePropertyWrite( batch, collectionName, propertyName, propertyValue, entity.getUuid(),
-                            timestamp );
-                }
-                finally {
-                    lock.unlock();
-                }
-            }
-        }
-
-        if ( getDefaultSchema().isPropertyIndexed( entity.getType(), propertyName ) ) {
-            //this call is incorrect.  The current entity is NOT the head entity
-            getRelationManager( entity )
-                    .batchUpdatePropertyIndexes( batch, propertyName, propertyValue, entitySchemaHasProperty, noRead,
-                            timestampUuid );
-        }
-
-
-        if ( propertyValue != null ) {
-            // Set the new value
-            addPropertyToMutator( batch, key( entity.getUuid() ), entity.getType(), propertyName, propertyValue,
-                    timestamp );
-
-            if ( !entitySchemaHasProperty ) {
-                // Make a list of all the properties ever dictionary on this
-                // entity
-                addInsertToMutator( batch, ENTITY_DICTIONARIES, key( entity.getUuid(), DICTIONARY_PROPERTIES ),
-                        propertyName, null, timestamp );
-            }
-        }
-        else {
-            addDeleteToMutator( batch, ENTITY_PROPERTIES, key( entity.getUuid() ), propertyName, timestamp );
-        }
-
-        return batch;
-    }
-
-
-    /**
-     * Batch update properties.
-     *
-     * @param batch the batch
-     * @param entity The owning entity reference
-     * @param properties the properties to set
-     * @param timestampUuid the timestamp of the update operation as a time uuid
-     *
-     * @return batch
-     *
-     * @throws Exception the exception
-     */
-    public Mutator<ByteBuffer> batchUpdateProperties( Mutator<ByteBuffer> batch, EntityRef entity,
-                                                      Map<String, Object> properties, UUID timestampUuid )
-            throws Exception {
-
-        for ( String propertyName : properties.keySet() ) {
-            Object propertyValue = properties.get( propertyName );
-
-            batch = batchSetProperty( batch, entity, propertyName, propertyValue, timestampUuid );
-        }
-
-        return batch;
-    }
-
-
-    /**
-     * Batch update set.
-     *
-     * @param batch the batch
-     * @param entity The owning entity
-     * @param dictionaryName the dictionary name
-     * @param elementValue the dictionary value
-     * @param removeFromDictionary True to delete from the dictionary
-     * @param timestampUuid the timestamp
-     *
-     * @return batch
-     *
-     * @throws Exception the exception
-     */
-    public Mutator<ByteBuffer> batchUpdateDictionary( Mutator<ByteBuffer> batch, EntityRef entity,
-                                                      String dictionaryName, Object elementValue,
-                                                      boolean removeFromDictionary, UUID timestampUuid )
-            throws Exception {
-        return batchUpdateDictionary( batch, entity, dictionaryName, elementValue, null, removeFromDictionary,
-                timestampUuid );
-    }
-
-
-    public Mutator<ByteBuffer> batchUpdateDictionary( Mutator<ByteBuffer> batch, EntityRef entity,
-                                                      String dictionaryName, Object elementValue, Object elementCoValue,
-                                                      boolean removeFromDictionary, UUID timestampUuid )
-            throws Exception {
-
-        long timestamp = getTimestampInMicros( timestampUuid );
-
-        // dictionaryName = dictionaryName.toLowerCase();
-        if ( elementCoValue == null ) {
-            elementCoValue = ByteBuffer.allocate( 0 );
-        }
-
-        boolean entityHasDictionary = getDefaultSchema().hasDictionary( entity.getType(), dictionaryName );
-
-        // Don't index dynamic dictionaries not defined by the schema
-        if ( entityHasDictionary ) {
-            getRelationManager( entity )
-                    .batchUpdateSetIndexes( batch, dictionaryName, elementValue, removeFromDictionary, timestampUuid );
-        }
-
-        ApplicationCF dictionary_cf = entityHasDictionary ? ENTITY_DICTIONARIES : ENTITY_COMPOSITE_DICTIONARIES;
-
-        if ( elementValue != null ) {
-            if ( !removeFromDictionary ) {
-                // Set the new value
-
-                elementCoValue = toStorableBinaryValue( elementCoValue, !entityHasDictionary );
-
-                addInsertToMutator( batch, dictionary_cf, key( entity.getUuid(), dictionaryName ),
-                        entityHasDictionary ? elementValue : asList( elementValue ), elementCoValue, timestamp );
-
-                if ( !entityHasDictionary ) {
-                    addInsertToMutator( batch, ENTITY_DICTIONARIES, key( entity.getUuid(), DICTIONARY_SETS ),
-                            dictionaryName, null, timestamp );
-                }
-            }
-            else {
-                addDeleteToMutator( batch, dictionary_cf, key( entity.getUuid(), dictionaryName ),
-                        entityHasDictionary ? elementValue : asList( elementValue ), timestamp );
-            }
-        }
-
-        return batch;
-    }
-
-
-    /**
-     * Returns true if the property is unique, and the entity can be saved.  If it's not unique, false is returned
-     *
-     * @return True if this entity can safely "own" this property name and value unique combination
-     */
-    @Metered( group = "core", name = "EntityManager_isPropertyValueUniqueForEntity" )
-    public boolean isPropertyValueUniqueForEntity( UUID ownerEntityId, String entityType, String propertyName,
-                                                   Object propertyValue ) throws Exception {
-
-        if ( !getDefaultSchema().isPropertyUnique( entityType, propertyName ) ) {
-            return true;
-        }
-
-        if ( propertyValue == null ) {
-            return true;
-        }
-
-        /**
-         * Doing this in a loop sucks, but we need to account for possibly having more than 1 entry in the index due
-         * to corruption.  We need to allow them to update, otherwise
-         * both entities will be unable to update and must be deleted
-         */
-
-        Set<UUID> ownerEntityIds = getUUIDsForUniqueProperty( applicationId, entityType, propertyName, propertyValue );
-
-        //if there are no entities for this property, we know it's unique.  If there are,
-        // we have to make sure the one we were passed is in the set.  otherwise it belongs
-        //to a different entity
-        return ownerEntityIds.size() == 0 || ownerEntityIds.contains( ownerEntityId );
-    }
-
-
-    /**
-     * Return all UUIDs that have this unique value
-     *
-     * @param ownerEntityId The entity id that owns this entity collection
-     * @param collectionName The entity collection name
-     * @param propertyName The name of the unique property
-     * @param propertyValue The value of the unique property
-     */
-    private Set<UUID> getUUIDsForUniqueProperty( UUID ownerEntityId, String collectionName, String propertyName,
-                                                 Object propertyValue ) throws Exception {
-
-
-        String collectionNameInternal = defaultCollectionName( collectionName );
-
-        Object key = createUniqueIndexKey( ownerEntityId, collectionNameInternal, propertyName, propertyValue );
-
-        List<HColumn<ByteBuffer, ByteBuffer>> cols =
-                cass.getColumns( cass.getApplicationKeyspace( applicationId ), ENTITY_UNIQUE, key, null, null, 2,
-                        false );
-
-
-        //No columns at all, it's unique
-        if ( cols.size() == 0 ) {
-            return Collections.emptySet();
-        }
-
-        //shouldn't happen, but it's an error case
-        if ( cols.size() > 1 ) {
-            logger.error( "INDEX CORRUPTION: More than 1 unique value exists for entities in ownerId {} of type {} on "
-                    + "property {} with value {}",
-                    new Object[] { ownerEntityId, collectionNameInternal, propertyName, propertyValue } );
-        }
-
-        /**
-         * Doing this in a loop sucks, but we need to account for possibly having more than 1 entry in the index due
-         * to corruption.  We need to allow them to update, otherwise
-         * both entities will be unable to update and must be deleted
-         */
-
-        Set<UUID> results = new HashSet<UUID>( cols.size() );
-
-        for ( HColumn<ByteBuffer, ByteBuffer> col : cols ) {
-            results.add( ue.fromByteBuffer( col.getName() ) );
-        }
-
-        return results;
-    }
-
-
-    /** Add this unique index to the delete */
-    private void uniquePropertyDelete( Mutator<ByteBuffer> m, String collectionName, String entityType,
-                                       String propertyName, Object propertyValue, UUID entityId, long timestamp )
-            throws Exception {
-        //read the old value and delete it
-
-        Object oldValue = getProperty( new SimpleEntityRef( entityType, entityId ), propertyName );
-
-        //we have an old value.  If the new value is empty, we want to delete the old value.  If the new value is
-        // different we want to delete, otherwise we don't issue the delete
-        if ( oldValue != null && ( propertyValue == null || !oldValue.equals( propertyValue ) ) ) {
-            Object key = createUniqueIndexKey( applicationId, collectionName, propertyName, oldValue );
-
-            addDeleteToMutator( m, ENTITY_UNIQUE, key, timestamp, entityId );
-        }
-    }
-
-
-    /** Add this unique index to the delete */
-    private void uniquePropertyWrite( Mutator<ByteBuffer> m, String collectionName, String propertyName,
-                                      Object propertyValue, UUID entityId, long timestamp ) throws Exception {
-        Object key = createUniqueIndexKey( applicationId, collectionName, propertyName, propertyValue );
-
-        addInsertToMutator( m, ENTITY_UNIQUE, key, entityId, null, timestamp );
-    }
-
-
-    /**
-     * Create a row key for the entity of the given type with the name and value in the property.  Used for fast unique
-     * index lookups
-     */
-    private Object createUniqueIndexKey( UUID ownerId, String collectionName, String propertyName, Object value ) {
-        return key( ownerId, collectionName, propertyName, value );
-    }
-
-
-    @Override
-    @Metered( group = "core", name = "EntityManager_getAlias_single" )
-    public EntityRef getAlias( UUID ownerId, String collectionType, String aliasValue ) throws Exception {
-
-        Assert.notNull( ownerId, "ownerId is required" );
-        Assert.notNull( collectionType, "collectionType is required" );
-        Assert.notNull( aliasValue, "aliasValue is required" );
-
-        Map<String, EntityRef> results = getAlias( ownerId, collectionType, Collections.singletonList( aliasValue ) );
-
-        if ( results == null || results.size() == 0 ) {
-            return null;
-        }
-
-        //add a warn statement so we can see if we have data migration issues.
-        //TODO When we get an event system, trigger a repair if this is detected
-        if ( results.size() > 1 ) {
-            logger.warn(
-                    "More than 1 entity with Owner id '{}' of type '{}' and alias '{}' exists.  This is a duplicate "
-                            + "alias, and needs audited", new Object[] { ownerId, collectionType, aliasValue } );
-        }
-
-        return results.get( aliasValue );
-    }
-
-
-    @Override
-    public Map<String, EntityRef> getAlias( String aliasType, List<String> aliases ) throws Exception {
-        return getAlias( applicationId, aliasType, aliases );
-    }
-
-
-    @Override
-    @Metered( group = "core", name = "EntityManager_getAlias_multi" )
-    public Map<String, EntityRef> getAlias( UUID ownerId, String collectionName, List<String> aliases )
-            throws Exception {
-
-        Assert.notNull( ownerId, "ownerId is required" );
-        Assert.notNull( collectionName, "collectionName is required" );
-        Assert.notEmpty( aliases, "aliases are required" );
-
-
-        String propertyName = Schema.getDefaultSchema().aliasProperty( collectionName );
-
-        Map<String, EntityRef> results = new HashMap<String, EntityRef>();
-
-        for ( String alias : aliases ) {
-            for ( UUID id : getUUIDsForUniqueProperty( ownerId, collectionName, propertyName, alias ) ) {
-                results.put( alias, new SimpleEntityRef( collectionName, id ) );
-            }
-        }
-
-        return results;
-    }
-
-
-    @SuppressWarnings( "unchecked" )
-    @Override
-    public <A extends Entity> A create( String entityType, Class<A> entityClass, Map<String, Object> properties )
-            throws Exception {
-        if ( ( entityType != null ) && ( entityType.startsWith( TYPE_ENTITY ) || entityType
-                .startsWith( "entities" ) ) ) {
-            throw new IllegalArgumentException( "Invalid entity type" );
-        }
-        A e = null;
-        try {
-            e = ( A ) create( entityType, ( Class<Entity> ) entityClass, properties, null );
-        }
-        catch ( ClassCastException e1 ) {
-            logger.error( "Unable to create typed entity", e1 );
-        }
-        return e;
-    }
-
-
-    @Override
-    public Entity create( UUID importId, String entityType, Map<String, Object> properties ) throws Exception {
-        return create( entityType, null, properties, importId );
-    }
-
-
-    @SuppressWarnings( "unchecked" )
-    @Override
-    public <A extends TypedEntity> A create( A entity ) throws Exception {
-        return ( A ) create( entity.getType(), entity.getClass(), entity.getProperties() );
-    }
-
-
-    @Override
-    @TraceParticipant
-    public Entity create( String entityType, Map<String, Object> properties ) throws Exception {
-        return create( entityType, null, properties );
-    }
-
-
-    /**
-     * Creates a new entity.
-     *
-     * @param entityType the entity type
-     * @param entityClass the entity class
-     * @param properties the properties
-     * @param importId an existing external uuid to use as the id for the new entity
-     *
-     * @return new entity
-     *
-     * @throws Exception the exception
-     */
-    @Metered( group = "core", name = "EntityManager_create" )
-    @TraceParticipant
-    public <A extends Entity> A create( String entityType, Class<A> entityClass, Map<String, Object> properties,
-                                        UUID importId ) throws Exception {
-
-        UUID timestampUuid = newTimeUUID();
-
-        Keyspace ko = cass.getApplicationKeyspace( applicationId );
-        Mutator<ByteBuffer> m = createMutator( ko, be );
-        A entity = batchCreate( m, entityType, entityClass, properties, importId, timestampUuid );
-
-        batchExecute( m, CassandraService.RETRY_COUNT );
-
-        return entity;
-    }
-
-
-    @SuppressWarnings( "unchecked" )
-    @Metered( group = "core", name = "EntityManager_batchCreate" )
-    public <A extends Entity> A batchCreate( Mutator<ByteBuffer> m, String entityType, Class<A> entityClass,
-                                             Map<String, Object> properties, UUID importId, UUID timestampUuid )
-            throws Exception {
-
-        String eType = Schema.normalizeEntityType( entityType );
-
-        Schema schema = getDefaultSchema();
-
-        boolean is_application = TYPE_APPLICATION.equals( eType );
-
-        if ( ( ( applicationId == null ) || applicationId.equals( UUIDUtils.ZERO_UUID ) ) && !is_application ) {
-            return null;
-        }
-
-        long timestamp = getTimestampInMicros( timestampUuid );
-
-        UUID itemId = UUIDUtils.newTimeUUID();
-
-        if ( is_application ) {
-            itemId = applicationId;
-        }
-        if ( importId != null ) {
-            itemId = importId;
-        }
-        boolean emptyPropertyMap = false;
-        if ( properties == null ) {
-            properties = new TreeMap<String, Object>( CASE_INSENSITIVE_ORDER );
-        }
-        if ( properties.isEmpty() ) {
-            emptyPropertyMap = true;
-        }
-
-        if ( importId != null ) {
-            if ( isTimeBased( importId ) ) {
-                timestamp = UUIDUtils.getTimestampInMicros( importId );
-            }
-            else if ( properties.get( PROPERTY_CREATED ) != null ) {
-                timestamp = getLong( properties.get( PROPERTY_CREATED ) ) * 1000;
-            }
-        }
-
-        if ( entityClass == null ) {
-            entityClass = ( Class<A> ) Schema.getDefaultSchema().getEntityClass( entityType );
-        }
-
-        Set<String> required = schema.getRequiredProperties( entityType );
-
-        if ( required != null ) {
-            for ( String p : required ) {
-                if ( !PROPERTY_UUID.equals( p ) && !PROPERTY_TYPE.equals( p ) && !PROPERTY_CREATED.equals( p )
-                        && !PROPERTY_MODIFIED.equals( p ) ) {
-                    Object v = properties.get( p );
-                    if ( schema.isPropertyTimestamp( entityType, p ) ) {
-                        if ( v == null ) {
-                            properties.put( p, timestamp / 1000 );
-                        }
-                        else {
-                            long ts = getLong( v );
-                            if ( ts <= 0 ) {
-                                properties.put( p, timestamp / 1000 );
-                            }
-                        }
-                        continue;
-                    }
-                    if ( v == null ) {
-                        throw new RequiredPropertyNotFoundException( entityType, p );
-                    }
-                    else if ( ( v instanceof String ) && isBlank( ( String ) v ) ) {
-                        throw new RequiredPropertyNotFoundException( entityType, p );
-                    }
-                }
-            }
-        }
-
-        // Create collection name based on entity: i.e. "users"
-        String collection_name = Schema.defaultCollectionName( eType );
-        // Create collection key based collection name
-        String bucketId = indexBucketLocator.getBucket( applicationId, IndexType.COLLECTION, itemId, collection_name );
-
-        Object collection_key = key( applicationId, Schema.DICTIONARY_COLLECTIONS, collection_name, bucketId );
-
-        CollectionInfo collection = null;
-
-        if ( !is_application ) {
-            // Add entity to collection
-
-
-            if ( !emptyPropertyMap ) {
-                addInsertToMutator( m, ENTITY_ID_SETS, collection_key, itemId, null, timestamp );
-            }
-
-            // Add name of collection to dictionary property
-            // Application.collections
-            addInsertToMutator( m, ENTITY_DICTIONARIES, key( applicationId, Schema.DICTIONARY_COLLECTIONS ),
-                    collection_name, null, timestamp );
-
-            addInsertToMutator( m, ENTITY_COMPOSITE_DICTIONARIES, key( itemId, Schema.DICTIONARY_CONTAINER_ENTITIES ),
-                    asList( TYPE_APPLICATION, collection_name, applicationId ), null, timestamp );
-        }
-
-        if ( emptyPropertyMap ) {
-            return null;
-        }
-        properties.put( PROPERTY_UUID, itemId );
-        properties.put( PROPERTY_TYPE, Schema.normalizeEntityType( entityType, false ) );
-
-        if ( importId != null ) {
-            if ( properties.get( PROPERTY_CREATED ) == null ) {
-                properties.put( PROPERTY_CREATED, timestamp / 1000 );
-            }
-
-            if ( properties.get( PROPERTY_MODIFIED ) == null ) {
-                properties.put( PROPERTY_MODIFIED, timestamp / 1000 );
-            }
-        }
-        else {
-            properties.put( PROPERTY_CREATED, timestamp / 1000 );
-            properties.put( PROPERTY_MODIFIED, timestamp / 1000 );
-        }
-
-        // special case timestamp and published properties
-        // and dictionary their timestamp values if not set
-        // this is sure to break something for someone someday
-
-        if ( properties.containsKey( PROPERTY_TIMESTAMP ) ) {
-            long ts = getLong( properties.get( PROPERTY_TIMESTAMP ) );
-            if ( ts <= 0 ) {
-                properties.put( PROPERTY_TIMESTAMP, timestamp / 1000 );
-            }
-        }
-
-        A entity = EntityFactory.newEntity( itemId, eType, entityClass );
-        logger.info( "Entity created of type {}", entity.getClass().getName() );
-
-        if ( Event.ENTITY_TYPE.equals( eType ) ) {
-            Event event = ( Event ) entity.toTypedEntity();
-            for ( String prop_name : properties.keySet() ) {
-                Object propertyValue = properties.get( prop_name );
-                if ( propertyValue != null ) {
-                    event.setProperty( prop_name, propertyValue );
-                }
-            }
-            Message message = storeEventAsMessage( m, event, timestamp );
-            incrementEntityCollection( "events", timestamp );
-
-            entity.setUuid( message.getUuid() );
-            return entity;
-        }
-
-        for ( String prop_name : properties.keySet() ) {
-
-            Object propertyValue = properties.get( prop_name );
-
-            if ( propertyValue == null ) {
-                continue;
-            }
-
-
-            if ( User.ENTITY_TYPE.equals( entityType ) && "me".equals( prop_name ) ) {
-                throw new DuplicateUniquePropertyExistsException( entityType, prop_name, propertyValue );
-            }
-
-            entity.setProperty( prop_name, propertyValue );
-
-            batchSetProperty( m, entity, prop_name, propertyValue, true, true, timestampUuid );
-        }
-
-        if ( !is_application ) {
-            incrementEntityCollection( collection_name, timestamp );
-        }
-
-        return entity;
-    }
-
-
-    private void incrementEntityCollection( String collection_name, long cassandraTimestamp ) {
-        try {
-            incrementAggregateCounters( null, null, null, new String( APPLICATION_COLLECTION + collection_name ),
-                    ONE_COUNT, cassandraTimestamp );
-        }
-        catch ( Exception e ) {
-            logger.error( "Unable to increment counter application.collection: {}.", new Object[]{ collection_name, e} );
-        }
-        try {
-            incrementAggregateCounters( null, null, null, APPLICATION_ENTITIES, ONE_COUNT, cassandraTimestamp );
-        }
-        catch ( Exception e ) {
-            logger.error( "Unable to increment counter application.entities for collection: {} with timestamp: {}", new Object[]{collection_name, cassandraTimestamp,e} );
-        }
-    }
-
-
-    public void decrementEntityCollection( String collection_name ) {
-
-        long cassandraTimestamp = cass.createTimestamp();
-        decrementEntityCollection( collection_name, cassandraTimestamp );
-    }
-
-
-    public void decrementEntityCollection( String collection_name, long cassandraTimestamp ) {
-        try {
-            incrementAggregateCounters( null, null, null, APPLICATION_COLLECTION + collection_name, -ONE_COUNT,
-                    cassandraTimestamp );
-        }
-        catch ( Exception e ) {
-            logger.error( "Unable to decrement counter application.collection: {}.", new Object[]{collection_name, e} );
-        }
-        try {
-            incrementAggregateCounters( null, null, null, APPLICATION_ENTITIES, -ONE_COUNT, cassandraTimestamp );
-        }
-        catch ( Exception e ) {
-        	logger.error( "Unable to decrement counter application.entities for collection: {} with timestamp: {}", new Object[]{collection_name, cassandraTimestamp,e} );
-        }
-    }
-
-
-    @Metered( group = "core", name = "EntityManager_insertEntity" )
-    public void insertEntity( String type, UUID entityId ) throws Exception {
-
-        Keyspace ko = cass.getApplicationKeyspace( applicationId );
-        Mutator<ByteBuffer> m = createMutator( ko, be );
-
-        Object itemKey = key( entityId );
-
-        long timestamp = cass.createTimestamp();
-
-        addPropertyToMutator( m, itemKey, type, PROPERTY_UUID, entityId, timestamp );
-        addPropertyToMutator( m, itemKey, type, PROPERTY_TYPE, type, timestamp );
-
-        batchExecute( m, CassandraService.RETRY_COUNT );
-    }
-
-
-    public Message storeEventAsMessage( Mutator<ByteBuffer> m, Event event, long timestamp ) {
-
-        counterUtils.addEventCounterMutations( m, applicationId, event, timestamp );
-
-        QueueManager q = qmf.getQueueManager( applicationId );
-
-        Message message = new Message();
-        message.setType( "event" );
-        message.setCategory( event.getCategory() );
-        message.setStringProperty( "message", event.getMessage() );
-        message.setTimestamp( timestamp );
-        q.postToQueue( "events", message );
-
-        return message;
-    }
-
-
-    /**
-     * Gets the type.
-     *
-     * @param entityId the entity id
-     *
-     * @return entity type
-     *
-     * @throws Exception the exception
-     */
-    @Metered( group = "core", name = "EntityManager_getEntityType" )
-    public String getEntityType( UUID entityId ) throws Exception {
-
-        HColumn<String, String> column =
-                cass.getColumn( cass.getApplicationKeyspace( applicationId ), ENTITY_PROPERTIES, key( entityId ),
-                        PROPERTY_TYPE, se, se );
-        if ( column != null ) {
-            return column.getValue();
-        }
-        return null;
-    }
-
-
-    /**
-     * Gets the entity info. If no propertyNames are passed it loads the ENTIRE entity!
-     *
-     * @param entityId the entity id
-     * @param propertyNames the property names
-     *
-     * @return DynamicEntity object holding properties
-     *
-     * @throws Exception the exception
-     */
-    @Metered( group = "core", name = "EntityManager_loadPartialEntity" )
-    public DynamicEntity loadPartialEntity( UUID entityId, String... propertyNames ) throws Exception {
-
-        List<HColumn<String, ByteBuffer>> results = null;
-        if ( ( propertyNames != null ) && ( propertyNames.length > 0 ) ) {
-            Set<String> column_names = new TreeSet<String>( CASE_INSENSITIVE_ORDER );
-
-            column_names.add( PROPERTY_TYPE );
-            column_names.add( PROPERTY_UUID );
-
-            for ( String propertyName : propertyNames ) {
-                column_names.add( propertyName );
-            }
-
-            results = cass.getColumns( cass.getApplicationKeyspace( applicationId ), ENTITY_PROPERTIES, key( entityId ),
-                    column_names, se, be );
-        }
-        else {
-            results = cass.getAllColumns( cass.getApplicationKeyspace( applicationId ), ENTITY_PROPERTIES,
-                    key( entityId ) );
-        }
-
-        Map<String, Object> entityProperties = deserializeEntityProperties( results );
-        if ( entityProperties == null ) {
-            return null;
-        }
-
-        String entityType = ( String ) entityProperties.get( PROPERTY_TYPE );
-        UUID id = ( UUID ) entityProperties.get( PROPERTY_UUID );
-
-        return new DynamicEntity( entityType, id, entityProperties );
-    }
-
-
-    /**
-     * Gets the specified entity.
-     *
-     * @param entityId the entity id
-     * @param entityClass the entity class
-     *
-     * @return entity
-     *
-     * @throws Exception the exception
-     */
-    public <A extends Entity> A getEntity( UUID entityId, Class<A> entityClass ) throws Exception {
-
-        Object entity_key = key( entityId );
-        Map<String, Object> results = null;
-
-        // if (entityType == null) {
-        results = deserializeEntityProperties(
-                cass.getAllColumns( cass.getApplicationKeyspace( applicationId ), ENTITY_PROPERTIES, entity_key ) );
-        // } else {
-        // Set<String> columnNames = Schema.getPropertyNames(entityType);
-        // results = getColumns(getApplicationKeyspace(applicationId),
-        // EntityCF.PROPERTIES, entity_key, columnNames, se, be);
-        // }
-
-        if ( results == null ) {
-            logger.warn( "getEntity(): No properties found for entity {}, probably doesn't exist...", entityId );
-            return null;
-        }
-
-        UUID id = uuid( results.get( PROPERTY_UUID ) );
-        String type = string( results.get( PROPERTY_TYPE ) );
-
-        if ( !entityId.equals( id ) ) {
-
-            logger.error( "Expected entity id {}, found {}. Returning null entity", new Object[]{entityId, id, new Throwable()} );
-            return null;
-        }
-
-        A entity = EntityFactory.newEntity( id, type, entityClass );
-        entity.setProperties( results );
-
-        return entity;
-    }
-
-
-    /**
-     * Gets the specified list of entities.
-     *
-     * @param entityIds the entity ids
-     * @param entityClass the entity class
-     *
-     * @return entity
-     *
-     * @throws Exception the exception
-     */
-    @Metered( group = "core", name = "EntityManager_getEntities" )
-    public <A extends Entity> List<A> getEntities( Collection<UUID> entityIds, Class<A> entityClass ) throws Exception {
-
-        List<A> entities = new ArrayList<A>();
-
-        if ( ( entityIds == null ) || ( entityIds.size() == 0 ) ) {
-            return entities;
-        }
-
-        Map<UUID, A> resultSet = new LinkedHashMap<UUID, A>();
-
-        Rows<UUID, String, ByteBuffer> results = null;
-
-        // if (entityType == null) {
-        results =
-                cass.getRows( cass.getApplicationKeyspace( applicationId ), ENTITY_PROPERTIES, entityIds, ue, se, be );
-        // } else {
-        // Set<String> columnNames = Schema.getPropertyNames(entityType);
-        // results = getRows(getApplicationKeyspace(applicationId),
-        // EntityCF.PROPERTIES,
-        // entityIds, columnNames, ue, se, be);
-        // }
-
-        if ( results != null ) {
-            for ( UUID key : entityIds ) {
-                Map<String, Object> properties = deserializeEntityProperties( results.getByKey( key ) );
-
-                if ( properties == null ) {
-                    logger.error( "Error deserializing entity with key {} entity probaby doesn't exist, where did this key come from?", key );
-                    continue;
-                }
-
-                UUID id = uuid( properties.get( PROPERTY_UUID ) );
-                String type = string( properties.get( PROPERTY_TYPE ) );
-
-                if ( ( id == null ) || ( type == null ) ) {
-                    logger.error( "Error retrieving entity with key {}, no type or id deseriazable, where did this key come from?", key );
-                    continue;
-                }
-                A entity = EntityFactory.newEntity( id, type, entityClass );
-                entity.setProperties( properties );
-
-                resultSet.put( id, entity );
-            }
-
-            for ( UUID entityId : entityIds ) {
-                A entity = resultSet.get( entityId );
-                if ( entity != null ) {
-                    entities.add( entity );
-                }
-            }
-        }
-
-        return entities;
-    }
-
-
-    @Metered( group = "core", name = "EntityManager_getPropertyNames" )
-    public Set<String> getPropertyNames( EntityRef entity ) throws Exception {
-
-        Set<String> propertyNames = new TreeSet<String>( CASE_INSENSITIVE_ORDER );
-        List<HColumn<String, ByteBuffer>> results =
-                cass.getAllColumns( cass.getApplicationKeyspace( applicationId ), ENTITY_DICTIONARIES,
-                        key( entity.getUuid(), DICTIONARY_PROPERTIES ) );
-        for ( HColumn<String, ByteBuffer> result : results ) {
-            String str = string( result.getName() );
-            if ( str != null ) {
-                propertyNames.add( str );
-            }
-        }
-
-        Set<String> schemaProperties = getDefaultSchema().getPropertyNames( entity.getType() );
-        if ( ( schemaProperties != null ) && !schemaProperties.isEmpty() ) {
-            propertyNames.addAll( schemaProperties );
-        }
-
-        return propertyNames;
-    }
-
-
-    @Metered( group = "core", name = "EntityManager_getDictionaryNames" )
-    public Set<String> getDictionaryNames( EntityRef entity ) throws Exception {
-
-        Set<String> dictionaryNames = new TreeSet<String>( CASE_INSENSITIVE_ORDER );
-        List<HColumn<String, ByteBuffer>> results =
-                cass.getAllColumns( cass.getApplicationKeyspace( applicationId ), ENTITY_DICTIONARIES,
-                        key( entity.getUuid(), DICTIONARY_SETS ) );
-        for ( HColumn<String, ByteBuffer> result : results ) {
-            String str = string( result.getName() );
-            if ( str != null ) {
-                dictionaryNames.add( str );
-            }
-        }
-
-        Set<String> schemaSets = getDefaultSchema().getDictionaryNames( entity.getType() );
-        if ( ( schemaSets != null ) && !schemaSets.isEmpty() ) {
-            dictionaryNames.addAll( schemaSets );
-        }
-
-        return dictionaryNames;
-    }
-
-
-    @Override
-    @Metered( group = "core", name = "EntityManager_getDictionaryElementValue" )
-    public Object getDictionaryElementValue( EntityRef entity, String dictionaryName, String elementName )
-            throws Exception {
-
-        Object value = null;
-
-        ApplicationCF dictionaryCf = null;
-
-        boolean entityHasDictionary = getDefaultSchema().hasDictionary( entity.getType(), dictionaryName );
-
-        if ( entityHasDictionary ) {
-            dictionaryCf = ENTITY_DICTIONARIES;
-        }
-        else {
-            dictionaryCf = ENTITY_COMPOSITE_DICTIONARIES;
-        }
-
-        Class<?> dictionaryCoType = getDefaultSchema().getDictionaryValueType( entity.getType(), dictionaryName );
-        boolean coTypeIsBasic = ClassUtils.isBasicType( dictionaryCoType );
-
-        HColumn<ByteBuffer, ByteBuffer> result =
-                cass.getColumn( cass.getApplicationKeyspace( applicationId ), dictionaryCf,
-                        key( entity.getUuid(), dictionaryName ),
-                        entityHasDictionary ? bytebuffer( elementName ) : DynamicComposite.toByteBuffer( elementName ),
-                        be, be );
-        if ( result != null ) {
-            if ( entityHasDictionary && coTypeIsBasic ) {
-                value = object( dictionaryCoType, result.getValue() );
-            }
-            else if ( result.getValue().remaining() > 0 ) {
-                value = Schema.deserializePropertyValueFromJsonBinary( result.getValue().slice(), dictionaryCoType );
-            }
-        }
-        else {
-            logger.info( "Results of EntityManagerImpl.getDictionaryElementValue is null" );
-        }
-
-        return value;
-    }
-
-
-    @Metered( group = "core", name = "EntityManager_getDictionaryElementValues" )
-    public Map<String, Object> getDictionaryElementValues( EntityRef entity, String dictionaryName,
-                                                           String... elementNames ) throws Exception {
-
-        Map<String, Object> values = null;
-
-        ApplicationCF dictionaryCf = null;
-
-        boolean entityHasDictionary = getDefaultSchema().hasDictionary( entity.getType(), dictionaryName );
-
-        if ( entityHasDictionary ) {
-            dictionaryCf = ENTITY_DICTIONARIES;
-        }
-        else {
-            dictionaryCf = ENTITY_COMPOSITE_DICTIONARIES;
-        }
-
-        Class<?> dictionaryCoType = getDefaultSchema().getDictionaryValueType( entity.getType(), dictionaryName );
-        boolean coTypeIsBasic = ClassUtils.isBasicType( dictionaryCoType );
-
-        ByteBuffer[] columnNames = new ByteBuffer[elementNames.length];
-        for ( int i = 0; i < elementNames.length; i++ ) {
-            columnNames[i] = entityHasDictionary ? bytebuffer( elementNames[i] ) :
-                             DynamicComposite.toByteBuffer( elementNames[i] );
-        }
-
-        ColumnSlice<ByteBuffer, ByteBuffer> results =
-                cass.getColumns( cass.getApplicationKeyspace( applicationId ), dictionaryCf,
-                        key( entity.getUuid(), dictionaryName ), columnNames, be, be );
-        if ( results != null ) {
-            values = new HashMap<String, Object>();
-            for ( HColumn<ByteBuffer, ByteBuffer> result : results.getColumns() ) {
-                String name = entityHasDictionary ? string( result.getName() ) :
-                              DynamicComposite.fromByteBuffer( result.getName() ).get( 0, se );
-                if ( entityHasDictionary && coTypeIsBasic ) {
-                    values.put( name, object( dictionaryCoType, result.getValue() ) );
-                }
-                else if ( result.getValue().remaining() > 0 ) {
-                    values.put( name, Schema.deserializePropertyValueFromJsonBinary( result.getValue().slice(),
-                            dictionaryCoType ) );
-                }
-            }
-        }
-        else {
-            logger.error( "Results of EntityManagerImpl.getDictionaryElementValues is null" );
-        }
-
-        return values;
-    }
-
-
-    /**
-     * Gets the set.
-     *
-     * @param entity The owning entity
-     * @param dictionaryName the dictionary name
-     *
-     * @return contents of dictionary property
-     *
-     * @throws Exception the exception
-     */
-    @Override
-    @Metered( group = "core", name = "EntityManager_getDictionaryAsMap" )
-    public Map<Object, Object> getDictionaryAsMap( EntityRef entity, String dictionaryName ) throws Exception {
-
-        entity = validate( entity );
-
-        Map<Object, Object> dictionary = new LinkedHashMap<Object, Object>();
-
-        ApplicationCF dictionaryCf = null;
-
-        boolean entityHasDictionary = getDefaultSchema().hasDictionary( entity.getType(), dictionaryName );
-
-        if ( entityHasDictionary ) {
-            dictionaryCf = ENTITY_DICTIONARIES;
-        }
-        else {
-            dictionaryCf = ENTITY_COMPOSITE_DICTIONARIES;
-        }
-
-        Class<?> setType = getDefaultSchema().getDictionaryKeyType( entity.getType(), dictionaryName );
-        Class<?> setCoType = getDefaultSchema().getDictionaryValueType( entity.getType(), dictionaryName );
-        boolean coTypeIsBasic = ClassUtils.isBasicType( setCoType );
-
-        List<HColumn<ByteBuffer, ByteBuffer>> results =
-                cass.getAllColumns( cass.getApplicationKeyspace( applicationId ), dictionaryCf,
-                        key( entity.getUuid(), dictionaryName ), be, be );
-        for ( HColumn<ByteBuffer, ByteBuffer> result : results ) {
-            Object name = null;
-            if ( entityHasDictionary ) {
-                name = object( setType, result.getName() );
-            }
-            else {
-                name = CompositeUtils.deserialize( result.getName() );
-            }
-            Object value = null;
-            if ( entityHasDictionary && coTypeIsBasic ) {
-                value = object( setCoType, result.getValue() );
-            }
-            else if ( result.getValue().remaining() > 0 ) {
-                value = Schema.deserializePropertyValueFromJsonBinary( result.getValue().slice(), setCoType );
-            }
-            if ( name != null ) {
-                dictionary.put( name, value );
-            }
-        }
-
-        return dictionary;
-    }
-
-
-    @Override
-    public Set<Object> getDictionaryAsSet( EntityRef entity, String dictionaryName ) throws Exception {
-        return new LinkedHashSet<Object>( getDictionaryAsMap( entity, dictionaryName ).keySet() );
-    }
-
-
-    /**
-     * Update properties.
-     *
-     * @param entityId the entity id
-     * @param properties the properties
-     *
-     * @throws Exception the exception
-     */
-    @Metered( group = "core", name = "EntityManager_updateProperties" )
-    public void updateProperties( UUID entityId, Map<String, Object> properties ) throws Exception {
-
-        EntityRef entity = getRef( entityId );
-        if ( entity == null ) {
-            return;
-        }
-
-        Keyspace ko = cass.getApplicationKeyspace( applicationId );
-        Mutator<ByteBuffer> m = createMutator( ko, be );
-
-        UUID timestampUuid = newTimeUUID();
-        properties.put( PROPERTY_MODIFIED, getTimestampInMillis( timestampUuid ) );
-
-        batchUpdateProperties( m, entity, properties, timestampUuid );
-
-        batchExecute( m, CassandraService.RETRY_COUNT );
-    }
-
-
-    @Metered( group = "core", name = "EntityManager_deleteEntity" )
-    public void deleteEntity( UUID entityId ) throws Exception {
-
-        logger.info( "deleteEntity {} of application {}", entityId, applicationId );
-
-        EntityRef entity = getRef( entityId );
-        if ( entity == null ) {
-            return;
-        }
-
-        logger.info( "deleteEntity: {} is of type {}", entityId, entity.getType() );
-
-        Keyspace ko = cass.getApplicationKeyspace( applicationId );
-        Mutator<ByteBuffer> m = createMutator( ko, be );
-
-        UUID timestampUuid = newTimeUUID();
-        long timestamp = getTimestampInMicros( timestampUuid );
-
-        // get all connections and disconnect them
-        getRelationManager( ref( entityId ) ).batchDisconnect( m, timestampUuid );
-
-        // delete all core properties and any dynamic property that's ever been
-        // dictionary for this entity
-        Set<String> properties = getPropertyNames( entity );
-        if ( properties != null ) {
-            for ( String propertyName : properties ) {
-                m = batchSetProperty( m, entity, propertyName, null, true, false, timestampUuid );
-            }
-        }
-
-        // delete any core dictionaries and dynamic dictionaries associated with
-        // this entity
-        Set<String> dictionaries = getDictionaryNames( entity );
-        if ( dictionaries != null ) {
-            for ( String dictionary : dictionaries ) {
-                Set<Object> values = getDictionaryAsSet( entity, dictionary );
-                if ( values != null ) {
-                    for ( Object value : values ) {
-                        batchUpdateDictionary( m, entity, dictionary, value, true, timestampUuid );
-                    }
-                }
-            }
-        }
-
-        // find all the containing collections
-        getRelationManager( entity ).batchRemoveFromContainers( m, timestampUuid );
-
-        //decrease entity count
-        if ( !TYPE_APPLICATION.equals( entity.getType() ) ) {
-            String collection_name = Schema.defaultCollectionName( entity.getType() );
-            decrementEntityCollection( collection_name );
-        }
-
-
-        timestamp += 1;
-
-        if ( dictionaries != null ) {
-            for ( String dictionary : dictionaries ) {
-
-                ApplicationCF cf =
-                        getDefaultSchema().hasDictionary( entity.getType(), dictionary ) ? ENTITY_DICTIONARIES :
-                        ENTITY_COMPOSITE_DICTIONARIES;
-
-                addDeleteToMutator( m, cf, key( entity.getUuid(), dictionary ), timestamp );
-            }
-        }
-
-        addDeleteToMutator( m, ENTITY_PROPERTIES, key( entityId ), timestamp );
-
-        batchExecute( m, CassandraService.RETRY_COUNT );
-    }
-
-
-    @Override
-    public void delete( EntityRef entityRef ) throws Exception {
-        deleteEntity( entityRef.getUuid() );
-    }
-
-
-    public void batchCreateRole( Mutator<ByteBuffer> batch, UUID groupId, String roleName, String roleTitle,
-                                 long inactivity, RoleRef roleRef, UUID timestampUuid ) throws Exception {
-
-        long timestamp = getTimestampInMicros( timestampUuid );
-
-        if ( roleRef == null ) {
-            roleRef = new SimpleRoleRef( groupId, roleName );
-        }
-        if ( roleTitle == null ) {
-            roleTitle = roleRef.getRoleName();
-        }
-
-        EntityRef ownerRef = null;
-        if ( roleRef.getGroupId() != null ) {
-            ownerRef = new SimpleEntityRef( Group.ENTITY_TYPE, roleRef.getGroupId() );
-        }
-        else {
-            ownerRef = new SimpleEntityRef( Application.ENTITY_TYPE, applicationId );
-        }
-
-        Map<String, Object> properties = new TreeMap<String, Object>( CASE_INSENSITIVE_ORDER );
-        properties.put( PROPERTY_TYPE, Role.ENTITY_TYPE );
-        properties.put( "group", roleRef.getGroupId() );
-        properties.put( PROPERTY_NAME, roleRef.getApplicationRoleName() );
-        properties.put( "roleName", roleRef.getRoleName() );
-        properties.put( "title", roleTitle );
-        properties.put( PROPERTY_INACTIVITY, inactivity );
-
-        Entity role = batchCreate( batch, Role.ENTITY_TYPE, null, properties, roleRef.getUuid(), timestampUuid );
-
-        addInsertToMutator( batch, ENTITY_DICTIONARIES, key( ownerRef.getUuid(), Schema.DICTIONARY_ROLENAMES ),
-                roleRef.getRoleName(), roleTitle, timestamp );
-
-        addInsertToMutator( batch, ENTITY_DICTIONARIES, key( ownerRef.getUuid(), Schema.DICTIONARY_ROLETIMES ),
-                roleRef.getRoleName(), inactivity, timestamp );
-
-        addInsertToMutator( batch, ENTITY_DICTIONARIES, key( ownerRef.getUuid(), DICTIONARY_SETS ),
-                Schema.DICTIONARY_ROLENAMES, null, timestamp );
-
-        if ( roleRef.getGroupId() != null ) {
-            getRelationManager( ownerRef ).batchAddToCollection( batch, COLLECTION_ROLES, role, timestampUuid );
-        }
-    }
-
-
-    @Override
-    public EntityRef getUserByIdentifier( Identifier identifier ) throws Exception {
-        if ( identifier == null ) {
-            return null;
-        }
-        if ( identifier.isUUID() ) {
-            return new SimpleEntityRef( "user", identifier.getUUID() );
-        }
-        if ( identifier.isName() ) {
-            return this.getAlias( applicationId, "user", identifier.getName() );
-        }
-        if ( identifier.isEmail() ) {
-
-            Query query = new Query();
-            query.setEntityType( "user" );
-            query.addEqualityFilter( "email", identifier.getEmail() );
-            query.setLimit( 1 );
-            query.setResultsLevel( REFS );
-
-            Results r = getRelationManager( ref( applicationId ) ).searchCollection( "users", query );
-            if ( r != null && r.getRef() != null ) {
-                return r.getRef();
-            }
-            else {
-                // look-aside as it might be an email in the name field
-                return this.getAlias( applicationId, "user", identifier.getEmail() );
-            }
-        }
-        return null;
-    }
-
-
-    @Override
-    public EntityRef getGroupByIdentifier( Identifier identifier ) throws Exception {
-        if ( identifier == null ) {
-            return null;
-        }
-        if ( identifier.isUUID() ) {
-            return new SimpleEntityRef( "group", identifier.getUUID() );
-        }
-        if ( identifier.isName() ) {
-            return this.getAlias( applicationId, "group", identifier.getName() );
-        }
-        return null;
-    }
-
-
-    @Override
-    public Results getAggregateCounters( UUID userId, UUID groupId, String category, String counterName,
-                                         CounterResolution resolution, long start, long finish, boolean pad ) {
-        return this
-                .getAggregateCounters( userId, groupId, null, category, counterName, resolution, start, finish, pad );
-    }
-
-
-    @Override
-    @Metered( group = "core", name = "EntityManager_getAggregateCounters" )
-    public Results getAggregateCounters( UUID userId, UUID groupId, UUID queueId, String category, String counterName,
-                                         CounterResolution resolution, long start, long finish, boolean pad ) {
-        start = resolution.round( start );
-        finish = resolution.round( finish );
-        long expected_time = start;
-        Keyspace ko = cass.getApplicationKeyspace( applicationId );
-        SliceCounterQuery<String, Long> q = createCounterSliceQuery( ko, se, le );
-        q.setColumnFamily( APPLICATION_AGGREGATE_COUNTERS.toString() );
-        q.setRange( start, finish, false, ALL_COUNT );
-        QueryResult<CounterSlice<Long>> r = q.setKey(
-                counterUtils.getAggregateCounterRow( counterName, userId, groupId, queueId, category, resolution ) )
-                                             .execute();
-        List<AggregateCounter> counters = new ArrayList<AggregateCounter>();
-        for ( HCounterColumn<Long> column : r.get().getColumns() ) {
-            AggregateCounter count = new AggregateCounter( column.getName(), column.getValue() );
-            if ( pad && !( resolution == CounterResolution.ALL ) ) {
-                while ( count.getTimestamp() != expected_time ) {
-                    counters.add( new AggregateCounter( expected_time, 0 ) );
-                    expected_time = resolution.next( expected_time );
-                }
-                expected_time = resolution.next( expected_time );
-            }
-            counters.add( count );
-        }
-        if ( pad && !( resolution == CounterResolution.ALL ) ) {
-            while ( expected_time <= finish ) {
-                counters.add( new AggregateCounter( expected_time, 0 ) );
-                expected_time = resolution.next( expected_time );
-            }
-        }
-        return Results.fromCounters( new AggregateCounterSet( counterName, userId, groupId, category, counters ) );
-    }
-
-
-    @Override
-    @Metered( group = "core", name = "EntityManager_getAggregateCounters_fromQueryObj" )
-    public Results getAggregateCounters( Query query ) throws Exception {
-        CounterResolution resolution = query.getResolution();
-        if ( resolution == null ) {
-            resolution = CounterResolution.ALL;
-        }
-        long start = query.getStartTime() != null ? query.getStartTime() : 0;
-        long finish = query.getFinishTime() != null ? query.getFinishTime() : 0;
-        boolean pad = query.isPad();
-        if ( start <= 0 ) {
-            start = 0;
-        }
-        if ( ( finish <= 0 ) || ( finish < start ) ) {
-            finish = System.currentTimeMillis();
-        }
-        start = resolution.round( start );
-        finish = resolution.round( finish );
-        long expected_time = start;
-
-        if ( pad && ( resolution != CounterResolution.ALL ) ) {
-            long max_counters = ( finish - start ) / resolution.interval();
-            if ( max_counters > 1000 ) {
-                finish = resolution.round( start + ( resolution.interval() * 1000 ) );
-            }
-        }
-
-        List<CounterFilterPredicate> filters = query.getCounterFilters();
-        if ( filters == null ) {
-            return null;
-        }
-        Map<String, AggregateCounterSelection> selections = new HashMap<String, AggregateCounterSelection>();
-        Keyspace ko = cass.getApplicationKeyspace( applicationId );
-
-        for ( CounterFilterPredicate filter : filters ) {
-            AggregateCounterSelection selection =
-                    new AggregateCounterSelection( filter.getName(), getUuid( getUserByIdentifier( filter.getUser() ) ),
-                            getUuid( getGroupByIdentifier( filter.getGroup() ) ),
-                            org.usergrid.mq.Queue.getQueueId( filter.getQueue() ), filter.getCategory() );
-            selections.put( selection.getRow( resolution ), selection );
-        }
-
-        MultigetSliceCounterQuery<String, Long> q = HFactory.createMultigetSliceCounterQuery( ko, se, le );
-        q.setColumnFamily( APPLICATION_AGGREGATE_COUNTERS.toString() );
-        q.setRange( start, finish, false, ALL_COUNT );
-        QueryResult<CounterRows<String, Long>> rows = q.setKeys( selections.keySet() ).execute();
-
-        List<AggregateCounterSet> countSets = new ArrayList<AggregateCounterSet>();
-        for ( CounterRow<String, Long> r : rows.get() ) {
-            expected_time = start;
-            List<AggregateCounter> counters = new ArrayList<AggregateCounter>();
-            for ( HCounterColumn<Long> column : r.getColumnSlice().getColumns() ) {
-                AggregateCounter count = new AggregateCounter( column.getName(), column.getValue() );
-                if ( pad && ( resolution != CounterResolution.ALL ) ) {
-                    while ( count.getTimestamp() != expected_time ) {
-                        counters.add( new AggregateCounter( expected_time, 0 ) );
-                        expected_time = resolution.next( expected_time );
-                    }
-                    expected_time = resolution.next( expected_time );
-                }
-                counters.add( count );
-            }
-            if ( pad && ( resolution != CounterResolution.ALL ) ) {
-                while ( expected_time <= finish ) {
-                    counters.add( new AggregateCounter( expected_time, 0 ) );
-                    expected_time = resolution.next( expected_time );
-                }
-            }
-            AggregateCounterSelection selection = selections.get( r.getKey() );
-            countSets.add( new AggregateCounterSet( selection.getName(), selection.getUserId(), selection.getGroupId(),
-                    selection.getCategory(), counters ) );
-        }
-
-        Collections.sort( countSets, new Comparator<AggregateCounterSet>() {
-            @Override
-            public int compare( AggregateCounterSet o1, AggregateCounterSet o2 ) {
-                String s1 = o1.getName();
-                String s2 = o2.getName();
-                return s1.compareTo( s2 );
-            }
-        } );
-        return Results.fromCounters( countSets );
-    }
-
-
-    @Override
-    @Metered( group = "core", name = "EntityManager_getEntityCounters" )
-    public Map<String, Long> getEntityCounters( UUID entityId ) throws Exception {
-
-        Map<String, Long> counters = new HashMap<String, Long>();
-        Keyspace ko = cass.getApplicationKeyspace( applicationId );
-        SliceCounterQuery<UUID, String> q = createCounterSliceQuery( ko, ue, se );
-        q.setColumnFamily( ENTITY_COUNTERS.toString() );
-        q.setRange( null, null, false, ALL_COUNT );
-        QueryResult<CounterSlice<String>> r = q.setKey( entityId ).execute();
-        for ( HCounterColumn<String> column : r.get().getColumns() ) {
-            counters.put( column.getName(), column.getValue() );
-        }
-        return counters;
-    }
-
-
-    @Override
-    public Map<String, Long> getApplicationCounters() throws Exception {
-        return getEntityCounters( applicationId );
-    }
-
-
-    @Override
-    @Metered( group = "core", name = "EntityManager_createApplicationCollection" )
-    public void createApplicationCollection( String entityType ) throws Exception {
-
-        Keyspace ko = cass.getApplicationKeyspace( applicationId );
-        Mutator<ByteBuffer> m = createMutator( ko, be );
-
-        long timestamp = cass.createTimestamp();
-
-        String collection_name = Schema.defaultCollectionName( entityType );
-        // Add name of collection to dictionary property Application.collections
-        addInsertToMutator( m, ENTITY_DICTIONARIES, key( applicationId, Schema.DICTIONARY_COLLECTIONS ),
-                collection_name, null, timestamp );
-
-        batchExecute( m, CassandraService.RETRY_COUNT );
-    }
-
-
-    @Override
-    public EntityRef getAlias( String aliasType, String alias ) throws Exception {
-        return getAlias( applicationId, aliasType, alias );
-    }
-
-
-    @Override
-    public EntityRef validate( EntityRef entityRef ) throws Exception {
-        return validate( entityRef, true );
-    }
-
-
-    public EntityRef validate( EntityRef entityRef, boolean verify ) throws Exception {
-        if ( ( entityRef == null ) || ( entityRef.getUuid() == null ) ) {
-            return null;
-        }
-        if ( ( entityRef.getType() == null ) || verify ) {
-            UUID entityId = entityRef.getUuid();
-            String entityType = entityRef.getType();
-            try {
-                entityRef = getRef( entityRef.getUuid() );
-            }
-            catch ( Exception e ) {
-                logger.error( "Unable to load entity: {}", new Object[] {entityRef.getUuid(), e} );
-            }
-            if ( entityRef == null ) {
-                throw new EntityNotFoundException( "Entity " + entityId.toString() + " cannot be verified" );
-            }
-            if ( ( entityType != null ) && !entityType.equalsIgnoreCase( entityRef.getType() ) ) {
-                throw new UnexpectedEntityTypeException(
-                        "Entity " + entityId + " is not the expected type, expected " + entityType + ", found "
-                                + entityRef.getType() );
-            }
-        }
-        return entityRef;
-    }
-
-
-    @Override
-    public String getType( UUID entityid ) throws Exception {
-        return getEntityType( entityid );
-    }
-
-
-    public String getType( EntityRef entity ) throws Exception {
-        if ( entity.getType() != null ) {
-            return entity.getType();
-        }
-        return getEntityType( entity.getUuid() );
-    }
-
-
-    @Override
-    public Entity get( UUID entityid ) throws Exception {
-        return getEntity( entityid, null );
-    }
-
-
-    @Override
-    public EntityRef getRef( UUID entityId ) throws Exception {
-        String entityType = getEntityType( entityId );
-        if ( entityType == null ) {
-            logger.warn( "Unable to get type for entity: {} ", new Object[] { entityId, new Exception()} );
-            return null;
-        }
-        return ref( entityType, entityId );
-    }
-
-
-    @Override
-    public Entity get( EntityRef entityRef ) throws Exception {
-        if ( entityRef == null ) {
-            return null;
-        }
-        return getEntity( entityRef.getUuid(), null );
-    }
-
-
-    @Override
-    public <A extends Entity> A get( EntityRef entityRef, Class<A> entityClass ) throws Exception {
-        if ( entityRef == null ) {
-            return null;
-        }
-        return get( entityRef.getUuid(), entityClass );
-    }
-
-
-    @SuppressWarnings( "unchecked" )
-    @Override
-    public <A extends Entity> A get( UUID entityId, Class<A> entityClass ) throws Exception {
-        A e = null;
-        try {
-            e = ( A ) getEntity( entityId, ( Class<Entity> ) entityClass );
-        }
-        catch ( ClassCastException e1 ) {
-            logger.error( "Unable to get typed entity: {} of class {}", new Object[] {entityId, entityClass.getCanonicalName(), e1} );
-        }
-        return e;
-    }
-
-
-    @Override
-    public Results get( Collection<UUID> entityIds, Results.Level resultsLevel ) throws Exception {
-        List<? extends Entity> results = getEntities( entityIds, null );
-        return Results.fromEntities( results );
-    }
-
-
-    /* (non-Javadoc)
-   * @see org.usergrid.persistence.EntityManager#get(java.util.Collection)
-   */
-    @Override
-    public Results get( Collection<UUID> entityIds ) throws Exception {
-        return fromEntities( getEntities( entityIds, null ) );
-    }
-
-
-    @Override
-    public Results get( Collection<UUID> entityIds, Class<? extends Entity> entityClass, Results.Level resultsLevel )
-            throws Exception {
-        return fromEntities( getEntities( entityIds, entityClass ) );
-    }
-
-
-    @Override
-    public Results get( Collection<UUID> entityIds, String entityType, Class<? extends Entity> entityClass,
-                        Results.Level resultsLevel ) throws Exception {
-        return fromEntities( getEntities( entityIds, entityClass ) );
-    }
-
-
-    public Results loadEntities( Results results, Results.Level resultsLevel, int count ) throws Exception {
-        return loadEntities( results, resultsLevel, null, count );
-    }
-
-
-    public Results loadEntities( Results results, Results.Level resultsLevel, Map<UUID, UUID> associatedMap, int count )
-            throws Exception {
-
-        results = results.trim( count );
-        if ( resultsLevel.ordinal() <= results.getLevel().ordinal() ) {
-            return results;
-        }
-
-        results.setEntities( getEntities( results.getIds(), null ) );
-
-        if ( resultsLevel == Results.Level.LINKED_PROPERTIES ) {
-            List<Entity> entities = results.getEntities();
-            BiMap<UUID, UUID> associatedIds = null;
-
-            if ( associatedMap != null ) {
-                associatedIds = HashBiMap.create( associatedMap );
-            }
-            else {
-                associatedIds = HashBiMap.create( entities.size() );
-                for ( Entity entity : entities ) {
-                    Object id = entity.getMetadata( PROPERTY_ASSOCIATED );
-                    if ( id instanceof UUID ) {
-                        associatedIds.put( entity.getUuid(), ( UUID ) id );
-                    }
-                }
-            }
-            List<DynamicEntity> linked = getEntities( new ArrayList<UUID>( associatedIds.values() ), null );
-            for ( DynamicEntity l : linked ) {
-                Map<String, Object> p = l.getDynamicProperties();
-                if ( ( p != null ) && ( p.size() > 0 ) ) {
-                    Entity e = results.getEntitiesMap().get( associatedIds.inverse().get( l.getUuid() ) );
-                    if ( l.getType().endsWith( TYPE_MEMBER ) ) {
-                        e.setProperty( TYPE_MEMBER, p );
-                    }
-                    else if ( l.getType().endsWith( TYPE_CONNECTION ) ) {
-                        e.setProperty( TYPE_CONNECTION, p );
-                    }
-                }
-            }
-        }
-
-        return results;
-    }
-
-
-    @Override
-    public void update( Entity entity ) throws Exception {
-        updateProperties( entity.getUuid(), entity.getProperties() );
-    }
-
-
-    @Override
-    public Object getProperty( EntityRef entityRef, String propertyName ) throws Exception {
-        Entity entity = loadPartialEntity( entityRef.getUuid(), propertyName );
-
-        if ( entity == null ) {
-            return null;
-        }
-
-        return entity.getProperty( propertyName );
-    }
-
-
-    @Override
-    public Map<String, Object> getProperties( EntityRef entityRef ) throws Exception {
-        Entity entity = loadPartialEntity( entityRef.getUuid() );
-        Map<String, Object> props = entity.getProperties();
-        return props;
-    }
-
-
-    @Override
-    public List<Entity> getPartialEntities( Collection<UUID> ids, Collection<String> fields ) throws Exception {
-
-        List<Entity> entities = new ArrayList<Entity>( ids.size() );
-
-        if ( ids == null || ids.size() == 0 ) {
-            return entities;
-        }
-
-        fields.add( PROPERTY_UUID );
-        fields.add( PROPERTY_TYPE );
-
-        Rows<UUID, String, ByteBuffer> results = null;
-
-        results = cass.getRows( cass.getApplicationKeyspace( applicationId ), ENTITY_PROPERTIES, ids, fields, ue, se,
-                be );
-
-        if ( results == null ) {
-            return entities;
-        }
-
-        for ( Row<UUID, String, ByteBuffer> row : results ) {
-
-
-            Map<String, Object> properties =
-                    deserializeEntityProperties( results.getByKey( row.getKey() ).getColumnSlice().getColumns(), true,
-                            false );
-
-            //Could get a tombstoned row if the index is behind, just ignore it
-            if ( properties == null ) {
-                logger.warn( "Received row key {} with no type or properties, skipping", row.getKey() );
-                continue;
-            }
-
-            UUID id = uuid( properties.get( PROPERTY_UUID ) );
-            String type = string( properties.get( PROPERTY_TYPE ) );
-
-            if ( id == null || type == null ) {
-                logger.warn( "Error retrieving entity with key {} no type or id deseriazable, skipping", row.getKey() );
-                continue;
-            }
-
-            Entity entity = EntityFactory.newEntity( id, type );
-            entity.setProperties( properties );
-
-            entities.add( entity );
-        }
-
-
-        return entities;
-    }
-
-
-    @Override
-    public void setProperty( EntityRef entityRef, String propertyName, Object propertyValue ) throws Exception {
-
-        setProperty( entityRef, propertyName, propertyValue, false );
-    }
-
-
-    @Override
-    public void setProperty( EntityRef entityRef, String propertyName, Object propertyValue, boolean override )
-            throws Exception {
-
-        if ( ( propertyValue instanceof String ) && ( ( String ) propertyValue ).equals( "" ) ) {
-            propertyValue = null;
-        }
-
-        // todo: would this ever need to load more?
-        DynamicEntity entity = loadPartialEntity( entityRef.getUuid(), propertyName );
-
-        UUID timestampUuid = newTimeUUID();
-        Mutator<ByteBuffer> batch = createMutator( cass.getApplicationKeyspace( applicationId ), be );
-
-        propertyValue = getDefaultSchema().validateEntityPropertyValue( entity.getType(), propertyName, propertyValue );
-
-        entity.setProperty( propertyName, propertyValue );
-        batch = batchSetProperty( batch, entity, propertyName, propertyValue, override, false, timestampUuid );
-        batchExecute( batch, CassandraService.RETRY_COUNT );
-    }
-
-
-    @Override
-    public void updateProperties( EntityRef entityRef, Map<String, Object> properties ) throws Exception {
-        entityRef = validate( entityRef );
-        properties = getDefaultSchema().cleanUpdatedProperties( entityRef.getType(), properties, false );
-        updateProperties( entityRef.getUuid(), properties );
-    }
-
-
-    @Override
-    public void addToDictionary( EntityRef entityRef, String dictionaryName, Object elementValue ) throws Exception {
-        addToDictionary( entityRef, dictionaryName, elementValue, null );
-    }
-
-
-    @Override
-    public void addToDictionary( EntityRef entityRef, String dictionaryName, Object elementValue,
-                                 Object elementCoValue ) throws Exception {
-
-        if ( elementValue == null ) {
-            return;
-        }
-
-        EntityRef entity = getRef( entityRef.getUuid() );
-
-        UUID timestampUuid = newTimeUUID();
-        Mutator<ByteBuffer> batch = createMutator( cass.getApplicationKeyspace( applicationId ), be );
-
-        batch = batchUpdateDictionary( batch, entity, dictionaryName, elementValue, elementCoValue, false,
-                timestampUuid );
-
-        batchExecute( batch, CassandraService.RETRY_COUNT );
-    }
-
-
-    @Override
-    public void addSetToDictionary( EntityRef entityRef, String dictionaryName, Set<?> elementValues )
-            throws Exception {
-
-        if ( ( elementValues == null ) || elementValues.isEmpty() ) {
-            return;
-        }
-
-        EntityRef entity = getRef( entityRef.getUuid() );
-
-        UUID timestampUuid = newTimeUUID();
-        Mutator<ByteBuffer> batch = createMutator( cass.getApplicationKeyspace( applicationId ), be );
-
-        for ( Object elementValue : elementValues ) {
-            batch = batchUpdateDictionary( batch, entity, dictionaryName, elementValue, null, false, timestampUuid );
-        }
-
-        batchExecute( batch, CassandraService.RETRY_COUNT );
-    }
-
-
-    @Override
-    public void addMapToDictionary( EntityRef entityRef, String dictionaryName, Map<?, ?> elementValues )
-            throws Exception {
-
-        if ( ( elementValues == null ) || elementValues.isEmpty() || entityRef == null ) {
-            return;
-        }
-
-        EntityRef entity = getRef( entityRef.getUuid() );
-
-        UUID timestampUuid = newTimeUUID();
-        Mutator<ByteBuffer> batch = createMutator( cass.getApplicationKeyspace( applicationId ), be );
-
-        for ( Map.Entry<?, ?> elementValue : elementValues.entrySet() ) {
-            batch = batchUpdateDictionary( batch, entity, dictionaryName, elementValue.getKey(),
-                    elementValue.getValue(), false, timestampUuid );
-        }
-
-        batchExecute( batch, CassandraService.RETRY_COUNT );
-    }
-
-
-    @Override
-    public void removeFromDictionary( EntityRef entityRef, String dictionaryName, Object elementValue )
-            throws Exception {
-
-        if ( elementValue == null ) {
-            return;
-        }
-
-        EntityRef entity = getRef( entityRef.getUuid() );
-
-        UUID timestampUuid = newTimeUUID();
-        Mutator<ByteBuffer> batch = createMutator( cass.getApplicationKeyspace( applicationId ), be );
-
-        batch = batchUpdateDictionary( batch, entity, dictionaryName, elementValue, true, timestampUuid );
-
-        batchExecute( batch, CassandraService.RETRY_COUNT );
-    }
-
-
-    @Override
-    public Set<String> getDictionaries( EntityRef entity ) throws Exception {
-        return getDictionaryNames( entity );
-    }
-
-
-    @Override
-    public void deleteProperty( EntityRef entityRef, String propertyName ) throws Exception {
-        setProperty( entityRef, propertyName, null );
-    }
-
-
-    @Override
-    public Set<String> getApplicationCollections() throws Exception {
-        Set<String> collections = new TreeSet<String>( CASE_INSENSITIVE_ORDER );
-        Set<String> dynamic_collections = cast( getDictionaryAsSet( getApplicationRef(), DICTIONARY_COLLECTIONS ) );
-        if ( dynamic_collections != null ) {
-            for ( String collection : dynamic_collections ) {
-                if ( !Schema.isAssociatedEntityType( collection ) ) {
-                    collections.add( collection );
-                }
-            }
-        }
-        Set<String> system_collections = getDefaultSchema().getCollectionNames( Application.ENTITY_TYPE );
-        if ( system_collections != null ) {
-            for ( String collection : system_collections ) {
-                if ( !Schema.isAssociatedEntityType( collection ) ) {
-                    collections.add( collection );
-                }
-            }
-        }
-        return collections;
-    }
-
-
-    @Override
-    public long getApplicationCollectionSize( String collectionName ) throws Exception {
-        Long count = null;
-        if ( !Schema.isAssociatedEntityType( collectionName ) ) {
-            Map<String, Long> counts = getApplicationCounters();
-            count = counts.get( new String( APPLICATION_COLLECTION + collectionName ) );
-        }
-        return count != null ? count : 0;
-    }
-
-
-    @Override
-    public Map<String, Object> getApplicationCollectionMetadata() throws Exception {
-        Set<String> collections = getApplicationCollections();
-        Map<String, Long> counts = getApplicationCounters();
-        Map<String, Object> metadata = new HashMap<String, Object>();
-        if ( collections != null ) {
-            for ( String collectionName : collections ) {
-                if ( !Schema.isAssociatedEntityType( collectionName ) ) {
-                    Long count = counts.get( APPLICATION_COLLECTION + collectionName );
-                    /*
-                     * int count = emf .countColumns(
-					 * getApplicationKeyspace(applicationId),
-					 * ApplicationCF.ENTITY_ID_SETS, key(applicationId,
-					 * DICTIONARY_COLLECTIONS, collectionName));
-					 */
-                    Map<String, Object> entry = new HashMap<String, Object>();
-                    entry.put( "count", count != null ? count : 0 );
-                    entry.put( "type", singularize( collectionName ) );
-                    entry.put( "name", collectionName );
-                    entry.put( "title", capitalize( collectionName ) );
-                    metadata.put( collectionName, entry );
-                }
-            }
-        }
-		/*
-		 * if ((counts != null) && !counts.isEmpty()) { metadata.put("counters",
-		 * counts); }
-		 */
-        return metadata;
-    }
-
-
-    public Object getRolePermissionsKey( String roleName ) {
-        return key( getIdFo

<TRUNCATED>

[78/96] [abbrv] USERGRID-2 package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/src/main/java/org/usergrid/android/client/Client.java
----------------------------------------------------------------------
diff --git a/sdks/android/src/main/java/org/usergrid/android/client/Client.java b/sdks/android/src/main/java/org/usergrid/android/client/Client.java
deleted file mode 100644
index 3effe73..0000000
--- a/sdks/android/src/main/java/org/usergrid/android/client/Client.java
+++ /dev/null
@@ -1,590 +0,0 @@
-package org.usergrid.android.client;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.UUID;
-import org.springframework.http.HttpMethod;
-import org.springframework.web.client.RestTemplate;
-import org.usergrid.android.client.callbacks.ApiResponseCallback;
-import org.usergrid.android.client.callbacks.ClientAsyncTask;
-import org.usergrid.android.client.callbacks.DeviceRegistrationCallback;
-import org.usergrid.android.client.callbacks.GroupsRetrievedCallback;
-import org.usergrid.android.client.callbacks.QueryResultsCallback;
-import org.usergrid.java.client.entities.Device;
-import org.usergrid.java.client.entities.Entity;
-import org.usergrid.java.client.entities.Group;
-import org.usergrid.java.client.entities.User;
-import org.usergrid.java.client.response.ApiResponse;
-import org.usergrid.android.client.utils.DeviceUuidFactory;
-
-import android.content.Context;
-import android.location.Location;
-
-/**
- * The Client class for accessing the Usergrid API. Start by instantiating this
- * class though the appropriate constructor.
- * 
- */
-public class Client extends org.usergrid.java.client.Client {
-
-	private static final String TAG = "UsergridClient";
-
-	public static boolean FORCE_PUBLIC_API = false;
-
-	// Public API
-	public static String PUBLIC_API_URL = "http://api.usergrid.com";
-
-	// Local API of standalone server
-	public static String LOCAL_STANDALONE_API_URL = "http://localhost:8080";
-
-	// Local API of Tomcat server in Eclipse
-	public static String LOCAL_TOMCAT_API_URL = "http://localhost:8080/ROOT";
-
-	// Local API
-	public static String LOCAL_API_URL = LOCAL_STANDALONE_API_URL;
-
-	
-	static RestTemplate restTemplate = new RestTemplate(true);
-
-	/**
-	 * Default constructor for instantiating a client.
-	 */
-	public Client() {
-		init();
-	}
-
-	/**
-	 * Instantiate client for a specific app
-	 * 
-	 * @param applicationId
-	 *            the application id or name
-	 */
-	public Client(String organizationId, String applicationId) {
-		super(organizationId, applicationId);
-	}
-
-
-	/**
-	 * Log the user in and get a valid access token. Executes asynchronously in
-	 * background and the callbacks are called in the UI thread.
-	 * 
-	 * @param email
-	 * @param password
-	 * @param callback
-	 */
-	public void authorizeAppUserAsync(final String email,
-			final String password, final ApiResponseCallback callback) {
-		(new ClientAsyncTask<ApiResponse>(callback) {
-			@Override
-			public ApiResponse doTask() {
-				return authorizeAppUser(email, password);
-			}
-		}).execute();
-	}
-
-	
-
-	/**
-	 * Log the user in with their numeric pin-code and get a valid access token.
-	 * Executes asynchronously in background and the callbacks are called in the
-	 * UI thread.
-	 * 
-	 * @param email
-	 * @param pin
-	 * @param callback
-	 */
-	public void authorizeAppUserViaPinAsync(final String email,
-			final String pin, final ApiResponseCallback callback) {
-		(new ClientAsyncTask<ApiResponse>(callback) {
-			@Override
-			public ApiResponse doTask() {
-				return authorizeAppUserViaPin(email, pin);
-			}
-		}).execute();
-	}
-
-
-	/**
-	 * Log the user in with their numeric pin-code and get a valid access token.
-	 * Executes asynchronously in background and the callbacks are called in the
-	 * UI thread.
-	 * 
-	 * @param email
-	 * @param pin
-	 * @param callback
-	 */
-	public void authorizeAppUserViaFacebookAsync(final String fb_access_token,
-			final ApiResponseCallback callback) {
-		(new ClientAsyncTask<ApiResponse>(callback) {
-			@Override
-			public ApiResponse doTask() {
-				return authorizeAppUserViaFacebook(fb_access_token);
-			}
-		}).execute();
-	}
-
-	
-
-	/**
-	 * Log the app in with it's client id and client secret key. Not recommended
-	 * for production apps. Executes asynchronously in background and the
-	 * callbacks are called in the UI thread.
-	 * 
-	 * @param clientId
-	 * @param clientSecret
-	 * @param callback
-	 */
-	public void authorizeAppClientAsync(final String clientId,
-			final String clientSecret, final ApiResponseCallback callback) {
-		(new ClientAsyncTask<ApiResponse>(callback) {
-
-			@Override
-			public ApiResponse doTask() {
-				return authorizeAppClient(clientId, clientSecret);
-			}
-		}).execute();
-	}
-
-	
-	/**
-	 * Registers a device using the device's unique device ID. Executes
-	 * asynchronously in background and the callbacks are called in the UI
-	 * thread.
-	 * 
-	 * @param context
-	 * @param properties
-	 * @param callback
-	 */
-	public void registerDeviceAsync(final Context context,
-			final Map<String, Object> properties,
-			final DeviceRegistrationCallback callback) {
-		(new ClientAsyncTask<Device>(callback) {
-			@Override
-			public Device doTask() {
-			    UUID deviceId = new DeviceUuidFactory(context).getDeviceUuid();
-		        
-				return registerDevice(deviceId, properties);
-			}
-		}).execute();
-	}
-
-
-  /**
-   * Registers a device using the device's unique device ID. Executes
-   * asynchronously in background and the callbacks are called in the UI
-   * thread.
-   *
-   * @param context
-   * @param properties
-   * @param callback
-   */
-  public void registerDeviceForPushAsync(final Context context,
-                                         final String notifier,
-                                         final String token,
-                                         final Map<String, Object> properties,
-                                         final DeviceRegistrationCallback callback) {
-    (new ClientAsyncTask<Device>(callback) {
-      @Override
-      public Device doTask() {
-        UUID deviceId = new DeviceUuidFactory(context).getDeviceUuid();
-
-        return registerDeviceForPush(deviceId, notifier, token, properties);
-      }
-    }).execute();
-  }
-
-
-  /**
-	 * Create a new entity on the server. Executes asynchronously in background
-	 * and the callbacks are called in the UI thread.
-	 * 
-	 * @param entity
-	 * @param callback
-	 */
-	public void createEntityAsync(final Entity entity,
-			final ApiResponseCallback callback) {
-		(new ClientAsyncTask<ApiResponse>(callback) {
-			@Override
-			public ApiResponse doTask() {
-				return createEntity(entity);
-			}
-		}).execute();
-	}
-
-	
-	/**
-	 * Create a new entity on the server from a set of properties. Properties
-	 * must include a "type" property. Executes asynchronously in background and
-	 * the callbacks are called in the UI thread.
-	 * 
-	 * @param properties
-	 * @param callback
-	 */
-	public void createEntityAsync(final Map<String, Object> properties,
-			final ApiResponseCallback callback) {
-		(new ClientAsyncTask<ApiResponse>(callback) {
-			@Override
-			public ApiResponse doTask() {
-				return createEntity(properties);
-			}
-		}).execute();
-	}
-
-
-	/**
-	 * Creates a user. Executes asynchronously in background and the callbacks
-	 * are called in the UI thread.
-	 * 
-	 * @param username
-	 * @param name
-	 * @param email
-	 * @param password
-	 * @param callback
-	 */
-	public void createUserAsync(final String username, final String name,
-			final String email, final String password,
-			final ApiResponseCallback callback) {
-		(new ClientAsyncTask<ApiResponse>(callback) {
-			@Override
-			public ApiResponse doTask() {
-				return createUser(username, name, email, password);
-			}
-		}).execute();
-	}
-
-
-
-	/**
-	 * Get the groups for the user. Executes asynchronously in background and
-	 * the callbacks are called in the UI thread.
-	 * 
-	 * @param userId
-	 * @param callback
-	 */
-	public void getGroupsForUserAsync(final String userId,
-			final GroupsRetrievedCallback callback) {
-		(new ClientAsyncTask<Map<String, Group>>(callback) {
-			@Override
-			public Map<String, Group> doTask() {
-				return getGroupsForUser(userId);
-			}
-		}).execute();
-	}
-
-	/**
-	 * Get a user's activity feed. Returned as a query to ease paging. Executes
-	 * asynchronously in background and the callbacks are called in the UI
-	 * thread.
-	 * 
-	 * 
-	 * @param userId
-	 * @param callback
-	 */
-	public void queryActivityFeedForUserAsync(final String userId, final QueryResultsCallback callback) {
-		(new ClientAsyncTask<Query>(callback) {
-			@Override
-			public Query doTask() {
-				return queryActivityFeedForUser(userId);
-			}
-		}).execute();
-	}
-
-	
-	/**
-	 * Creates and posts an activity to a user. Executes asynchronously in
-	 * background and the callbacks are called in the UI thread.
-	 * 
-	 * @param verb
-	 * @param title
-	 * @param content
-	 * @param category
-	 * @param user
-	 * @param object
-	 * @param objectType
-	 * @param objectName
-	 * @param objectContent
-	 * @param callback
-	 */
-	public void postUserActivityAsync(final String verb, final String title,
-			final String content, final String category, final User user,
-			final Entity object, final String objectType,
-			final String objectName, final String objectContent,
-			final ApiResponseCallback callback) {
-		(new ClientAsyncTask<ApiResponse>(callback) {
-			@Override
-			public ApiResponse doTask() {
-				return postUserActivity(verb, title, content, category, user,
-						object, objectType, objectName, objectContent);
-			}
-		}).execute();
-	}
-
-	
-	/**
-	 * Creates and posts an activity to a group. Executes asynchronously in
-	 * background and the callbacks are called in the UI thread.
-	 * 
-	 * @param groupId
-	 * @param verb
-	 * @param title
-	 * @param content
-	 * @param category
-	 * @param user
-	 * @param object
-	 * @param objectType
-	 * @param objectName
-	 * @param objectContent
-	 * @param callback
-	 */
-	public void postGroupActivityAsync(final String groupId, final String verb, final String title,
-			final String content, final String category, final User user,
-			final Entity object, final String objectType,
-			final String objectName, final String objectContent,
-			final ApiResponseCallback callback) {
-		(new ClientAsyncTask<ApiResponse>(callback) {
-			@Override
-			public ApiResponse doTask() {
-				return postGroupActivity(groupId, verb, title, content, category, user,
-						object, objectType, objectName, objectContent);
-			}
-		}).execute();
-	}
-
-
-	/**
-	 * Get a group's activity feed. Returned as a query to ease paging. Executes
-	 * asynchronously in background and the callbacks are called in the UI
-	 * thread.
-	 * 
-	 * 
-	 * @param userId
-	 * @param callback
-	 */
-	public void queryActivityFeedForGroupAsync(final String groupId,
-			final QueryResultsCallback callback) {
-		(new ClientAsyncTask<Query>(callback) {
-			@Override
-			public Query doTask() {
-				return queryActivityFeedForGroup(groupId);
-			}
-		}).execute();
-	}
-
-
-	/**
-	 * Perform a query request and return a query object. The Query object
-	 * provides a simple way of dealing with result sets that need to be
-	 * iterated or paged through. Executes asynchronously in background and the
-	 * callbacks are called in the UI thread.
-	 * 
-	 * @param callback
-	 * @param method
-	 * @param params
-	 * @param data
-	 * @param segments
-	 */
-	public void queryEntitiesRequestAsync(final QueryResultsCallback callback,
-			final HttpMethod method, final Map<String, Object> params,
-			final Object data, final String... segments) {
-		(new ClientAsyncTask<Query>(callback) {
-			@Override
-			public Query doTask() {
-				return queryEntitiesRequest(method, params, data, segments);
-			}
-		}).execute();
-	}
-
-
-	/**
-	 * Perform a query of the users collection. Executes asynchronously in
-	 * background and the callbacks are called in the UI thread.
-	 * 
-	 * @param callback
-	 */
-	public void queryUsersAsync(QueryResultsCallback callback) {
-		queryEntitiesRequestAsync(callback, HttpMethod.GET, null, null,
-				getApplicationId(), "users");
-	}
-
-	/**
-	 * Perform a query of the users collection using the provided query command.
-	 * For example: "name contains 'ed'". Executes asynchronously in background
-	 * and the callbacks are called in the UI thread.
-	 * 
-	 * @param ql
-	 * @param callback
-	 */
-	public void queryUsersAsync(String ql, QueryResultsCallback callback) {
-		Map<String, Object> params = new HashMap<String, Object>();
-		params.put("ql", ql);
-		queryEntitiesRequestAsync(callback, HttpMethod.GET, params, null,
-				getApplicationId(), "users");
-	}
-
-	
-	/**
-	 * Queries the users for the specified group. Executes asynchronously in
-	 * background and the callbacks are called in the UI thread.
-	 * 
-	 * @param groupId
-	 * @param callback
-	 */
-	public void queryUsersForGroupAsync(String groupId,
-			QueryResultsCallback callback) {
-		queryEntitiesRequestAsync(callback, HttpMethod.GET, null, null,
-				getApplicationId(), "groups", groupId, "users");
-	}
-
-	/**
-	 * Adds a user to the specified groups. Executes asynchronously in
-	 * background and the callbacks are called in the UI thread.
-	 * 
-	 * @param userId
-	 * @param groupId
-	 * @param callback
-	 */
-	public void addUserToGroupAsync(final String userId, final String groupId,
-			final ApiResponseCallback callback) {
-		(new ClientAsyncTask<ApiResponse>(callback) {
-			@Override
-			public ApiResponse doTask() {
-				return addUserToGroup(userId, groupId);
-			}
-		}).execute();
-	}
-
-
-	/**
-	 * Creates a group with the specified group path. Group paths can be slash
-	 * ("/") delimited like file paths for hierarchical group relationships.
-	 * Executes asynchronously in background and the callbacks are called in the
-	 * UI thread.
-	 * 
-	 * @param groupPath
-	 * @param callback
-	 */
-	public void createGroupAsync(String groupPath,
-			final ApiResponseCallback callback) {
-		createGroupAsync(groupPath, null);
-	}
-
-	
-
-	/**
-	 * Creates a group with the specified group path and group title. Group
-	 * paths can be slash ("/") deliminted like file paths for hierarchical
-	 * group relationships. Executes asynchronously in background and the
-	 * callbacks are called in the UI thread.
-	 * 
-	 * @param groupPath
-	 * @param groupTitle
-	 * @param callback
-	 */
-	public void createGroupAsync(final String groupPath,
-			final String groupTitle, final ApiResponseCallback callback) {
-		(new ClientAsyncTask<ApiResponse>(callback) {
-			@Override
-			public ApiResponse doTask() {
-				return createGroup(groupPath, groupTitle);
-			}
-		}).execute();
-	}
-
-	
-	/**
-	 * Connect two entities together. Executes asynchronously in background and
-	 * the callbacks are called in the UI thread.
-	 * 
-	 * @param connectingEntityType
-	 * @param connectingEntityId
-	 * @param connectionType
-	 * @param connectedEntityId
-	 * @param callback
-	 */
-	public void connectEntitiesAsync(final String connectingEntityType,
-			final String connectingEntityId, final String connectionType,
-			final String connectedEntityId, final ApiResponseCallback callback) {
-		(new ClientAsyncTask<ApiResponse>(callback) {
-			@Override
-			public ApiResponse doTask() {
-				return connectEntities(connectingEntityType,
-						connectingEntityId, connectionType, connectedEntityId);
-			}
-		}).execute();
-	}
-
-
-
-	/**
-	 * Disconnect two entities. Executes asynchronously in background and the
-	 * callbacks are called in the UI thread.
-	 * 
-	 * @param connectingEntityType
-	 * @param connectingEntityId
-	 * @param connectionType
-	 * @param connectedEntityId
-	 * @param callback
-	 */
-	public void disconnectEntitiesAsync(final String connectingEntityType,
-			final String connectingEntityId, final String connectionType,
-			final String connectedEntityId, final ApiResponseCallback callback) {
-		(new ClientAsyncTask<ApiResponse>(callback) {
-			@Override
-			public ApiResponse doTask() {
-				return connectEntities(connectingEntityType,
-						connectingEntityId, connectionType, connectedEntityId);
-			}
-		}).execute();
-	}
-
-
-
-	/**
-	 * Query the connected entities. Executes asynchronously in background and
-	 * the callbacks are called in the UI thread.
-	 * 
-	 * @param connectingEntityType
-	 * @param connectingEntityId
-	 * @param connectionType
-	 * @param ql
-	 * @param callback
-	 */
-	public void queryEntityConnectionsAsync(String connectingEntityType,
-			String connectingEntityId, String connectionType, String ql,
-			QueryResultsCallback callback) {
-		Map<String, Object> params = new HashMap<String, Object>();
-		params.put("ql", ql);
-		queryEntitiesRequestAsync(callback, HttpMethod.GET, params, null,
-				getApplicationId(), connectingEntityType, connectingEntityId,
-				connectionType);
-	}
-
-
-	/**
-	 * Query the connected entities within distance of a specific point. .
-	 * Executes asynchronously in background and the callbacks are called in the
-	 * UI thread.
-	 * 
-	 * @param connectingEntityType
-	 * @param connectingEntityId
-	 * @param connectionType
-	 * @param distance
-	 * @param latitude
-	 * @param longitude
-	 * @param callback
-	 */
-	public void queryEntityConnectionsWithinLocationAsync(
-			String connectingEntityType, String connectingEntityId,
-			String connectionType, float distance, Location location,
-			String ql, QueryResultsCallback callback) {
-		Map<String, Object> params = new HashMap<String, Object>();
-		params.put("ql", makeLocationQL(distance, location.getLatitude(), location.getLongitude(), ql));
-		params.put("ql", ql);
-		queryEntitiesRequestAsync(callback, HttpMethod.GET, params, null,
-				getApplicationId(), connectingEntityType, connectingEntityId,
-				connectionType);
-	}
-
-	
-	
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/src/main/java/org/usergrid/android/client/callbacks/ApiResponseCallback.java
----------------------------------------------------------------------
diff --git a/sdks/android/src/main/java/org/usergrid/android/client/callbacks/ApiResponseCallback.java b/sdks/android/src/main/java/org/usergrid/android/client/callbacks/ApiResponseCallback.java
deleted file mode 100644
index 6da5040..0000000
--- a/sdks/android/src/main/java/org/usergrid/android/client/callbacks/ApiResponseCallback.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package org.usergrid.android.client.callbacks;
-
-import org.usergrid.java.client.response.ApiResponse;
-
-
-public interface ApiResponseCallback extends ClientCallback<ApiResponse> {
-
-	public void onResponse(ApiResponse response);
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/src/main/java/org/usergrid/android/client/callbacks/ClientAsyncTask.java
----------------------------------------------------------------------
diff --git a/sdks/android/src/main/java/org/usergrid/android/client/callbacks/ClientAsyncTask.java b/sdks/android/src/main/java/org/usergrid/android/client/callbacks/ClientAsyncTask.java
deleted file mode 100644
index da2dcaa..0000000
--- a/sdks/android/src/main/java/org/usergrid/android/client/callbacks/ClientAsyncTask.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package org.usergrid.android.client.callbacks;
-
-import android.os.AsyncTask;
-
-public abstract class ClientAsyncTask<T> extends AsyncTask<Void, Exception, T> {
-
-	ClientCallback<T> callback;
-
-	public ClientAsyncTask(ClientCallback<T> callback) {
-		this.callback = callback;
-	}
-
-	@Override
-	protected T doInBackground(Void... v) {
-		try {
-			return doTask();
-		} catch (Exception e) {
-			this.publishProgress(e);
-		}
-		return null;
-	}
-
-	public abstract T doTask();
-
-	@Override
-	protected void onPostExecute(T response) {
-		if (callback != null) {
-			callback.onResponse(response);
-		}
-	}
-
-	@Override
-	protected void onProgressUpdate(Exception... e) {
-		if ((callback != null) && (e != null) && (e.length > 0)) {
-			callback.onException(e[0]);
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/src/main/java/org/usergrid/android/client/callbacks/ClientCallback.java
----------------------------------------------------------------------
diff --git a/sdks/android/src/main/java/org/usergrid/android/client/callbacks/ClientCallback.java b/sdks/android/src/main/java/org/usergrid/android/client/callbacks/ClientCallback.java
deleted file mode 100644
index d84d17b..0000000
--- a/sdks/android/src/main/java/org/usergrid/android/client/callbacks/ClientCallback.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package org.usergrid.android.client.callbacks;
-
-public interface ClientCallback<T> {
-
-	public void onResponse(T response);
-
-	public void onException(Exception e);
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/src/main/java/org/usergrid/android/client/callbacks/DeviceRegistrationCallback.java
----------------------------------------------------------------------
diff --git a/sdks/android/src/main/java/org/usergrid/android/client/callbacks/DeviceRegistrationCallback.java b/sdks/android/src/main/java/org/usergrid/android/client/callbacks/DeviceRegistrationCallback.java
deleted file mode 100644
index 2ed0ce8..0000000
--- a/sdks/android/src/main/java/org/usergrid/android/client/callbacks/DeviceRegistrationCallback.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package org.usergrid.android.client.callbacks;
-
-import org.usergrid.java.client.entities.Device;
-
-public interface DeviceRegistrationCallback extends ClientCallback<Device> {
-
-	public void onDeviceRegistration(Device device);
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/src/main/java/org/usergrid/android/client/callbacks/GroupsRetrievedCallback.java
----------------------------------------------------------------------
diff --git a/sdks/android/src/main/java/org/usergrid/android/client/callbacks/GroupsRetrievedCallback.java b/sdks/android/src/main/java/org/usergrid/android/client/callbacks/GroupsRetrievedCallback.java
deleted file mode 100644
index 4586f60..0000000
--- a/sdks/android/src/main/java/org/usergrid/android/client/callbacks/GroupsRetrievedCallback.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package org.usergrid.android.client.callbacks;
-
-import java.util.Map;
-
-import org.usergrid.java.client.entities.Group;
-
-
-public interface GroupsRetrievedCallback extends
-		ClientCallback<Map<String, Group>> {
-
-	public void onGroupsRetrieved(Map<String, Group> groups);
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/src/main/java/org/usergrid/android/client/callbacks/QueryResultsCallback.java
----------------------------------------------------------------------
diff --git a/sdks/android/src/main/java/org/usergrid/android/client/callbacks/QueryResultsCallback.java b/sdks/android/src/main/java/org/usergrid/android/client/callbacks/QueryResultsCallback.java
deleted file mode 100644
index 9aac648..0000000
--- a/sdks/android/src/main/java/org/usergrid/android/client/callbacks/QueryResultsCallback.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package org.usergrid.android.client.callbacks;
-
-import org.usergrid.java.client.Client.Query;
-
-public interface QueryResultsCallback extends ClientCallback<Query> {
-
-	public void onQueryResults(Query query);
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/src/main/java/org/usergrid/android/client/utils/DeviceUuidFactory.java
----------------------------------------------------------------------
diff --git a/sdks/android/src/main/java/org/usergrid/android/client/utils/DeviceUuidFactory.java b/sdks/android/src/main/java/org/usergrid/android/client/utils/DeviceUuidFactory.java
deleted file mode 100644
index d3ac84a..0000000
--- a/sdks/android/src/main/java/org/usergrid/android/client/utils/DeviceUuidFactory.java
+++ /dev/null
@@ -1,154 +0,0 @@
-package org.usergrid.android.client.utils;
-
-import static org.usergrid.android.client.utils.ObjectUtils.isEmpty;
-
-import java.io.UnsupportedEncodingException;
-import java.util.UUID;
-
-import android.content.Context;
-import android.content.SharedPreferences;
-import android.net.wifi.WifiManager;
-import android.os.Build;
-import android.provider.Settings.Secure;
-import android.telephony.TelephonyManager;
-
-/**
- * Tries to get the device ID as a UUID and fallsback to a generated UUID value
- * if it doesn't work.
- * 
- * @see http 
- *      ://stackoverflow.com/questions/2785485/is-there-a-unique-android-device
- *      -id
- * 
- */
-public class DeviceUuidFactory {
-	protected static final String PREFS_FILE = "device_id.xml";
-	protected static final String PREFS_DEVICE_ID = "device_id";
-
-	protected static UUID uuid;
-
-	public DeviceUuidFactory(Context context) {
-
-		if (uuid == null) {
-			synchronized (DeviceUuidFactory.class) {
-				if (uuid == null) {
-					final SharedPreferences prefs = context
-							.getSharedPreferences(PREFS_FILE, 0);
-					final String id = prefs.getString(PREFS_DEVICE_ID, null);
-
-					if (id != null) {
-						// Use the ids previously computed and stored in the
-						// prefs file
-						uuid = UUID.fromString(id);
-
-					} else {
-
-						final String androidId = Secure
-								.getString(context.getContentResolver(),
-										Secure.ANDROID_ID);
-
-						// Use the Android ID unless it's broken, in which case
-						// fallback on deviceId,
-						// unless it's not available, then fallback on a random
-						// number which we store
-						// to a prefs file
-						try {
-							if (!"9774d56d682e549c".equals(androidId)) {
-								uuid = UUID.nameUUIDFromBytes(androidId
-										.getBytes("utf8"));
-							} else {
-								final String deviceId = ((TelephonyManager) context
-										.getSystemService(Context.TELEPHONY_SERVICE))
-										.getDeviceId();
-								uuid = deviceId != null ? UUID
-										.nameUUIDFromBytes(deviceId
-												.getBytes("utf8"))
-										: generateDeviceUuid(context);
-							}
-						} catch (UnsupportedEncodingException e) {
-							throw new RuntimeException(e);
-						}
-
-						// Write the value out to the prefs file
-						prefs.edit()
-								.putString(PREFS_DEVICE_ID, uuid.toString())
-								.commit();
-
-					}
-
-				}
-			}
-		}
-
-	}
-
-	private UUID generateDeviceUuid(Context context) {
-
-		// Get some of the hardware information
-		String buildParams = Build.BOARD + Build.BRAND + Build.CPU_ABI
-				+ Build.DEVICE + Build.DISPLAY + Build.FINGERPRINT + Build.HOST
-				+ Build.ID + Build.MANUFACTURER + Build.MODEL + Build.PRODUCT
-				+ Build.TAGS + Build.TYPE + Build.USER;
-
-		// Requires READ_PHONE_STATE
-		TelephonyManager tm = (TelephonyManager) context
-				.getSystemService(Context.TELEPHONY_SERVICE);
-
-		// gets the imei (GSM) or MEID/ESN (CDMA)
-		String imei = tm.getDeviceId();
-
-		// gets the android-assigned id
-		String androidId = Secure.getString(context.getContentResolver(),
-				Secure.ANDROID_ID);
-
-		// requires ACCESS_WIFI_STATE
-		WifiManager wm = (WifiManager) context
-				.getSystemService(Context.WIFI_SERVICE);
-
-		// gets the MAC address
-		String mac = wm.getConnectionInfo().getMacAddress();
-
-		// if we've got nothing, return a random UUID
-		if (isEmpty(imei) && isEmpty(androidId) && isEmpty(mac)) {
-			return UUID.randomUUID();
-		}
-
-		// concatenate the string
-		String fullHash = buildParams.toString() + imei + androidId + mac;
-
-		return UUID.nameUUIDFromBytes(fullHash.getBytes());
-	}
-
-	/**
-	 * Returns a unique UUID for the current android device. As with all UUIDs,
-	 * this unique ID is "very highly likely" to be unique across all Android
-	 * devices. Much more so than ANDROID_ID is.
-	 * 
-	 * The UUID is generated by using ANDROID_ID as the base key if appropriate,
-	 * falling back on TelephonyManager.getDeviceID() if ANDROID_ID is known to
-	 * be incorrect, and finally falling back on a random UUID that's persisted
-	 * to SharedPreferences if getDeviceID() does not return a usable value.
-	 * 
-	 * In some rare circumstances, this ID may change. In particular, if the
-	 * device is factory reset a new device ID may be generated. In addition, if
-	 * a user upgrades their phone from certain buggy implementations of Android
-	 * 2.2 to a newer, non-buggy version of Android, the device ID may change.
-	 * Or, if a user uninstalls your app on a device that has neither a proper
-	 * Android ID nor a Device ID, this ID may change on reinstallation.
-	 * 
-	 * Note that if the code falls back on using TelephonyManager.getDeviceId(),
-	 * the resulting ID will NOT change after a factory reset. Something to be
-	 * aware of.
-	 * 
-	 * Works around a bug in Android 2.2 for many devices when using ANDROID_ID
-	 * directly.
-	 * 
-	 * @see http://code.google.com/p/android/issues/detail?id=10603
-	 * 
-	 * @return a UUID that may be used to uniquely identify your device for most
-	 *         purposes.
-	 */
-	public UUID getDeviceUuid() {
-		return uuid;
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/src/main/java/org/usergrid/android/client/utils/ObjectUtils.java
----------------------------------------------------------------------
diff --git a/sdks/android/src/main/java/org/usergrid/android/client/utils/ObjectUtils.java b/sdks/android/src/main/java/org/usergrid/android/client/utils/ObjectUtils.java
deleted file mode 100644
index a9d5a16..0000000
--- a/sdks/android/src/main/java/org/usergrid/android/client/utils/ObjectUtils.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package org.usergrid.android.client.utils;
-
-import java.util.Map;
-
-public class ObjectUtils {
-
-	public static boolean isEmpty(Object s) {
-		if (s == null) {
-			return true;
-		}
-		if ((s instanceof String) && (((String) s).trim().length() == 0)) {
-			return true;
-		}
-		if (s instanceof Map) {
-			return ((Map<?, ?>) s).isEmpty();
-		}
-		return false;
-	}
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/README.txt
----------------------------------------------------------------------
diff --git a/sdks/java/README.txt b/sdks/java/README.txt
index 5540ba4..ce11b55 100644
--- a/sdks/java/README.txt
+++ b/sdks/java/README.txt
@@ -1,8 +1,7 @@
 
-Usergrid Android Client
+Apache Usergrid Java Client
 
-Experimental Android client for Usergrid. Basically uses Spring Android and
-Jackson to wrap calls to Usergrid REST API. Loosely based on the Usergrid
+Experimental Java client for Apache Usergrid. Loosely based on the Usergrid
 Javascript client.
 
 Requires the following permissions:

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/pom.xml
----------------------------------------------------------------------
diff --git a/sdks/java/pom.xml b/sdks/java/pom.xml
index 6913cf9..ebeb2bf 100644
--- a/sdks/java/pom.xml
+++ b/sdks/java/pom.xml
@@ -14,12 +14,12 @@
 	</parent>
 	
 	<modelVersion>4.0.0</modelVersion>
-	<groupId>org.usergrid</groupId>
+	<groupId>org.apache.usergrid</groupId>
 	<artifactId>usergrid-java-client</artifactId>
 	<version>0.0.8-SNAPSHOT</version>
 	<packaging>jar</packaging>
 	<description>A simple java client for usergrid</description>
-	<url>https://github.com/apigee/usergrid-stack-internal</url>
+	<url>https://github.com/usergrid/usergrid</url>
 	
 	<licenses>
 		<license>
@@ -82,9 +82,4 @@
 			<url>http://maven.springframework.org/milestone</url>
 		</repository>
 	</repositories>
-	<scm>
-		<connection>scm:git:git@github.com:apigee/usergrid-java-sdk.git</connection>
-		<developerConnection>scm:git:git@github.com:apigee/usergrid-java-sdk.git</developerConnection>
-		<url>git@github.com:apigee/usergrid-java-sdk.git</url>
-	</scm>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/java/src/main/java/org/apache/usergrid/java/client/Client.java
----------------------------------------------------------------------
diff --git a/sdks/java/src/main/java/org/apache/usergrid/java/client/Client.java b/sdks/java/src/main/java/org/apache/usergrid/java/client/Client.java
new file mode 100644
index 0000000..c3e9d69
--- /dev/null
+++ b/sdks/java/src/main/java/org/apache/usergrid/java/client/Client.java
@@ -0,0 +1,1277 @@
+package org.apache.usergrid.java.client;
+
+import static org.apache.usergrid.java.client.utils.JsonUtils.parse;
+import static org.apache.usergrid.java.client.utils.ObjectUtils.isEmpty;
+import static org.apache.usergrid.java.client.utils.UrlUtils.addQueryParams;
+import static org.apache.usergrid.java.client.utils.UrlUtils.encodeParams;
+import static org.apache.usergrid.java.client.utils.UrlUtils.path;
+import static org.springframework.util.StringUtils.arrayToDelimitedString;
+import static org.springframework.util.StringUtils.tokenizeToStringArray;
+
+import java.util.Collections;
+import java.util.EnumSet;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+import java.util.concurrent.ConcurrentHashMap;
+
+import com.fasterxml.jackson.databind.node.JsonNodeFactory;
+
+import org.apache.usergrid.java.client.entities.Activity;
+import org.apache.usergrid.java.client.entities.Device;
+import org.apache.usergrid.java.client.entities.Entity;
+import org.apache.usergrid.java.client.entities.Group;
+import org.apache.usergrid.java.client.entities.User;
+import org.apache.usergrid.java.client.response.ApiResponse;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.client.HttpClientErrorException;
+import org.springframework.web.client.RestTemplate;
+
+/**
+ * The Client class for accessing the Usergrid API. Start by instantiating this
+ * class though the appropriate constructor.
+ * 
+ */
+public class Client {
+
+    private static final Logger log = LoggerFactory.getLogger(Client.class);
+
+    public static boolean FORCE_PUBLIC_API = false;
+
+    // Public API
+    public static String PUBLIC_API_URL = "http://api.usergrid.com";
+
+    // Local API of standalone server
+    public static String LOCAL_STANDALONE_API_URL = "http://localhost:8080";
+
+    // Local API of Tomcat server in Eclipse
+    public static String LOCAL_TOMCAT_API_URL = "http://localhost:8080/ROOT";
+
+    // Local API
+    public static String LOCAL_API_URL = LOCAL_STANDALONE_API_URL;
+
+    private String apiUrl = PUBLIC_API_URL;
+
+    private String organizationId;
+    private String applicationId;
+    private String clientId;
+    private String clientSecret;
+
+    private User loggedInUser = null;
+
+    private String accessToken = null;
+
+    private String currentOrganization = null;
+
+    static RestTemplate restTemplate = new RestTemplate();
+
+    /**
+     * Default constructor for instantiating a client.
+     */
+    public Client() {
+        init();
+    }
+
+    /**
+     * Instantiate client for a specific app
+     * 
+     * @param applicationId
+     *            the application id or name
+     */
+    public Client(String organizationId, String applicationId) {
+        init();
+        this.organizationId = organizationId;
+        this.applicationId = applicationId;
+    }
+
+    public void init() {
+
+    }
+
+    /**
+     * @return the Usergrid API url (default: http://api.usergrid.com)
+     */
+    public String getApiUrl() {
+        return apiUrl;
+    }
+
+    /**
+     * @param apiUrl
+     *            the Usergrid API url (default: http://api.usergrid.com)
+     */
+    public void setApiUrl(String apiUrl) {
+        this.apiUrl = apiUrl;
+    }
+
+    /**
+     * @param apiUrl
+     *            the Usergrid API url (default: http://api.usergrid.com)
+     * @return Client object for method call chaining
+     */
+    public Client withApiUrl(String apiUrl) {
+        this.apiUrl = apiUrl;
+        return this;
+    }
+    
+    
+    /**
+     * the organizationId to set
+     * @param organizationId
+     * @return
+     */
+    public Client withOrganizationId(String organizationId){
+        this.organizationId = organizationId;
+        return this;
+    }
+    
+    
+
+    /**
+     * @return the organizationId
+     */
+    public String getOrganizationId() {
+        return organizationId;
+    }
+
+    /**
+     * @param organizationId the organizationId to set
+     */
+    public void setOrganizationId(String organizationId) {
+        this.organizationId = organizationId;
+    }
+
+    /**
+     * @return the application id or name
+     */
+    public String getApplicationId() {
+        return applicationId;
+    }
+
+    /**
+     * @param applicationId
+     *            the application id or name
+     */
+    public void setApplicationId(String applicationId) {
+        this.applicationId = applicationId;
+    }
+   
+
+    /**
+     * @param applicationId
+     *            the application id or name
+     * @return Client object for method call chaining
+     */
+    public Client withApplicationId(String applicationId) {
+        this.applicationId = applicationId;
+        return this;
+    }
+
+    /**
+     * @return the client key id for making calls as the application-owner. Not
+     *         safe for most mobile use.
+     */
+    public String getClientId() {
+        return clientId;
+    }
+
+    /**
+     * @param clientId
+     *            the client key id for making calls as the application-owner.
+     *            Not safe for most mobile use.
+     */
+    public void setClientId(String clientId) {
+        this.clientId = clientId;
+    }
+
+    /**
+     * @param clientId
+     *            the client key id for making calls as the application-owner.
+     *            Not safe for most mobile use.
+     * @return Client object for method call chaining
+     */
+    public Client withClientId(String clientId) {
+        this.clientId = clientId;
+        return this;
+    }
+
+    /**
+     * @return the client key id for making calls as the application-owner. Not
+     *         safe for most mobile use.
+     */
+    public String getClientSecret() {
+        return clientSecret;
+    }
+
+    /**
+     * @param clientSecret
+     *            the client key id for making calls as the application-owner.
+     *            Not safe for most mobile use.
+     */
+    public void setClientSecret(String clientSecret) {
+        this.clientSecret = clientSecret;
+    }
+
+    /**
+     * @param clientSecret
+     *            the client key id for making calls as the application-owner.
+     *            Not safe for most mobile use.
+     * @return Client object for method call chaining
+     */
+    public Client withClientSecret(String clientSecret) {
+        this.clientSecret = clientSecret;
+        return this;
+    }
+
+    /**
+     * @return the logged-in user after a successful authorizeAppUser request
+     */
+    public User getLoggedInUser() {
+        return loggedInUser;
+    }
+
+    /**
+     * @param loggedInUser
+     *            the logged-in user, usually not set by host application
+     */
+    public void setLoggedInUser(User loggedInUser) {
+        this.loggedInUser = loggedInUser;
+    }
+
+    /**
+     * @return the OAuth2 access token after a successful authorize request
+     */
+    public String getAccessToken() {
+        return accessToken;
+    }
+
+    /**
+     * @param accessToken
+     *            an OAuth2 access token. Usually not set by host application
+     */
+    public void setAccessToken(String accessToken) {
+        this.accessToken = accessToken;
+    }
+
+    /**
+     * @return the currentOrganization
+     */
+    public String getCurrentOrganization() {
+        return currentOrganization;
+    }
+
+    /**
+     * @param currentOrganization
+     */
+    public void setCurrentOrganization(String currentOrganization) {
+        this.currentOrganization = currentOrganization;
+    }
+
+    /**
+     * Low-level HTTP request method. Synchronous, blocks till response or
+     * timeout.
+     * 
+     * @param method
+     *            HttpMethod method
+     * @param cls
+     *            class for the return type
+     * @param params
+     *            parameters to encode as querystring or body parameters
+     * @param data
+     *            JSON data to put in body
+     * @param segments
+     *            REST url path segments (i.e. /segment1/segment2/segment3)
+     * @return results marshalled into class specified in cls parameter
+     */
+    public <T> T httpRequest(HttpMethod method, Class<T> cls,
+            Map<String, Object> params, Object data, String... segments) {
+        HttpHeaders requestHeaders = new HttpHeaders();
+        requestHeaders.setAccept(Collections
+                .singletonList(MediaType.APPLICATION_JSON));
+        if (accessToken != null) {
+            String auth = "Bearer " + accessToken;
+            requestHeaders.set("Authorization", auth);
+            log.info("Authorization: " + auth);
+        }
+        String url = path(apiUrl, segments);
+
+        MediaType contentType = MediaType.APPLICATION_JSON;
+        if (method.equals(HttpMethod.POST) && isEmpty(data) && !isEmpty(params)) {
+            data = encodeParams(params);
+            contentType = MediaType.APPLICATION_FORM_URLENCODED;
+        } else {
+            url = addQueryParams(url, params);
+        }
+        requestHeaders.setContentType(contentType);
+        HttpEntity<?> requestEntity = null;
+
+        if (method.equals(HttpMethod.POST) || method.equals(HttpMethod.PUT)) {
+            if (isEmpty(data)) {
+                data = JsonNodeFactory.instance.objectNode();
+            }
+            requestEntity = new HttpEntity<Object>(data, requestHeaders);
+        } else {
+            requestEntity = new HttpEntity<Object>(requestHeaders);
+        }
+        log.info("Client.httpRequest(): url: " + url);
+        ResponseEntity<T> responseEntity = restTemplate.exchange(url, method,
+                requestEntity, cls);
+        log.info("Client.httpRequest(): reponse body: "
+                + responseEntity.getBody().toString());
+        return responseEntity.getBody();
+    }
+
+    /**
+     * High-level Usergrid API request.
+     * 
+     * @param method
+     * @param params
+     * @param data
+     * @param segments
+     * @return
+     */
+    public ApiResponse apiRequest(HttpMethod method,
+            Map<String, Object> params, Object data, String... segments) {
+        ApiResponse response = null;
+        try {
+            response = httpRequest(method, ApiResponse.class, params, data,
+                    segments);
+            log.info("Client.apiRequest(): Response: " + response);
+        } catch (HttpClientErrorException e) {
+            log.error("Client.apiRequest(): HTTP error: "
+                    + e.getLocalizedMessage());
+            response = parse(e.getResponseBodyAsString(), ApiResponse.class);
+            if ((response != null) && !isEmpty(response.getError())) {
+                log.error("Client.apiRequest(): Response error: "
+                        + response.getError());
+                if (!isEmpty(response.getException())) {
+                    log.error("Client.apiRequest(): Response exception: "
+                            + response.getException());
+                }
+            }
+        }
+        return response;
+    }
+
+    protected void assertValidApplicationId() {
+        if (isEmpty(applicationId)) {
+            throw new IllegalArgumentException("No application id specified");
+        }
+    }
+
+    /**
+     * Log the user in and get a valid access token.
+     * 
+     * @param email
+     * @param password
+     * @return non-null ApiResponse if request succeeds, check getError() for
+     *         "invalid_grant" to see if access is denied.
+     */
+    public ApiResponse authorizeAppUser(String email, String password) {
+        validateNonEmptyParam(email, "email");
+        validateNonEmptyParam(password,"password");
+        assertValidApplicationId();
+        loggedInUser = null;
+        accessToken = null;
+        currentOrganization = null;
+        Map<String, Object> formData = new HashMap<String, Object>();
+        formData.put("grant_type", "password");
+        formData.put("username", email);
+        formData.put("password", password);
+        ApiResponse response = apiRequest(HttpMethod.POST, formData, null,
+                organizationId, applicationId, "token");
+        if (response == null) {
+            return response;
+        }
+        if (!isEmpty(response.getAccessToken()) && (response.getUser() != null)) {
+            loggedInUser = response.getUser();
+            accessToken = response.getAccessToken();
+            currentOrganization = null;
+            log.info("Client.authorizeAppUser(): Access token: " + accessToken);
+        } else {
+            log.info("Client.authorizeAppUser(): Response: " + response);
+        }
+        return response;
+    }
+
+    /**
+     * Change the password for the currently logged in user. You must supply the
+     * old password and the new password.
+     * 
+     * @param username
+     * @param oldPassword
+     * @param newPassword
+     * @return
+     */
+    public ApiResponse changePassword(String username, String oldPassword,
+            String newPassword) {
+
+        Map<String, Object> data = new HashMap<String, Object>();
+        data.put("newpassword", newPassword);
+        data.put("oldpassword", oldPassword);
+
+        return apiRequest(HttpMethod.POST, null, data, organizationId,  applicationId, "users",
+                username, "password");
+
+    }
+
+    /**
+     * Log the user in with their numeric pin-code and get a valid access token.
+     * 
+     * @param email
+     * @param pin
+     * @return non-null ApiResponse if request succeeds, check getError() for
+     *         "invalid_grant" to see if access is denied.
+     */
+    public ApiResponse authorizeAppUserViaPin(String email, String pin) {
+        validateNonEmptyParam(email, "email");
+        validateNonEmptyParam(pin, "pin");
+        assertValidApplicationId();
+        loggedInUser = null;
+        accessToken = null;
+        currentOrganization = null;
+        Map<String, Object> formData = new HashMap<String, Object>();
+        formData.put("grant_type", "pin");
+        formData.put("username", email);
+        formData.put("pin", pin);
+        ApiResponse response = apiRequest(HttpMethod.POST, formData, null,
+                organizationId,  applicationId, "token");
+        if (response == null) {
+            return response;
+        }
+        if (!isEmpty(response.getAccessToken()) && (response.getUser() != null)) {
+            loggedInUser = response.getUser();
+            accessToken = response.getAccessToken();
+            currentOrganization = null;
+            log.info("Client.authorizeAppUser(): Access token: " + accessToken);
+        } else {
+            log.info("Client.authorizeAppUser(): Response: " + response);
+        }
+        return response;
+    }
+
+    /**
+     * Log the user in with their Facebook access token retrived via Facebook
+     * OAuth.
+     * 
+     * @param email
+     * @param pin
+     * @return non-null ApiResponse if request succeeds, check getError() for
+     *         "invalid_grant" to see if access is denied.
+     */
+    public ApiResponse authorizeAppUserViaFacebook(String fb_access_token) {
+        validateNonEmptyParam(fb_access_token, "Facebook token");
+        assertValidApplicationId();
+        loggedInUser = null;
+        accessToken = null;
+        currentOrganization = null;
+        Map<String, Object> formData = new HashMap<String, Object>();
+        formData.put("fb_access_token", fb_access_token);
+        ApiResponse response = apiRequest(HttpMethod.POST, formData, null,
+                organizationId,  applicationId, "auth", "facebook");
+        if (response == null) {
+            return response;
+        }
+        if (!isEmpty(response.getAccessToken()) && (response.getUser() != null)) {
+            loggedInUser = response.getUser();
+            accessToken = response.getAccessToken();
+            currentOrganization = null;
+            log.info("Client.authorizeAppUserViaFacebook(): Access token: "
+                    + accessToken);
+        } else {
+            log.info("Client.authorizeAppUserViaFacebook(): Response: "
+                    + response);
+        }
+        return response;
+    }
+
+    /**
+     * Log the app in with it's client id and client secret key. Not recommended
+     * for production apps.
+     * 
+     * @param email
+     * @param pin
+     * @return non-null ApiResponse if request succeeds, check getError() for
+     *         "invalid_grant" to see if access is denied.
+     */
+    public ApiResponse authorizeAppClient(String clientId, String clientSecret) {
+        validateNonEmptyParam(clientId, "client identifier");
+        validateNonEmptyParam(clientSecret, "client secret");
+        assertValidApplicationId();
+        loggedInUser = null;
+        accessToken = null;
+        currentOrganization = null;
+        Map<String, Object> formData = new HashMap<String, Object>();
+        formData.put("grant_type", "client_credentials");
+        formData.put("client_id", clientId);
+        formData.put("client_secret", clientSecret);
+        ApiResponse response = apiRequest(HttpMethod.POST, formData, null,
+                organizationId, applicationId, "token");
+        if (response == null) {
+            return response;
+        }
+        if (!isEmpty(response.getAccessToken())) {
+            loggedInUser = null;
+            accessToken = response.getAccessToken();
+            currentOrganization = null;
+            log.info("Client.authorizeAppClient(): Access token: "
+                    + accessToken);
+        } else {
+            log.info("Client.authorizeAppClient(): Response: " + response);
+        }
+        return response;
+    }
+
+    private void validateNonEmptyParam(Object param, String paramName) {
+        if ( isEmpty(param) ) {
+            throw new IllegalArgumentException(paramName + " cannot be null or empty");
+        }
+    }
+
+    /**
+     * Registers a device using the device's unique device ID.
+     * 
+     * @param context
+     * @param properties
+     * @return a Device object if success
+     */
+    public Device registerDevice(UUID deviceId, Map<String, Object> properties) {
+        assertValidApplicationId();
+        if (properties == null) {
+            properties = new HashMap<String, Object>();
+        }
+        properties.put("refreshed", System.currentTimeMillis());
+        ApiResponse response = apiRequest(HttpMethod.PUT, null, properties,
+                organizationId, applicationId, "devices", deviceId.toString());
+        return response.getFirstEntity(Device.class);
+    }
+
+    /**
+     * Registers a device using the device's unique device ID.
+     *
+     * @param context
+     * @param properties
+     * @return a Device object if success
+     */
+    public Device registerDeviceForPush(UUID deviceId,
+                                        String notifier,
+                                        String token,
+                                        Map<String, Object> properties) {
+      if (properties == null) {
+          properties = new HashMap<String, Object>();
+      }
+      String notifierKey = notifier + ".notifier.id";
+      properties.put(notifierKey, token);
+      return registerDevice(deviceId, properties);
+    }
+
+    /**
+     * Create a new entity on the server.
+     * 
+     * @param entity
+     * @return an ApiResponse with the new entity in it.
+     */
+    public ApiResponse createEntity(Entity entity) {
+        assertValidApplicationId();
+        if (isEmpty(entity.getType())) {
+            throw new IllegalArgumentException("Missing entity type");
+        }
+        ApiResponse response = apiRequest(HttpMethod.POST, null, entity,
+                organizationId, applicationId, entity.getType());
+        return response;
+    }
+
+    /**
+     * Create a new entity on the server from a set of properties. Properties
+     * must include a "type" property.
+     * 
+     * @param properties
+     * @return an ApiResponse with the new entity in it.
+     */
+    public ApiResponse createEntity(Map<String, Object> properties) {
+        assertValidApplicationId();
+        if (isEmpty(properties.get("type"))) {
+            throw new IllegalArgumentException("Missing entity type");
+        }
+        ApiResponse response = apiRequest(HttpMethod.POST, null, properties,
+                organizationId, applicationId, properties.get("type").toString());
+        return response;
+    }
+
+    /**
+     * Creates a user.
+     * 
+     * @param username
+     *            required
+     * @param name
+     * @param email
+     * @param password
+     * @return
+     */
+    public ApiResponse createUser(String username, String name, String email,
+            String password) {
+        Map<String, Object> properties = new HashMap<String, Object>();
+        properties.put("type", "user");
+        if (username != null) {
+            properties.put("username", username);
+        }
+        if (name != null) {
+            properties.put("name", name);
+        }
+        if (email != null) {
+            properties.put("email", email);
+        }
+        if (password != null) {
+            properties.put("password", password);
+        }
+        return createEntity(properties);
+    }
+
+    /**
+     * Get the groups for the user.
+     * 
+     * @param userId
+     * @return a map with the group path as the key and the Group entity as the
+     *         value
+     */
+    public Map<String, Group> getGroupsForUser(String userId) {
+        ApiResponse response = apiRequest(HttpMethod.GET, null, null,
+                organizationId, applicationId, "users", userId, "groups");
+        Map<String, Group> groupMap = new HashMap<String, Group>();
+        if (response != null) {
+            List<Group> groups = response.getEntities(Group.class);
+            for (Group group : groups) {
+                groupMap.put(group.getPath(), group);
+            }
+        }
+        return groupMap;
+    }
+
+    /**
+     * Get a user's activity feed. Returned as a query to ease paging.
+     * 
+     * @param userId
+     * @return
+     */
+    public Query queryActivityFeedForUser(String userId) {
+        Query q = queryEntitiesRequest(HttpMethod.GET, null, null,
+                organizationId, applicationId, "users", userId, "feed");
+        return q;
+    }
+
+    /**
+     * Posts an activity to a user. Activity must already be created.
+     * 
+     * @param userId
+     * @param activity
+     * @return
+     */
+    public ApiResponse postUserActivity(String userId, Activity activity) {
+        return apiRequest(HttpMethod.POST, null, activity,  organizationId, applicationId, "users",
+                userId, "activities");
+    }
+
+    /**
+     * Creates and posts an activity to a user.
+     * 
+     * @param verb
+     * @param title
+     * @param content
+     * @param category
+     * @param user
+     * @param object
+     * @param objectType
+     * @param objectName
+     * @param objectContent
+     * @return
+     */
+    public ApiResponse postUserActivity(String verb, String title,
+            String content, String category, User user, Entity object,
+            String objectType, String objectName, String objectContent) {
+        Activity activity = Activity.newActivity(verb, title, content,
+                category, user, object, objectType, objectName, objectContent);
+        return postUserActivity(user.getUuid().toString(), activity);
+    }
+
+    /**
+     * Posts an activity to a group. Activity must already be created.
+     * 
+     * @param userId
+     * @param activity
+     * @return
+     */
+    public ApiResponse postGroupActivity(String groupId, Activity activity) {
+        return apiRequest(HttpMethod.POST, null, activity, organizationId, applicationId, "groups",
+                groupId, "activities");
+    }
+
+    /**
+     * Creates and posts an activity to a group.
+     * 
+     * @param groupId
+     * @param verb
+     * @param title
+     * @param content
+     * @param category
+     * @param user
+     * @param object
+     * @param objectType
+     * @param objectName
+     * @param objectContent
+     * @return
+     */
+    public ApiResponse postGroupActivity(String groupId, String verb, String title,
+            String content, String category, User user, Entity object,
+            String objectType, String objectName, String objectContent) {
+        Activity activity = Activity.newActivity(verb, title, content,
+                category, user, object, objectType, objectName, objectContent);
+        return postGroupActivity(groupId, activity);
+    }
+
+    /**
+     * Post an activity to the stream.
+     * 
+     * @param activity
+     * @return
+     */
+    public ApiResponse postActivity(Activity activity) {
+        return createEntity(activity);
+    }
+
+    /**
+     * Creates and posts an activity to a group.
+     * 
+     * @param verb
+     * @param title
+     * @param content
+     * @param category
+     * @param user
+     * @param object
+     * @param objectType
+     * @param objectName
+     * @param objectContent
+     * @return
+     */
+    public ApiResponse postActivity(String verb, String title,
+            String content, String category, User user, Entity object,
+            String objectType, String objectName, String objectContent) {
+        Activity activity = Activity.newActivity(verb, title, content,
+                category, user, object, objectType, objectName, objectContent);
+        return createEntity(activity);
+    }
+    
+    /**
+     * Get a group's activity feed. Returned as a query to ease paging.
+     * 
+     * @param userId
+     * @return
+     */
+    public Query queryActivity() {
+        Query q = queryEntitiesRequest(HttpMethod.GET, null, null,
+               organizationId, applicationId, "activities");
+        return q;
+    }
+
+    
+
+    /**
+     * Get a group's activity feed. Returned as a query to ease paging.
+     * 
+     * @param userId
+     * @return
+     */
+    public Query queryActivityFeedForGroup(String groupId) {
+        Query q = queryEntitiesRequest(HttpMethod.GET, null, null,
+                organizationId,  applicationId, "groups", groupId, "feed");
+        return q;
+    }
+
+    /**
+     * Perform a query request and return a query object. The Query object
+     * provides a simple way of dealing with result sets that need to be
+     * iterated or paged through.
+     * 
+     * @param method
+     * @param params
+     * @param data
+     * @param segments
+     * @return
+     */
+    public Query queryEntitiesRequest(HttpMethod method,
+            Map<String, Object> params, Object data, String... segments) {
+        ApiResponse response = apiRequest(method, params, data, segments);
+        return new EntityQuery(response, method, params, data, segments);
+    }
+
+    /**
+     * Perform a query of the users collection.
+     * 
+     * @return
+     */
+    public Query queryUsers() {
+        Query q = queryEntitiesRequest(HttpMethod.GET, null, null,
+                organizationId,  applicationId, "users");
+        return q;
+    }
+
+    /**
+     * Perform a query of the users collection using the provided query command.
+     * For example: "name contains 'ed'".
+     * 
+     * @param ql
+     * @return
+     */
+    public Query queryUsers(String ql) {
+        Map<String, Object> params = new HashMap<String, Object>();
+        params.put("ql", ql);
+        Query q = queryEntitiesRequest(HttpMethod.GET, params, null,organizationId,
+                applicationId, "users");
+        return q;
+    }
+
+    /**
+     * Perform a query of the users collection within the specified distance of
+     * the specified location and optionally using the provided query command.
+     * For example: "name contains 'ed'".
+     * 
+     * @param distance
+     * @param location
+     * @param ql
+     * @return
+     */
+    public Query queryUsersWithinLocation(float distance, float lattitude,
+            float longitude, String ql) {
+        Map<String, Object> params = new HashMap<String, Object>();
+        params.put("ql",
+                this.makeLocationQL(distance, lattitude, longitude, ql));
+        Query q = queryEntitiesRequest(HttpMethod.GET, params, null, organizationId,
+                applicationId, "users");
+        return q;
+    }
+
+    /**
+     * Queries the users for the specified group.
+     * 
+     * @param groupId
+     * @return
+     */
+    public Query queryUsersForGroup(String groupId) {
+        Query q = queryEntitiesRequest(HttpMethod.GET, null, null, organizationId,
+                applicationId, "groups", groupId, "users");
+        return q;
+    }
+
+    /**
+     * Adds a user to the specified groups.
+     * 
+     * @param userId
+     * @param groupId
+     * @return
+     */
+    public ApiResponse addUserToGroup(String userId, String groupId) {
+        return apiRequest(HttpMethod.POST, null, null, organizationId,  applicationId, "groups",
+                groupId, "users", userId);
+    }
+
+    /**
+     * Creates a group with the specified group path. Group paths can be slash
+     * ("/") delimited like file paths for hierarchical group relationships.
+     * 
+     * @param groupPath
+     * @return
+     */
+    public ApiResponse createGroup(String groupPath) {
+        return createGroup(groupPath, null);
+    }
+
+    /**
+     * Creates a group with the specified group path and group title. Group
+     * paths can be slash ("/") delimited like file paths for hierarchical group
+     * relationships.
+     * 
+     * @param groupPath
+     * @param groupTitle
+     * @return
+     */
+    public ApiResponse createGroup(String groupPath, String groupTitle) {
+     return createGroup(groupPath, groupTitle, null);  
+    }
+    
+    /**
+     * Create a group with a path, title and name
+     * @param groupPath
+     * @param groupTitle
+     * @param groupName
+     * @return
+     */
+    public ApiResponse createGroup(String groupPath, String groupTitle, String groupName){
+        Map<String, Object> data = new HashMap<String, Object>();
+        data.put("type", "group");
+        data.put("path", groupPath);
+        
+        if (groupTitle != null) {
+            data.put("title", groupTitle);
+        }
+        
+        if(groupName != null){
+            data.put("name", groupName);
+        }
+        
+        return apiRequest(HttpMethod.POST, null, data,  organizationId, applicationId, "groups");
+    }
+    
+    /**
+     * Perform a query of the users collection using the provided query command.
+     * For example: "name contains 'ed'".
+     * 
+     * @param ql
+     * @return
+     */
+    public Query queryGroups(String ql) {
+        Map<String, Object> params = new HashMap<String, Object>();
+        params.put("ql", ql);
+        Query q = queryEntitiesRequest(HttpMethod.GET, params, null, organizationId,
+                applicationId, "groups");
+        return q;
+    }
+
+    
+
+    /**
+     * Connect two entities together.
+     * 
+     * @param connectingEntityType
+     * @param connectingEntityId
+     * @param connectionType
+     * @param connectedEntityId
+     * @return
+     */
+    public ApiResponse connectEntities(String connectingEntityType,
+            String connectingEntityId, String connectionType,
+            String connectedEntityId) {
+        return apiRequest(HttpMethod.POST, null, null,  organizationId, applicationId,
+                connectingEntityType, connectingEntityId, connectionType,
+                connectedEntityId);
+    }
+
+    /**
+     * Disconnect two entities.
+     * 
+     * @param connectingEntityType
+     * @param connectingEntityId
+     * @param connectionType
+     * @param connectedEntityId
+     * @return
+     */
+    public ApiResponse disconnectEntities(String connectingEntityType,
+            String connectingEntityId, String connectionType,
+            String connectedEntityId) {
+        return apiRequest(HttpMethod.DELETE, null, null,  organizationId, applicationId,
+                connectingEntityType, connectingEntityId, connectionType,
+                connectedEntityId);
+    }
+
+    /**
+     * Query the connected entities.
+     * 
+     * @param connectingEntityType
+     * @param connectingEntityId
+     * @param connectionType
+     * @param ql
+     * @return
+     */
+    public Query queryEntityConnections(String connectingEntityType,
+            String connectingEntityId, String connectionType, String ql) {
+        Map<String, Object> params = new HashMap<String, Object>();
+        params.put("ql", ql);
+        Query q = queryEntitiesRequest(HttpMethod.GET, params, null,
+                organizationId, applicationId, connectingEntityType, connectingEntityId,
+                connectionType);
+        return q;
+    }
+
+    protected String makeLocationQL(float distance, double lattitude,
+            double longitude, String ql) {
+        String within = String.format("within %d of %d , %d", distance,
+                lattitude, longitude);
+        ql = ql == null ? within : within + " and " + ql;
+        return ql;
+    }
+
+    /**
+     * Query the connected entities within distance of a specific point.
+     * 
+     * @param connectingEntityType
+     * @param connectingEntityId
+     * @param connectionType
+     * @param distance
+     * @param latitude
+     * @param longitude
+     * @return
+     */
+    public Query queryEntityConnectionsWithinLocation(
+            String connectingEntityType, String connectingEntityId,
+            String connectionType, float distance, float lattitude,
+            float longitude, String ql) {
+        Map<String, Object> params = new HashMap<String, Object>();
+        params.put("ql", makeLocationQL(distance, lattitude, longitude, ql));
+        Query q = queryEntitiesRequest(HttpMethod.GET, params, null, organizationId,
+                applicationId, connectingEntityType, connectingEntityId,
+                connectionType);
+        return q;
+    }
+
+    public interface Query {
+
+        public ApiResponse getResponse();
+
+        public boolean more();
+
+        public Query next();
+
+    }
+
+    /**
+     * Query object
+     * 
+     */
+    private class EntityQuery implements Query {
+        final HttpMethod method;
+        final Map<String, Object> params;
+        final Object data;
+        final String[] segments;
+        final ApiResponse response;
+
+        private EntityQuery(ApiResponse response, HttpMethod method,
+                Map<String, Object> params, Object data, String[] segments) {
+            this.response = response;
+            this.method = method;
+            this.params = params;
+            this.data = data;
+            this.segments = segments;
+        }
+
+        private EntityQuery(ApiResponse response, EntityQuery q) {
+            this.response = response;
+            method = q.method;
+            params = q.params;
+            data = q.data;
+            segments = q.segments;
+        }
+
+        /**
+         * @return the api response of the last request
+         */
+        public ApiResponse getResponse() {
+            return response;
+        }
+
+        /**
+         * @return true if the server indicates more results are available
+         */
+        public boolean more() {
+            if ((response != null) && (response.getCursor() != null)
+                    && (response.getCursor().length() > 0)) {
+                return true;
+            }
+            return false;
+        }
+
+        /**
+         * Performs a request for the next set of results
+         * 
+         * @return query that contains results and where to get more from.
+         */
+        public Query next() {
+            if (more()) {
+                Map<String, Object> nextParams = null;
+                if (params != null) {
+                    nextParams = new HashMap<String, Object>(params);
+                } else {
+                    nextParams = new HashMap<String, Object>();
+                }
+                nextParams.put("cursor", response.getCursor());
+                ApiResponse nextResponse = apiRequest(method, nextParams, data,
+                        segments);
+                return new EntityQuery(nextResponse, this);
+            }
+            return null;
+        }
+
+    }
+
+    private String normalizeQueuePath(String path) {
+        return arrayToDelimitedString(
+                tokenizeToStringArray(path, "/", true, true), "/");
+    }
+
+    public ApiResponse postMessage(String path, Map<String, Object> message) {
+        return apiRequest(HttpMethod.POST, null, message, organizationId,  applicationId,
+                "queues", normalizeQueuePath(path));
+    }
+
+    public ApiResponse postMessage(String path,
+            List<Map<String, Object>> messages) {
+        return apiRequest(HttpMethod.POST, null, messages,  organizationId, applicationId,
+                "queues", normalizeQueuePath(path));
+    }
+
+    public enum QueuePosition {
+        START("start"), END("end"), LAST("last"), CONSUMER("consumer");
+
+        private final String shortName;
+
+        QueuePosition(String shortName) {
+            this.shortName = shortName;
+        }
+
+        static Map<String, QueuePosition> nameMap = new ConcurrentHashMap<String, QueuePosition>();
+
+        static {
+            for (QueuePosition op : EnumSet.allOf(QueuePosition.class)) {
+                if (op.shortName != null) {
+                    nameMap.put(op.shortName, op);
+                }
+            }
+        }
+
+        public static QueuePosition find(String s) {
+            if (s == null) {
+                return null;
+            }
+            return nameMap.get(s);
+        }
+
+        @Override
+        public String toString() {
+            return shortName;
+        }
+    }
+
+    public ApiResponse getMessages(String path, String consumer, UUID last,
+            Long time, Integer prev, Integer next, Integer limit,
+            QueuePosition pos, Boolean update, Boolean sync) {
+        Map<String, Object> params = new HashMap<String, Object>();
+        if (consumer != null) {
+            params.put("consumer", consumer);
+        }
+        if (last != null) {
+            params.put("last", last);
+        }
+        if (time != null) {
+            params.put("time", time);
+        }
+        if (prev != null) {
+            params.put("prev", prev);
+        }
+        if (next != null) {
+            params.put("next", next);
+        }
+        if (limit != null) {
+            params.put("limit", limit);
+        }
+        if (pos != null) {
+            params.put("pos", pos.toString());
+        }
+        if (update != null) {
+            params.put("update", update);
+        }
+        if (sync != null) {
+            params.put("synchronized", sync);
+        }
+        return apiRequest(HttpMethod.GET, params, null,  organizationId, applicationId,
+                "queues", normalizeQueuePath(path));
+    }
+
+    public ApiResponse addSubscriber(String publisherQueue,
+            String subscriberQueue) {
+        return apiRequest(HttpMethod.POST, null, null, organizationId,  applicationId, "queues",
+                normalizeQueuePath(publisherQueue), "subscribers",
+                normalizeQueuePath(subscriberQueue));
+    }
+
+    public ApiResponse removeSubscriber(String publisherQueue,
+            String subscriberQueue) {
+        return apiRequest(HttpMethod.DELETE, null, null, organizationId,  applicationId,
+                "queues", normalizeQueuePath(publisherQueue), "subscribers",
+                normalizeQueuePath(subscriberQueue));
+    }
+
+    private class QueueQuery implements Query {
+        final HttpMethod method;
+        final Map<String, Object> params;
+        final Object data;
+        final String queuePath;
+        final ApiResponse response;
+
+        private QueueQuery(ApiResponse response, HttpMethod method,
+                Map<String, Object> params, Object data, String queuePath) {
+            this.response = response;
+            this.method = method;
+            this.params = params;
+            this.data = data;
+            this.queuePath = normalizeQueuePath(queuePath);
+        }
+
+        private QueueQuery(ApiResponse response, QueueQuery q) {
+            this.response = response;
+            method = q.method;
+            params = q.params;
+            data = q.data;
+            queuePath = q.queuePath;
+        }
+
+        /**
+         * @return the api response of the last request
+         */
+        public ApiResponse getResponse() {
+            return response;
+        }
+
+        /**
+         * @return true if the server indicates more results are available
+         */
+        public boolean more() {
+            if ((response != null) && (response.getCursor() != null)
+                    && (response.getCursor().length() > 0)) {
+                return true;
+            }
+            return false;
+        }
+
+        /**
+         * Performs a request for the next set of results
+         * 
+         * @return query that contains results and where to get more from.
+         */
+        public Query next() {
+            if (more()) {
+                Map<String, Object> nextParams = null;
+                if (params != null) {
+                    nextParams = new HashMap<String, Object>(params);
+                } else {
+                    nextParams = new HashMap<String, Object>();
+                }
+                nextParams.put("start", response.getCursor());
+                ApiResponse nextResponse = apiRequest(method, nextParams, data,
+                        queuePath);
+                return new QueueQuery(nextResponse, this);
+            }
+            return null;
+        }
+
+    }
+
+    public Query queryQueuesRequest(HttpMethod method,
+            Map<String, Object> params, Object data, String queuePath) {
+        ApiResponse response = apiRequest(method, params, data, queuePath);
+        return new QueueQuery(response, method, params, data, queuePath);
+    }
+
+}


[80/96] [abbrv] USERGRID-2 package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/response/class-use/ApiResponse.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/response/class-use/ApiResponse.html b/sdks/android/doc/org/usergrid/android/client/response/class-use/ApiResponse.html
index 62328c9..2f479cc 100644
--- a/sdks/android/doc/org/usergrid/android/client/response/class-use/ApiResponse.html
+++ b/sdks/android/doc/org/usergrid/android/client/response/class-use/ApiResponse.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Class org.usergrid.android.client.response.ApiResponse
+Uses of Class org.apache.usergrid.android.client.response.ApiResponse
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Class org.usergrid.android.client.response.ApiResponse
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Class org.usergrid.android.client.response.ApiResponse";
+        parent.document.title="Uses of Class org.apache.usergrid.android.client.response.ApiResponse";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,30 +81,30 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Class<br>org.usergrid.android.client.response.ApiResponse</B></H2>
+<B>Uses of Class<br>org.apache.usergrid.android.client.response.ApiResponse</B></H2>
 </CENTER>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Packages that use <A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></FONT></TH>
+Packages that use <A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client"><B>org.usergrid.android.client</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client"><B>org.apache.usergrid.android.client</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client.callbacks"><B>org.usergrid.android.client.callbacks</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client.callbacks"><B>org.apache.usergrid.android.client.callbacks</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A> in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A></FONT></TH>
+Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A> in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -112,11 +112,11 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ApiRespo
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A> that return <A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A> that return <A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#addSubscriber(java.lang.String, java.lang.String)">addSubscriber</A></B>(java.lang.String&nbsp;publisherQueue,
               java.lang.String&nbsp;subscriberQueue)</CODE>
 
@@ -125,7 +125,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ApiRespo
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#addUserToGroup(java.lang.String, java.lang.String)">addUserToGroup</A></B>(java.lang.String&nbsp;userId,
                java.lang.String&nbsp;groupId)</CODE>
 
@@ -134,7 +134,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ApiRespo
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#apiRequest(org.springframework.http.HttpMethod, java.util.Map, java.lang.Object, java.lang.String...)">apiRequest</A></B>(org.springframework.http.HttpMethod&nbsp;method,
            java.util.Map&lt;java.lang.String,java.lang.Object&gt;&nbsp;params,
            java.lang.Object&nbsp;data,
@@ -145,7 +145,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ApiRespo
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#authorizeAppClient(java.lang.String, java.lang.String)">authorizeAppClient</A></B>(java.lang.String&nbsp;clientId,
                    java.lang.String&nbsp;clientSecret)</CODE>
 
@@ -154,7 +154,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ApiRespo
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#authorizeAppUser(java.lang.String, java.lang.String)">authorizeAppUser</A></B>(java.lang.String&nbsp;email,
                  java.lang.String&nbsp;password)</CODE>
 
@@ -163,7 +163,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ApiRespo
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#authorizeAppUserViaFacebook(java.lang.String)">authorizeAppUserViaFacebook</A></B>(java.lang.String&nbsp;fb_access_token)</CODE>
 
 <BR>
@@ -172,7 +172,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ApiRespo
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#authorizeAppUserViaPin(java.lang.String, java.lang.String)">authorizeAppUserViaPin</A></B>(java.lang.String&nbsp;email,
                        java.lang.String&nbsp;pin)</CODE>
 
@@ -181,7 +181,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ApiRespo
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#connectEntities(java.lang.String, java.lang.String, java.lang.String, java.lang.String)">connectEntities</A></B>(java.lang.String&nbsp;connectingEntityType,
                 java.lang.String&nbsp;connectingEntityId,
                 java.lang.String&nbsp;connectionType,
@@ -192,15 +192,15 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ApiRespo
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#createEntity(org.usergrid.android.client.entities.Entity)">createEntity</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;entity)</CODE>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#createEntity(org.apache.usergrid.android.client.entities.Entity)">createEntity</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;entity)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a new entity on the server.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#createEntity(java.util.Map)">createEntity</A></B>(java.util.Map&lt;java.lang.String,java.lang.Object&gt;&nbsp;properties)</CODE>
 
 <BR>
@@ -208,7 +208,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ApiRespo
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#createGroup(java.lang.String)">createGroup</A></B>(java.lang.String&nbsp;groupPath)</CODE>
 
 <BR>
@@ -216,7 +216,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ApiRespo
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#createGroup(java.lang.String, java.lang.String)">createGroup</A></B>(java.lang.String&nbsp;groupPath,
             java.lang.String&nbsp;groupTitle)</CODE>
 
@@ -225,7 +225,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ApiRespo
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#createUser(java.lang.String, java.lang.String, java.lang.String, java.lang.String)">createUser</A></B>(java.lang.String&nbsp;username,
            java.lang.String&nbsp;name,
            java.lang.String&nbsp;email,
@@ -236,7 +236,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ApiRespo
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#disconnectEntities(java.lang.String, java.lang.String, java.lang.String, java.lang.String)">disconnectEntities</A></B>(java.lang.String&nbsp;connectingEntityType,
                    java.lang.String&nbsp;connectingEntityId,
                    java.lang.String&nbsp;connectionType,
@@ -247,15 +247,15 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ApiRespo
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#getMessages(java.lang.String, java.lang.String, java.util.UUID, java.lang.Long, java.lang.Integer, java.lang.Integer, java.lang.Integer, org.usergrid.android.client.Client.QueuePosition, java.lang.Boolean, java.lang.Boolean)">getMessages</A></B>(java.lang.String&nbsp;path,
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#getMessages(java.lang.String, java.lang.String, java.util.UUID, java.lang.Long, java.lang.Integer, java.lang.Integer, java.lang.Integer, org.apache.usergrid.android.client.Client.QueuePosition, java.lang.Boolean, java.lang.Boolean)">getMessages</A></B>(java.lang.String&nbsp;path,
             java.lang.String&nbsp;consumer,
             java.util.UUID&nbsp;last,
             java.lang.Long&nbsp;time,
             java.lang.Integer&nbsp;prev,
             java.lang.Integer&nbsp;next,
             java.lang.Integer&nbsp;limit,
-            <A HREF="../../../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.usergrid.android.client">Client.QueuePosition</A>&nbsp;pos,
+            <A HREF="../../../../../../org/usergrid/android/client/Client.QueuePosition.html" title="enum in org.apache.usergrid.android.client">Client.QueuePosition</A>&nbsp;pos,
             java.lang.Boolean&nbsp;update,
             java.lang.Boolean&nbsp;sync)</CODE>
 
@@ -264,7 +264,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ApiRespo
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B>Client.Query.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.Query.html#getResponse()">getResponse</A></B>()</CODE>
 
 <BR>
@@ -272,22 +272,22 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ApiRespo
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postGroupActivity(java.lang.String, org.usergrid.android.client.entities.Activity)">postGroupActivity</A></B>(java.lang.String&nbsp;groupId,
-                  <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>&nbsp;activity)</CODE>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postGroupActivity(java.lang.String, org.apache.usergrid.android.client.entities.Activity)">postGroupActivity</A></B>(java.lang.String&nbsp;groupId,
+                  <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>&nbsp;activity)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Posts an activity to a group.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postGroupActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.entities.User, org.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)">postGroupActivity</A></B>(java.lang.String&nbsp;verb,
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postGroupActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.entities.User, org.apache.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)">postGroupActivity</A></B>(java.lang.String&nbsp;verb,
                   java.lang.String&nbsp;title,
                   java.lang.String&nbsp;content,
                   java.lang.String&nbsp;category,
-                  <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>&nbsp;user,
-                  <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;object,
+                  <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>&nbsp;user,
+                  <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;object,
                   java.lang.String&nbsp;objectType,
                   java.lang.String&nbsp;objectName,
                   java.lang.String&nbsp;objectContent)</CODE>
@@ -297,7 +297,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ApiRespo
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postMessage(java.lang.String, java.util.List)">postMessage</A></B>(java.lang.String&nbsp;path,
             java.util.List&lt;java.util.Map&lt;java.lang.String,java.lang.Object&gt;&gt;&nbsp;messages)</CODE>
 
@@ -306,7 +306,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ApiRespo
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postMessage(java.lang.String, java.util.Map)">postMessage</A></B>(java.lang.String&nbsp;path,
             java.util.Map&lt;java.lang.String,java.lang.Object&gt;&nbsp;message)</CODE>
 
@@ -315,22 +315,22 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ApiRespo
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postUserActivity(java.lang.String, org.usergrid.android.client.entities.Activity)">postUserActivity</A></B>(java.lang.String&nbsp;userId,
-                 <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>&nbsp;activity)</CODE>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postUserActivity(java.lang.String, org.apache.usergrid.android.client.entities.Activity)">postUserActivity</A></B>(java.lang.String&nbsp;userId,
+                 <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>&nbsp;activity)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Posts an activity to a user.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postUserActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.entities.User, org.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)">postUserActivity</A></B>(java.lang.String&nbsp;verb,
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postUserActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.entities.User, org.apache.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)">postUserActivity</A></B>(java.lang.String&nbsp;verb,
                  java.lang.String&nbsp;title,
                  java.lang.String&nbsp;content,
                  java.lang.String&nbsp;category,
-                 <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>&nbsp;user,
-                 <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;object,
+                 <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>&nbsp;user,
+                 <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;object,
                  java.lang.String&nbsp;objectType,
                  java.lang.String&nbsp;objectName,
                  java.lang.String&nbsp;objectContent)</CODE>
@@ -340,7 +340,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ApiRespo
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#removeSubscriber(java.lang.String, java.lang.String)">removeSubscriber</A></B>(java.lang.String&nbsp;publisherQueue,
                  java.lang.String&nbsp;subscriberQueue)</CODE>
 
@@ -350,11 +350,11 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ApiRespo
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client.callbacks"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client.callbacks"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A> in <A HREF="../../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.usergrid.android.client.callbacks</A></FONT></TH>
+Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A> in <A HREF="../../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.apache.usergrid.android.client.callbacks</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -362,12 +362,12 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ApiRespo
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.usergrid.android.client.callbacks</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.apache.usergrid.android.client.callbacks</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>ApiResponseCallback.</B><B><A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html#onResponse(org.usergrid.android.client.response.ApiResponse)">onResponse</A></B>(<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A>&nbsp;response)</CODE>
+<TD><CODE><B>ApiResponseCallback.</B><B><A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html#onResponse(org.apache.usergrid.android.client.response.ApiResponse)">onResponse</A></B>(<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A>&nbsp;response)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -389,7 +389,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ApiRespo
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/response/class-use/ClientCredentialsInfo.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/response/class-use/ClientCredentialsInfo.html b/sdks/android/doc/org/usergrid/android/client/response/class-use/ClientCredentialsInfo.html
index db03b16..114c374 100644
--- a/sdks/android/doc/org/usergrid/android/client/response/class-use/ClientCredentialsInfo.html
+++ b/sdks/android/doc/org/usergrid/android/client/response/class-use/ClientCredentialsInfo.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Class org.usergrid.android.client.response.ClientCredentialsInfo
+Uses of Class org.apache.usergrid.android.client.response.ClientCredentialsInfo
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Class org.usergrid.android.client.response.ClientCredentialsInfo
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Class org.usergrid.android.client.response.ClientCredentialsInfo";
+        parent.document.title="Uses of Class org.apache.usergrid.android.client.response.ClientCredentialsInfo";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,26 +81,26 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Class<br>org.usergrid.android.client.response.ClientCredentialsInfo</B></H2>
+<B>Uses of Class<br>org.apache.usergrid.android.client.response.ClientCredentialsInfo</B></H2>
 </CENTER>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Packages that use <A HREF="../../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response">ClientCredentialsInfo</A></FONT></TH>
+Packages that use <A HREF="../../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response">ClientCredentialsInfo</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client.response"><B>org.usergrid.android.client.response</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client.response"><B>org.apache.usergrid.android.client.response</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client.response"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client.response"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response">ClientCredentialsInfo</A> in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A></FONT></TH>
+Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response">ClientCredentialsInfo</A> in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -108,11 +108,11 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ClientCr
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A> that return <A HREF="../../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response">ClientCredentialsInfo</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A> that return <A HREF="../../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response">ClientCredentialsInfo</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response">ClientCredentialsInfo</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response">ClientCredentialsInfo</A></CODE></FONT></TD>
 <TD><CODE><B>ApiResponse.</B><B><A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html#getCredentials()">getCredentials</A></B>()</CODE>
 
 <BR>
@@ -124,12 +124,12 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ClientCr
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response">ClientCredentialsInfo</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response">ClientCredentialsInfo</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>ApiResponse.</B><B><A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html#setCredentials(org.usergrid.android.client.response.ClientCredentialsInfo)">setCredentials</A></B>(<A HREF="../../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response">ClientCredentialsInfo</A>&nbsp;credentials)</CODE>
+<TD><CODE><B>ApiResponse.</B><B><A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html#setCredentials(org.apache.usergrid.android.client.response.ClientCredentialsInfo)">setCredentials</A></B>(<A HREF="../../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response">ClientCredentialsInfo</A>&nbsp;credentials)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -151,7 +151,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/ClientCr
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/response/class-use/QueueInfo.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/response/class-use/QueueInfo.html b/sdks/android/doc/org/usergrid/android/client/response/class-use/QueueInfo.html
index 91798c0..c97939a 100644
--- a/sdks/android/doc/org/usergrid/android/client/response/class-use/QueueInfo.html
+++ b/sdks/android/doc/org/usergrid/android/client/response/class-use/QueueInfo.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Class org.usergrid.android.client.response.QueueInfo
+Uses of Class org.apache.usergrid.android.client.response.QueueInfo
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Class org.usergrid.android.client.response.QueueInfo
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Class org.usergrid.android.client.response.QueueInfo";
+        parent.document.title="Uses of Class org.apache.usergrid.android.client.response.QueueInfo";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,26 +81,26 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Class<br>org.usergrid.android.client.response.QueueInfo</B></H2>
+<B>Uses of Class<br>org.apache.usergrid.android.client.response.QueueInfo</B></H2>
 </CENTER>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Packages that use <A HREF="../../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response">QueueInfo</A></FONT></TH>
+Packages that use <A HREF="../../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response">QueueInfo</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client.response"><B>org.usergrid.android.client.response</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client.response"><B>org.apache.usergrid.android.client.response</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client.response"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client.response"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response">QueueInfo</A> in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A></FONT></TH>
+Uses of <A HREF="../../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response">QueueInfo</A> in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -108,11 +108,11 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/QueueInf
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A> that return <A HREF="../../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response">QueueInfo</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A> that return <A HREF="../../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response">QueueInfo</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response">QueueInfo</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response">QueueInfo</A></CODE></FONT></TD>
 <TD><CODE><B>ApiResponse.</B><B><A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html#getFirstQueue()">getFirstQueue</A></B>()</CODE>
 
 <BR>
@@ -120,7 +120,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/QueueInf
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response">QueueInfo</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response">QueueInfo</A></CODE></FONT></TD>
 <TD><CODE><B>ApiResponse.</B><B><A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html#getLastQueue()">getLastQueue</A></B>()</CODE>
 
 <BR>
@@ -132,11 +132,11 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/QueueInf
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A> that return types with arguments of type <A HREF="../../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response">QueueInfo</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A> that return types with arguments of type <A HREF="../../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response">QueueInfo</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response">QueueInfo</A>&gt;</CODE></FONT></TD>
+<CODE>&nbsp;java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response">QueueInfo</A>&gt;</CODE></FONT></TD>
 <TD><CODE><B>ApiResponse.</B><B><A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html#getQueues()">getQueues</A></B>()</CODE>
 
 <BR>
@@ -148,12 +148,12 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/QueueInf
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Method parameters in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A> with type arguments of type <A HREF="../../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response">QueueInfo</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Method parameters in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A> with type arguments of type <A HREF="../../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response">QueueInfo</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>ApiResponse.</B><B><A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html#setQueues(java.util.List)">setQueues</A></B>(java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response">QueueInfo</A>&gt;&nbsp;queues)</CODE>
+<TD><CODE><B>ApiResponse.</B><B><A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html#setQueues(java.util.List)">setQueues</A></B>(java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response">QueueInfo</A>&gt;&nbsp;queues)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -175,7 +175,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/response/QueueInf
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/response/package-frame.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/response/package-frame.html b/sdks/android/doc/org/usergrid/android/client/response/package-frame.html
index 2ddf18e..6b64314 100644
--- a/sdks/android/doc/org/usergrid/android/client/response/package-frame.html
+++ b/sdks/android/doc/org/usergrid/android/client/response/package-frame.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-org.usergrid.android.client.response
+org.apache.usergrid.android.client.response
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -16,22 +16,22 @@ org.usergrid.android.client.response
 
 <BODY BGCOLOR="white">
 <FONT size="+1" CLASS="FrameTitleFont">
-<A HREF="../../../../../org/usergrid/android/client/response/package-summary.html" target="classFrame">org.usergrid.android.client.response</A></FONT>
+<A HREF="../../../../../org/usergrid/android/client/response/package-summary.html" target="classFrame">org.apache.usergrid.android.client.response</A></FONT>
 <TABLE BORDER="0" WIDTH="100%" SUMMARY="">
 <TR>
 <TD NOWRAP><FONT size="+1" CLASS="FrameHeadingFont">
 Classes</FONT>&nbsp;
 <FONT CLASS="FrameItemFont">
 <BR>
-<A HREF="AggregateCounter.html" title="class in org.usergrid.android.client.response" target="classFrame">AggregateCounter</A>
+<A HREF="AggregateCounter.html" title="class in org.apache.usergrid.android.client.response" target="classFrame">AggregateCounter</A>
 <BR>
-<A HREF="AggregateCounterSet.html" title="class in org.usergrid.android.client.response" target="classFrame">AggregateCounterSet</A>
+<A HREF="AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response" target="classFrame">AggregateCounterSet</A>
 <BR>
-<A HREF="ApiResponse.html" title="class in org.usergrid.android.client.response" target="classFrame">ApiResponse</A>
+<A HREF="ApiResponse.html" title="class in org.apache.usergrid.android.client.response" target="classFrame">ApiResponse</A>
 <BR>
-<A HREF="ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response" target="classFrame">ClientCredentialsInfo</A>
+<A HREF="ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response" target="classFrame">ClientCredentialsInfo</A>
 <BR>
-<A HREF="QueueInfo.html" title="class in org.usergrid.android.client.response" target="classFrame">QueueInfo</A></FONT></TD>
+<A HREF="QueueInfo.html" title="class in org.apache.usergrid.android.client.response" target="classFrame">QueueInfo</A></FONT></TD>
 </TR>
 </TABLE>
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/response/package-summary.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/response/package-summary.html b/sdks/android/doc/org/usergrid/android/client/response/package-summary.html
index 8aa0fa8..9ae6c1c 100644
--- a/sdks/android/doc/org/usergrid/android/client/response/package-summary.html
+++ b/sdks/android/doc/org/usergrid/android/client/response/package-summary.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-org.usergrid.android.client.response
+org.apache.usergrid.android.client.response
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ org.usergrid.android.client.response
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="org.usergrid.android.client.response";
+        parent.document.title="org.apache.usergrid.android.client.response";
     }
 }
 </SCRIPT>
@@ -80,7 +80,7 @@ function windowTitle()
 
 <HR>
 <H2>
-Package org.usergrid.android.client.response
+Package org.apache.usergrid.android.client.response
 </H2>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
@@ -89,23 +89,23 @@ Package org.usergrid.android.client.response
 <B>Class Summary</B></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response">AggregateCounter</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response">AggregateCounter</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response">AggregateCounterSet</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response">AggregateCounterSet</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response">ClientCredentialsInfo</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response">ClientCredentialsInfo</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.usergrid.android.client.response">QueueInfo</A></B></TD>
+<TD WIDTH="15%"><B><A HREF="../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response">QueueInfo</A></B></TD>
 <TD>&nbsp;</TD>
 </TR>
 </TABLE>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/response/package-tree.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/response/package-tree.html b/sdks/android/doc/org/usergrid/android/client/response/package-tree.html
index b539912..69c40bd 100644
--- a/sdks/android/doc/org/usergrid/android/client/response/package-tree.html
+++ b/sdks/android/doc/org/usergrid/android/client/response/package-tree.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-org.usergrid.android.client.response Class Hierarchy
+org.apache.usergrid.android.client.response Class Hierarchy
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ org.usergrid.android.client.response Class Hierarchy
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="org.usergrid.android.client.response Class Hierarchy";
+        parent.document.title="org.apache.usergrid.android.client.response Class Hierarchy";
     }
 }
 </SCRIPT>
@@ -81,7 +81,7 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-Hierarchy For Package org.usergrid.android.client.response
+Hierarchy For Package org.apache.usergrid.android.client.response
 </H2>
 </CENTER>
 <DL>
@@ -92,7 +92,7 @@ Class Hierarchy
 </H2>
 <UL>
 <LI TYPE="circle">java.lang.Object<UL>
-<LI TYPE="circle">org.usergrid.android.client.response.<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.usergrid.android.client.response"><B>AggregateCounter</B></A><LI TYPE="circle">org.usergrid.android.client.response.<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.usergrid.android.client.response"><B>AggregateCounterSet</B></A><LI TYPE="circle">org.usergrid.android.client.response.<A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response"><B>ApiResponse</B></A><LI TYPE="circle">org.usergrid.android.client.response.<A HREF="../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.usergrid.android.client.response"><B>ClientCredentialsInfo</B></A><LI TYPE="circle">org.usergrid.android.client.response.<A HREF="../../../../../org/usergrid/android/client/resp
 onse/QueueInfo.html" title="class in org.usergrid.android.client.response"><B>QueueInfo</B></A></UL>
+<LI TYPE="circle">org.apache.usergrid.android.client.response.<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounter.html" title="class in org.apache.usergrid.android.client.response"><B>AggregateCounter</B></A><LI TYPE="circle">org.apache.usergrid.android.client.response.<A HREF="../../../../../org/usergrid/android/client/response/AggregateCounterSet.html" title="class in org.apache.usergrid.android.client.response"><B>AggregateCounterSet</B></A><LI TYPE="circle">org.apache.usergrid.android.client.response.<A HREF="../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response"><B>ApiResponse</B></A><LI TYPE="circle">org.apache.usergrid.android.client.response.<A HREF="../../../../../org/usergrid/android/client/response/ClientCredentialsInfo.html" title="class in org.apache.usergrid.android.client.response"><B>ClientCredentialsInfo</B></A><LI TYPE="circle">org.apache.usergrid.android.client.re
 sponse.<A HREF="../../../../../org/usergrid/android/client/response/QueueInfo.html" title="class in org.apache.usergrid.android.client.response"><B>QueueInfo</B></A></UL>
 </UL>
 <HR>
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/response/package-use.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/response/package-use.html b/sdks/android/doc/org/usergrid/android/client/response/package-use.html
index c777bd3..0fdb799 100644
--- a/sdks/android/doc/org/usergrid/android/client/response/package-use.html
+++ b/sdks/android/doc/org/usergrid/android/client/response/package-use.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Package org.usergrid.android.client.response
+Uses of Package org.apache.usergrid.android.client.response
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Package org.usergrid.android.client.response
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Package org.usergrid.android.client.response";
+        parent.document.title="Uses of Package org.apache.usergrid.android.client.response";
     }
 }
 </SCRIPT>
@@ -81,37 +81,37 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Package<br>org.usergrid.android.client.response</B></H2>
+<B>Uses of Package<br>org.apache.usergrid.android.client.response</B></H2>
 </CENTER>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Packages that use <A HREF="../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A></FONT></TH>
+Packages that use <A HREF="../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client"><B>org.usergrid.android.client</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client"><B>org.apache.usergrid.android.client</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client.callbacks"><B>org.usergrid.android.client.callbacks</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client.callbacks"><B>org.apache.usergrid.android.client.callbacks</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client.response"><B>org.usergrid.android.client.response</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client.response"><B>org.apache.usergrid.android.client.response</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Classes in <A HREF="../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A> used by <A HREF="../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A></FONT></TH>
+Classes in <A HREF="../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A> used by <A HREF="../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../../org/usergrid/android/client/response/class-use/ApiResponse.html#org.usergrid.android.client"><B>ApiResponse</B></A></B>
+<TD><B><A HREF="../../../../../org/usergrid/android/client/response/class-use/ApiResponse.html#org.apache.usergrid.android.client"><B>ApiResponse</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -119,14 +119,14 @@ Classes in <A HREF="../../../../../org/usergrid/android/client/response/package-
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client.callbacks"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client.callbacks"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Classes in <A HREF="../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A> used by <A HREF="../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.usergrid.android.client.callbacks</A></FONT></TH>
+Classes in <A HREF="../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A> used by <A HREF="../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.apache.usergrid.android.client.callbacks</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../../org/usergrid/android/client/response/class-use/ApiResponse.html#org.usergrid.android.client.callbacks"><B>ApiResponse</B></A></B>
+<TD><B><A HREF="../../../../../org/usergrid/android/client/response/class-use/ApiResponse.html#org.apache.usergrid.android.client.callbacks"><B>ApiResponse</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -134,32 +134,32 @@ Classes in <A HREF="../../../../../org/usergrid/android/client/response/package-
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client.response"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client.response"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Classes in <A HREF="../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A> used by <A HREF="../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A></FONT></TH>
+Classes in <A HREF="../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A> used by <A HREF="../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../../org/usergrid/android/client/response/class-use/AggregateCounter.html#org.usergrid.android.client.response"><B>AggregateCounter</B></A></B>
+<TD><B><A HREF="../../../../../org/usergrid/android/client/response/class-use/AggregateCounter.html#org.apache.usergrid.android.client.response"><B>AggregateCounter</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../../org/usergrid/android/client/response/class-use/AggregateCounterSet.html#org.usergrid.android.client.response"><B>AggregateCounterSet</B></A></B>
+<TD><B><A HREF="../../../../../org/usergrid/android/client/response/class-use/AggregateCounterSet.html#org.apache.usergrid.android.client.response"><B>AggregateCounterSet</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../../org/usergrid/android/client/response/class-use/ClientCredentialsInfo.html#org.usergrid.android.client.response"><B>ClientCredentialsInfo</B></A></B>
+<TD><B><A HREF="../../../../../org/usergrid/android/client/response/class-use/ClientCredentialsInfo.html#org.apache.usergrid.android.client.response"><B>ClientCredentialsInfo</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><B><A HREF="../../../../../org/usergrid/android/client/response/class-use/QueueInfo.html#org.usergrid.android.client.response"><B>QueueInfo</B></A></B>
+<TD><B><A HREF="../../../../../org/usergrid/android/client/response/class-use/QueueInfo.html#org.apache.usergrid.android.client.response"><B>QueueInfo</B></A></B>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/utils/DeviceUuidFactory.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/utils/DeviceUuidFactory.html b/sdks/android/doc/org/usergrid/android/client/utils/DeviceUuidFactory.html
index ee499d6..40b5d83 100644
--- a/sdks/android/doc/org/usergrid/android/client/utils/DeviceUuidFactory.html
+++ b/sdks/android/doc/org/usergrid/android/client/utils/DeviceUuidFactory.html
@@ -56,7 +56,7 @@ function windowTitle()
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 &nbsp;PREV CLASS&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.usergrid.android.client.utils"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.apache.usergrid.android.client.utils"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/utils/DeviceUuidFactory.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="DeviceUuidFactory.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
@@ -88,12 +88,12 @@ DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&n
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client.utils</FONT>
+org.apache.usergrid.android.client.utils</FONT>
 <BR>
 Class DeviceUuidFactory</H2>
 <PRE>
 java.lang.Object
-  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.usergrid.android.client.utils.DeviceUuidFactory</B>
+  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.usergrid.android.client.utils.DeviceUuidFactory</B>
 </PRE>
 <HR>
 <DL>
@@ -251,7 +251,7 @@ public java.util.UUID <B>getDeviceUuid</B>()</PRE>
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 &nbsp;PREV CLASS&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.usergrid.android.client.utils"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.apache.usergrid.android.client.utils"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/utils/DeviceUuidFactory.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="DeviceUuidFactory.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/utils/JsonUtils.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/utils/JsonUtils.html b/sdks/android/doc/org/usergrid/android/client/utils/JsonUtils.html
index b3249b8..20b8e5b 100644
--- a/sdks/android/doc/org/usergrid/android/client/utils/JsonUtils.html
+++ b/sdks/android/doc/org/usergrid/android/client/utils/JsonUtils.html
@@ -55,8 +55,8 @@ function windowTitle()
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/DeviceUuidFactory.html" title="class in org.usergrid.android.client.utils"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/MapUtils.html" title="class in org.usergrid.android.client.utils"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/DeviceUuidFactory.html" title="class in org.apache.usergrid.android.client.utils"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/MapUtils.html" title="class in org.apache.usergrid.android.client.utils"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/utils/JsonUtils.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="JsonUtils.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
@@ -88,12 +88,12 @@ DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&n
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client.utils</FONT>
+org.apache.usergrid.android.client.utils</FONT>
 <BR>
 Class JsonUtils</H2>
 <PRE>
 java.lang.Object
-  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.usergrid.android.client.utils.JsonUtils</B>
+  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.usergrid.android.client.utils.JsonUtils</B>
 </PRE>
 <HR>
 <DL>
@@ -521,8 +521,8 @@ public static void <B>setObjectProperty</B>(java.util.Map&lt;java.lang.String,or
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/DeviceUuidFactory.html" title="class in org.usergrid.android.client.utils"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/MapUtils.html" title="class in org.usergrid.android.client.utils"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/DeviceUuidFactory.html" title="class in org.apache.usergrid.android.client.utils"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/MapUtils.html" title="class in org.apache.usergrid.android.client.utils"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/utils/JsonUtils.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="JsonUtils.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/utils/MapUtils.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/utils/MapUtils.html b/sdks/android/doc/org/usergrid/android/client/utils/MapUtils.html
index f1ccae2..8734258 100644
--- a/sdks/android/doc/org/usergrid/android/client/utils/MapUtils.html
+++ b/sdks/android/doc/org/usergrid/android/client/utils/MapUtils.html
@@ -55,8 +55,8 @@ function windowTitle()
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.usergrid.android.client.utils"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.usergrid.android.client.utils"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.apache.usergrid.android.client.utils"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.apache.usergrid.android.client.utils"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/utils/MapUtils.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="MapUtils.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
@@ -88,12 +88,12 @@ DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&n
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client.utils</FONT>
+org.apache.usergrid.android.client.utils</FONT>
 <BR>
 Class MapUtils</H2>
 <PRE>
 java.lang.Object
-  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.usergrid.android.client.utils.MapUtils</B>
+  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.usergrid.android.client.utils.MapUtils</B>
 </PRE>
 <HR>
 <DL>
@@ -226,8 +226,8 @@ public static &lt;T&gt; java.util.Map&lt;java.lang.String,T&gt; <B>newMapWithout
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.usergrid.android.client.utils"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.usergrid.android.client.utils"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/JsonUtils.html" title="class in org.apache.usergrid.android.client.utils"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/ObjectUtils.html" title="class in org.apache.usergrid.android.client.utils"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/utils/MapUtils.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="MapUtils.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/utils/ObjectUtils.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/utils/ObjectUtils.html b/sdks/android/doc/org/usergrid/android/client/utils/ObjectUtils.html
index f4f63c0..588063e 100644
--- a/sdks/android/doc/org/usergrid/android/client/utils/ObjectUtils.html
+++ b/sdks/android/doc/org/usergrid/android/client/utils/ObjectUtils.html
@@ -55,8 +55,8 @@ function windowTitle()
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/MapUtils.html" title="class in org.usergrid.android.client.utils"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/UrlUtils.html" title="class in org.usergrid.android.client.utils"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/MapUtils.html" title="class in org.apache.usergrid.android.client.utils"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/UrlUtils.html" title="class in org.apache.usergrid.android.client.utils"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/utils/ObjectUtils.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="ObjectUtils.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
@@ -88,12 +88,12 @@ DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&n
 <!-- ======== START OF CLASS DATA ======== -->
 <H2>
 <FONT SIZE="-1">
-org.usergrid.android.client.utils</FONT>
+org.apache.usergrid.android.client.utils</FONT>
 <BR>
 Class ObjectUtils</H2>
 <PRE>
 java.lang.Object
-  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.usergrid.android.client.utils.ObjectUtils</B>
+  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.usergrid.android.client.utils.ObjectUtils</B>
 </PRE>
 <HR>
 <DL>
@@ -217,8 +217,8 @@ public static boolean <B>isEmpty</B>(java.lang.Object&nbsp;s)</PRE>
 
 <TR>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/MapUtils.html" title="class in org.usergrid.android.client.utils"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/UrlUtils.html" title="class in org.usergrid.android.client.utils"><B>NEXT CLASS</B></A></FONT></TD>
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/MapUtils.html" title="class in org.apache.usergrid.android.client.utils"><B>PREV CLASS</B></A>&nbsp;
+&nbsp;<A HREF="../../../../../org/usergrid/android/client/utils/UrlUtils.html" title="class in org.apache.usergrid.android.client.utils"><B>NEXT CLASS</B></A></FONT></TD>
 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
   <A HREF="../../../../../index.html?org/usergrid/android/client/utils/ObjectUtils.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 &nbsp;<A HREF="ObjectUtils.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;


[37/96] [abbrv] [partial] Change package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/EntityManagerImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/EntityManagerImpl.java b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/EntityManagerImpl.java
new file mode 100644
index 0000000..388d24a
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/EntityManagerImpl.java
@@ -0,0 +1,2856 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.cassandra;
+
+
+import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.TreeSet;
+import java.util.UUID;
+
+import javax.annotation.Resource;
+
+import org.apache.usergrid.locking.Lock;
+import org.apache.usergrid.mq.Message;
+import org.apache.usergrid.mq.QueueManager;
+import org.apache.usergrid.mq.cassandra.QueueManagerFactoryImpl;
+import org.apache.usergrid.persistence.AggregateCounter;
+import org.apache.usergrid.persistence.AggregateCounterSet;
+import org.apache.usergrid.persistence.CollectionRef;
+import org.apache.usergrid.persistence.ConnectedEntityRef;
+import org.apache.usergrid.persistence.ConnectionRef;
+import org.apache.usergrid.persistence.CounterResolution;
+import org.apache.usergrid.persistence.DynamicEntity;
+import org.apache.usergrid.persistence.Entity;
+import org.apache.usergrid.persistence.EntityFactory;
+import org.apache.usergrid.persistence.EntityManager;
+import org.apache.usergrid.persistence.EntityRef;
+import org.apache.usergrid.persistence.Identifier;
+import org.apache.usergrid.persistence.IndexBucketLocator;
+import org.apache.usergrid.persistence.Query;
+import org.apache.usergrid.persistence.Results;
+import org.apache.usergrid.persistence.RoleRef;
+import org.apache.usergrid.persistence.Schema;
+import org.apache.usergrid.persistence.SimpleCollectionRef;
+import org.apache.usergrid.persistence.SimpleEntityRef;
+import org.apache.usergrid.persistence.SimpleRoleRef;
+import org.apache.usergrid.persistence.TypedEntity;
+import org.apache.usergrid.persistence.IndexBucketLocator.IndexType;
+import org.apache.usergrid.persistence.Query.CounterFilterPredicate;
+import org.apache.usergrid.persistence.Results.Level;
+import org.apache.usergrid.persistence.cassandra.CounterUtils.AggregateCounterSelection;
+import org.apache.usergrid.persistence.cassandra.util.TraceParticipant;
+import org.apache.usergrid.persistence.entities.Application;
+import org.apache.usergrid.persistence.entities.Event;
+import org.apache.usergrid.persistence.entities.Group;
+import org.apache.usergrid.persistence.entities.Role;
+import org.apache.usergrid.persistence.entities.User;
+import org.apache.usergrid.persistence.exceptions.DuplicateUniquePropertyExistsException;
+import org.apache.usergrid.persistence.exceptions.EntityNotFoundException;
+import org.apache.usergrid.persistence.exceptions.RequiredPropertyNotFoundException;
+import org.apache.usergrid.persistence.exceptions.UnexpectedEntityTypeException;
+import org.apache.usergrid.persistence.schema.CollectionInfo;
+import org.apache.usergrid.utils.ClassUtils;
+import org.apache.usergrid.utils.CompositeUtils;
+import org.apache.usergrid.utils.UUIDUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.context.ApplicationContext;
+import org.springframework.util.Assert;
+
+import com.google.common.collect.BiMap;
+import com.google.common.collect.HashBiMap;
+import com.yammer.metrics.annotation.Metered;
+
+import me.prettyprint.cassandra.serializers.ByteBufferSerializer;
+import me.prettyprint.cassandra.serializers.LongSerializer;
+import me.prettyprint.cassandra.serializers.StringSerializer;
+import me.prettyprint.cassandra.serializers.UUIDSerializer;
+import me.prettyprint.hector.api.Keyspace;
+import me.prettyprint.hector.api.beans.ColumnSlice;
+import me.prettyprint.hector.api.beans.CounterRow;
+import me.prettyprint.hector.api.beans.CounterRows;
+import me.prettyprint.hector.api.beans.CounterSlice;
+import me.prettyprint.hector.api.beans.DynamicComposite;
+import me.prettyprint.hector.api.beans.HColumn;
+import me.prettyprint.hector.api.beans.HCounterColumn;
+import me.prettyprint.hector.api.beans.Row;
+import me.prettyprint.hector.api.beans.Rows;
+import me.prettyprint.hector.api.factory.HFactory;
+import me.prettyprint.hector.api.mutation.Mutator;
+import me.prettyprint.hector.api.query.MultigetSliceCounterQuery;
+import me.prettyprint.hector.api.query.QueryResult;
+import me.prettyprint.hector.api.query.SliceCounterQuery;
+import static java.lang.String.CASE_INSENSITIVE_ORDER;
+import static java.util.Arrays.asList;
+import static me.prettyprint.hector.api.factory.HFactory.createCounterSliceQuery;
+import static me.prettyprint.hector.api.factory.HFactory.createMutator;
+import static org.apache.commons.lang.StringUtils.capitalize;
+import static org.apache.commons.lang.StringUtils.isBlank;
+import static org.apache.usergrid.locking.LockHelper.getUniqueUpdateLock;
+import static org.apache.usergrid.persistence.Results.fromEntities;
+import static org.apache.usergrid.persistence.Results.Level.REFS;
+import static org.apache.usergrid.persistence.Schema.COLLECTION_ROLES;
+import static org.apache.usergrid.persistence.Schema.COLLECTION_USERS;
+import static org.apache.usergrid.persistence.Schema.DICTIONARY_COLLECTIONS;
+import static org.apache.usergrid.persistence.Schema.DICTIONARY_PERMISSIONS;
+import static org.apache.usergrid.persistence.Schema.DICTIONARY_PROPERTIES;
+import static org.apache.usergrid.persistence.Schema.DICTIONARY_ROLENAMES;
+import static org.apache.usergrid.persistence.Schema.DICTIONARY_ROLETIMES;
+import static org.apache.usergrid.persistence.Schema.DICTIONARY_SETS;
+import static org.apache.usergrid.persistence.Schema.PROPERTY_ASSOCIATED;
+import static org.apache.usergrid.persistence.Schema.PROPERTY_CREATED;
+import static org.apache.usergrid.persistence.Schema.PROPERTY_INACTIVITY;
+import static org.apache.usergrid.persistence.Schema.PROPERTY_MODIFIED;
+import static org.apache.usergrid.persistence.Schema.PROPERTY_NAME;
+import static org.apache.usergrid.persistence.Schema.PROPERTY_TIMESTAMP;
+import static org.apache.usergrid.persistence.Schema.PROPERTY_TYPE;
+import static org.apache.usergrid.persistence.Schema.PROPERTY_UUID;
+import static org.apache.usergrid.persistence.Schema.TYPE_APPLICATION;
+import static org.apache.usergrid.persistence.Schema.TYPE_CONNECTION;
+import static org.apache.usergrid.persistence.Schema.TYPE_ENTITY;
+import static org.apache.usergrid.persistence.Schema.TYPE_MEMBER;
+import static org.apache.usergrid.persistence.Schema.TYPE_ROLE;
+import static org.apache.usergrid.persistence.Schema.defaultCollectionName;
+import static org.apache.usergrid.persistence.Schema.deserializeEntityProperties;
+import static org.apache.usergrid.persistence.Schema.getDefaultSchema;
+import static org.apache.usergrid.persistence.SimpleEntityRef.getUuid;
+import static org.apache.usergrid.persistence.SimpleEntityRef.ref;
+import static org.apache.usergrid.persistence.SimpleRoleRef.getIdForGroupIdAndRoleName;
+import static org.apache.usergrid.persistence.SimpleRoleRef.getIdForRoleName;
+import static org.apache.usergrid.persistence.cassandra.ApplicationCF.APPLICATION_AGGREGATE_COUNTERS;
+import static org.apache.usergrid.persistence.cassandra.ApplicationCF.ENTITY_COMPOSITE_DICTIONARIES;
+import static org.apache.usergrid.persistence.cassandra.ApplicationCF.ENTITY_COUNTERS;
+import static org.apache.usergrid.persistence.cassandra.ApplicationCF.ENTITY_DICTIONARIES;
+import static org.apache.usergrid.persistence.cassandra.ApplicationCF.ENTITY_ID_SETS;
+import static org.apache.usergrid.persistence.cassandra.ApplicationCF.ENTITY_PROPERTIES;
+import static org.apache.usergrid.persistence.cassandra.ApplicationCF.ENTITY_UNIQUE;
+import static org.apache.usergrid.persistence.cassandra.CassandraPersistenceUtils.addDeleteToMutator;
+import static org.apache.usergrid.persistence.cassandra.CassandraPersistenceUtils.addInsertToMutator;
+import static org.apache.usergrid.persistence.cassandra.CassandraPersistenceUtils.addPropertyToMutator;
+import static org.apache.usergrid.persistence.cassandra.CassandraPersistenceUtils.batchExecute;
+import static org.apache.usergrid.persistence.cassandra.CassandraPersistenceUtils.key;
+import static org.apache.usergrid.persistence.cassandra.CassandraPersistenceUtils.toStorableBinaryValue;
+import static org.apache.usergrid.persistence.cassandra.CassandraService.ALL_COUNT;
+import static org.apache.usergrid.utils.ClassUtils.cast;
+import static org.apache.usergrid.utils.ConversionUtils.bytebuffer;
+import static org.apache.usergrid.utils.ConversionUtils.getLong;
+import static org.apache.usergrid.utils.ConversionUtils.object;
+import static org.apache.usergrid.utils.ConversionUtils.string;
+import static org.apache.usergrid.utils.ConversionUtils.uuid;
+import static org.apache.usergrid.utils.InflectionUtils.singularize;
+import static org.apache.usergrid.utils.UUIDUtils.getTimestampInMicros;
+import static org.apache.usergrid.utils.UUIDUtils.getTimestampInMillis;
+import static org.apache.usergrid.utils.UUIDUtils.isTimeBased;
+import static org.apache.usergrid.utils.UUIDUtils.newTimeUUID;
+
+
+/**
+ * Cassandra-specific implementation of Datastore
+ *
+ * @author edanuff
+ * @author tnine
+ */
+public class EntityManagerImpl implements EntityManager {
+
+    /** The log4j logger. */
+    private static final Logger logger = LoggerFactory.getLogger( EntityManagerImpl.class );
+    public static final String APPLICATION_COLLECTION = "application.collection.";
+    public static final String APPLICATION_ENTITIES = "application.entities";
+    public static final long ONE_COUNT = 1L;
+    @Resource
+    private EntityManagerFactoryImpl emf;
+    @Resource
+    private QueueManagerFactoryImpl qmf;
+    @Resource
+    private IndexBucketLocator indexBucketLocator;
+
+    private UUID applicationId;
+
+    private Application application;
+    @Resource
+    private CassandraService cass;
+    @Resource
+    private CounterUtils counterUtils;
+
+    private boolean skipAggregateCounters;
+
+    public static final StringSerializer se = new StringSerializer();
+    public static final ByteBufferSerializer be = new ByteBufferSerializer();
+    public static final UUIDSerializer ue = new UUIDSerializer();
+    public static final LongSerializer le = new LongSerializer();
+
+
+    public EntityManagerImpl() {
+    }
+
+
+    public EntityManagerImpl init( EntityManagerFactoryImpl emf, CassandraService cass, CounterUtils counterUtils,
+                                   UUID applicationId, boolean skipAggregateCounters ) {
+        this.emf = emf;
+        this.cass = cass;
+        this.counterUtils = counterUtils;
+        this.applicationId = applicationId;
+        this.skipAggregateCounters = skipAggregateCounters;
+        qmf = ( QueueManagerFactoryImpl ) getApplicationContext().getBean( "queueManagerFactory" );
+        indexBucketLocator = ( IndexBucketLocator ) getApplicationContext().getBean( "indexBucketLocator" );
+        // prime the application entity for the EM
+        try {
+            getApplication();
+        }
+        catch ( Exception ex ) {
+            ex.printStackTrace();
+        }
+        return this;
+    }
+
+
+    public void setApplicationId( UUID applicationId ) {
+        this.applicationId = applicationId;
+    }
+
+
+    public ApplicationContext getApplicationContext() {
+        return emf.applicationContext;
+    }
+
+
+    @Override
+    public EntityRef getApplicationRef() {
+        return ref( TYPE_APPLICATION, applicationId );
+    }
+
+
+    @Override
+    public Application getApplication() throws Exception {
+        if ( application == null ) {
+            application = get( applicationId, Application.class );
+        }
+        return application;
+    }
+
+
+    @Override
+    public void updateApplication( Application app ) throws Exception {
+        update( app );
+        this.application = app;
+    }
+
+
+    @Override
+    public void updateApplication( Map<String, Object> properties ) throws Exception {
+        this.updateProperties( applicationId, properties );
+        this.application = get( applicationId, Application.class );
+    }
+
+
+    @Override
+    public RelationManagerImpl getRelationManager( EntityRef entityRef ) {
+        //RelationManagerImpl rmi = applicationContext.getBean(RelationManagerImpl.class);
+        RelationManagerImpl rmi = new RelationManagerImpl();
+        rmi.init( this, cass, applicationId, entityRef, indexBucketLocator );
+        return rmi;
+    }
+
+
+    /**
+     * Batch dictionary property.
+     *
+     * @param batch The batch to set the property into
+     * @param entity The entity that owns the property
+     * @param propertyName the property name
+     * @param propertyValue the property value
+     * @param timestampUuid The update timestamp as a uuid
+     *
+     * @return batch
+     *
+     * @throws Exception the exception
+     */
+    public Mutator<ByteBuffer> batchSetProperty( Mutator<ByteBuffer> batch, EntityRef entity, String propertyName,
+                                                 Object propertyValue, UUID timestampUuid ) throws Exception {
+        return this.batchSetProperty( batch, entity, propertyName, propertyValue, false, false, timestampUuid );
+    }
+
+
+    public Mutator<ByteBuffer> batchSetProperty( Mutator<ByteBuffer> batch, EntityRef entity, String propertyName,
+                                                 Object propertyValue, boolean force, boolean noRead,
+                                                 UUID timestampUuid ) throws Exception {
+
+        long timestamp = getTimestampInMicros( timestampUuid );
+
+        // propertyName = propertyName.toLowerCase();
+
+        boolean entitySchemaHasProperty = getDefaultSchema().hasProperty( entity.getType(), propertyName );
+
+        propertyValue = getDefaultSchema().validateEntityPropertyValue( entity.getType(), propertyName, propertyValue );
+
+        Schema defaultSchema = Schema.getDefaultSchema();
+
+        if ( PROPERTY_TYPE.equalsIgnoreCase( propertyName ) && ( propertyValue != null ) ) {
+            if ( "entity".equalsIgnoreCase( propertyValue.toString() ) || "dynamicentity"
+                    .equalsIgnoreCase( propertyValue.toString() ) ) {
+                String errorMsg =
+                        "Unable to dictionary entity type to " + propertyValue + " because that is not a valid type.";
+                logger.error( errorMsg );
+                throw new IllegalArgumentException( errorMsg );
+            }
+        }
+
+        if ( entitySchemaHasProperty ) {
+
+            if ( !force ) {
+                if ( !defaultSchema.isPropertyMutable( entity.getType(), propertyName ) ) {
+                    return batch;
+                }
+
+                // Passing null for propertyValue indicates delete the property
+                // so if required property, exit
+                if ( ( propertyValue == null ) && defaultSchema.isRequiredProperty( entity.getType(), propertyName ) ) {
+                    return batch;
+                }
+            }
+
+
+            /**
+             * Unique property, load the old value and remove it, check if it's not a duplicate
+             */
+            if ( defaultSchema.getEntityInfo( entity.getType() ).isPropertyUnique( propertyName ) ) {
+
+                Lock lock = getUniqueUpdateLock( cass.getLockManager(), applicationId, propertyValue, entity.getType(),
+                        propertyName );
+
+                try {
+                    lock.lock();
+
+                    if ( !isPropertyValueUniqueForEntity( entity.getUuid(), entity.getType(), propertyName,
+                            propertyValue ) ) {
+                        throw new DuplicateUniquePropertyExistsException( entity.getType(), propertyName,
+                                propertyValue );
+                    }
+
+
+                    String collectionName = Schema.defaultCollectionName( entity.getType() );
+
+                    uniquePropertyDelete( batch, collectionName, entity.getType(), propertyName, propertyValue,
+                            entity.getUuid(), timestamp - 1 );
+                    uniquePropertyWrite( batch, collectionName, propertyName, propertyValue, entity.getUuid(),
+                            timestamp );
+                }
+                finally {
+                    lock.unlock();
+                }
+            }
+        }
+
+        if ( getDefaultSchema().isPropertyIndexed( entity.getType(), propertyName ) ) {
+            //this call is incorrect.  The current entity is NOT the head entity
+            getRelationManager( entity )
+                    .batchUpdatePropertyIndexes( batch, propertyName, propertyValue, entitySchemaHasProperty, noRead,
+                            timestampUuid );
+        }
+
+
+        if ( propertyValue != null ) {
+            // Set the new value
+            addPropertyToMutator( batch, key( entity.getUuid() ), entity.getType(), propertyName, propertyValue,
+                    timestamp );
+
+            if ( !entitySchemaHasProperty ) {
+                // Make a list of all the properties ever dictionary on this
+                // entity
+                addInsertToMutator( batch, ENTITY_DICTIONARIES, key( entity.getUuid(), DICTIONARY_PROPERTIES ),
+                        propertyName, null, timestamp );
+            }
+        }
+        else {
+            addDeleteToMutator( batch, ENTITY_PROPERTIES, key( entity.getUuid() ), propertyName, timestamp );
+        }
+
+        return batch;
+    }
+
+
+    /**
+     * Batch update properties.
+     *
+     * @param batch the batch
+     * @param entity The owning entity reference
+     * @param properties the properties to set
+     * @param timestampUuid the timestamp of the update operation as a time uuid
+     *
+     * @return batch
+     *
+     * @throws Exception the exception
+     */
+    public Mutator<ByteBuffer> batchUpdateProperties( Mutator<ByteBuffer> batch, EntityRef entity,
+                                                      Map<String, Object> properties, UUID timestampUuid )
+            throws Exception {
+
+        for ( String propertyName : properties.keySet() ) {
+            Object propertyValue = properties.get( propertyName );
+
+            batch = batchSetProperty( batch, entity, propertyName, propertyValue, timestampUuid );
+        }
+
+        return batch;
+    }
+
+
+    /**
+     * Batch update set.
+     *
+     * @param batch the batch
+     * @param entity The owning entity
+     * @param dictionaryName the dictionary name
+     * @param elementValue the dictionary value
+     * @param removeFromDictionary True to delete from the dictionary
+     * @param timestampUuid the timestamp
+     *
+     * @return batch
+     *
+     * @throws Exception the exception
+     */
+    public Mutator<ByteBuffer> batchUpdateDictionary( Mutator<ByteBuffer> batch, EntityRef entity,
+                                                      String dictionaryName, Object elementValue,
+                                                      boolean removeFromDictionary, UUID timestampUuid )
+            throws Exception {
+        return batchUpdateDictionary( batch, entity, dictionaryName, elementValue, null, removeFromDictionary,
+                timestampUuid );
+    }
+
+
+    public Mutator<ByteBuffer> batchUpdateDictionary( Mutator<ByteBuffer> batch, EntityRef entity,
+                                                      String dictionaryName, Object elementValue, Object elementCoValue,
+                                                      boolean removeFromDictionary, UUID timestampUuid )
+            throws Exception {
+
+        long timestamp = getTimestampInMicros( timestampUuid );
+
+        // dictionaryName = dictionaryName.toLowerCase();
+        if ( elementCoValue == null ) {
+            elementCoValue = ByteBuffer.allocate( 0 );
+        }
+
+        boolean entityHasDictionary = getDefaultSchema().hasDictionary( entity.getType(), dictionaryName );
+
+        // Don't index dynamic dictionaries not defined by the schema
+        if ( entityHasDictionary ) {
+            getRelationManager( entity )
+                    .batchUpdateSetIndexes( batch, dictionaryName, elementValue, removeFromDictionary, timestampUuid );
+        }
+
+        ApplicationCF dictionary_cf = entityHasDictionary ? ENTITY_DICTIONARIES : ENTITY_COMPOSITE_DICTIONARIES;
+
+        if ( elementValue != null ) {
+            if ( !removeFromDictionary ) {
+                // Set the new value
+
+                elementCoValue = toStorableBinaryValue( elementCoValue, !entityHasDictionary );
+
+                addInsertToMutator( batch, dictionary_cf, key( entity.getUuid(), dictionaryName ),
+                        entityHasDictionary ? elementValue : asList( elementValue ), elementCoValue, timestamp );
+
+                if ( !entityHasDictionary ) {
+                    addInsertToMutator( batch, ENTITY_DICTIONARIES, key( entity.getUuid(), DICTIONARY_SETS ),
+                            dictionaryName, null, timestamp );
+                }
+            }
+            else {
+                addDeleteToMutator( batch, dictionary_cf, key( entity.getUuid(), dictionaryName ),
+                        entityHasDictionary ? elementValue : asList( elementValue ), timestamp );
+            }
+        }
+
+        return batch;
+    }
+
+
+    /**
+     * Returns true if the property is unique, and the entity can be saved.  If it's not unique, false is returned
+     *
+     * @return True if this entity can safely "own" this property name and value unique combination
+     */
+    @Metered( group = "core", name = "EntityManager_isPropertyValueUniqueForEntity" )
+    public boolean isPropertyValueUniqueForEntity( UUID ownerEntityId, String entityType, String propertyName,
+                                                   Object propertyValue ) throws Exception {
+
+        if ( !getDefaultSchema().isPropertyUnique( entityType, propertyName ) ) {
+            return true;
+        }
+
+        if ( propertyValue == null ) {
+            return true;
+        }
+
+        /**
+         * Doing this in a loop sucks, but we need to account for possibly having more than 1 entry in the index due
+         * to corruption.  We need to allow them to update, otherwise
+         * both entities will be unable to update and must be deleted
+         */
+
+        Set<UUID> ownerEntityIds = getUUIDsForUniqueProperty( applicationId, entityType, propertyName, propertyValue );
+
+        //if there are no entities for this property, we know it's unique.  If there are,
+        // we have to make sure the one we were passed is in the set.  otherwise it belongs
+        //to a different entity
+        return ownerEntityIds.size() == 0 || ownerEntityIds.contains( ownerEntityId );
+    }
+
+
+    /**
+     * Return all UUIDs that have this unique value
+     *
+     * @param ownerEntityId The entity id that owns this entity collection
+     * @param collectionName The entity collection name
+     * @param propertyName The name of the unique property
+     * @param propertyValue The value of the unique property
+     */
+    private Set<UUID> getUUIDsForUniqueProperty( UUID ownerEntityId, String collectionName, String propertyName,
+                                                 Object propertyValue ) throws Exception {
+
+
+        String collectionNameInternal = defaultCollectionName( collectionName );
+
+        Object key = createUniqueIndexKey( ownerEntityId, collectionNameInternal, propertyName, propertyValue );
+
+        List<HColumn<ByteBuffer, ByteBuffer>> cols =
+                cass.getColumns( cass.getApplicationKeyspace( applicationId ), ENTITY_UNIQUE, key, null, null, 2,
+                        false );
+
+
+        //No columns at all, it's unique
+        if ( cols.size() == 0 ) {
+            return Collections.emptySet();
+        }
+
+        //shouldn't happen, but it's an error case
+        if ( cols.size() > 1 ) {
+            logger.error( "INDEX CORRUPTION: More than 1 unique value exists for entities in ownerId {} of type {} on "
+                    + "property {} with value {}",
+                    new Object[] { ownerEntityId, collectionNameInternal, propertyName, propertyValue } );
+        }
+
+        /**
+         * Doing this in a loop sucks, but we need to account for possibly having more than 1 entry in the index due
+         * to corruption.  We need to allow them to update, otherwise
+         * both entities will be unable to update and must be deleted
+         */
+
+        Set<UUID> results = new HashSet<UUID>( cols.size() );
+
+        for ( HColumn<ByteBuffer, ByteBuffer> col : cols ) {
+            results.add( ue.fromByteBuffer( col.getName() ) );
+        }
+
+        return results;
+    }
+
+
+    /** Add this unique index to the delete */
+    private void uniquePropertyDelete( Mutator<ByteBuffer> m, String collectionName, String entityType,
+                                       String propertyName, Object propertyValue, UUID entityId, long timestamp )
+            throws Exception {
+        //read the old value and delete it
+
+        Object oldValue = getProperty( new SimpleEntityRef( entityType, entityId ), propertyName );
+
+        //we have an old value.  If the new value is empty, we want to delete the old value.  If the new value is
+        // different we want to delete, otherwise we don't issue the delete
+        if ( oldValue != null && ( propertyValue == null || !oldValue.equals( propertyValue ) ) ) {
+            Object key = createUniqueIndexKey( applicationId, collectionName, propertyName, oldValue );
+
+            addDeleteToMutator( m, ENTITY_UNIQUE, key, timestamp, entityId );
+        }
+    }
+
+
+    /** Add this unique index to the delete */
+    private void uniquePropertyWrite( Mutator<ByteBuffer> m, String collectionName, String propertyName,
+                                      Object propertyValue, UUID entityId, long timestamp ) throws Exception {
+        Object key = createUniqueIndexKey( applicationId, collectionName, propertyName, propertyValue );
+
+        addInsertToMutator( m, ENTITY_UNIQUE, key, entityId, null, timestamp );
+    }
+
+
+    /**
+     * Create a row key for the entity of the given type with the name and value in the property.  Used for fast unique
+     * index lookups
+     */
+    private Object createUniqueIndexKey( UUID ownerId, String collectionName, String propertyName, Object value ) {
+        return key( ownerId, collectionName, propertyName, value );
+    }
+
+
+    @Override
+    @Metered( group = "core", name = "EntityManager_getAlias_single" )
+    public EntityRef getAlias( UUID ownerId, String collectionType, String aliasValue ) throws Exception {
+
+        Assert.notNull( ownerId, "ownerId is required" );
+        Assert.notNull( collectionType, "collectionType is required" );
+        Assert.notNull( aliasValue, "aliasValue is required" );
+
+        Map<String, EntityRef> results = getAlias( ownerId, collectionType, Collections.singletonList( aliasValue ) );
+
+        if ( results == null || results.size() == 0 ) {
+            return null;
+        }
+
+        //add a warn statement so we can see if we have data migration issues.
+        //TODO When we get an event system, trigger a repair if this is detected
+        if ( results.size() > 1 ) {
+            logger.warn(
+                    "More than 1 entity with Owner id '{}' of type '{}' and alias '{}' exists.  This is a duplicate "
+                            + "alias, and needs audited", new Object[] { ownerId, collectionType, aliasValue } );
+        }
+
+        return results.get( aliasValue );
+    }
+
+
+    @Override
+    public Map<String, EntityRef> getAlias( String aliasType, List<String> aliases ) throws Exception {
+        return getAlias( applicationId, aliasType, aliases );
+    }
+
+
+    @Override
+    @Metered( group = "core", name = "EntityManager_getAlias_multi" )
+    public Map<String, EntityRef> getAlias( UUID ownerId, String collectionName, List<String> aliases )
+            throws Exception {
+
+        Assert.notNull( ownerId, "ownerId is required" );
+        Assert.notNull( collectionName, "collectionName is required" );
+        Assert.notEmpty( aliases, "aliases are required" );
+
+
+        String propertyName = Schema.getDefaultSchema().aliasProperty( collectionName );
+
+        Map<String, EntityRef> results = new HashMap<String, EntityRef>();
+
+        for ( String alias : aliases ) {
+            for ( UUID id : getUUIDsForUniqueProperty( ownerId, collectionName, propertyName, alias ) ) {
+                results.put( alias, new SimpleEntityRef( collectionName, id ) );
+            }
+        }
+
+        return results;
+    }
+
+
+    @SuppressWarnings( "unchecked" )
+    @Override
+    public <A extends Entity> A create( String entityType, Class<A> entityClass, Map<String, Object> properties )
+            throws Exception {
+        if ( ( entityType != null ) && ( entityType.startsWith( TYPE_ENTITY ) || entityType
+                .startsWith( "entities" ) ) ) {
+            throw new IllegalArgumentException( "Invalid entity type" );
+        }
+        A e = null;
+        try {
+            e = ( A ) create( entityType, ( Class<Entity> ) entityClass, properties, null );
+        }
+        catch ( ClassCastException e1 ) {
+            logger.error( "Unable to create typed entity", e1 );
+        }
+        return e;
+    }
+
+
+    @Override
+    public Entity create( UUID importId, String entityType, Map<String, Object> properties ) throws Exception {
+        return create( entityType, null, properties, importId );
+    }
+
+
+    @SuppressWarnings( "unchecked" )
+    @Override
+    public <A extends TypedEntity> A create( A entity ) throws Exception {
+        return ( A ) create( entity.getType(), entity.getClass(), entity.getProperties() );
+    }
+
+
+    @Override
+    @TraceParticipant
+    public Entity create( String entityType, Map<String, Object> properties ) throws Exception {
+        return create( entityType, null, properties );
+    }
+
+
+    /**
+     * Creates a new entity.
+     *
+     * @param entityType the entity type
+     * @param entityClass the entity class
+     * @param properties the properties
+     * @param importId an existing external uuid to use as the id for the new entity
+     *
+     * @return new entity
+     *
+     * @throws Exception the exception
+     */
+    @Metered( group = "core", name = "EntityManager_create" )
+    @TraceParticipant
+    public <A extends Entity> A create( String entityType, Class<A> entityClass, Map<String, Object> properties,
+                                        UUID importId ) throws Exception {
+
+        UUID timestampUuid = newTimeUUID();
+
+        Keyspace ko = cass.getApplicationKeyspace( applicationId );
+        Mutator<ByteBuffer> m = createMutator( ko, be );
+        A entity = batchCreate( m, entityType, entityClass, properties, importId, timestampUuid );
+
+        batchExecute( m, CassandraService.RETRY_COUNT );
+
+        return entity;
+    }
+
+
+    @SuppressWarnings( "unchecked" )
+    @Metered( group = "core", name = "EntityManager_batchCreate" )
+    public <A extends Entity> A batchCreate( Mutator<ByteBuffer> m, String entityType, Class<A> entityClass,
+                                             Map<String, Object> properties, UUID importId, UUID timestampUuid )
+            throws Exception {
+
+        String eType = Schema.normalizeEntityType( entityType );
+
+        Schema schema = getDefaultSchema();
+
+        boolean is_application = TYPE_APPLICATION.equals( eType );
+
+        if ( ( ( applicationId == null ) || applicationId.equals( UUIDUtils.ZERO_UUID ) ) && !is_application ) {
+            return null;
+        }
+
+        long timestamp = getTimestampInMicros( timestampUuid );
+
+        UUID itemId = UUIDUtils.newTimeUUID();
+
+        if ( is_application ) {
+            itemId = applicationId;
+        }
+        if ( importId != null ) {
+            itemId = importId;
+        }
+        boolean emptyPropertyMap = false;
+        if ( properties == null ) {
+            properties = new TreeMap<String, Object>( CASE_INSENSITIVE_ORDER );
+        }
+        if ( properties.isEmpty() ) {
+            emptyPropertyMap = true;
+        }
+
+        if ( importId != null ) {
+            if ( isTimeBased( importId ) ) {
+                timestamp = UUIDUtils.getTimestampInMicros( importId );
+            }
+            else if ( properties.get( PROPERTY_CREATED ) != null ) {
+                timestamp = getLong( properties.get( PROPERTY_CREATED ) ) * 1000;
+            }
+        }
+
+        if ( entityClass == null ) {
+            entityClass = ( Class<A> ) Schema.getDefaultSchema().getEntityClass( entityType );
+        }
+
+        Set<String> required = schema.getRequiredProperties( entityType );
+
+        if ( required != null ) {
+            for ( String p : required ) {
+                if ( !PROPERTY_UUID.equals( p ) && !PROPERTY_TYPE.equals( p ) && !PROPERTY_CREATED.equals( p )
+                        && !PROPERTY_MODIFIED.equals( p ) ) {
+                    Object v = properties.get( p );
+                    if ( schema.isPropertyTimestamp( entityType, p ) ) {
+                        if ( v == null ) {
+                            properties.put( p, timestamp / 1000 );
+                        }
+                        else {
+                            long ts = getLong( v );
+                            if ( ts <= 0 ) {
+                                properties.put( p, timestamp / 1000 );
+                            }
+                        }
+                        continue;
+                    }
+                    if ( v == null ) {
+                        throw new RequiredPropertyNotFoundException( entityType, p );
+                    }
+                    else if ( ( v instanceof String ) && isBlank( ( String ) v ) ) {
+                        throw new RequiredPropertyNotFoundException( entityType, p );
+                    }
+                }
+            }
+        }
+
+        // Create collection name based on entity: i.e. "users"
+        String collection_name = Schema.defaultCollectionName( eType );
+        // Create collection key based collection name
+        String bucketId = indexBucketLocator.getBucket( applicationId, IndexType.COLLECTION, itemId, collection_name );
+
+        Object collection_key = key( applicationId, Schema.DICTIONARY_COLLECTIONS, collection_name, bucketId );
+
+        CollectionInfo collection = null;
+
+        if ( !is_application ) {
+            // Add entity to collection
+
+
+            if ( !emptyPropertyMap ) {
+                addInsertToMutator( m, ENTITY_ID_SETS, collection_key, itemId, null, timestamp );
+            }
+
+            // Add name of collection to dictionary property
+            // Application.collections
+            addInsertToMutator( m, ENTITY_DICTIONARIES, key( applicationId, Schema.DICTIONARY_COLLECTIONS ),
+                    collection_name, null, timestamp );
+
+            addInsertToMutator( m, ENTITY_COMPOSITE_DICTIONARIES, key( itemId, Schema.DICTIONARY_CONTAINER_ENTITIES ),
+                    asList( TYPE_APPLICATION, collection_name, applicationId ), null, timestamp );
+        }
+
+        if ( emptyPropertyMap ) {
+            return null;
+        }
+        properties.put( PROPERTY_UUID, itemId );
+        properties.put( PROPERTY_TYPE, Schema.normalizeEntityType( entityType, false ) );
+
+        if ( importId != null ) {
+            if ( properties.get( PROPERTY_CREATED ) == null ) {
+                properties.put( PROPERTY_CREATED, timestamp / 1000 );
+            }
+
+            if ( properties.get( PROPERTY_MODIFIED ) == null ) {
+                properties.put( PROPERTY_MODIFIED, timestamp / 1000 );
+            }
+        }
+        else {
+            properties.put( PROPERTY_CREATED, timestamp / 1000 );
+            properties.put( PROPERTY_MODIFIED, timestamp / 1000 );
+        }
+
+        // special case timestamp and published properties
+        // and dictionary their timestamp values if not set
+        // this is sure to break something for someone someday
+
+        if ( properties.containsKey( PROPERTY_TIMESTAMP ) ) {
+            long ts = getLong( properties.get( PROPERTY_TIMESTAMP ) );
+            if ( ts <= 0 ) {
+                properties.put( PROPERTY_TIMESTAMP, timestamp / 1000 );
+            }
+        }
+
+        A entity = EntityFactory.newEntity( itemId, eType, entityClass );
+        logger.info( "Entity created of type {}", entity.getClass().getName() );
+
+        if ( Event.ENTITY_TYPE.equals( eType ) ) {
+            Event event = ( Event ) entity.toTypedEntity();
+            for ( String prop_name : properties.keySet() ) {
+                Object propertyValue = properties.get( prop_name );
+                if ( propertyValue != null ) {
+                    event.setProperty( prop_name, propertyValue );
+                }
+            }
+            Message message = storeEventAsMessage( m, event, timestamp );
+            incrementEntityCollection( "events", timestamp );
+
+            entity.setUuid( message.getUuid() );
+            return entity;
+        }
+
+        for ( String prop_name : properties.keySet() ) {
+
+            Object propertyValue = properties.get( prop_name );
+
+            if ( propertyValue == null ) {
+                continue;
+            }
+
+
+            if ( User.ENTITY_TYPE.equals( entityType ) && "me".equals( prop_name ) ) {
+                throw new DuplicateUniquePropertyExistsException( entityType, prop_name, propertyValue );
+            }
+
+            entity.setProperty( prop_name, propertyValue );
+
+            batchSetProperty( m, entity, prop_name, propertyValue, true, true, timestampUuid );
+        }
+
+        if ( !is_application ) {
+            incrementEntityCollection( collection_name, timestamp );
+        }
+
+        return entity;
+    }
+
+
+    private void incrementEntityCollection( String collection_name, long cassandraTimestamp ) {
+        try {
+            incrementAggregateCounters( null, null, null, new String( APPLICATION_COLLECTION + collection_name ),
+                    ONE_COUNT, cassandraTimestamp );
+        }
+        catch ( Exception e ) {
+            logger.error( "Unable to increment counter application.collection: {}.", new Object[]{ collection_name, e} );
+        }
+        try {
+            incrementAggregateCounters( null, null, null, APPLICATION_ENTITIES, ONE_COUNT, cassandraTimestamp );
+        }
+        catch ( Exception e ) {
+            logger.error( "Unable to increment counter application.entities for collection: {} with timestamp: {}", new Object[]{collection_name, cassandraTimestamp,e} );
+        }
+    }
+
+
+    public void decrementEntityCollection( String collection_name ) {
+
+        long cassandraTimestamp = cass.createTimestamp();
+        decrementEntityCollection( collection_name, cassandraTimestamp );
+    }
+
+
+    public void decrementEntityCollection( String collection_name, long cassandraTimestamp ) {
+        try {
+            incrementAggregateCounters( null, null, null, APPLICATION_COLLECTION + collection_name, -ONE_COUNT,
+                    cassandraTimestamp );
+        }
+        catch ( Exception e ) {
+            logger.error( "Unable to decrement counter application.collection: {}.", new Object[]{collection_name, e} );
+        }
+        try {
+            incrementAggregateCounters( null, null, null, APPLICATION_ENTITIES, -ONE_COUNT, cassandraTimestamp );
+        }
+        catch ( Exception e ) {
+        	logger.error( "Unable to decrement counter application.entities for collection: {} with timestamp: {}", new Object[]{collection_name, cassandraTimestamp,e} );
+        }
+    }
+
+
+    @Metered( group = "core", name = "EntityManager_insertEntity" )
+    public void insertEntity( String type, UUID entityId ) throws Exception {
+
+        Keyspace ko = cass.getApplicationKeyspace( applicationId );
+        Mutator<ByteBuffer> m = createMutator( ko, be );
+
+        Object itemKey = key( entityId );
+
+        long timestamp = cass.createTimestamp();
+
+        addPropertyToMutator( m, itemKey, type, PROPERTY_UUID, entityId, timestamp );
+        addPropertyToMutator( m, itemKey, type, PROPERTY_TYPE, type, timestamp );
+
+        batchExecute( m, CassandraService.RETRY_COUNT );
+    }
+
+
+    public Message storeEventAsMessage( Mutator<ByteBuffer> m, Event event, long timestamp ) {
+
+        counterUtils.addEventCounterMutations( m, applicationId, event, timestamp );
+
+        QueueManager q = qmf.getQueueManager( applicationId );
+
+        Message message = new Message();
+        message.setType( "event" );
+        message.setCategory( event.getCategory() );
+        message.setStringProperty( "message", event.getMessage() );
+        message.setTimestamp( timestamp );
+        q.postToQueue( "events", message );
+
+        return message;
+    }
+
+
+    /**
+     * Gets the type.
+     *
+     * @param entityId the entity id
+     *
+     * @return entity type
+     *
+     * @throws Exception the exception
+     */
+    @Metered( group = "core", name = "EntityManager_getEntityType" )
+    public String getEntityType( UUID entityId ) throws Exception {
+
+        HColumn<String, String> column =
+                cass.getColumn( cass.getApplicationKeyspace( applicationId ), ENTITY_PROPERTIES, key( entityId ),
+                        PROPERTY_TYPE, se, se );
+        if ( column != null ) {
+            return column.getValue();
+        }
+        return null;
+    }
+
+
+    /**
+     * Gets the entity info. If no propertyNames are passed it loads the ENTIRE entity!
+     *
+     * @param entityId the entity id
+     * @param propertyNames the property names
+     *
+     * @return DynamicEntity object holding properties
+     *
+     * @throws Exception the exception
+     */
+    @Metered( group = "core", name = "EntityManager_loadPartialEntity" )
+    public DynamicEntity loadPartialEntity( UUID entityId, String... propertyNames ) throws Exception {
+
+        List<HColumn<String, ByteBuffer>> results = null;
+        if ( ( propertyNames != null ) && ( propertyNames.length > 0 ) ) {
+            Set<String> column_names = new TreeSet<String>( CASE_INSENSITIVE_ORDER );
+
+            column_names.add( PROPERTY_TYPE );
+            column_names.add( PROPERTY_UUID );
+
+            for ( String propertyName : propertyNames ) {
+                column_names.add( propertyName );
+            }
+
+            results = cass.getColumns( cass.getApplicationKeyspace( applicationId ), ENTITY_PROPERTIES, key( entityId ),
+                    column_names, se, be );
+        }
+        else {
+            results = cass.getAllColumns( cass.getApplicationKeyspace( applicationId ), ENTITY_PROPERTIES,
+                    key( entityId ) );
+        }
+
+        Map<String, Object> entityProperties = deserializeEntityProperties( results );
+        if ( entityProperties == null ) {
+            return null;
+        }
+
+        String entityType = ( String ) entityProperties.get( PROPERTY_TYPE );
+        UUID id = ( UUID ) entityProperties.get( PROPERTY_UUID );
+
+        return new DynamicEntity( entityType, id, entityProperties );
+    }
+
+
+    /**
+     * Gets the specified entity.
+     *
+     * @param entityId the entity id
+     * @param entityClass the entity class
+     *
+     * @return entity
+     *
+     * @throws Exception the exception
+     */
+    public <A extends Entity> A getEntity( UUID entityId, Class<A> entityClass ) throws Exception {
+
+        Object entity_key = key( entityId );
+        Map<String, Object> results = null;
+
+        // if (entityType == null) {
+        results = deserializeEntityProperties(
+                cass.getAllColumns( cass.getApplicationKeyspace( applicationId ), ENTITY_PROPERTIES, entity_key ) );
+        // } else {
+        // Set<String> columnNames = Schema.getPropertyNames(entityType);
+        // results = getColumns(getApplicationKeyspace(applicationId),
+        // EntityCF.PROPERTIES, entity_key, columnNames, se, be);
+        // }
+
+        if ( results == null ) {
+            logger.warn( "getEntity(): No properties found for entity {}, probably doesn't exist...", entityId );
+            return null;
+        }
+
+        UUID id = uuid( results.get( PROPERTY_UUID ) );
+        String type = string( results.get( PROPERTY_TYPE ) );
+
+        if ( !entityId.equals( id ) ) {
+
+            logger.error( "Expected entity id {}, found {}. Returning null entity", new Object[]{entityId, id, new Throwable()} );
+            return null;
+        }
+
+        A entity = EntityFactory.newEntity( id, type, entityClass );
+        entity.setProperties( results );
+
+        return entity;
+    }
+
+
+    /**
+     * Gets the specified list of entities.
+     *
+     * @param entityIds the entity ids
+     * @param entityClass the entity class
+     *
+     * @return entity
+     *
+     * @throws Exception the exception
+     */
+    @Metered( group = "core", name = "EntityManager_getEntities" )
+    public <A extends Entity> List<A> getEntities( Collection<UUID> entityIds, Class<A> entityClass ) throws Exception {
+
+        List<A> entities = new ArrayList<A>();
+
+        if ( ( entityIds == null ) || ( entityIds.size() == 0 ) ) {
+            return entities;
+        }
+
+        Map<UUID, A> resultSet = new LinkedHashMap<UUID, A>();
+
+        Rows<UUID, String, ByteBuffer> results = null;
+
+        // if (entityType == null) {
+        results =
+                cass.getRows( cass.getApplicationKeyspace( applicationId ), ENTITY_PROPERTIES, entityIds, ue, se, be );
+        // } else {
+        // Set<String> columnNames = Schema.getPropertyNames(entityType);
+        // results = getRows(getApplicationKeyspace(applicationId),
+        // EntityCF.PROPERTIES,
+        // entityIds, columnNames, ue, se, be);
+        // }
+
+        if ( results != null ) {
+            for ( UUID key : entityIds ) {
+                Map<String, Object> properties = deserializeEntityProperties( results.getByKey( key ) );
+
+                if ( properties == null ) {
+                    logger.error( "Error deserializing entity with key {} entity probaby doesn't exist, where did this key come from?", key );
+                    continue;
+                }
+
+                UUID id = uuid( properties.get( PROPERTY_UUID ) );
+                String type = string( properties.get( PROPERTY_TYPE ) );
+
+                if ( ( id == null ) || ( type == null ) ) {
+                    logger.error( "Error retrieving entity with key {}, no type or id deseriazable, where did this key come from?", key );
+                    continue;
+                }
+                A entity = EntityFactory.newEntity( id, type, entityClass );
+                entity.setProperties( properties );
+
+                resultSet.put( id, entity );
+            }
+
+            for ( UUID entityId : entityIds ) {
+                A entity = resultSet.get( entityId );
+                if ( entity != null ) {
+                    entities.add( entity );
+                }
+            }
+        }
+
+        return entities;
+    }
+
+
+    @Metered( group = "core", name = "EntityManager_getPropertyNames" )
+    public Set<String> getPropertyNames( EntityRef entity ) throws Exception {
+
+        Set<String> propertyNames = new TreeSet<String>( CASE_INSENSITIVE_ORDER );
+        List<HColumn<String, ByteBuffer>> results =
+                cass.getAllColumns( cass.getApplicationKeyspace( applicationId ), ENTITY_DICTIONARIES,
+                        key( entity.getUuid(), DICTIONARY_PROPERTIES ) );
+        for ( HColumn<String, ByteBuffer> result : results ) {
+            String str = string( result.getName() );
+            if ( str != null ) {
+                propertyNames.add( str );
+            }
+        }
+
+        Set<String> schemaProperties = getDefaultSchema().getPropertyNames( entity.getType() );
+        if ( ( schemaProperties != null ) && !schemaProperties.isEmpty() ) {
+            propertyNames.addAll( schemaProperties );
+        }
+
+        return propertyNames;
+    }
+
+
+    @Metered( group = "core", name = "EntityManager_getDictionaryNames" )
+    public Set<String> getDictionaryNames( EntityRef entity ) throws Exception {
+
+        Set<String> dictionaryNames = new TreeSet<String>( CASE_INSENSITIVE_ORDER );
+        List<HColumn<String, ByteBuffer>> results =
+                cass.getAllColumns( cass.getApplicationKeyspace( applicationId ), ENTITY_DICTIONARIES,
+                        key( entity.getUuid(), DICTIONARY_SETS ) );
+        for ( HColumn<String, ByteBuffer> result : results ) {
+            String str = string( result.getName() );
+            if ( str != null ) {
+                dictionaryNames.add( str );
+            }
+        }
+
+        Set<String> schemaSets = getDefaultSchema().getDictionaryNames( entity.getType() );
+        if ( ( schemaSets != null ) && !schemaSets.isEmpty() ) {
+            dictionaryNames.addAll( schemaSets );
+        }
+
+        return dictionaryNames;
+    }
+
+
+    @Override
+    @Metered( group = "core", name = "EntityManager_getDictionaryElementValue" )
+    public Object getDictionaryElementValue( EntityRef entity, String dictionaryName, String elementName )
+            throws Exception {
+
+        Object value = null;
+
+        ApplicationCF dictionaryCf = null;
+
+        boolean entityHasDictionary = getDefaultSchema().hasDictionary( entity.getType(), dictionaryName );
+
+        if ( entityHasDictionary ) {
+            dictionaryCf = ENTITY_DICTIONARIES;
+        }
+        else {
+            dictionaryCf = ENTITY_COMPOSITE_DICTIONARIES;
+        }
+
+        Class<?> dictionaryCoType = getDefaultSchema().getDictionaryValueType( entity.getType(), dictionaryName );
+        boolean coTypeIsBasic = ClassUtils.isBasicType( dictionaryCoType );
+
+        HColumn<ByteBuffer, ByteBuffer> result =
+                cass.getColumn( cass.getApplicationKeyspace( applicationId ), dictionaryCf,
+                        key( entity.getUuid(), dictionaryName ),
+                        entityHasDictionary ? bytebuffer( elementName ) : DynamicComposite.toByteBuffer( elementName ),
+                        be, be );
+        if ( result != null ) {
+            if ( entityHasDictionary && coTypeIsBasic ) {
+                value = object( dictionaryCoType, result.getValue() );
+            }
+            else if ( result.getValue().remaining() > 0 ) {
+                value = Schema.deserializePropertyValueFromJsonBinary( result.getValue().slice(), dictionaryCoType );
+            }
+        }
+        else {
+            logger.info( "Results of EntityManagerImpl.getDictionaryElementValue is null" );
+        }
+
+        return value;
+    }
+
+
+    @Metered( group = "core", name = "EntityManager_getDictionaryElementValues" )
+    public Map<String, Object> getDictionaryElementValues( EntityRef entity, String dictionaryName,
+                                                           String... elementNames ) throws Exception {
+
+        Map<String, Object> values = null;
+
+        ApplicationCF dictionaryCf = null;
+
+        boolean entityHasDictionary = getDefaultSchema().hasDictionary( entity.getType(), dictionaryName );
+
+        if ( entityHasDictionary ) {
+            dictionaryCf = ENTITY_DICTIONARIES;
+        }
+        else {
+            dictionaryCf = ENTITY_COMPOSITE_DICTIONARIES;
+        }
+
+        Class<?> dictionaryCoType = getDefaultSchema().getDictionaryValueType( entity.getType(), dictionaryName );
+        boolean coTypeIsBasic = ClassUtils.isBasicType( dictionaryCoType );
+
+        ByteBuffer[] columnNames = new ByteBuffer[elementNames.length];
+        for ( int i = 0; i < elementNames.length; i++ ) {
+            columnNames[i] = entityHasDictionary ? bytebuffer( elementNames[i] ) :
+                             DynamicComposite.toByteBuffer( elementNames[i] );
+        }
+
+        ColumnSlice<ByteBuffer, ByteBuffer> results =
+                cass.getColumns( cass.getApplicationKeyspace( applicationId ), dictionaryCf,
+                        key( entity.getUuid(), dictionaryName ), columnNames, be, be );
+        if ( results != null ) {
+            values = new HashMap<String, Object>();
+            for ( HColumn<ByteBuffer, ByteBuffer> result : results.getColumns() ) {
+                String name = entityHasDictionary ? string( result.getName() ) :
+                              DynamicComposite.fromByteBuffer( result.getName() ).get( 0, se );
+                if ( entityHasDictionary && coTypeIsBasic ) {
+                    values.put( name, object( dictionaryCoType, result.getValue() ) );
+                }
+                else if ( result.getValue().remaining() > 0 ) {
+                    values.put( name, Schema.deserializePropertyValueFromJsonBinary( result.getValue().slice(),
+                            dictionaryCoType ) );
+                }
+            }
+        }
+        else {
+            logger.error( "Results of EntityManagerImpl.getDictionaryElementValues is null" );
+        }
+
+        return values;
+    }
+
+
+    /**
+     * Gets the set.
+     *
+     * @param entity The owning entity
+     * @param dictionaryName the dictionary name
+     *
+     * @return contents of dictionary property
+     *
+     * @throws Exception the exception
+     */
+    @Override
+    @Metered( group = "core", name = "EntityManager_getDictionaryAsMap" )
+    public Map<Object, Object> getDictionaryAsMap( EntityRef entity, String dictionaryName ) throws Exception {
+
+        entity = validate( entity );
+
+        Map<Object, Object> dictionary = new LinkedHashMap<Object, Object>();
+
+        ApplicationCF dictionaryCf = null;
+
+        boolean entityHasDictionary = getDefaultSchema().hasDictionary( entity.getType(), dictionaryName );
+
+        if ( entityHasDictionary ) {
+            dictionaryCf = ENTITY_DICTIONARIES;
+        }
+        else {
+            dictionaryCf = ENTITY_COMPOSITE_DICTIONARIES;
+        }
+
+        Class<?> setType = getDefaultSchema().getDictionaryKeyType( entity.getType(), dictionaryName );
+        Class<?> setCoType = getDefaultSchema().getDictionaryValueType( entity.getType(), dictionaryName );
+        boolean coTypeIsBasic = ClassUtils.isBasicType( setCoType );
+
+        List<HColumn<ByteBuffer, ByteBuffer>> results =
+                cass.getAllColumns( cass.getApplicationKeyspace( applicationId ), dictionaryCf,
+                        key( entity.getUuid(), dictionaryName ), be, be );
+        for ( HColumn<ByteBuffer, ByteBuffer> result : results ) {
+            Object name = null;
+            if ( entityHasDictionary ) {
+                name = object( setType, result.getName() );
+            }
+            else {
+                name = CompositeUtils.deserialize( result.getName() );
+            }
+            Object value = null;
+            if ( entityHasDictionary && coTypeIsBasic ) {
+                value = object( setCoType, result.getValue() );
+            }
+            else if ( result.getValue().remaining() > 0 ) {
+                value = Schema.deserializePropertyValueFromJsonBinary( result.getValue().slice(), setCoType );
+            }
+            if ( name != null ) {
+                dictionary.put( name, value );
+            }
+        }
+
+        return dictionary;
+    }
+
+
+    @Override
+    public Set<Object> getDictionaryAsSet( EntityRef entity, String dictionaryName ) throws Exception {
+        return new LinkedHashSet<Object>( getDictionaryAsMap( entity, dictionaryName ).keySet() );
+    }
+
+
+    /**
+     * Update properties.
+     *
+     * @param entityId the entity id
+     * @param properties the properties
+     *
+     * @throws Exception the exception
+     */
+    @Metered( group = "core", name = "EntityManager_updateProperties" )
+    public void updateProperties( UUID entityId, Map<String, Object> properties ) throws Exception {
+
+        EntityRef entity = getRef( entityId );
+        if ( entity == null ) {
+            return;
+        }
+
+        Keyspace ko = cass.getApplicationKeyspace( applicationId );
+        Mutator<ByteBuffer> m = createMutator( ko, be );
+
+        UUID timestampUuid = newTimeUUID();
+        properties.put( PROPERTY_MODIFIED, getTimestampInMillis( timestampUuid ) );
+
+        batchUpdateProperties( m, entity, properties, timestampUuid );
+
+        batchExecute( m, CassandraService.RETRY_COUNT );
+    }
+
+
+    @Metered( group = "core", name = "EntityManager_deleteEntity" )
+    public void deleteEntity( UUID entityId ) throws Exception {
+
+        logger.info( "deleteEntity {} of application {}", entityId, applicationId );
+
+        EntityRef entity = getRef( entityId );
+        if ( entity == null ) {
+            return;
+        }
+
+        logger.info( "deleteEntity: {} is of type {}", entityId, entity.getType() );
+
+        Keyspace ko = cass.getApplicationKeyspace( applicationId );
+        Mutator<ByteBuffer> m = createMutator( ko, be );
+
+        UUID timestampUuid = newTimeUUID();
+        long timestamp = getTimestampInMicros( timestampUuid );
+
+        // get all connections and disconnect them
+        getRelationManager( ref( entityId ) ).batchDisconnect( m, timestampUuid );
+
+        // delete all core properties and any dynamic property that's ever been
+        // dictionary for this entity
+        Set<String> properties = getPropertyNames( entity );
+        if ( properties != null ) {
+            for ( String propertyName : properties ) {
+                m = batchSetProperty( m, entity, propertyName, null, true, false, timestampUuid );
+            }
+        }
+
+        // delete any core dictionaries and dynamic dictionaries associated with
+        // this entity
+        Set<String> dictionaries = getDictionaryNames( entity );
+        if ( dictionaries != null ) {
+            for ( String dictionary : dictionaries ) {
+                Set<Object> values = getDictionaryAsSet( entity, dictionary );
+                if ( values != null ) {
+                    for ( Object value : values ) {
+                        batchUpdateDictionary( m, entity, dictionary, value, true, timestampUuid );
+                    }
+                }
+            }
+        }
+
+        // find all the containing collections
+        getRelationManager( entity ).batchRemoveFromContainers( m, timestampUuid );
+
+        //decrease entity count
+        if ( !TYPE_APPLICATION.equals( entity.getType() ) ) {
+            String collection_name = Schema.defaultCollectionName( entity.getType() );
+            decrementEntityCollection( collection_name );
+        }
+
+
+        timestamp += 1;
+
+        if ( dictionaries != null ) {
+            for ( String dictionary : dictionaries ) {
+
+                ApplicationCF cf =
+                        getDefaultSchema().hasDictionary( entity.getType(), dictionary ) ? ENTITY_DICTIONARIES :
+                        ENTITY_COMPOSITE_DICTIONARIES;
+
+                addDeleteToMutator( m, cf, key( entity.getUuid(), dictionary ), timestamp );
+            }
+        }
+
+        addDeleteToMutator( m, ENTITY_PROPERTIES, key( entityId ), timestamp );
+
+        batchExecute( m, CassandraService.RETRY_COUNT );
+    }
+
+
+    @Override
+    public void delete( EntityRef entityRef ) throws Exception {
+        deleteEntity( entityRef.getUuid() );
+    }
+
+
+    public void batchCreateRole( Mutator<ByteBuffer> batch, UUID groupId, String roleName, String roleTitle,
+                                 long inactivity, RoleRef roleRef, UUID timestampUuid ) throws Exception {
+
+        long timestamp = getTimestampInMicros( timestampUuid );
+
+        if ( roleRef == null ) {
+            roleRef = new SimpleRoleRef( groupId, roleName );
+        }
+        if ( roleTitle == null ) {
+            roleTitle = roleRef.getRoleName();
+        }
+
+        EntityRef ownerRef = null;
+        if ( roleRef.getGroupId() != null ) {
+            ownerRef = new SimpleEntityRef( Group.ENTITY_TYPE, roleRef.getGroupId() );
+        }
+        else {
+            ownerRef = new SimpleEntityRef( Application.ENTITY_TYPE, applicationId );
+        }
+
+        Map<String, Object> properties = new TreeMap<String, Object>( CASE_INSENSITIVE_ORDER );
+        properties.put( PROPERTY_TYPE, Role.ENTITY_TYPE );
+        properties.put( "group", roleRef.getGroupId() );
+        properties.put( PROPERTY_NAME, roleRef.getApplicationRoleName() );
+        properties.put( "roleName", roleRef.getRoleName() );
+        properties.put( "title", roleTitle );
+        properties.put( PROPERTY_INACTIVITY, inactivity );
+
+        Entity role = batchCreate( batch, Role.ENTITY_TYPE, null, properties, roleRef.getUuid(), timestampUuid );
+
+        addInsertToMutator( batch, ENTITY_DICTIONARIES, key( ownerRef.getUuid(), Schema.DICTIONARY_ROLENAMES ),
+                roleRef.getRoleName(), roleTitle, timestamp );
+
+        addInsertToMutator( batch, ENTITY_DICTIONARIES, key( ownerRef.getUuid(), Schema.DICTIONARY_ROLETIMES ),
+                roleRef.getRoleName(), inactivity, timestamp );
+
+        addInsertToMutator( batch, ENTITY_DICTIONARIES, key( ownerRef.getUuid(), DICTIONARY_SETS ),
+                Schema.DICTIONARY_ROLENAMES, null, timestamp );
+
+        if ( roleRef.getGroupId() != null ) {
+            getRelationManager( ownerRef ).batchAddToCollection( batch, COLLECTION_ROLES, role, timestampUuid );
+        }
+    }
+
+
+    @Override
+    public EntityRef getUserByIdentifier( Identifier identifier ) throws Exception {
+        if ( identifier == null ) {
+            return null;
+        }
+        if ( identifier.isUUID() ) {
+            return new SimpleEntityRef( "user", identifier.getUUID() );
+        }
+        if ( identifier.isName() ) {
+            return this.getAlias( applicationId, "user", identifier.getName() );
+        }
+        if ( identifier.isEmail() ) {
+
+            Query query = new Query();
+            query.setEntityType( "user" );
+            query.addEqualityFilter( "email", identifier.getEmail() );
+            query.setLimit( 1 );
+            query.setResultsLevel( REFS );
+
+            Results r = getRelationManager( ref( applicationId ) ).searchCollection( "users", query );
+            if ( r != null && r.getRef() != null ) {
+                return r.getRef();
+            }
+            else {
+                // look-aside as it might be an email in the name field
+                return this.getAlias( applicationId, "user", identifier.getEmail() );
+            }
+        }
+        return null;
+    }
+
+
+    @Override
+    public EntityRef getGroupByIdentifier( Identifier identifier ) throws Exception {
+        if ( identifier == null ) {
+            return null;
+        }
+        if ( identifier.isUUID() ) {
+            return new SimpleEntityRef( "group", identifier.getUUID() );
+        }
+        if ( identifier.isName() ) {
+            return this.getAlias( applicationId, "group", identifier.getName() );
+        }
+        return null;
+    }
+
+
+    @Override
+    public Results getAggregateCounters( UUID userId, UUID groupId, String category, String counterName,
+                                         CounterResolution resolution, long start, long finish, boolean pad ) {
+        return this
+                .getAggregateCounters( userId, groupId, null, category, counterName, resolution, start, finish, pad );
+    }
+
+
+    @Override
+    @Metered( group = "core", name = "EntityManager_getAggregateCounters" )
+    public Results getAggregateCounters( UUID userId, UUID groupId, UUID queueId, String category, String counterName,
+                                         CounterResolution resolution, long start, long finish, boolean pad ) {
+        start = resolution.round( start );
+        finish = resolution.round( finish );
+        long expected_time = start;
+        Keyspace ko = cass.getApplicationKeyspace( applicationId );
+        SliceCounterQuery<String, Long> q = createCounterSliceQuery( ko, se, le );
+        q.setColumnFamily( APPLICATION_AGGREGATE_COUNTERS.toString() );
+        q.setRange( start, finish, false, ALL_COUNT );
+        QueryResult<CounterSlice<Long>> r = q.setKey(
+                counterUtils.getAggregateCounterRow( counterName, userId, groupId, queueId, category, resolution ) )
+                                             .execute();
+        List<AggregateCounter> counters = new ArrayList<AggregateCounter>();
+        for ( HCounterColumn<Long> column : r.get().getColumns() ) {
+            AggregateCounter count = new AggregateCounter( column.getName(), column.getValue() );
+            if ( pad && !( resolution == CounterResolution.ALL ) ) {
+                while ( count.getTimestamp() != expected_time ) {
+                    counters.add( new AggregateCounter( expected_time, 0 ) );
+                    expected_time = resolution.next( expected_time );
+                }
+                expected_time = resolution.next( expected_time );
+            }
+            counters.add( count );
+        }
+        if ( pad && !( resolution == CounterResolution.ALL ) ) {
+            while ( expected_time <= finish ) {
+                counters.add( new AggregateCounter( expected_time, 0 ) );
+                expected_time = resolution.next( expected_time );
+            }
+        }
+        return Results.fromCounters( new AggregateCounterSet( counterName, userId, groupId, category, counters ) );
+    }
+
+
+    @Override
+    @Metered( group = "core", name = "EntityManager_getAggregateCounters_fromQueryObj" )
+    public Results getAggregateCounters( Query query ) throws Exception {
+        CounterResolution resolution = query.getResolution();
+        if ( resolution == null ) {
+            resolution = CounterResolution.ALL;
+        }
+        long start = query.getStartTime() != null ? query.getStartTime() : 0;
+        long finish = query.getFinishTime() != null ? query.getFinishTime() : 0;
+        boolean pad = query.isPad();
+        if ( start <= 0 ) {
+            start = 0;
+        }
+        if ( ( finish <= 0 ) || ( finish < start ) ) {
+            finish = System.currentTimeMillis();
+        }
+        start = resolution.round( start );
+        finish = resolution.round( finish );
+        long expected_time = start;
+
+        if ( pad && ( resolution != CounterResolution.ALL ) ) {
+            long max_counters = ( finish - start ) / resolution.interval();
+            if ( max_counters > 1000 ) {
+                finish = resolution.round( start + ( resolution.interval() * 1000 ) );
+            }
+        }
+
+        List<CounterFilterPredicate> filters = query.getCounterFilters();
+        if ( filters == null ) {
+            return null;
+        }
+        Map<String, AggregateCounterSelection> selections = new HashMap<String, AggregateCounterSelection>();
+        Keyspace ko = cass.getApplicationKeyspace( applicationId );
+
+        for ( CounterFilterPredicate filter : filters ) {
+            AggregateCounterSelection selection =
+                    new AggregateCounterSelection( filter.getName(), getUuid( getUserByIdentifier( filter.getUser() ) ),
+                            getUuid( getGroupByIdentifier( filter.getGroup() ) ),
+                            org.apache.usergrid.mq.Queue.getQueueId( filter.getQueue() ), filter.getCategory() );
+            selections.put( selection.getRow( resolution ), selection );
+        }
+
+        MultigetSliceCounterQuery<String, Long> q = HFactory.createMultigetSliceCounterQuery( ko, se, le );
+        q.setColumnFamily( APPLICATION_AGGREGATE_COUNTERS.toString() );
+        q.setRange( start, finish, false, ALL_COUNT );
+        QueryResult<CounterRows<String, Long>> rows = q.setKeys( selections.keySet() ).execute();
+
+        List<AggregateCounterSet> countSets = new ArrayList<AggregateCounterSet>();
+        for ( CounterRow<String, Long> r : rows.get() ) {
+            expected_time = start;
+            List<AggregateCounter> counters = new ArrayList<AggregateCounter>();
+            for ( HCounterColumn<Long> column : r.getColumnSlice().getColumns() ) {
+                AggregateCounter count = new AggregateCounter( column.getName(), column.getValue() );
+                if ( pad && ( resolution != CounterResolution.ALL ) ) {
+                    while ( count.getTimestamp() != expected_time ) {
+                        counters.add( new AggregateCounter( expected_time, 0 ) );
+                        expected_time = resolution.next( expected_time );
+                    }
+                    expected_time = resolution.next( expected_time );
+                }
+                counters.add( count );
+            }
+            if ( pad && ( resolution != CounterResolution.ALL ) ) {
+                while ( expected_time <= finish ) {
+                    counters.add( new AggregateCounter( expected_time, 0 ) );
+                    expected_time = resolution.next( expected_time );
+                }
+            }
+            AggregateCounterSelection selection = selections.get( r.getKey() );
+            countSets.add( new AggregateCounterSet( selection.getName(), selection.getUserId(), selection.getGroupId(),
+                    selection.getCategory(), counters ) );
+        }
+
+        Collections.sort( countSets, new Comparator<AggregateCounterSet>() {
+            @Override
+            public int compare( AggregateCounterSet o1, AggregateCounterSet o2 ) {
+                String s1 = o1.getName();
+                String s2 = o2.getName();
+                return s1.compareTo( s2 );
+            }
+        } );
+        return Results.fromCounters( countSets );
+    }
+
+
+    @Override
+    @Metered( group = "core", name = "EntityManager_getEntityCounters" )
+    public Map<String, Long> getEntityCounters( UUID entityId ) throws Exception {
+
+        Map<String, Long> counters = new HashMap<String, Long>();
+        Keyspace ko = cass.getApplicationKeyspace( applicationId );
+        SliceCounterQuery<UUID, String> q = createCounterSliceQuery( ko, ue, se );
+        q.setColumnFamily( ENTITY_COUNTERS.toString() );
+        q.setRange( null, null, false, ALL_COUNT );
+        QueryResult<CounterSlice<String>> r = q.setKey( entityId ).execute();
+        for ( HCounterColumn<String> column : r.get().getColumns() ) {
+            counters.put( column.getName(), column.getValue() );
+        }
+        return counters;
+    }
+
+
+    @Override
+    public Map<String, Long> getApplicationCounters() throws Exception {
+        return getEntityCounters( applicationId );
+    }
+
+
+    @Override
+    @Metered( group = "core", name = "EntityManager_createApplicationCollection" )
+    public void createApplicationCollection( String entityType ) throws Exception {
+
+        Keyspace ko = cass.getApplicationKeyspace( applicationId );
+        Mutator<ByteBuffer> m = createMutator( ko, be );
+
+        long timestamp = cass.createTimestamp();
+
+        String collection_name = Schema.defaultCollectionName( entityType );
+        // Add name of collection to dictionary property Application.collections
+        addInsertToMutator( m, ENTITY_DICTIONARIES, key( applicationId, Schema.DICTIONARY_COLLECTIONS ),
+                collection_name, null, timestamp );
+
+        batchExecute( m, CassandraService.RETRY_COUNT );
+    }
+
+
+    @Override
+    public EntityRef getAlias( String aliasType, String alias ) throws Exception {
+        return getAlias( applicationId, aliasType, alias );
+    }
+
+
+    @Override
+    public EntityRef validate( EntityRef entityRef ) throws Exception {
+        return validate( entityRef, true );
+    }
+
+
+    public EntityRef validate( EntityRef entityRef, boolean verify ) throws Exception {
+        if ( ( entityRef == null ) || ( entityRef.getUuid() == null ) ) {
+            return null;
+        }
+        if ( ( entityRef.getType() == null ) || verify ) {
+            UUID entityId = entityRef.getUuid();
+            String entityType = entityRef.getType();
+            try {
+                entityRef = getRef( entityRef.getUuid() );
+            }
+            catch ( Exception e ) {
+                logger.error( "Unable to load entity: {}", new Object[] {entityRef.getUuid(), e} );
+            }
+            if ( entityRef == null ) {
+                throw new EntityNotFoundException( "Entity " + entityId.toString() + " cannot be verified" );
+            }
+            if ( ( entityType != null ) && !entityType.equalsIgnoreCase( entityRef.getType() ) ) {
+                throw new UnexpectedEntityTypeException(
+                        "Entity " + entityId + " is not the expected type, expected " + entityType + ", found "
+                                + entityRef.getType() );
+            }
+        }
+        return entityRef;
+    }
+
+
+    @Override
+    public String getType( UUID entityid ) throws Exception {
+        return getEntityType( entityid );
+    }
+
+
+    public String getType( EntityRef entity ) throws Exception {
+        if ( entity.getType() != null ) {
+            return entity.getType();
+        }
+        return getEntityType( entity.getUuid() );
+    }
+
+
+    @Override
+    public Entity get( UUID entityid ) throws Exception {
+        return getEntity( entityid, null );
+    }
+
+
+    @Override
+    public EntityRef getRef( UUID entityId ) throws Exception {
+        String entityType = getEntityType( entityId );
+        if ( entityType == null ) {
+            logger.warn( "Unable to get type for entity: {} ", new Object[] { entityId, new Exception()} );
+            return null;
+        }
+        return ref( entityType, entityId );
+    }
+
+
+    @Override
+    public Entity get( EntityRef entityRef ) throws Exception {
+        if ( entityRef == null ) {
+            return null;
+        }
+        return getEntity( entityRef.getUuid(), null );
+    }
+
+
+    @Override
+    public <A extends Entity> A get( EntityRef entityRef, Class<A> entityClass ) throws Exception {
+        if ( entityRef == null ) {
+            return null;
+        }
+        return get( entityRef.getUuid(), entityClass );
+    }
+
+
+    @SuppressWarnings( "unchecked" )
+    @Override
+    public <A extends Entity> A get( UUID entityId, Class<A> entityClass ) throws Exception {
+        A e = null;
+        try {
+            e = ( A ) getEntity( entityId, ( Class<Entity> ) entityClass );
+        }
+        catch ( ClassCastException e1 ) {
+            logger.error( "Unable to get typed entity: {} of class {}", new Object[] {entityId, entityClass.getCanonicalName(), e1} );
+        }
+        return e;
+    }
+
+
+    @Override
+    public Results get( Collection<UUID> entityIds, Results.Level resultsLevel ) throws Exception {
+        List<? extends Entity> results = getEntities( entityIds, null );
+        return Results.fromEntities( results );
+    }
+
+
+    /* (non-Javadoc)
+   * @see org.apache.usergrid.persistence.EntityManager#get(java.util.Collection)
+   */
+    @Override
+    public Results get( Collection<UUID> entityIds ) throws Exception {
+        return fromEntities( getEntities( entityIds, null ) );
+    }
+
+
+    @Override
+    public Results get( Collection<UUID> entityIds, Class<? extends Entity> entityClass, Results.Level resultsLevel )
+            throws Exception {
+        return fromEntities( getEntities( entityIds, entityClass ) );
+    }
+
+
+    @Override
+    public Results get( Collection<UUID> entityIds, String entityType, Class<? extends Entity> entityClass,
+                        Results.Level resultsLevel ) throws Exception {
+        return fromEntities( getEntities( entityIds, entityClass ) );
+    }
+
+
+    public Results loadEntities( Results results, Results.Level resultsLevel, int count ) throws Exception {
+        return loadEntities( results, resultsLevel, null, count );
+    }
+
+
+    public Results loadEntities( Results results, Results.Level resultsLevel, Map<UUID, UUID> associatedMap, int count )
+            throws Exception {
+
+        results = results.trim( count );
+        if ( resultsLevel.ordinal() <= results.getLevel().ordinal() ) {
+            return results;
+        }
+
+        results.setEntities( getEntities( results.getIds(), null ) );
+
+        if ( resultsLevel == Results.Level.LINKED_PROPERTIES ) {
+            List<Entity> entities = results.getEntities();
+            BiMap<UUID, UUID> associatedIds = null;
+
+            if ( associatedMap != null ) {
+                associatedIds = HashBiMap.create( associatedMap );
+            }
+            else {
+                associatedIds = HashBiMap.create( entities.size() );
+                for ( Entity entity : entities ) {
+                    Object id = entity.getMetadata( PROPERTY_ASSOCIATED );
+                    if ( id instanceof UUID ) {
+                        associatedIds.put( entity.getUuid(), ( UUID ) id );
+                    }
+                }
+            }
+            List<DynamicEntity> linked = getEntities( new ArrayList<UUID>( associatedIds.values() ), null );
+            for ( DynamicEntity l : linked ) {
+                Map<String, Object> p = l.getDynamicProperties();
+                if ( ( p != null ) && ( p.size() > 0 ) ) {
+                    Entity e = results.getEntitiesMap().get( associatedIds.inverse().get( l.getUuid() ) );
+                    if ( l.getType().endsWith( TYPE_MEMBER ) ) {
+                        e.setProperty( TYPE_MEMBER, p );
+                    }
+                    else if ( l.getType().endsWith( TYPE_CONNECTION ) ) {
+                        e.setProperty( TYPE_CONNECTION, p );
+                    }
+                }
+            }
+        }
+
+        return results;
+    }
+
+
+    @Override
+    public void update( Entity entity ) throws Exception {
+        updateProperties( entity.getUuid(), entity.getProperties() );
+    }
+
+
+    @Override
+    public Object getProperty( EntityRef entityRef, String propertyName ) throws Exception {
+        Entity entity = loadPartialEntity( entityRef.getUuid(), propertyName );
+
+        if ( entity == null ) {
+            return null;
+        }
+
+        return entity.getProperty( propertyName );
+    }
+
+
+    @Override
+    public Map<String, Object> getProperties( EntityRef entityRef ) throws Exception {
+        Entity entity = loadPartialEntity( entityRef.getUuid() );
+        Map<String, Object> props = entity.getProperties();
+        return props;
+    }
+
+
+    @Override
+    public List<Entity> getPartialEntities( Collection<UUID> ids, Collection<String> fields ) throws Exception {
+
+        List<Entity> entities = new ArrayList<Entity>( ids.size() );
+
+        if ( ids == null || ids.size() == 0 ) {
+            return entities;
+        }
+
+        fields.add( PROPERTY_UUID );
+        fields.add( PROPERTY_TYPE );
+
+        Rows<UUID, String, ByteBuffer> results = null;
+
+        results = cass.getRows( cass.getApplicationKeyspace( applicationId ), ENTITY_PROPERTIES, ids, fields, ue, se,
+                be );
+
+        if ( results == null ) {
+            return entities;
+        }
+
+        for ( Row<UUID, String, ByteBuffer> row : results ) {
+
+
+            Map<String, Object> properties =
+                    deserializeEntityProperties( results.getByKey( row.getKey() ).getColumnSlice().getColumns(), true,
+                            false );
+
+            //Could get a tombstoned row if the index is behind, just ignore it
+            if ( properties == null ) {
+                logger.warn( "Received row key {} with no type or properties, skipping", row.getKey() );
+                continue;
+            }
+
+            UUID id = uuid( properties.get( PROPERTY_UUID ) );
+            String type = string( properties.get( PROPERTY_TYPE ) );
+
+            if ( id == null || type == null ) {
+                logger.warn( "Error retrieving entity with key {} no type or id deseriazable, skipping", row.getKey() );
+                continue;
+            }
+
+            Entity entity = EntityFactory.newEntity( id, type );
+            entity.setProperties( properties );
+
+            entities.add( entity );
+        }
+
+
+        return entities;
+    }
+
+
+    @Override
+    public void setProperty( EntityRef entityRef, String propertyName, Object propertyValue ) throws Exception {
+
+        setProperty( entityRef, propertyName, propertyValue, false );
+    }
+
+
+    @Override
+    public void setProperty( EntityRef entityRef, String propertyName, Object propertyValue, boolean override )
+            throws Exception {
+
+        if ( ( propertyValue instanceof String ) && ( ( String ) propertyValue ).equals( "" ) ) {
+            propertyValue = null;
+        }
+
+        // todo: would this ever need to load more?
+        DynamicEntity entity = loadPartialEntity( entityRef.getUuid(), propertyName );
+
+        UUID timestampUuid = newTimeUUID();
+        Mutator<ByteBuffer> batch = createMutator( cass.getApplicationKeyspace( applicationId ), be );
+
+        propertyValue = getDefaultSchema().validateEntityPropertyValue( entity.getType(), propertyName, propertyValue );
+
+        entity.setProperty( propertyName, propertyValue );
+        batch = batchSetProperty( batch, entity, propertyName, propertyValue, override, false, timestampUuid );
+        batchExecute( batch, CassandraService.RETRY_COUNT );
+    }
+
+
+    @Override
+    public void updateProperties( EntityRef entityRef, Map<String, Object> properties ) throws Exception {
+        entityRef = validate( entityRef );
+        properties = getDefaultSchema().cleanUpdatedProperties( entityRef.getType(), properties, false );
+        updateProperties( entityRef.getUuid(), properties );
+    }
+
+
+    @Override
+    public void addToDictionary( EntityRef entityRef, String dictionaryName, Object elementValue ) throws Exception {
+        addToDictionary( entityRef, dictionaryName, elementValue, null );
+    }
+
+
+    @Override
+    public void addToDictionary( EntityRef entityRef, String dictionaryName, Object elementValue,
+                                 Object elementCoValue ) throws Exception {
+
+        if ( elementValue == null ) {
+            return;
+        }
+
+        EntityRef entity = getRef( entityRef.getUuid() );
+
+        UUID timestampUuid = newTimeUUID();
+        Mutator<ByteBuffer> batch = createMutator( cass.getApplicationKeyspace( applicationId ), be );
+
+        batch = batchUpdateDictionary( batch, entity, dictionaryName, elementValue, elementCoValue, false,
+                timestampUuid );
+
+        batchExecute( batch, CassandraService.RETRY_COUNT );
+    }
+
+
+    @Override
+    public void addSetToDictionary( EntityRef entityRef, String dictionaryName, Set<?> elementValues )
+            throws Exception {
+
+        if ( ( elementValues == null ) || elementValues.isEmpty() ) {
+            return;
+        }
+
+        EntityRef entity = getRef( entityRef.getUuid() );
+
+        UUID timestampUuid = newTimeUUID();
+        Mutator<ByteBuffer> batch = createMutator( cass.getApplicationKeyspace( applicationId ), be );
+
+        for ( Object elementValue : elementValues ) {
+            batch = batchUpdateDictionary( batch, entity, dictionaryName, elementValue, null, false, timestampUuid );
+        }
+
+        batchExecute( batch, CassandraService.RETRY_COUNT );
+    }
+
+
+    @Override
+    public void addMapToDictionary( EntityRef entityRef, String dictionaryName, Map<?, ?> elementValues )
+            throws Exception {
+
+        if ( ( elementValues == null ) || elementValues.isEmpty() || entityRef == null ) {
+            return;
+        }
+
+        EntityRef entity = getRef( entityRef.getUuid() );
+
+        UUID timestampUuid = newTimeUUID();
+        Mutator<ByteBuffer> batch = createMutator( cass.getApplicationKeyspace( applicationId ), be );
+
+        for ( Map.Entry<?, ?> elementValue : elementValues.entrySet() ) {
+            batch = batchUpdateDictionary( batch, entity, dictionaryName, elementValue.getKey(),
+                    elementValue.getValue(), false, timestampUuid );
+        }
+
+        batchExecute( batch, CassandraService.RETRY_COUNT );
+    }
+
+
+    @Override
+    public void removeFromDictionary( EntityRef entityRef, String dictionaryName, Object elementValue )
+            throws Exception {
+
+        if ( elementValue == null ) {
+            return;
+        }
+
+        EntityRef entity = getRef( entityRef.getUuid() );
+
+        UUID timestampUuid = newTimeUUID();
+        Mutator<ByteBuffer> batch = createMutator( cass.getApplicationKeyspace( applicationId ), be );
+
+        batch = batchUpdateDictionary( batch, entity, dictionaryName, elementValue, true, timestampUuid );
+
+        batchExecute( batch, CassandraService.RETRY_COUNT );
+    }
+
+
+    @Override
+    public Set<String> getDictionaries( EntityRef entity ) throws Exception {
+        return getDictionaryNames( entity );
+    }
+
+
+    @Override
+    public void deleteProperty( EntityRef entityRef, String propertyName ) throws Exception {
+        setProperty( entityRef, propertyName, null );
+    }
+
+
+    @Override
+    public Set<String> getApplicationCollections() throws Exception {
+        Set<String> collections = new TreeSet<String>( CASE_INSENSITIVE_ORDER );
+        Set<String> dynamic_collections = cast( getDictionaryAsSet( getApplicationRef(), DICTIONARY_COLLECTIONS ) );
+        if ( dynamic_collections != null ) {
+            for ( String collection : dynamic_collections ) {
+                if ( !Schema.isAssociatedEntityType( collection ) ) {
+                    collections.add( collection );
+                }
+            }
+        }
+        Set<String> system_collections = getDefaultSchema().getCollectionNames( Application.ENTITY_TYPE );
+        if ( system_collections != null ) {
+            for ( String collection : system_collections ) {
+                if ( !Schema.isAssociatedEntityType( collection ) ) {
+                    collections.add( collection );
+                }
+            }
+        }
+        return collections;
+    }
+
+
+    @Override
+    public long getApplicationCollectionSize( String collectionName ) throws Exception {
+        Long count = null;
+        if ( !Schema.isAssociatedEntityType( collectionName ) ) {
+            Map<String, Long> counts = getApplicationCounters();
+            count = counts.get( new String( APPLICATION_COLLECTION + collectionName ) );
+        }
+        return count != null ? count : 0;
+    }
+
+
+    @Override
+    public Map<String, Object> getApplicationCollectionMetadata() throws Exception {
+        Set<String> collections = getApplicationCollections();
+        Map<String, Long> counts = getApplicationCounters();
+        Map<String, Object> metadata = new HashMap<String, Object>();
+        if ( collections != null ) {
+            for ( String collectionName : collections ) {
+                if ( !Schema.isAssociatedEntityType( collectionName ) ) {
+                    Long count = counts.get( APPLICATION_COLLECTION + collectionName );
+                    /*
+                     * int count = emf .countColumns(
+					 * getApplicationKeyspace(applicationId),
+					 * ApplicationCF.ENTITY_ID_SETS, key(applicationId,
+					 * DICTIONARY

<TRUNCATED>

[02/96] [abbrv] [partial] Change package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/test/java/org/apache/usergrid/CoreITSetupImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/CoreITSetupImpl.java b/stack/core/src/test/java/org/apache/usergrid/CoreITSetupImpl.java
new file mode 100644
index 0000000..eee42af
--- /dev/null
+++ b/stack/core/src/test/java/org/apache/usergrid/CoreITSetupImpl.java
@@ -0,0 +1,145 @@
+package org.apache.usergrid;
+
+
+import java.util.UUID;
+
+import org.apache.usergrid.cassandra.CassandraResource;
+import org.apache.usergrid.mq.QueueManagerFactory;
+import org.apache.usergrid.persistence.EntityManagerFactory;
+import org.apache.usergrid.persistence.IndexBucketLocator;
+import org.apache.usergrid.persistence.cassandra.CassandraService;
+import org.apache.usergrid.utils.JsonUtils;
+import org.junit.runner.Description;
+import org.junit.runners.model.Statement;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+public class CoreITSetupImpl implements CoreITSetup {
+    private static final Logger LOG = LoggerFactory.getLogger( CoreITSetupImpl.class );
+
+    protected EntityManagerFactory emf;
+    protected QueueManagerFactory qmf;
+    protected IndexBucketLocator indexBucketLocator;
+    protected CassandraService cassandraService;
+    protected CassandraResource cassandraResource;
+    protected boolean enabled = false;
+
+
+    public CoreITSetupImpl( CassandraResource cassandraResource ) {
+        this.cassandraResource = cassandraResource;
+    }
+
+
+    @Override
+    public Statement apply( Statement base, Description description ) {
+        return statement( base, description );
+    }
+
+
+    private Statement statement( final Statement base, final Description description ) {
+        return new Statement() {
+            @Override
+            public void evaluate() throws Throwable {
+                before( description );
+
+                try {
+                    base.evaluate();
+                }
+                finally {
+                    after( description );
+                }
+            }
+        };
+    }
+
+
+    /**
+     * Sets up the resources for the test here.
+     *
+     * @throws Throwable if setup fails (which will disable {@code after}
+     */
+    protected void before( Description description ) throws Throwable {
+        LOG.info( "Setting up for {}", description.getDisplayName() );
+        initialize();
+    }
+
+
+    private void initialize() {
+        if ( !enabled ) {
+            emf = cassandraResource.getBean( EntityManagerFactory.class );
+            qmf = cassandraResource.getBean( QueueManagerFactory.class );
+            indexBucketLocator = cassandraResource.getBean( IndexBucketLocator.class );
+            cassandraService = cassandraResource.getBean( CassandraService.class );
+            enabled = true;
+        }
+    }
+
+
+    /** Override to tear down your specific external resource. */
+    protected void after( Description description ) {
+        LOG.info( "Tearing down for {}", description.getDisplayName() );
+    }
+
+
+    @Override
+    public EntityManagerFactory getEmf() {
+        if ( emf == null ) {
+            initialize();
+        }
+
+        return emf;
+    }
+
+
+    @Override
+    public QueueManagerFactory getQmf() {
+        if ( qmf == null ) {
+            initialize();
+        }
+
+        return qmf;
+    }
+
+
+    @Override
+    public IndexBucketLocator getIbl() {
+        if ( indexBucketLocator == null ) {
+            initialize();
+        }
+
+        return indexBucketLocator;
+    }
+
+
+    @Override
+    public CassandraService getCassSvc() {
+        if ( cassandraService == null ) {
+            initialize();
+        }
+
+        return cassandraService;
+    }
+
+
+    @Override
+    public UUID createApplication( String organizationName, String applicationName ) throws Exception {
+        if ( USE_DEFAULT_APPLICATION ) {
+            return CassandraService.DEFAULT_APPLICATION_ID;
+        }
+
+        if ( emf == null ) {
+            emf = cassandraResource.getBean( EntityManagerFactory.class );
+        }
+
+        return emf.createApplication( organizationName, applicationName );
+    }
+
+
+    @Override
+    public void dump( String name, Object obj ) {
+        if ( obj != null && LOG.isInfoEnabled() ) {
+            LOG.info( name + ":\n" + JsonUtils.mapToFormattedJsonString( obj ) );
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/test/java/org/apache/usergrid/CoreITSuite.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/CoreITSuite.java b/stack/core/src/test/java/org/apache/usergrid/CoreITSuite.java
new file mode 100644
index 0000000..f08916d
--- /dev/null
+++ b/stack/core/src/test/java/org/apache/usergrid/CoreITSuite.java
@@ -0,0 +1,34 @@
+package org.apache.usergrid;
+
+
+import org.apache.usergrid.cassandra.CassandraResource;
+import org.apache.usergrid.cassandra.Concurrent;
+import org.apache.usergrid.locking.cassandra.HectorLockManagerIT;
+import org.apache.usergrid.mq.MessagesIT;
+import org.apache.usergrid.persistence.CollectionIT;
+import org.apache.usergrid.persistence.CounterIT;
+import org.apache.usergrid.persistence.EntityConnectionsIT;
+import org.apache.usergrid.persistence.EntityDictionaryIT;
+import org.apache.usergrid.persistence.EntityManagerIT;
+import org.apache.usergrid.persistence.GeoIT;
+import org.apache.usergrid.persistence.IndexIT;
+import org.apache.usergrid.persistence.PathQueryIT;
+import org.apache.usergrid.persistence.PermissionsIT;
+import org.apache.usergrid.persistence.cassandra.EntityManagerFactoryImplIT;
+import org.apache.usergrid.system.UsergridSystemMonitorIT;
+import org.junit.ClassRule;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+        HectorLockManagerIT.class, UsergridSystemMonitorIT.class, CollectionIT.class, CounterIT.class,
+        EntityConnectionsIT.class, EntityDictionaryIT.class, EntityManagerIT.class, GeoIT.class, IndexIT.class,
+        MessagesIT.class, PermissionsIT.class, PathQueryIT.class, EntityManagerFactoryImplIT.class
+})
+@Concurrent()
+public class CoreITSuite {
+    @ClassRule
+    public static CassandraResource cassandraResource = CassandraResource.newWithAvailablePorts( "coreManager" );
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/test/java/org/apache/usergrid/CoreTestSuite.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/CoreTestSuite.java b/stack/core/src/test/java/org/apache/usergrid/CoreTestSuite.java
new file mode 100644
index 0000000..3b45c0a
--- /dev/null
+++ b/stack/core/src/test/java/org/apache/usergrid/CoreTestSuite.java
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2012 Apigee Corporation
+ * 
+ * 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;
+
+
+import org.apache.usergrid.cassandra.Concurrent;
+import org.apache.usergrid.locking.zookeeper.ZookeeperLockManagerTest;
+import org.apache.usergrid.mq.QueuePathsTest;
+import org.apache.usergrid.persistence.EntityTest;
+import org.apache.usergrid.persistence.QueryTest;
+import org.apache.usergrid.persistence.QueryUtilsTest;
+import org.apache.usergrid.persistence.SchemaTest;
+import org.apache.usergrid.persistence.UtilsTest;
+import org.apache.usergrid.persistence.cassandra.QueryProcessorTest;
+import org.apache.usergrid.persistence.cassandra.SimpleIndexBucketLocatorImplTest;
+import org.apache.usergrid.persistence.query.ir.result.IntersectionIteratorTest;
+import org.apache.usergrid.persistence.query.ir.result.SubtractionIteratorTest;
+import org.apache.usergrid.persistence.query.ir.result.UnionIteratorTest;
+import org.apache.usergrid.persistence.query.tree.GrammarTreeTest;
+import org.apache.usergrid.persistence.query.tree.LongLiteralTest;
+import org.apache.usergrid.persistence.query.tree.StringLiteralTest;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+        ZookeeperLockManagerTest.class, QueuePathsTest.class, QueryProcessorTest.class,
+        SimpleIndexBucketLocatorImplTest.class, EntityTest.class, QueryTest.class, QueryUtilsTest.class,
+        SchemaTest.class, UtilsTest.class, IntersectionIteratorTest.class, SubtractionIteratorTest.class,
+        UnionIteratorTest.class, GrammarTreeTest.class, LongLiteralTest.class, StringLiteralTest.class
+})
+@Concurrent()
+public class CoreTestSuite {}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/test/java/org/apache/usergrid/batch/AppArgsTest.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/AppArgsTest.java b/stack/core/src/test/java/org/apache/usergrid/batch/AppArgsTest.java
new file mode 100644
index 0000000..73b193a
--- /dev/null
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/AppArgsTest.java
@@ -0,0 +1,53 @@
+package org.apache.usergrid.batch;
+
+
+import org.apache.usergrid.batch.AppArgs;
+import org.apache.usergrid.cassandra.Concurrent;
+import org.junit.Test;
+
+import com.google.common.base.CharMatcher;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+
+/** @author zznate */
+@Concurrent()
+public class AppArgsTest {
+
+    @Test
+    public void verifyDefaults() {
+        AppArgs aa = AppArgs.parseArgs( new String[] { "" } );
+        assertEquals( "127.0.0.1", aa.getHost() );
+        assertEquals( 9160, aa.getPort() );
+    }
+
+
+    @Test
+    public void verifyArgs() {
+        AppArgs aa =
+                AppArgs.parseArgs( new String[] { "-host", "127.0.0.2", "-appContext", "classpath:/appContext.xml" } );
+        assertEquals( "127.0.0.2", aa.getHost() );
+        assertNotNull( aa.getAppContext() );
+    }
+
+
+    @Test
+    public void verifyContextSwitch() {
+        AppArgs appArgs = AppArgs.parseArgs( new String[] { "-appContext", "classpath:/appContext.xml" } );
+        assertEquals( "/appContext.xml", getIndex( appArgs.getAppContext() ) );
+        appArgs = AppArgs.parseArgs( new String[] { "-appContext", "/appContext.xml" } );
+        assertEquals( "/appContext.xml", getIndex( appArgs.getAppContext() ) );
+    }
+
+
+    private String getIndex( String path ) {
+        int index = CharMatcher.is( ':' ).indexIn( path );
+        if ( index > 0 ) {
+            return path.substring( ++index );
+        }
+        else {
+            return path;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/test/java/org/apache/usergrid/batch/BulkJobExecutionUnitTest.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/BulkJobExecutionUnitTest.java b/stack/core/src/test/java/org/apache/usergrid/batch/BulkJobExecutionUnitTest.java
new file mode 100644
index 0000000..501bc53
--- /dev/null
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/BulkJobExecutionUnitTest.java
@@ -0,0 +1,211 @@
+package org.apache.usergrid.batch;
+
+
+import java.util.UUID;
+
+import org.apache.usergrid.batch.JobExecution;
+import org.apache.usergrid.batch.JobExecutionImpl;
+import org.apache.usergrid.batch.JobExecution.Status;
+import org.apache.usergrid.batch.repository.JobDescriptor;
+import org.apache.usergrid.cassandra.Concurrent;
+import org.apache.usergrid.persistence.entities.JobData;
+import org.apache.usergrid.persistence.entities.JobStat;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+
+/**
+ * @author zznate
+ * @author tnine
+ */
+@Concurrent()
+public class BulkJobExecutionUnitTest {
+
+    @Test
+    public void transitionsOk() {
+        JobData data = new JobData();
+        JobStat stat = new JobStat();
+        JobDescriptor jobDescriptor = new JobDescriptor( "", UUID.randomUUID(), UUID.randomUUID(), data, stat, null );
+        JobExecution bje = new JobExecutionImpl( jobDescriptor );
+        assertEquals( JobExecution.Status.NOT_STARTED, bje.getStatus() );
+        bje.start( 1 );
+        assertEquals( JobExecution.Status.IN_PROGRESS, bje.getStatus() );
+        bje.completed();
+        assertEquals( JobExecution.Status.COMPLETED, bje.getStatus() );
+    }
+
+
+    @Test
+    public void transitionsDead() {
+        JobData data = new JobData();
+        JobStat stat = new JobStat();
+        JobDescriptor jobDescriptor = new JobDescriptor( "", UUID.randomUUID(), UUID.randomUUID(), data, stat, null );
+        JobExecution bje = new JobExecutionImpl( jobDescriptor );
+        assertEquals( JobExecution.Status.NOT_STARTED, bje.getStatus() );
+        bje.start( 1 );
+        assertEquals( JobExecution.Status.IN_PROGRESS, bje.getStatus() );
+        bje.killed();
+        assertEquals( JobExecution.Status.DEAD, bje.getStatus() );
+    }
+
+
+    @Test
+    public void transitionsRetry() {
+        JobData data = new JobData();
+        JobStat stat = new JobStat();
+        JobDescriptor jobDescriptor = new JobDescriptor( "", UUID.randomUUID(), UUID.randomUUID(), data, stat, null );
+        JobExecution bje = new JobExecutionImpl( jobDescriptor );
+        assertEquals( JobExecution.Status.NOT_STARTED, bje.getStatus() );
+        bje.start( JobExecution.FOREVER );
+        assertEquals( JobExecution.Status.IN_PROGRESS, bje.getStatus() );
+        bje.failed();
+        assertEquals( JobExecution.Status.FAILED, bje.getStatus() );
+    }
+
+
+    @Test
+    public void transitionFail() {
+        JobData data = new JobData();
+        JobStat stat = new JobStat();
+        JobDescriptor jobDescriptor = new JobDescriptor( "", UUID.randomUUID(), UUID.randomUUID(), data, stat, null );
+        JobExecution bje = new JobExecutionImpl( jobDescriptor );
+        try {
+            bje.completed();
+            fail( "Should have throw ISE on NOT_STARTED to IN_PROGRESS" );
+        }
+        catch ( IllegalStateException ise ) {
+        }
+
+        try {
+            bje.failed();
+            fail( "Should have thrown ISE on NOT_STARTED to FAILED" );
+        }
+        catch ( IllegalStateException ise ) {
+        }
+        bje.start( 1 );
+
+        bje.completed();
+        try {
+            bje.failed();
+            fail( "Should have failed failed after complete call" );
+        }
+        catch ( IllegalStateException ise ) {
+        }
+    }
+
+
+    @Test
+    public void transitionFailOnDeath() {
+        JobData data = new JobData();
+        JobStat stat = new JobStat();
+        JobDescriptor jobDescriptor = new JobDescriptor( "", UUID.randomUUID(), UUID.randomUUID(), data, stat, null );
+        JobExecution bje = new JobExecutionImpl( jobDescriptor );
+        try {
+            bje.completed();
+            fail( "Should have throw ISE on NOT_STARTED to IN_PROGRESS" );
+        }
+        catch ( IllegalStateException ise ) {
+        }
+
+        try {
+            bje.failed();
+            fail( "Should have thrown ISE on NOT_STARTED to FAILED" );
+        }
+        catch ( IllegalStateException ise ) {
+        }
+        bje.start( 1 );
+
+        bje.killed();
+        try {
+            bje.killed();
+            fail( "Should have failed failed after complete call" );
+        }
+        catch ( IllegalStateException ise ) {
+        }
+    }
+
+
+    @Test
+    public void failureTriggerCount() {
+        JobData data = new JobData();
+        JobStat stat = new JobStat();
+        JobDescriptor jobDescriptor = new JobDescriptor( "", UUID.randomUUID(), UUID.randomUUID(), data, stat, null );
+        JobExecution bje = new JobExecutionImpl( jobDescriptor );
+
+        bje.start( 1 );
+
+        assertEquals( Status.IN_PROGRESS, bje.getStatus() );
+        assertEquals( 1, stat.getRunCount() );
+
+
+        bje.failed();
+
+        assertEquals( Status.FAILED, bje.getStatus() );
+        assertEquals( 1, stat.getRunCount() );
+
+
+        // now fail again, we should trigger a state change
+        bje = new JobExecutionImpl( jobDescriptor );
+        bje.start( 1 );
+
+        assertEquals( Status.DEAD, bje.getStatus() );
+        assertEquals( 2, stat.getRunCount() );
+    }
+
+
+    @Test
+    public void failureTriggerNoTrip() {
+        JobData data = new JobData();
+        JobStat stat = new JobStat();
+        JobDescriptor jobDescriptor = new JobDescriptor( "", UUID.randomUUID(), UUID.randomUUID(), data, stat, null );
+        JobExecution bje = new JobExecutionImpl( jobDescriptor );
+
+        bje.start( JobExecution.FOREVER );
+
+        assertEquals( Status.IN_PROGRESS, bje.getStatus() );
+        assertEquals( 1, stat.getRunCount() );
+
+        bje.failed();
+
+        assertEquals( Status.FAILED, bje.getStatus() );
+        assertEquals( 1, stat.getRunCount() );
+
+        // now fail again, we should trigger a state change
+        bje = new JobExecutionImpl( jobDescriptor );
+        bje.start( JobExecution.FOREVER );
+
+        assertEquals( Status.IN_PROGRESS, bje.getStatus() );
+        assertEquals( 2, stat.getRunCount() );
+
+        bje.failed();
+
+        assertEquals( Status.FAILED, bje.getStatus() );
+        assertEquals( 2, stat.getRunCount() );
+    }
+
+
+    @Test
+    public void doubleInvokeFail() {
+        JobData data = new JobData();
+        JobStat stat = new JobStat();
+        JobDescriptor jobDescriptor = new JobDescriptor( "", UUID.randomUUID(), UUID.randomUUID(), data, stat, null );
+        JobExecution bje = new JobExecutionImpl( jobDescriptor );
+        bje.start( 1 );
+        try {
+            bje.start( 1 );
+            fail( "Should have failed on double start() call" );
+        }
+        catch ( IllegalStateException ise ) {
+        }
+
+        bje.completed();
+        try {
+            bje.completed();
+            fail( "Should have failed on double complete call" );
+        }
+        catch ( IllegalStateException ise ) {
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/test/java/org/apache/usergrid/batch/BulkTestUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/BulkTestUtils.java b/stack/core/src/test/java/org/apache/usergrid/batch/BulkTestUtils.java
new file mode 100644
index 0000000..01ea153
--- /dev/null
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/BulkTestUtils.java
@@ -0,0 +1,41 @@
+package org.apache.usergrid.batch;
+
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.apache.usergrid.batch.Job;
+import org.apache.usergrid.batch.JobExecution;
+import org.apache.usergrid.batch.JobFactory;
+import org.apache.usergrid.batch.repository.JobDescriptor;
+import org.junit.Ignore;
+
+
+/** @author zznate */
+@Ignore
+public class BulkTestUtils {
+
+    public static JobFactory getBulkJobFactory() {
+        return new MyBulkJobFactory();
+    }
+
+
+    private static class MyBulkJobFactory implements JobFactory {
+        /* (non-Javadoc)
+         * @see org.apache.usergrid.batch.JobFactory#jobsFrom(org.apache.usergrid.batch.repository.JobDescriptor)
+         */
+        @Override
+        public List<Job> jobsFrom( JobDescriptor descriptor ) {
+            return Arrays.asList( new Job[] { new MyBulkJob() } );
+        }
+    }
+
+
+    private static class MyBulkJob implements Job {
+        @Override
+        public void execute( JobExecution execution ) throws Exception {
+            // do some stuff
+
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/test/java/org/apache/usergrid/batch/ConcurrentSchedulerITSuite.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/ConcurrentSchedulerITSuite.java b/stack/core/src/test/java/org/apache/usergrid/batch/ConcurrentSchedulerITSuite.java
new file mode 100644
index 0000000..af1ce02
--- /dev/null
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/ConcurrentSchedulerITSuite.java
@@ -0,0 +1,31 @@
+package org.apache.usergrid.batch;
+
+
+import org.apache.usergrid.batch.job.SchedulerRuntime1IT;
+import org.apache.usergrid.batch.job.SchedulerRuntime2IT;
+import org.apache.usergrid.batch.job.SchedulerRuntime3IT;
+import org.apache.usergrid.batch.job.SchedulerRuntime4IT;
+import org.apache.usergrid.batch.job.SchedulerRuntime5IT;
+import org.apache.usergrid.batch.job.SchedulerRuntime6IT;
+import org.apache.usergrid.batch.job.SchedulerRuntime7IT;
+import org.apache.usergrid.batch.job.SchedulerRuntime8IT;
+import org.apache.usergrid.cassandra.CassandraResource;
+import org.apache.usergrid.cassandra.Concurrent;
+import org.apache.usergrid.cassandra.ConcurrentSuite;
+import org.junit.ClassRule;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+
+@RunWith(ConcurrentSuite.class)
+@Suite.SuiteClasses(
+        {
+                SchedulerRuntime1IT.class, SchedulerRuntime2IT.class, SchedulerRuntime3IT.class,
+                SchedulerRuntime4IT.class, SchedulerRuntime5IT.class, SchedulerRuntime6IT.class,
+                SchedulerRuntime7IT.class, SchedulerRuntime8IT.class
+        })
+@Concurrent()
+public class ConcurrentSchedulerITSuite {
+    @ClassRule
+    public static CassandraResource cassandraResource = CassandraResource.newWithAvailablePorts();
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/test/java/org/apache/usergrid/batch/ConcurrentSchedulerTestSuite.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/ConcurrentSchedulerTestSuite.java b/stack/core/src/test/java/org/apache/usergrid/batch/ConcurrentSchedulerTestSuite.java
new file mode 100644
index 0000000..debd291
--- /dev/null
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/ConcurrentSchedulerTestSuite.java
@@ -0,0 +1,19 @@
+package org.apache.usergrid.batch;
+
+
+import org.apache.usergrid.batch.AppArgsTest;
+import org.apache.usergrid.batch.BulkJobExecutionUnitTest;
+import org.apache.usergrid.batch.UsergridJobFactoryTest;
+import org.apache.usergrid.cassandra.Concurrent;
+import org.apache.usergrid.cassandra.ConcurrentSuite;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+
+@RunWith(ConcurrentSuite.class)
+@Suite.SuiteClasses(
+        {
+                AppArgsTest.class, UsergridJobFactoryTest.class, BulkJobExecutionUnitTest.class,
+        })
+@Concurrent()
+public class ConcurrentSchedulerTestSuite {}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/test/java/org/apache/usergrid/batch/SchedulerITSuite.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/SchedulerITSuite.java b/stack/core/src/test/java/org/apache/usergrid/batch/SchedulerITSuite.java
new file mode 100644
index 0000000..804e9bf
--- /dev/null
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/SchedulerITSuite.java
@@ -0,0 +1,34 @@
+package org.apache.usergrid.batch;
+
+
+import org.apache.usergrid.batch.job.SchedulerRuntime1IT;
+import org.apache.usergrid.batch.job.SchedulerRuntime2IT;
+import org.apache.usergrid.batch.job.SchedulerRuntime3IT;
+import org.apache.usergrid.batch.job.SchedulerRuntime4IT;
+import org.apache.usergrid.batch.job.SchedulerRuntime5IT;
+import org.apache.usergrid.batch.job.SchedulerRuntime6IT;
+import org.apache.usergrid.batch.job.SchedulerRuntime7IT;
+import org.apache.usergrid.batch.job.SchedulerRuntime8IT;
+import org.apache.usergrid.cassandra.CassandraResource;
+import org.apache.usergrid.cassandra.Concurrent;
+import org.junit.ClassRule;
+import org.junit.Ignore;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+
+@RunWith(Suite.class)
+@Suite.SuiteClasses(
+        {
+                SchedulerRuntime1IT.class, SchedulerRuntime2IT.class, SchedulerRuntime3IT.class,
+                SchedulerRuntime4IT.class, SchedulerRuntime5IT.class, SchedulerRuntime6IT.class,
+                SchedulerRuntime7IT.class, SchedulerRuntime8IT.class
+        })
+@Concurrent()
+@Ignore("TODO: Todd fix. Does not reliably pass on our build server.")
+// TODO - this suite actually runs correctly now so we can
+// remove this ignore if Todd is OK with it.
+public class SchedulerITSuite {
+    @ClassRule
+    public static CassandraResource cassandraResource = CassandraResource.newWithAvailablePorts();
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/test/java/org/apache/usergrid/batch/SchedulerTestSuite.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/SchedulerTestSuite.java b/stack/core/src/test/java/org/apache/usergrid/batch/SchedulerTestSuite.java
new file mode 100644
index 0000000..2509568
--- /dev/null
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/SchedulerTestSuite.java
@@ -0,0 +1,18 @@
+package org.apache.usergrid.batch;
+
+
+import org.apache.usergrid.batch.AppArgsTest;
+import org.apache.usergrid.batch.BulkJobExecutionUnitTest;
+import org.apache.usergrid.batch.UsergridJobFactoryTest;
+import org.apache.usergrid.cassandra.Concurrent;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+
+@RunWith(Suite.class)
+@Suite.SuiteClasses(
+        {
+                AppArgsTest.class, UsergridJobFactoryTest.class, BulkJobExecutionUnitTest.class,
+        })
+@Concurrent()
+public class SchedulerTestSuite {}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/test/java/org/apache/usergrid/batch/UsergridJobFactoryTest.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/UsergridJobFactoryTest.java b/stack/core/src/test/java/org/apache/usergrid/batch/UsergridJobFactoryTest.java
new file mode 100644
index 0000000..6c44b33
--- /dev/null
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/UsergridJobFactoryTest.java
@@ -0,0 +1,33 @@
+package org.apache.usergrid.batch;
+
+
+import java.util.List;
+import java.util.UUID;
+
+import org.apache.usergrid.batch.Job;
+import org.apache.usergrid.batch.JobNotFoundException;
+import org.apache.usergrid.batch.repository.JobDescriptor;
+import org.apache.usergrid.cassandra.Concurrent;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+
+/** @author zznate */
+@Concurrent()
+public class UsergridJobFactoryTest {
+
+    private static UUID jobId = UUID.randomUUID();
+
+
+    @Test
+    public void verifyBuildup() throws JobNotFoundException {
+        JobDescriptor jobDescriptor = new JobDescriptor( "", jobId, UUID.randomUUID(), null, null, null );
+
+
+        List<Job> bulkJobs = BulkTestUtils.getBulkJobFactory().jobsFrom( jobDescriptor );
+        assertNotNull( bulkJobs );
+        assertEquals( 1, bulkJobs.size() );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/test/java/org/apache/usergrid/batch/job/AbstractSchedulerRuntimeIT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/AbstractSchedulerRuntimeIT.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/AbstractSchedulerRuntimeIT.java
new file mode 100644
index 0000000..377ed08
--- /dev/null
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/AbstractSchedulerRuntimeIT.java
@@ -0,0 +1,77 @@
+/*
+ * 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.batch.job;
+
+
+import java.util.Properties;
+
+import com.google.common.util.concurrent.Service.State;
+
+import org.apache.usergrid.batch.SchedulerITSuite;
+import org.apache.usergrid.batch.service.JobSchedulerService;
+import org.apache.usergrid.batch.service.SchedulerService;
+import org.apache.usergrid.cassandra.CassandraResource;
+import org.junit.Before;
+
+
+/**
+ * Class to test job runtimes
+ */
+public class AbstractSchedulerRuntimeIT {
+    protected static final int DEFAULT_COUNT = 10;
+    protected static final String COUNT_PROP = AbstractSchedulerRuntimeIT.class.getCanonicalName();
+    protected static final String TIMEOUT_PROP = "usergrid.scheduler.job.timeout";
+    protected static final String RUNLOOP_PROP = "usergrid.scheduler.job.interval";
+    protected static final String FAIL_PROP = "usergrid.scheduler.job.maxfail";
+
+    public static CassandraResource cassandraResource = SchedulerITSuite.cassandraResource;
+
+    private TestJobListener listener = new TestJobListener();
+    private int count = DEFAULT_COUNT;
+    protected SchedulerService scheduler;
+    protected Properties props;
+    protected long waitTime = listener.WAIT_MAX_MILLIS;
+
+
+    @Before
+    @SuppressWarnings( "all" )
+    public void setup() {
+        scheduler = cassandraResource.getBean( SchedulerService.class );
+        props = cassandraResource.getBean( "properties", Properties.class );
+
+        if ( System.getProperties().containsKey( COUNT_PROP ) ) {
+            count = Integer.getInteger( System.getProperty( COUNT_PROP ) );
+        }
+
+        // start the scheduler after we're all set up
+        JobSchedulerService jobScheduler = cassandraResource.getBean( JobSchedulerService.class );
+        jobScheduler.setJobListener( listener );
+        if ( jobScheduler.state() != State.RUNNING ) {
+            jobScheduler.startAndWait();
+        }
+    }
+
+
+    protected int getCount() {
+        return count;
+    }
+
+
+    protected TestJobListener getJobListener() {
+        return listener;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/test/java/org/apache/usergrid/batch/job/CountdownLatchJob.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/CountdownLatchJob.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/CountdownLatchJob.java
new file mode 100644
index 0000000..61c7560
--- /dev/null
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/CountdownLatchJob.java
@@ -0,0 +1,67 @@
+/*
+ * 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.batch.job;
+
+
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.usergrid.batch.Job;
+import org.apache.usergrid.batch.JobExecution;
+import org.junit.Ignore;
+import org.springframework.stereotype.Component;
+
+
+/**
+ * A simple job that does nothing but increment an atomic counter
+ *
+ * @author tnine
+ */
+@Component("countdownLatch")
+@Ignore("Not a test")
+public class CountdownLatchJob implements Job {
+
+    private CountDownLatch latch = null;
+
+
+    /**
+     *
+     */
+    public CountdownLatchJob() {
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.apache.usergrid.batch.Job#execute(org.apache.usergrid.batch.JobExecution)
+     */
+    @Override
+    public void execute( JobExecution execution ) throws Exception {
+        latch.countDown();
+    }
+
+
+    public void setLatch( int size ) {
+        latch = new CountDownLatch( size );
+    }
+
+
+    public boolean waitForCount( long timeout, TimeUnit unit ) throws InterruptedException {
+        return latch.await( timeout, unit );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/test/java/org/apache/usergrid/batch/job/DelayExecution.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/DelayExecution.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/DelayExecution.java
new file mode 100644
index 0000000..23b4206
--- /dev/null
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/DelayExecution.java
@@ -0,0 +1,104 @@
+/*
+ * 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.batch.job;
+
+
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.usergrid.batch.Job;
+import org.apache.usergrid.batch.JobExecution;
+import org.junit.Ignore;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Component;
+
+
+/**
+ * A simple job that does nothing but increment an atomic counter
+ *
+ * @author tnine
+ */
+@Component("delayExecution")
+@Ignore("Not a test")
+public class DelayExecution implements Job {
+
+    private static final Logger logger = LoggerFactory.getLogger( DelayExecution.class );
+
+    private CountDownLatch latch = null;
+    private long timeout;
+    private int delayCount;
+
+
+    /**
+     *
+     */
+    public DelayExecution() {
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.apache.usergrid.batch.Job#execute(org.apache.usergrid.batch.JobExecution)
+     */
+    @Override
+    public void execute( JobExecution execution ) throws Exception {
+
+        logger.info( "Running delay execution" );
+
+        if ( latch.getCount() > 1 ) {
+            execution.delay( timeout );
+        }
+
+        latch.countDown();
+    }
+
+
+    public void setLatch( int calls ) {
+        latch = new CountDownLatch( calls );
+    }
+
+
+    public boolean waitForCount( long timeout, TimeUnit unit ) throws InterruptedException {
+        return latch.await( timeout, unit );
+    }
+
+
+    /** @return the timeout */
+    public long getTimeout() {
+        return timeout;
+    }
+
+
+    /** @param timeout the timeout to set */
+    public void setTimeout( long timeout ) {
+        this.timeout = timeout;
+    }
+
+
+    /** @return the delayCount */
+    public int getDelayCount() {
+        return delayCount;
+    }
+
+
+    /** @param delayCount the delayCount to set */
+    public void setDelayCount( int delayCount ) {
+        this.delayCount = delayCount;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/test/java/org/apache/usergrid/batch/job/DelayHeartbeat.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/DelayHeartbeat.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/DelayHeartbeat.java
new file mode 100644
index 0000000..3b9204a
--- /dev/null
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/DelayHeartbeat.java
@@ -0,0 +1,106 @@
+/*
+ * 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.batch.job;
+
+
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.usergrid.batch.Job;
+import org.apache.usergrid.batch.JobExecution;
+import org.junit.Ignore;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Component;
+
+
+/**
+ * A simple job that does nothing but increment an atomic counter and use heartbeat delay
+ *
+ * @author tnine
+ */
+@Component("delayHeartbeat")
+@Ignore("Not a test")
+public class DelayHeartbeat implements Job {
+
+    private static final Logger logger = LoggerFactory.getLogger( DelayHeartbeat.class );
+
+    private CountDownLatch latch = null;
+    private long timeout;
+    private int delayCount;
+
+
+    /**
+     *
+     */
+    public DelayHeartbeat() {
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.apache.usergrid.batch.Job#execute(org.apache.usergrid.batch.JobExecution)
+     */
+    @Override
+    public void execute( JobExecution execution ) throws Exception {
+
+
+        while ( latch.getCount() > 1 ) {
+            logger.info( "Running heartbeat execution" );
+            execution.heartbeat( timeout );
+            latch.countDown();
+            Thread.sleep( timeout - 1 );
+        }
+
+        latch.countDown();
+    }
+
+
+    public void setLatch( int calls ) {
+        latch = new CountDownLatch( calls );
+    }
+
+
+    public boolean waitForCount( long timeout, TimeUnit unit ) throws InterruptedException {
+        return latch.await( timeout, unit );
+    }
+
+
+    /** @return the timeout */
+    public long getTimeout() {
+        return timeout;
+    }
+
+
+    /** @param timeout the timeout to set */
+    public void setTimeout( long timeout ) {
+        this.timeout = timeout;
+    }
+
+
+    /** @return the delayCount */
+    public int getDelayCount() {
+        return delayCount;
+    }
+
+
+    /** @param delayCount the delayCount to set */
+    public void setDelayCount( int delayCount ) {
+        this.delayCount = delayCount;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/test/java/org/apache/usergrid/batch/job/FailureJobExceuction.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/FailureJobExceuction.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/FailureJobExceuction.java
new file mode 100644
index 0000000..f13742e
--- /dev/null
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/FailureJobExceuction.java
@@ -0,0 +1,74 @@
+/*
+ * 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.batch.job;
+
+
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.usergrid.batch.Job;
+import org.apache.usergrid.batch.JobExecution;
+import org.junit.Ignore;
+import org.springframework.stereotype.Component;
+
+
+/**
+ * A simple job that does nothing but increment an atomic counter
+ *
+ * @author tnine
+ */
+@Component("failureJobExceuction")
+@Ignore("Not a test")
+public class FailureJobExceuction implements Job {
+
+    private CountDownLatch latch = null;
+
+
+    /**
+     *
+     */
+    public FailureJobExceuction() {
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.apache.usergrid.batch.Job#execute(org.apache.usergrid.batch.JobExecution)
+     */
+    @Override
+    public void execute( JobExecution execution ) throws Exception {
+        latch.countDown();
+
+        throw new RuntimeException( "Job Failed" );
+    }
+
+
+    public void setLatch( int calls ) {
+        latch = new CountDownLatch( calls );
+    }
+
+
+    public boolean waitForCount( long timeout, TimeUnit unit ) throws InterruptedException {
+        return latch.await( timeout, unit );
+    }
+
+
+    public long getLatchCount() {
+        return latch.getCount();
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/test/java/org/apache/usergrid/batch/job/OnlyOnceExceution.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/OnlyOnceExceution.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/OnlyOnceExceution.java
new file mode 100644
index 0000000..7f6305c
--- /dev/null
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/OnlyOnceExceution.java
@@ -0,0 +1,117 @@
+/*
+ * 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.batch.job;
+
+
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.usergrid.batch.JobExecution;
+import org.apache.usergrid.batch.job.OnlyOnceJob;
+import org.junit.Ignore;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Component;
+
+
+/**
+ * A job that will sleep for the amount of time specified. Used to check that our counter is only ever run once.
+ *
+ * @author tnine
+ */
+@Component("onlyOnceExceution")
+@Ignore("Not a test")
+public class OnlyOnceExceution extends OnlyOnceJob {
+
+    private static final Logger logger = LoggerFactory.getLogger( OnlyOnceExceution.class );
+
+    private CountDownLatch latch = null;
+    private CountDownLatch sleptLatch = new CountDownLatch( 1 );
+    private long timeout;
+    private boolean slept = false;
+    private long delay;
+
+
+    /**
+     *
+     */
+    public OnlyOnceExceution() {
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see
+     * org.apache.usergrid.batch.job.OnlyOnceJob#doJob(org.apache.usergrid.batch.JobExecution)
+     */
+    @Override
+    protected void doJob( JobExecution execution ) throws Exception {
+        logger.info( "Running only once execution" );
+
+        latch.countDown();
+
+
+        if ( !slept ) {
+            logger.info( "Sleeping in only once execution" );
+            Thread.sleep( timeout );
+            slept = true;
+            sleptLatch.countDown();
+        }
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.usergrid.batch.job.OnlyOnceJob#getDelay(org.apache.usergrid.batch.JobExecution)
+     */
+    @Override
+    protected long getDelay( JobExecution execution ) throws Exception {
+        return delay;
+    }
+
+
+    public void setDelay( long delay ) {
+        this.delay = delay;
+    }
+
+
+    public void setLatch( int calls ) {
+        latch = new CountDownLatch( calls );
+    }
+
+
+    public boolean waitForCount( long timeout, TimeUnit unit ) throws InterruptedException {
+        return latch.await( timeout, unit );
+    }
+
+
+    public boolean waitForSleep( long timeout, TimeUnit unit ) throws InterruptedException {
+        return sleptLatch.await( timeout, unit );
+    }
+
+
+    /** @return the timeout */
+    public long getTimeout() {
+        return timeout;
+    }
+
+
+    /** @param timeout the timeout to set */
+    public void setTimeout( long timeout ) {
+        this.timeout = timeout;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/test/java/org/apache/usergrid/batch/job/OnlyOnceUnlockOnFailExceution.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/OnlyOnceUnlockOnFailExceution.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/OnlyOnceUnlockOnFailExceution.java
new file mode 100644
index 0000000..2df61ef
--- /dev/null
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/OnlyOnceUnlockOnFailExceution.java
@@ -0,0 +1,127 @@
+/*
+ * 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.batch.job;
+
+
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.usergrid.batch.JobExecution;
+import org.apache.usergrid.batch.job.OnlyOnceJob;
+import org.junit.Ignore;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Component;
+
+
+/**
+ * A job that will sleep for the amount of time specified. Used to check that our counter is only ever run once.  Checks
+ * the lock is released on fail
+ *
+ * @author tnine
+ */
+@Component("onlyOnceUnlockOnFailExceution")
+@Ignore("Not a test")
+public class OnlyOnceUnlockOnFailExceution extends OnlyOnceJob {
+
+    private static final Logger logger = LoggerFactory.getLogger( OnlyOnceUnlockOnFailExceution.class );
+
+    private CountDownLatch latch = null;
+    private CountDownLatch exception = new CountDownLatch( 1 );
+    private CountDownLatch completed = new CountDownLatch( 1 );
+    private long timeout;
+    private boolean slept = false;
+    private long delay;
+
+
+    /**
+     *
+     */
+    public OnlyOnceUnlockOnFailExceution() {
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see
+     * org.apache.usergrid.batch.job.OnlyOnceJob#doJob(org.apache.usergrid.batch.JobExecution)
+     */
+    @Override
+    protected void doJob( JobExecution execution ) throws Exception {
+        logger.info( "Running only once execution" );
+
+
+        latch.countDown();
+
+        if ( !slept ) {
+            logger.info( "Sleeping in only once execution" );
+            Thread.sleep( timeout );
+            slept = true;
+            exception.countDown();
+            throw new RuntimeException( "I failed to run correctly, I should be retried" );
+        }
+
+        completed.countDown();
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.usergrid.batch.job.OnlyOnceJob#getDelay(org.apache.usergrid.batch.JobExecution)
+     */
+    @Override
+    protected long getDelay( JobExecution execution ) throws Exception {
+        return delay;
+    }
+
+
+    public void setDelay( long delay ) {
+        this.delay = delay;
+    }
+
+
+    public void setLatch( int calls ) {
+        latch = new CountDownLatch( calls );
+    }
+
+
+    public boolean waitForCount( long timeout, TimeUnit unit ) throws InterruptedException {
+        return latch.await( timeout, unit );
+    }
+
+
+    public boolean waitForException( long timeout, TimeUnit unit ) throws InterruptedException {
+        return exception.await( timeout, unit );
+    }
+
+
+    public boolean waitForCompletion( long timeout, TimeUnit unit ) throws InterruptedException {
+        return completed.await( timeout, unit );
+    }
+
+
+    /** @return the timeout */
+    public long getTimeout() {
+        return timeout;
+    }
+
+
+    /** @param timeout the timeout to set */
+    public void setTimeout( long timeout ) {
+        this.timeout = timeout;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime1IT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime1IT.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime1IT.java
new file mode 100644
index 0000000..67fd2ba
--- /dev/null
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime1IT.java
@@ -0,0 +1,70 @@
+/*
+ * 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.batch.job;
+
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.util.concurrent.TimeUnit;
+
+import org.apache.usergrid.cassandra.Concurrent;
+import org.apache.usergrid.persistence.entities.JobData;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * Class to test job runtimes
+ */
+@Concurrent
+public class SchedulerRuntime1IT extends AbstractSchedulerRuntimeIT {
+	
+	private static final Logger logger = LoggerFactory.getLogger(SchedulerRuntime1IT.class.getName());
+    @Test
+    public void basicScheduling() throws InterruptedException {
+        CountdownLatchJob counterJob = cassandraResource.getBean( CountdownLatchJob.class );
+        // set the counter job latch size
+        counterJob.setLatch( getCount() );
+
+        for ( int i = 0; i < getCount(); i++ ) {
+            scheduler.createJob( "countdownLatch", System.currentTimeMillis(), new JobData() );
+        }
+
+        // previously: 
+        // now wait until everything fires or no jobs complete in #waitTime seconds
+        // boolean waited = getJobListener().blockTilDone( getCount(),  waitTime);
+        
+        // now:
+        // note that the waitForCount only wait for job execution. It does NOT wait for job Completion
+        boolean waited = counterJob.waitForCount(waitTime, TimeUnit.MILLISECONDS);
+        assertTrue( "Failed to run " + getCount() + " number of jobs. Waited " + waitTime + " seconds.", waited );
+        
+        // previously:
+        // assertTrue( getJobListener().getSuccessCount() + " successful jobs ran, expected " + getCount(), getCount() == getJobListener().getSuccessCount() );
+        
+        // now:
+        // blockTilDone look into the JobListener hook and blocked until jobs are completed.
+        // TODO : need a retry count so it doesn't reblock forever
+        while (!getJobListener().blockTilDone(getCount(), waitTime)) {
+        	logger.warn("Jobs not yet finished after waited {}, block again" , waitTime);
+        }
+        assertEquals( "Expected success job: " + getCount()+ ". Actual :" + getJobListener().getSuccessCount() + ". Total count: " + getJobListener().getDoneCount() , getCount() , getJobListener().getSuccessCount() );
+        
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime2IT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime2IT.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime2IT.java
new file mode 100644
index 0000000..656b329
--- /dev/null
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime2IT.java
@@ -0,0 +1,98 @@
+/*
+ * 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.batch.job;
+
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.util.concurrent.TimeUnit;
+
+import org.apache.usergrid.cassandra.Concurrent;
+import org.apache.usergrid.persistence.entities.JobData;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * Class to test job runtimes
+ */
+@Concurrent
+public class SchedulerRuntime2IT extends AbstractSchedulerRuntimeIT {
+	private static final Logger logger = LoggerFactory.getLogger(SchedulerRuntime2IT.class.getName());
+    /** Test the scheduler ramps up correctly when there are more jobs to be read after a pause */
+    @Test
+    public void schedulingWithNoJobs() throws InterruptedException {
+        CountdownLatchJob counterJob = cassandraResource.getBean( CountdownLatchJob.class );
+        // set the counter job latch size
+        counterJob.setLatch( getCount() );
+
+        for ( int i = 0; i < getCount(); i++ ) {
+            scheduler.createJob( "countdownLatch", System.currentTimeMillis(), new JobData() );
+        }
+
+        // previously:
+        // now wait until everything fires
+        // boolean waited = getJobListener().blockTilDone( getCount(), 15000L );
+        // assertTrue( "Jobs ran", waited );
+        // assertTrue( getCount() + " successful jobs ran", getCount() == getJobListener().getSuccessCount() );
+        
+        // now:
+        // note that the waitForCount only wait for job execution. It does NOT wait for job Completion
+        boolean waited = counterJob.waitForCount(waitTime, TimeUnit.MILLISECONDS);
+        assertTrue( "Failed to run " + getCount() + " number of jobs. Waited " + waitTime + " seconds.", waited );
+        
+        // now:
+        // blockTilDone look into the JobListener hook and blocked until jobs are completed.
+        // TODO : need a retry count so it doesn't reblock forever
+        while (!getJobListener().blockTilDone(getCount(), waitTime)) {
+        	logger.warn("Jobs not yet finished after waited {}, block again" , waitTime);
+        }
+        assertEquals( "Expected success job: " + getCount()+ ". Actual :" + getJobListener().getSuccessCount() + ". Total count: " + getJobListener().getDoneCount() , getCount() , getJobListener().getSuccessCount() );
+        
+        Thread.sleep( 5000L );
+
+        // set the counter job latch size
+        counterJob.setLatch( getCount() );
+
+        for ( int i = 0; i < getCount(); i++ ) {
+            scheduler.createJob( "countdownLatch", System.currentTimeMillis(), new JobData() );
+        }
+
+        // previously: 
+        // now wait until everything fires
+        // waited = getJobListener().blockTilDone( 2 * getCount(), 15000L );
+        // waited = counterJob.waitForCount(waitTime, TimeUnit.MILLISECONDS );
+        // assertTrue( "Failed to run " + 2* getCount() + " number of jobs. Success count = " + getJobListener().getSuccessCount() + ". Waited " + waitTime  + " seconds.", waited );
+        // assertTrue( 2 * getCount() + " successful jobs ran",
+        //  ( 2 * getCount() ) == getJobListener().getSuccessCount() );
+		
+		// now:
+        // note that the waitForCount only wait for job execution. It does NOT wait for job Completion
+        waited = counterJob.waitForCount(waitTime, TimeUnit.MILLISECONDS);
+        assertTrue( "Failed to run " + getCount() + " number of jobs. Waited " + waitTime + " seconds.", waited );
+        
+        // now:
+        // blockTilDone look into the JobListener hook and blocked until jobs are completed.
+        // TODO : need a retry count so it doesn't reblock forever
+        while (!getJobListener().blockTilDone(getCount(), waitTime)) {
+        	logger.warn("Jobs not yet finished after waited {}, block again" , waitTime);
+        }
+        assertEquals( "Expected success job: " +2 * getCount()+ ". Actual :" + getJobListener().getSuccessCount() + ". Total count: " + getJobListener().getDoneCount() , 2 * getCount() , getJobListener().getSuccessCount() );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime3IT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime3IT.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime3IT.java
new file mode 100644
index 0000000..8087b21
--- /dev/null
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime3IT.java
@@ -0,0 +1,70 @@
+/*
+ * 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.batch.job;
+
+
+import org.apache.usergrid.cassandra.Concurrent;
+import org.apache.usergrid.persistence.entities.JobData;
+import org.apache.usergrid.persistence.entities.JobStat;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+
+/**
+ * Class to test job runtimes
+ */
+@Concurrent
+public class SchedulerRuntime3IT extends AbstractSchedulerRuntimeIT {
+
+
+    /** Test the scheduler ramps up correctly when there are more jobs to be read after a pause */
+    @Test
+    public void failureCausesJobDeath() throws Exception {
+
+        int failCount = Integer.parseInt( props.getProperty( FAIL_PROP ) );
+        long sleepTime = Long.parseLong( props.getProperty( RUNLOOP_PROP ) );
+
+        FailureJobExceuction job = cassandraResource.getBean( "failureJobExceuction", FailureJobExceuction.class );
+
+        int latchValue = failCount + 1;
+
+        job.setLatch( latchValue );
+
+        JobData returned = scheduler.createJob( "failureJobExceuction", System.currentTimeMillis(), new JobData() );
+
+        // sleep until the job should have failed. We sleep 1 extra cycle just to
+        // make sure we're not racing the test
+        boolean waited = getJobListener().blockTilDone( 3, ( failCount + 2 ) * sleepTime + 5000L );
+
+        //we shouldn't trip the latch.  It should fail failCount times, and not run again
+        assertTrue( "Jobs ran", waited );
+        assertTrue( failCount + " failures resulted", getJobListener().getFailureCount() == failCount );
+        assertTrue( 1 + " success resulted", getJobListener().getSuccessCount() == 1 );
+
+        //we shouldn't have run the last time, we should have counted down to it
+        assertEquals( 1, job.getLatchCount() );
+
+        JobStat stat = scheduler.getStatsForJob( returned.getJobName(), returned.getUuid() );
+
+        // we should have only marked this as run fail+1 times
+        assertEquals( latchValue, stat.getTotalAttempts() );
+        assertEquals( latchValue, stat.getRunCount() );
+        assertEquals( 0, stat.getDelayCount() );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime4IT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime4IT.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime4IT.java
new file mode 100644
index 0000000..8ff75f6
--- /dev/null
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime4IT.java
@@ -0,0 +1,67 @@
+/*
+ * 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.batch.job;
+
+
+import org.apache.usergrid.cassandra.Concurrent;
+import org.apache.usergrid.persistence.entities.JobData;
+import org.apache.usergrid.persistence.entities.JobStat;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+
+/**
+ * Class to test job runtimes
+ */
+@Concurrent
+public class SchedulerRuntime4IT extends AbstractSchedulerRuntimeIT {
+    /**
+     * Test the scheduler ramps up correctly when there are more jobs to be read after a pause when the job specifies
+     * the retry time
+     */
+    @Test
+    public void delayExecution() throws Exception {
+        long sleepTime = Long.parseLong( props.getProperty( TIMEOUT_PROP ) );
+
+        int delayCount = 2;
+
+        long customRetry = sleepTime * 2;
+
+        DelayExecution job = cassandraResource.getBean( "delayExecution", DelayExecution.class );
+
+        job.setTimeout( customRetry );
+        job.setLatch( delayCount + 1 );
+
+        JobData returned = scheduler.createJob( "delayExecution", System.currentTimeMillis(), new JobData() );
+
+        // sleep until the job should have failed. We sleep 1 extra cycle just to
+        // make sure we're not racing the test
+        boolean waited = getJobListener().blockTilDone( 3, 5000L + sleepTime * 2 );
+
+        assertTrue( "Job ran to complete", waited );
+
+        JobStat stat = scheduler.getStatsForJob( returned.getJobName(), returned.getUuid() );
+
+        // we should have only marked this as run once since we delayed furthur execution
+        // we should have only marked this as run once
+        assertEquals( 1, stat.getTotalAttempts() );
+        assertEquals( delayCount + 1, stat.getRunCount() );
+        assertEquals( delayCount, stat.getDelayCount() );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime5IT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime5IT.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime5IT.java
new file mode 100644
index 0000000..35fbd01
--- /dev/null
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime5IT.java
@@ -0,0 +1,68 @@
+/*
+ * 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.batch.job;
+
+
+import org.apache.usergrid.cassandra.Concurrent;
+import org.apache.usergrid.persistence.entities.JobData;
+import org.apache.usergrid.persistence.entities.JobStat;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+
+/**
+ * Class to test job runtimes
+ */
+@Concurrent
+public class SchedulerRuntime5IT extends AbstractSchedulerRuntimeIT {
+    /**
+     * Test the scheduler ramps up correctly when there are more jobs to be read after a pause when the job specifies
+     * the retry time
+     */
+    @Test
+    public void delayHeartbeat() throws Exception {
+
+        long sleepTime = Long.parseLong( props.getProperty( TIMEOUT_PROP ) );
+
+        int heartbeatCount = 2;
+
+        long customRetry = sleepTime * 2;
+
+        DelayHeartbeat job = cassandraResource.getBean( "delayHeartbeat", DelayHeartbeat.class );
+
+        job.setTimeout( customRetry );
+        job.setLatch( heartbeatCount + 1 );
+
+        JobData returned = scheduler.createJob( "delayHeartbeat", System.currentTimeMillis(), new JobData() );
+
+        // sleep until the job should have failed. We sleep 1 extra cycle just to
+        // make sure we're not racing the test
+        boolean waited = getJobListener().blockTilDone( 1, customRetry * ( heartbeatCount * 2 ) + 5000L );
+
+        assertTrue( "Job ran to complete", waited );
+
+        JobStat stat = scheduler.getStatsForJob( returned.getJobName(), returned.getUuid() );
+
+        // we should have only marked this as run once since we delayed further execution
+        // we should have only marked this as run once
+        assertEquals( 1, stat.getTotalAttempts() );
+        assertEquals( 1, stat.getRunCount() );
+        assertEquals( 0, stat.getDelayCount() );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime6IT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime6IT.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime6IT.java
new file mode 100644
index 0000000..6f05b58
--- /dev/null
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime6IT.java
@@ -0,0 +1,96 @@
+/*
+ * 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.batch.job;
+
+
+import java.util.concurrent.TimeUnit;
+
+import org.apache.usergrid.cassandra.Concurrent;
+import org.apache.usergrid.persistence.entities.JobData;
+import org.apache.usergrid.persistence.entities.JobStat;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+
+/**
+ * Class to test job runtimes
+ */
+@Concurrent
+public class SchedulerRuntime6IT extends AbstractSchedulerRuntimeIT {
+    /**
+     * Test the scheduler ramps up correctly when there are more jobs to be read after a pause when the job specifies
+     * the retry time
+     */
+    @Test
+    public void onlyOnceTest() throws Exception {
+
+        long sleepTime = Long.parseLong( props.getProperty( TIMEOUT_PROP ) );
+
+        long customRetry = sleepTime + 1000;
+        int numberOfRuns = 1;
+
+        OnlyOnceExceution job = cassandraResource.getBean( "onlyOnceExceution", OnlyOnceExceution.class );
+
+        job.setTimeout( customRetry );
+        job.setLatch( numberOfRuns );
+        job.setDelay( sleepTime );
+
+        JobData returned = scheduler.createJob( "onlyOnceExceution", System.currentTimeMillis(), new JobData() );
+
+        // sleep until the job should have failed. We sleep 1 extra cycle just to
+        // make sure we're not racing the test
+        boolean waited = getJobListener().blockTilDone( 1, customRetry * numberOfRuns * 2 + 5000L );
+
+        assertTrue( "Job ran twice", waited );
+
+
+        //reset our latch immediately for further tests
+        job.setLatch( numberOfRuns );
+
+        JobStat stat = scheduler.getStatsForJob( returned.getJobName(), returned.getUuid() );
+
+        // we should have only marked this as run once since we delayed furthur execution
+        // we should have only marked this as run once
+        assertNotNull( stat );
+        assertEquals( numberOfRuns, stat.getTotalAttempts() );
+        assertEquals( numberOfRuns, stat.getRunCount() );
+        assertEquals( 0, stat.getDelayCount() );
+
+
+        boolean slept = job.waitForSleep( customRetry * numberOfRuns * 2, TimeUnit.MILLISECONDS );
+
+        assertTrue( "Job slept", slept );
+
+
+        //now wait again to see if the job fires one more time, it shouldn't
+        waited = getJobListener().blockTilDone( 2, customRetry * numberOfRuns * 2 );
+
+        assertFalse( "Job ran twice", waited );
+
+        stat = scheduler.getStatsForJob( returned.getJobName(), returned.getUuid() );
+
+        // we should have only marked this as run once since we delayed further execution
+        // we should have only marked this as run once
+        assertEquals( numberOfRuns, stat.getTotalAttempts() );
+        assertEquals( numberOfRuns, stat.getRunCount() );
+        assertEquals( 0, stat.getDelayCount() );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime7IT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime7IT.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime7IT.java
new file mode 100644
index 0000000..ea75a2d
--- /dev/null
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime7IT.java
@@ -0,0 +1,73 @@
+/*
+ * 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.batch.job;
+
+
+import org.apache.usergrid.cassandra.Concurrent;
+import org.apache.usergrid.persistence.entities.JobData;
+import org.apache.usergrid.persistence.entities.JobStat;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+
+/**
+ * Class to test job runtimes
+ */
+@Concurrent
+@org.junit.Ignore( "Todd you need to take a look at this since it's not clear to me what was intended in this test." )
+public class SchedulerRuntime7IT extends AbstractSchedulerRuntimeIT {
+
+    /** Test that we're only running once, even when a job exceeds the heartbeat time */
+    @Test
+    public void onlyOnceTestOnException() throws Exception {
+
+        long sleepTime = Long.parseLong( props.getProperty( TIMEOUT_PROP ) );
+
+        long runLoop = Long.parseLong( props.getProperty( RUNLOOP_PROP ) );
+
+        long customRetry = sleepTime * 2;
+        int numberOfRuns = 2;
+
+        OnlyOnceUnlockOnFailExceution job =
+                cassandraResource.getBean( "onlyOnceUnlockOnFailExceution", OnlyOnceUnlockOnFailExceution.class );
+
+        job.setTimeout( customRetry );
+        job.setLatch( numberOfRuns );
+        job.setDelay( sleepTime );
+
+        JobData returned =
+                scheduler.createJob( "onlyOnceUnlockOnFailExceution", System.currentTimeMillis(), new JobData() );
+
+        // sleep until the job should have failed. We sleep 1 extra cycle just to make sure we're not racing the test
+
+        boolean waited = getJobListener().blockTilDone( 1, runLoop * numberOfRuns * 2 + 5000L );
+
+        assertTrue( "Job threw exception", waited );
+        assertTrue( "Job failed", getJobListener().getFailureCount() == 1 );
+        assertTrue( "No Job succeeded", getJobListener().getSuccessCount() == 0 );
+
+        JobStat stat = scheduler.getStatsForJob( returned.getJobName(), returned.getUuid() );
+
+        // we should have only marked this as run once since we delayed furthur execution
+        // we should have only marked this as run once
+        assertEquals( numberOfRuns, stat.getTotalAttempts() );
+        assertEquals( numberOfRuns, stat.getRunCount() );
+        assertEquals( 0, stat.getDelayCount() );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime8IT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime8IT.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime8IT.java
new file mode 100644
index 0000000..3a220da
--- /dev/null
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime8IT.java
@@ -0,0 +1,94 @@
+/*
+ * 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.batch.job;
+
+
+import java.util.UUID;
+
+import org.apache.usergrid.cassandra.Concurrent;
+import org.apache.usergrid.persistence.Query;
+import org.apache.usergrid.persistence.Results;
+import org.apache.usergrid.persistence.entities.JobData;
+import org.apache.usergrid.utils.UUIDUtils;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+
+
+/**
+ * Class to test job runtimes
+ */
+@Concurrent
+public class SchedulerRuntime8IT extends AbstractSchedulerRuntimeIT {
+    /**
+     * Test the scheduler ramps up correctly when there are more jobs to be read after a pause when the job specifies
+     * the retry time
+     */
+    @Test
+    public void queryAndDeleteJobs() throws Exception {
+
+        CountdownLatchJob job = cassandraResource.getBean( "countdownLatch", CountdownLatchJob.class );
+
+        job.setLatch( 1 );
+
+        // fire the job 30 seconds from now
+        long fireTime = System.currentTimeMillis() + 30000;
+
+        UUID notificationId = UUIDUtils.newTimeUUID();
+
+        JobData test = new JobData();
+        test.setProperty( "stringprop", "test" );
+        test.setProperty( "notificationId", notificationId );
+
+        JobData saved = scheduler.createJob( "countdownLatch", fireTime, test );
+
+        // now query and make sure it equals the saved value
+
+        Query query = new Query();
+        query.addEqualityFilter( "notificationId", notificationId );
+
+        Results r = scheduler.queryJobData( query );
+
+        assertEquals( 1, r.size() );
+
+        assertEquals( saved.getUuid(), r.getEntity().getUuid() );
+
+        // query by uuid
+        query = new Query();
+        query.addEqualityFilter( "stringprop", "test" );
+
+        r = scheduler.queryJobData( query );
+
+        assertEquals( 1, r.size() );
+
+        assertEquals( saved.getUuid(), r.getEntity().getUuid() );
+
+        // now delete the job
+
+        scheduler.deleteJob( saved.getUuid() );
+
+        // sleep until the job should have failed. We sleep 1 extra cycle just to
+        // make sure we're not racing the test
+
+        long waitTime = Math.max( 0, fireTime - System.currentTimeMillis() + 1000 );
+
+        boolean waited = getJobListener().blockTilDone( 1, waitTime );
+
+        assertFalse( "Job ran ", waited );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/test/java/org/apache/usergrid/batch/job/TestJobListener.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/TestJobListener.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/TestJobListener.java
new file mode 100644
index 0000000..8e1144b
--- /dev/null
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/TestJobListener.java
@@ -0,0 +1,121 @@
+/*
+ * 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.batch.job;
+
+
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.apache.usergrid.batch.JobExecution;
+import org.apache.usergrid.batch.service.JobListener;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * Implementation of the JobListener for tests.
+ */
+public class TestJobListener implements JobListener {
+    // public static final long WAIT_MAX_MILLIS = 250;
+	public static final long WAIT_MAX_MILLIS = 60000L; // max wait 1 minutes 
+    private static final Logger LOG = LoggerFactory.getLogger( TestJobListener.class );
+    private AtomicInteger submittedCounter = new AtomicInteger();
+    private AtomicInteger failureCounter = new AtomicInteger();
+    private AtomicInteger successCounter = new AtomicInteger();
+    private final Object lock = new Object();
+
+
+    public int getSubmittedCount() {
+        return submittedCounter.get();
+    }
+
+
+    public int getFailureCount() {
+        return failureCounter.get();
+    }
+
+
+    public int getSuccessCount() {
+        return successCounter.get();
+    }
+
+
+    public int getDoneCount() {
+        return successCounter.get() + failureCounter.get();
+    }
+
+
+    public void onSubmit( JobExecution execution ) {
+        LOG.debug( "Job execution {} submitted with count {}.", execution,
+                submittedCounter.incrementAndGet() );
+    }
+
+
+    public void onSuccess( JobExecution execution ) {
+        LOG.debug( "Job execution {} succeeded with count {}.", execution,
+                successCounter.incrementAndGet() );
+    }
+
+
+    public void onFailure( JobExecution execution ) {
+        LOG.debug( "Job execution {} failed with count {}.", execution,
+                failureCounter.incrementAndGet() );
+    }
+
+
+
+    /**
+     * block until submitted jobs are all accounted for.
+     * 
+     * @param jobCount total submitted job
+     * @param idleTime idleTime in millisecond.
+     * @return true when all jobs are completed (could be succeed or failed) within the given idleTime range, or {@value #WAIT_MAX_MILLIS}, whichever is smaller
+     * @throws InterruptedException
+     */
+    public boolean blockTilDone( int jobCount, long idleTime ) throws InterruptedException
+    {
+        final long waitTime = Math.min( idleTime, WAIT_MAX_MILLIS );
+        long lastChangeTime = System.currentTimeMillis();
+        long timeNotChanged = 0;
+        int currentCount;
+        int startCount = getDoneCount();
+
+        do {
+            currentCount = getDoneCount();
+
+            if ( startCount == currentCount ) {
+//                if ( timeNotChanged > idleTime ) {
+                if ( timeNotChanged > waitTime ) {
+                    return false;
+                }
+
+                timeNotChanged = System.currentTimeMillis() - lastChangeTime;
+            }
+            else {
+                timeNotChanged = 0;
+                startCount = currentCount;
+                lastChangeTime = System.currentTimeMillis();
+            }
+
+            synchronized ( lock ) {
+                lock.wait( waitTime );
+            }
+        } while ( currentCount < jobCount );
+
+        return true;
+    }
+}


[34/96] [abbrv] [partial] Change package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/Setup.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/Setup.java b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/Setup.java
new file mode 100644
index 0000000..cbb8a1c
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/Setup.java
@@ -0,0 +1,205 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.cassandra;
+
+
+import java.util.UUID;
+
+import org.apache.usergrid.mq.cassandra.QueuesCF;
+import org.apache.usergrid.persistence.entities.Application;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import me.prettyprint.hector.api.ddl.ComparatorType;
+import static me.prettyprint.hector.api.factory.HFactory.createColumnFamilyDefinition;
+import static org.apache.usergrid.persistence.cassandra.CassandraPersistenceUtils.getCfDefs;
+import static org.apache.usergrid.persistence.cassandra.CassandraService.APPLICATIONS_CF;
+import static org.apache.usergrid.persistence.cassandra.CassandraService.DEFAULT_APPLICATION;
+import static org.apache.usergrid.persistence.cassandra.CassandraService.DEFAULT_APPLICATION_ID;
+import static org.apache.usergrid.persistence.cassandra.CassandraService.DEFAULT_ORGANIZATION;
+import static org.apache.usergrid.persistence.cassandra.CassandraService.MANAGEMENT_APPLICATION;
+import static org.apache.usergrid.persistence.cassandra.CassandraService.MANAGEMENT_APPLICATION_ID;
+import static org.apache.usergrid.persistence.cassandra.CassandraService.PRINCIPAL_TOKEN_CF;
+import static org.apache.usergrid.persistence.cassandra.CassandraService.PROPERTIES_CF;
+import static org.apache.usergrid.persistence.cassandra.CassandraService.STATIC_APPLICATION_KEYSPACE;
+import static org.apache.usergrid.persistence.cassandra.CassandraService.SYSTEM_KEYSPACE;
+import static org.apache.usergrid.persistence.cassandra.CassandraService.TOKENS_CF;
+import static org.apache.usergrid.persistence.cassandra.CassandraService.USE_VIRTUAL_KEYSPACES;
+import static org.apache.usergrid.persistence.cassandra.CassandraService.keyspaceForApplication;
+
+
+/**
+ * Cassandra-specific setup utilities.
+ *
+ * @author edanuff
+ */
+public class Setup {
+
+    private static final Logger logger = LoggerFactory.getLogger( Setup.class );
+
+    private final org.apache.usergrid.persistence.EntityManagerFactory emf;
+    private final CassandraService cass;
+
+
+    /**
+     * Instantiates a new setup object.
+     *
+     * @param emf the emf
+     */
+    public Setup( EntityManagerFactoryImpl emf, CassandraService cass ) {
+        this.emf = emf;
+        this.cass = cass;
+    }
+
+
+    /**
+     * Initialize.
+     *
+     * @throws Exception the exception
+     */
+    public synchronized void setup() throws Exception {
+        init();
+
+        setupSystemKeyspace();
+
+        setupStaticKeyspace();
+
+        createDefaultApplications();
+    }
+
+
+    public void init() throws Exception {
+        cass.init();
+    }
+
+
+    public void createDefaultApplications() throws Exception {
+        // TODO unique check?
+        ( ( EntityManagerFactoryImpl ) emf )
+                .initializeApplication( DEFAULT_ORGANIZATION, DEFAULT_APPLICATION_ID, DEFAULT_APPLICATION, null );
+
+        ( ( EntityManagerFactoryImpl ) emf )
+                .initializeApplication( DEFAULT_ORGANIZATION, MANAGEMENT_APPLICATION_ID, MANAGEMENT_APPLICATION, null );
+    }
+
+
+    /**
+     * Initialize system keyspace.
+     *
+     * @throws Exception the exception
+     */
+    public void setupSystemKeyspace() throws Exception {
+
+        logger.info( "Initialize system keyspace" );
+
+        cass.createColumnFamily( SYSTEM_KEYSPACE,
+                createColumnFamilyDefinition( SYSTEM_KEYSPACE, APPLICATIONS_CF, ComparatorType.BYTESTYPE ) );
+
+        cass.createColumnFamily( SYSTEM_KEYSPACE,
+                createColumnFamilyDefinition( SYSTEM_KEYSPACE, PROPERTIES_CF, ComparatorType.BYTESTYPE ) );
+
+        cass.createColumnFamily( SYSTEM_KEYSPACE,
+                createColumnFamilyDefinition( SYSTEM_KEYSPACE, TOKENS_CF, ComparatorType.BYTESTYPE ) );
+
+        cass.createColumnFamily( SYSTEM_KEYSPACE,
+                createColumnFamilyDefinition( SYSTEM_KEYSPACE, PRINCIPAL_TOKEN_CF, ComparatorType.UUIDTYPE ) );
+
+        logger.info( "System keyspace initialized" );
+    }
+
+
+    /**
+     * Initialize application keyspace.
+     *
+     * @param applicationId the application id
+     * @param applicationName the application name
+     *
+     * @throws Exception the exception
+     */
+    public void setupApplicationKeyspace( final UUID applicationId, String applicationName ) throws Exception {
+
+        if ( !USE_VIRTUAL_KEYSPACES ) {
+            String app_keyspace = keyspaceForApplication( applicationId );
+
+            logger.info( "Creating application keyspace " + app_keyspace + " for " + applicationName + " application" );
+
+            cass.createColumnFamily( app_keyspace,
+                    createColumnFamilyDefinition( SYSTEM_KEYSPACE, APPLICATIONS_CF, ComparatorType.BYTESTYPE ) );
+
+            cass.createColumnFamilies( app_keyspace, getCfDefs( ApplicationCF.class, app_keyspace ) );
+            cass.createColumnFamilies( app_keyspace, getCfDefs( QueuesCF.class, app_keyspace ) );
+        }
+    }
+
+
+    public void setupStaticKeyspace() throws Exception {
+
+        if ( USE_VIRTUAL_KEYSPACES ) {
+
+            logger.info( "Creating static application keyspace " + STATIC_APPLICATION_KEYSPACE );
+
+            cass.createColumnFamily( STATIC_APPLICATION_KEYSPACE,
+                    createColumnFamilyDefinition( STATIC_APPLICATION_KEYSPACE, APPLICATIONS_CF,
+                            ComparatorType.BYTESTYPE ) );
+
+            cass.createColumnFamilies( STATIC_APPLICATION_KEYSPACE,
+                    getCfDefs( ApplicationCF.class, STATIC_APPLICATION_KEYSPACE ) );
+            cass.createColumnFamilies( STATIC_APPLICATION_KEYSPACE,
+                    getCfDefs( QueuesCF.class, STATIC_APPLICATION_KEYSPACE ) );
+        }
+    }
+
+
+    public boolean keyspacesExist() {
+        return cass.checkKeyspacesExist();
+    }
+
+
+    public static void logCFPermissions() {
+        System.out.println( SYSTEM_KEYSPACE + "." + APPLICATIONS_CF + ".<rw>=usergrid" );
+        System.out.println( SYSTEM_KEYSPACE + "." + PROPERTIES_CF + ".<rw>=usergrid" );
+        for ( CFEnum cf : ApplicationCF.values() ) {
+            System.out.println( STATIC_APPLICATION_KEYSPACE + "." + cf + ".<rw>=usergrid" );
+        }
+        for ( CFEnum cf : QueuesCF.values() ) {
+            System.out.println( STATIC_APPLICATION_KEYSPACE + "." + cf + ".<rw>=usergrid" );
+        }
+    }
+
+
+    /** @return staticly constructed reference to the management application */
+    public static Application getManagementApp() {
+        return SystemDefaults.managementApp;
+    }
+
+
+    /** @return statically constructed reference to the default application */
+    public static Application getDefaultApp() {
+        return SystemDefaults.defaultApp;
+    }
+
+
+    static class SystemDefaults {
+        private static final Application managementApp = new Application( MANAGEMENT_APPLICATION_ID );
+        private static final Application defaultApp = new Application( DEFAULT_APPLICATION_ID );
+
+
+        static {
+            managementApp.setName( MANAGEMENT_APPLICATION );
+            defaultApp.setName( DEFAULT_APPLICATION );
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/SimpleIndexBucketLocatorImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/SimpleIndexBucketLocatorImpl.java b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/SimpleIndexBucketLocatorImpl.java
new file mode 100644
index 0000000..45a4069
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/SimpleIndexBucketLocatorImpl.java
@@ -0,0 +1,121 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.cassandra;
+
+
+import java.math.BigInteger;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.UUID;
+
+import org.apache.usergrid.persistence.IndexBucketLocator;
+
+import static org.apache.commons.codec.digest.DigestUtils.md5;
+import static org.apache.usergrid.utils.ConversionUtils.bytes;
+
+
+/**
+ * Simple implementation that does static hashing across 100 rows. Future implementations should be smarter and create
+ * new tokens as required when buckets become too large for an entity property within an application for the given index
+ * type.
+ *
+ * @author tnine
+ */
+public class SimpleIndexBucketLocatorImpl implements IndexBucketLocator {
+
+    public static final BigInteger MINIMUM = BigInteger.ZERO;
+    public static final BigInteger MAXIMUM = new BigInteger( "" + 2 ).pow( 127 );
+
+    private final List<BigInteger> buckets = new ArrayList<BigInteger>( 100 );
+    private final List<String> bucketsString = new ArrayList<String>( 100 );
+    private final int size;
+
+
+    /** Create a bucket locator with the specified size */
+    public SimpleIndexBucketLocatorImpl( int size ) {
+        for ( int i = 0; i < size; i++ ) {
+            BigInteger integer = initialToken( size, i );
+            buckets.add( integer );
+            bucketsString.add( String.format( "%039d", integer ) );
+        }
+
+        this.size = size;
+    }
+
+
+    /** Base constructor that creates a ring of 100 tokens */
+    public SimpleIndexBucketLocatorImpl() {
+        this( 100 );
+    }
+
+
+    /** Get a token */
+    private static BigInteger initialToken( int size, int position ) {
+        BigInteger decValue = MINIMUM;
+        if ( position != 0 ) {
+            decValue = MAXIMUM.divide( new BigInteger( "" + size ) ).multiply( new BigInteger( "" + position ) )
+                              .subtract( BigInteger.ONE );
+        }
+        return decValue;
+    }
+
+
+    /** Get the next token in the ring for this big int. */
+    private String getClosestToken( UUID entityId ) {
+        BigInteger location = new BigInteger( md5( bytes( entityId ) ) );
+        location = location.abs();
+
+        int index = Collections.binarySearch( buckets, location );
+
+        if ( index < 0 ) {
+            index = ( index + 1 ) * -1;
+        }
+
+        // mod if we need to wrap
+        index = index % size;
+
+        return bucketsString.get( index );
+    }
+
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.usergrid.persistence.IndexBucketLocator#getBucket(java.util.UUID,
+     * org.apache.usergrid.persistence.IndexBucketLocator.IndexType, java.util.UUID,
+     * java.lang.String[])
+     */
+    @Override
+    public String getBucket( UUID applicationId, IndexType type, UUID entityId, String... components ) {
+        return getClosestToken( entityId );
+    }
+
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.usergrid.persistence.IndexBucketLocator#getBuckets(java.util.UUID,
+     * org.apache.usergrid.persistence.IndexBucketLocator.IndexType,
+     * java.lang.String[])
+     */
+    @Override
+    public List<String> getBuckets( UUID applicationId, IndexType type, String... components ) {
+        return bucketsString;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/index/ConnectedIndexScanner.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/index/ConnectedIndexScanner.java b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/index/ConnectedIndexScanner.java
new file mode 100644
index 0000000..8a2d3d3
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/index/ConnectedIndexScanner.java
@@ -0,0 +1,231 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.cassandra.index;
+
+
+import java.nio.ByteBuffer;
+import java.util.Iterator;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.UUID;
+
+import org.apache.usergrid.persistence.cassandra.CassandraService;
+import org.springframework.util.Assert;
+
+import com.yammer.metrics.annotation.Metered;
+
+import me.prettyprint.hector.api.beans.HColumn;
+import static org.apache.usergrid.persistence.cassandra.ApplicationCF.ENTITY_COMPOSITE_DICTIONARIES;
+import static org.apache.usergrid.persistence.cassandra.CassandraPersistenceUtils.key;
+
+
+/** @author tnine */
+public class ConnectedIndexScanner implements IndexScanner {
+
+    private final CassandraService cass;
+    private final UUID applicationId;
+    private final boolean reversed;
+    private final int pageSize;
+    private final String dictionaryType;
+    private final UUID entityId;
+    private final Iterator<String> connectionTypes;
+
+    /** Pointer to our next start read */
+    private ByteBuffer start;
+
+    /** Set to the original value to start scanning from */
+    private ByteBuffer scanStart;
+
+    /** Iterator for our results from the last page load */
+    private LinkedHashSet<HColumn<ByteBuffer, ByteBuffer>> lastResults;
+
+    /** True if our last load loaded a full page size. */
+    private boolean hasMore = true;
+
+    private String currentConnectionType;
+
+
+    public ConnectedIndexScanner( CassandraService cass, String dictionaryType, UUID applicationId, UUID entityId,
+                                  Iterator<String> connectionTypes, ByteBuffer start, boolean reversed, int pageSize ) {
+
+        Assert.notNull( entityId, "Entity id for row key construction must be specified when searching graph indexes" );
+        // create our start and end ranges
+        this.scanStart = start;
+        this.cass = cass;
+        this.applicationId = applicationId;
+        this.entityId = entityId;
+        this.start = scanStart;
+        this.reversed = reversed;
+        this.pageSize = pageSize;
+        this.dictionaryType = dictionaryType;
+        this.connectionTypes = connectionTypes;
+
+
+        if ( connectionTypes.hasNext() ) {
+            currentConnectionType = connectionTypes.next();
+        }
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.apache.usergrid.persistence.cassandra.index.IndexScanner#reset()
+     */
+    @Override
+    public void reset() {
+        hasMore = true;
+        start = scanStart;
+    }
+
+
+    /**
+     * Search the collection index using all the buckets for the given collection. Load the next page. Return false if
+     * nothing was loaded, true otherwise
+     */
+
+    public boolean load() throws Exception {
+
+        // nothing left to load
+        if ( !hasMore ) {
+            return false;
+        }
+
+
+        lastResults = new LinkedHashSet<HColumn<ByteBuffer, ByteBuffer>>();
+
+        //go through each connection type until we exhaust the result sets
+        while ( currentConnectionType != null ) {
+
+            //only load a delta size to get this next page
+            int selectSize = pageSize + 1 - lastResults.size();
+
+            Object key = key( entityId, dictionaryType, currentConnectionType );
+
+
+            List<HColumn<ByteBuffer, ByteBuffer>> results =
+                    cass.getColumns( cass.getApplicationKeyspace( applicationId ), ENTITY_COMPOSITE_DICTIONARIES, key,
+                            start, null, selectSize, reversed );
+
+            lastResults.addAll( results );
+
+            // we loaded a full page, there might be more
+            if ( results.size() == selectSize ) {
+                hasMore = true;
+
+                // set the bytebuffer for the next pass
+                start = results.get( results.size() - 1 ).getName();
+
+                lastResults.remove( lastResults.size() - 1 );
+
+                //we've loaded a full page
+                break;
+            }
+            else {
+
+                //we're done, there's no more connection types and we've loaded all cols for this type.
+                if ( !connectionTypes.hasNext() ) {
+                    hasMore = false;
+                    currentConnectionType = null;
+                    break;
+                }
+
+                //we have more connection types, but we've reached the end of this type,
+                // keep going in the loop to load the next page
+
+                currentConnectionType = connectionTypes.next();
+            }
+        }
+
+
+        return lastResults != null && lastResults.size() > 0;
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see java.lang.Iterable#iterator()
+     */
+    @Override
+    public Iterator<Set<HColumn<ByteBuffer, ByteBuffer>>> iterator() {
+        return this;
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see java.util.Iterator#hasNext()
+     */
+    @Override
+    public boolean hasNext() {
+
+        // We've either 1) paged everything we should and have 1 left from our
+        // "next page" pointer
+        // Our currently buffered results don't exist or don't have a next. Try to
+        // load them again if they're less than the page size
+        if ( lastResults == null && hasMore ) {
+            try {
+                return load();
+            }
+            catch ( Exception e ) {
+                throw new RuntimeException( "Error loading next page of indexbucket scanner", e );
+            }
+        }
+
+        return false;
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see java.util.Iterator#next()
+     */
+    @Override
+    @Metered(group = "core", name = "IndexBucketScanner_load")
+    public Set<HColumn<ByteBuffer, ByteBuffer>> next() {
+        Set<HColumn<ByteBuffer, ByteBuffer>> returnVal = lastResults;
+
+        lastResults = null;
+
+        return returnVal;
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see java.util.Iterator#remove()
+     */
+    @Override
+    public void remove() {
+        throw new UnsupportedOperationException( "You can't remove from a result set, only advance" );
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.apache.usergrid.persistence.cassandra.index.IndexScanner#getPageSize()
+     */
+    @Override
+    public int getPageSize() {
+        return pageSize;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/index/IndexBucketScanner.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/index/IndexBucketScanner.java b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/index/IndexBucketScanner.java
new file mode 100644
index 0000000..9250d0d
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/index/IndexBucketScanner.java
@@ -0,0 +1,217 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.cassandra.index;
+
+
+import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.NavigableSet;
+import java.util.Set;
+import java.util.TreeSet;
+import java.util.UUID;
+
+import org.apache.usergrid.persistence.IndexBucketLocator;
+import org.apache.usergrid.persistence.IndexBucketLocator.IndexType;
+import org.apache.usergrid.persistence.cassandra.ApplicationCF;
+import org.apache.usergrid.persistence.cassandra.CassandraService;
+
+import com.yammer.metrics.annotation.Metered;
+
+import me.prettyprint.hector.api.beans.HColumn;
+import static org.apache.usergrid.persistence.cassandra.CassandraPersistenceUtils.key;
+
+
+/**
+ * A simple class to make working with index buckets easier. Scans all buckets and merges the results into a single
+ * column list to allow easy backwards compatibility with existing code
+ *
+ * @author tnine
+ */
+public class IndexBucketScanner implements IndexScanner {
+
+    private final CassandraService cass;
+    private final IndexBucketLocator indexBucketLocator;
+    private final UUID applicationId;
+    private final Object keyPrefix;
+    private final ApplicationCF columnFamily;
+    private final Object finish;
+    private final boolean reversed;
+    private final int pageSize;
+    private final String[] indexPath;
+    private final IndexType indexType;
+
+    /** Pointer to our next start read */
+    private Object start;
+
+    /** Set to the original value to start scanning from */
+    private Object scanStart;
+
+    /** Iterator for our results from the last page load */
+    private TreeSet<HColumn<ByteBuffer, ByteBuffer>> lastResults;
+
+    /** True if our last load loaded a full page size. */
+    private boolean hasMore = true;
+
+
+    public IndexBucketScanner( CassandraService cass, IndexBucketLocator locator, ApplicationCF columnFamily,
+                               UUID applicationId, IndexType indexType, Object keyPrefix, Object start, Object finish,
+                               boolean reversed, int pageSize, String... indexPath ) {
+        this.cass = cass;
+        this.indexBucketLocator = locator;
+        this.applicationId = applicationId;
+        this.keyPrefix = keyPrefix;
+        this.columnFamily = columnFamily;
+        this.start = start;
+        this.finish = finish;
+        this.reversed = reversed;
+        this.pageSize = pageSize;
+        this.indexPath = indexPath;
+        this.indexType = indexType;
+        this.scanStart = start;
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.usergrid.persistence.cassandra.index.IndexScanner#reset()
+     */
+    @Override
+    public void reset() {
+        hasMore = true;
+        start = scanStart;
+    }
+
+
+    /**
+     * Search the collection index using all the buckets for the given collection. Load the next page. Return false if
+     * nothing was loaded, true otherwise
+     *
+     * @return True if the data could be loaded
+     */
+
+    public boolean load() throws Exception {
+
+        // nothing left to load
+        if ( !hasMore ) {
+            return false;
+        }
+
+        List<String> keys = indexBucketLocator.getBuckets( applicationId, indexType, indexPath );
+
+        List<Object> cassKeys = new ArrayList<Object>( keys.size() );
+
+        for ( String bucket : keys ) {
+            cassKeys.add( key( keyPrefix, bucket ) );
+        }
+
+        //if we skip the first we need to set the load to page size +2, since we'll discard the first
+        //and start paging at the next entity, otherwise we'll just load the page size we need
+        int selectSize = pageSize + 1;
+
+        TreeSet<HColumn<ByteBuffer, ByteBuffer>> resultsTree = IndexMultiBucketSetLoader
+                .load( cass, columnFamily, applicationId, cassKeys, start, finish, selectSize, reversed );
+
+        // we loaded a full page, there might be more
+        if ( resultsTree.size() == selectSize ) {
+            hasMore = true;
+
+            // set the bytebuffer for the next pass
+            start = resultsTree.last().getName();
+
+            resultsTree.remove( resultsTree.last() );
+        }
+        else {
+            hasMore = false;
+        }
+
+        lastResults = resultsTree;
+
+        return lastResults != null && lastResults.size() > 0;
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see java.lang.Iterable#iterator()
+     */
+    @Override
+    public Iterator<Set<HColumn<ByteBuffer, ByteBuffer>>> iterator() {
+        return this;
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see java.util.Iterator#hasNext()
+     */
+    @Override
+    public boolean hasNext() {
+
+        // We've either 1) paged everything we should and have 1 left from our
+        // "next page" pointer
+        // Our currently buffered results don't exist or don't have a next. Try to
+        // load them again if they're less than the page size
+        if ( lastResults == null && hasMore ) {
+            try {
+                return load();
+            }
+            catch ( Exception e ) {
+                throw new RuntimeException( "Error loading next page of indexbucket scanner", e );
+            }
+        }
+
+        return false;
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see java.util.Iterator#next()
+     */
+    @Override
+    @Metered(group = "core", name = "IndexBucketScanner_load")
+    public NavigableSet<HColumn<ByteBuffer, ByteBuffer>> next() {
+        NavigableSet<HColumn<ByteBuffer, ByteBuffer>> returnVal = lastResults;
+
+        lastResults = null;
+
+        return returnVal;
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see java.util.Iterator#remove()
+     */
+    @Override
+    public void remove() {
+        throw new UnsupportedOperationException( "You can't remove from a result set, only advance" );
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.usergrid.persistence.cassandra.index.IndexScanner#getPageSize()
+     */
+    @Override
+    public int getPageSize() {
+        return pageSize;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/index/IndexMultiBucketSetLoader.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/index/IndexMultiBucketSetLoader.java b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/index/IndexMultiBucketSetLoader.java
new file mode 100644
index 0000000..8deebc4
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/index/IndexMultiBucketSetLoader.java
@@ -0,0 +1,137 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.cassandra.index;
+
+
+import java.nio.ByteBuffer;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Map;
+import java.util.TreeSet;
+import java.util.UUID;
+
+import org.apache.cassandra.db.marshal.AbstractType;
+import org.apache.cassandra.db.marshal.TypeParser;
+import org.apache.usergrid.persistence.cassandra.ApplicationCF;
+import org.apache.usergrid.persistence.cassandra.CassandraService;
+
+import me.prettyprint.hector.api.beans.HColumn;
+
+
+/** @author tnine */
+public class IndexMultiBucketSetLoader {
+
+
+    /**
+     *
+     */
+    private static final long serialVersionUID = 1L;
+
+
+    /**
+     * Loads and sorts columns from each bucket in memory.  This will return a contiguous set of columns as if they'd
+     * been
+     * read from a single row
+     */
+    public static TreeSet<HColumn<ByteBuffer, ByteBuffer>> load( CassandraService cass, ApplicationCF columnFamily,
+                                                                 UUID applicationId, List<Object> rowKeys, Object start,
+                                                                 Object finish, int resultSize, boolean reversed )
+            throws Exception {
+        Map<ByteBuffer, List<HColumn<ByteBuffer, ByteBuffer>>> results =
+                cass.multiGetColumns( cass.getApplicationKeyspace( applicationId ), columnFamily, rowKeys, start,
+                        finish, resultSize, reversed );
+
+        final Comparator<ByteBuffer> comparator = reversed ? new DynamicCompositeReverseComparator( columnFamily ) :
+                                                  new DynamicCompositeForwardComparator( columnFamily );
+
+        TreeSet<HColumn<ByteBuffer, ByteBuffer>> resultsTree =
+                new TreeSet<HColumn<ByteBuffer, ByteBuffer>>( new Comparator<HColumn<ByteBuffer, ByteBuffer>>() {
+
+                    @Override
+                    public int compare( HColumn<ByteBuffer, ByteBuffer> first,
+                                        HColumn<ByteBuffer, ByteBuffer> second ) {
+
+                        return comparator.compare( first.getName(), second.getName() );
+                    }
+                } );
+
+        for ( List<HColumn<ByteBuffer, ByteBuffer>> cols : results.values() ) {
+
+            for ( HColumn<ByteBuffer, ByteBuffer> col : cols ) {
+                resultsTree.add( col );
+
+                // trim if we're over size
+                if ( resultsTree.size() > resultSize ) {
+                    resultsTree.pollLast();
+                }
+            }
+        }
+
+        return resultsTree;
+    }
+
+
+    private static abstract class DynamicCompositeComparator implements Comparator<ByteBuffer> {
+        @SuppressWarnings("rawtypes")
+        protected final AbstractType dynamicComposite;
+
+
+        protected DynamicCompositeComparator( ApplicationCF cf ) {
+            // should never happen, this will blow up during development if this fails
+            try {
+                dynamicComposite = TypeParser.parse( cf.getComparator() );
+            }
+            catch ( Exception e ) {
+                throw new RuntimeException( e );
+            }
+        }
+    }
+
+
+    private static class DynamicCompositeForwardComparator extends DynamicCompositeComparator {
+
+        /**
+         * @param cf
+         */
+        protected DynamicCompositeForwardComparator( ApplicationCF cf ) {
+            super( cf );
+        }
+
+
+        @SuppressWarnings("unchecked")
+        @Override
+        public int compare( ByteBuffer o1, ByteBuffer o2 ) {
+            return dynamicComposite.compare( o1, o2 );
+        }
+    }
+
+
+    private static class DynamicCompositeReverseComparator extends DynamicCompositeComparator {
+        /**
+         * @param cf
+         */
+        protected DynamicCompositeReverseComparator( ApplicationCF cf ) {
+            super( cf );
+        }
+
+
+        @SuppressWarnings("unchecked")
+        @Override
+        public int compare( ByteBuffer o1, ByteBuffer o2 ) {
+            return dynamicComposite.compare( o2, o1 );
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/index/IndexScanner.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/index/IndexScanner.java b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/index/IndexScanner.java
new file mode 100644
index 0000000..3fc4a60
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/index/IndexScanner.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.cassandra.index;
+
+
+import java.nio.ByteBuffer;
+import java.util.Iterator;
+import java.util.Set;
+
+import me.prettyprint.hector.api.beans.HColumn;
+
+
+/**
+ * Interface for scanning all index buckets.
+ *
+ * @author tnine
+ */
+public interface IndexScanner
+        extends Iterable<Set<HColumn<ByteBuffer, ByteBuffer>>>, Iterator<Set<HColumn<ByteBuffer, ByteBuffer>>> {
+
+    /** Reset the scanner back to the start */
+    public void reset();
+
+    public int getPageSize();
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/index/NoOpIndexScanner.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/index/NoOpIndexScanner.java b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/index/NoOpIndexScanner.java
new file mode 100644
index 0000000..b11c5f4
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/index/NoOpIndexScanner.java
@@ -0,0 +1,94 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.cassandra.index;
+
+
+import java.nio.ByteBuffer;
+import java.util.Iterator;
+import java.util.NavigableSet;
+import java.util.Set;
+
+import me.prettyprint.hector.api.beans.HColumn;
+
+
+/**
+ * Index scanner that doesn't return anything.  This is used if our cursor has advanced beyond the end of all scannable
+ * ranges
+ *
+ * @author tnine
+ */
+public class NoOpIndexScanner implements IndexScanner {
+
+    /**
+     *
+     */
+    public NoOpIndexScanner() {
+    }
+
+
+    /* (non-Javadoc)
+     * @see java.lang.Iterable#iterator()
+     */
+    @Override
+    public Iterator<Set<HColumn<ByteBuffer, ByteBuffer>>> iterator() {
+        return this;
+    }
+
+
+    /* (non-Javadoc)
+     * @see java.util.Iterator#hasNext()
+     */
+    @Override
+    public boolean hasNext() {
+        return false;
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.usergrid.persistence.cassandra.index.IndexScanner#reset()
+     */
+    @Override
+    public void reset() {
+        //no op
+    }
+
+
+    /* (non-Javadoc)
+     * @see java.util.Iterator#next()
+     */
+    @Override
+    public NavigableSet<HColumn<ByteBuffer, ByteBuffer>> next() {
+        return null;
+    }
+
+
+    /* (non-Javadoc)
+     * @see java.util.Iterator#remove()
+     */
+    @Override
+    public void remove() {
+        throw new UnsupportedOperationException( "Remove is not supported" );
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.usergrid.persistence.cassandra.index.IndexScanner#getPageSize()
+     */
+    @Override
+    public int getPageSize() {
+        return 0;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/util/Slf4jTraceTagReporter.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/util/Slf4jTraceTagReporter.java b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/util/Slf4jTraceTagReporter.java
new file mode 100644
index 0000000..d22b63d
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/util/Slf4jTraceTagReporter.java
@@ -0,0 +1,47 @@
+package org.apache.usergrid.persistence.cassandra.util;
+
+
+import java.util.Date;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * Simple reporter which dumps to class logger at info level.
+ * <p/>
+ * You can configure a logger with the name "TraceTagReporter" explicitly which, if not in a logging context, then the
+ * class level logger will be used.
+ *
+ * @author zznate
+ */
+public class Slf4jTraceTagReporter implements TraceTagReporter {
+    private Logger logger;
+
+
+    public Slf4jTraceTagReporter() {
+        logger = LoggerFactory.getLogger( "TraceTagReporter" );
+        if ( logger == null ) {
+            logger = LoggerFactory.getLogger( Slf4jTraceTagReporter.class );
+        }
+    }
+
+
+    @Override
+    public void report( TraceTag traceTag ) {
+        logger.info( "TraceTag: {}", traceTag.getTraceName() );
+        for ( TimedOpTag timedOpTag : traceTag ) {
+            logger.info( "----opId: {} opName: {} startTime: {} elapsed: {}", new Object[] {
+                    timedOpTag.getOpTag(), timedOpTag.getTagName(), new Date( timedOpTag.getStart() ),
+                    timedOpTag.getElapsed()
+            } );
+        }
+        logger.info( "------" );
+    }
+
+
+    @Override
+    public void reportUnattached( TimedOpTag timedOpTag ) {
+        logger.info( "--[unattached]-- {}", timedOpTag );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/util/TaggedOpTimer.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/util/TaggedOpTimer.java b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/util/TaggedOpTimer.java
new file mode 100644
index 0000000..5c146d3
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/util/TaggedOpTimer.java
@@ -0,0 +1,38 @@
+package org.apache.usergrid.persistence.cassandra.util;
+
+
+import me.prettyprint.cassandra.connection.HOpTimer;
+
+
+/**
+ * Trace the timed execution of a 'tag' over the course of a number of operations. Facilitates integration with
+ * Dapper-style trace logging infrastructure.
+ *
+ * @author zznate
+ */
+public class TaggedOpTimer implements HOpTimer {
+
+    private TraceTagManager traceTagManager;
+
+
+    public TaggedOpTimer( TraceTagManager traceTagManager ) {
+        this.traceTagManager = traceTagManager;
+    }
+
+
+    @Override
+    public Object start( String tagName ) {
+        // look for our threadLocal. if not present, return this.
+        return traceTagManager.timerInstance();
+    }
+
+
+    @Override
+    public void stop( Object timedOpTag, String opTagName, boolean success ) {
+        if ( timedOpTag instanceof TimedOpTag ) {
+            TimedOpTag t = ( ( TimedOpTag ) timedOpTag );
+            t.stopAndApply( opTagName, success );
+            traceTagManager.addTimer( t );
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/util/TimedOpTag.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/util/TimedOpTag.java b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/util/TimedOpTag.java
new file mode 100644
index 0000000..1faaccf
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/util/TimedOpTag.java
@@ -0,0 +1,101 @@
+package org.apache.usergrid.persistence.cassandra.util;
+
+
+import java.util.UUID;
+
+import org.apache.usergrid.utils.UUIDUtils;
+
+import com.google.common.base.Objects;
+
+
+/**
+ * Simple struct holding timer information for an operation and an arbitrary tag for spanning 0 or more operations
+ *
+ * @author zznate
+ */
+public class TimedOpTag {
+
+    private final UUID opTag;
+    private final String traceTagName;
+    private String tagName;
+    private long elapsed = 0;
+    private boolean status;
+
+
+    private TimedOpTag( TraceTag trace ) {
+        this.opTag = UUIDUtils.newTimeUUID();
+        this.traceTagName = ( trace != null ? trace.getTraceName() : "-NONE-" );
+    }
+
+
+    /**
+     * Get an instance with the current start timer set to 'now'
+     *
+     * @param traceTag can be null for single op timing
+     */
+    public static TimedOpTag instance( TraceTag traceTag ) {
+        return new TimedOpTag( traceTag );
+    }
+
+
+    /** Apply tagName only if not already applied */
+    public void stopAndApply( String tName, boolean opStatus ) {
+        if ( elapsed == 0 ) {
+            // extract from uuid and calculate
+            elapsed = System.currentTimeMillis() - UUIDUtils.getTimestampInMillis( opTag );
+        }
+        if ( tName != null ) {
+            this.tagName = tName;
+            this.status = opStatus;
+        }
+    }
+
+
+    /** Elapsed time of this op in milliseconds. */
+    public long getElapsed() {
+        return elapsed;
+    }
+
+
+    /**
+     * The start time of this operation as represented by the timestamp embedded in the type-1 UUID of the opTag
+     * property
+     */
+    public long getStart() {
+        return UUIDUtils.getTimestampInMillis( opTag );
+    }
+
+
+    /** The tag for this specific operation */
+    public UUID getOpTag() {
+        return opTag;
+    }
+
+
+    /** A tag which may span 0 or more operations */
+    public String getTraceTagName() {
+        return traceTagName;
+    }
+
+
+    /** @return the tagName - null if never applied */
+    public String getTagName() {
+        return tagName;
+    }
+
+
+    /**
+     * @return whether or not the operation was 'successful' Could still be false if {@link #stopAndApply(String,
+     *         boolean)} was never called
+     */
+    public boolean getOpSuccessful() {
+        return status;
+    }
+
+
+    @Override
+    public String toString() {
+        return Objects.toStringHelper( this ).add( "traceTag", traceTagName ).add( "opTag", opTag.toString() )
+                      .add( "tagName", tagName ).add( "start", getStart() ).add( "elapsed", elapsed ).toString();
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/util/TraceParticipant.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/util/TraceParticipant.java b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/util/TraceParticipant.java
new file mode 100644
index 0000000..829de00
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/util/TraceParticipant.java
@@ -0,0 +1,20 @@
+package org.apache.usergrid.persistence.cassandra.util;
+
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+
+/**
+ * Mark a method as able to participate in a trace session
+ *
+ * @author zznate
+ */
+@Target(value = { ElementType.METHOD })
+@Retention(RetentionPolicy.RUNTIME)
+public @interface TraceParticipant {
+
+    String name() default "";
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/util/TraceTag.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/util/TraceTag.java b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/util/TraceTag.java
new file mode 100644
index 0000000..e7521c0
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/util/TraceTag.java
@@ -0,0 +1,77 @@
+package org.apache.usergrid.persistence.cassandra.util;
+
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.UUID;
+
+
+/** @author zznate */
+public class TraceTag implements Iterable<TimedOpTag> {
+
+    private final UUID tag;
+    private final String name;
+    private final String traceName;
+    private final List<TimedOpTag> timedOps;
+    private final boolean metered;
+
+
+    private TraceTag( UUID tag, String name, boolean metered ) {
+        this.tag = tag;
+        this.name = name;
+        this.metered = metered;
+        traceName = new StringBuilder( this.tag.toString() ).append( "-" ).append( this.metered ).append( "-" )
+                                                            .append( this.name ).toString();
+        timedOps = new ArrayList<TimedOpTag>();
+    }
+
+
+    public static TraceTag getInstance( UUID tag, String name ) {
+        return new TraceTag( tag, name, false );
+    }
+
+
+    public static TraceTag getMeteredInstance( UUID tag, String name ) {
+        return new TraceTag( tag, name, true );
+    }
+
+
+    public String getTraceName() {
+        return traceName;
+    }
+
+
+    public void add( TimedOpTag timedOpTag ) {
+        timedOps.add( timedOpTag );
+    }
+
+
+    public boolean getMetered() {
+        return metered;
+    }
+
+
+    @Override
+    public String toString() {
+        return getTraceName();
+    }
+
+
+    @Override
+    public Iterator iterator() {
+        return timedOps.iterator();
+    }
+
+
+    /** The number of {@link TimedOpTag} instances currently held */
+    public int getOpCount() {
+        return timedOps.size();
+    }
+
+
+    /** Remove the currently held {@link TimedOpTag} instances */
+    public void removeOps() {
+        timedOps.clear();
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/util/TraceTagAspect.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/util/TraceTagAspect.java b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/util/TraceTagAspect.java
new file mode 100644
index 0000000..b4ae784
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/util/TraceTagAspect.java
@@ -0,0 +1,41 @@
+package org.apache.usergrid.persistence.cassandra.util;
+
+
+import javax.annotation.Resource;
+
+import org.aspectj.lang.ProceedingJoinPoint;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * Use Aspects to apply a trace
+ *
+ * @author zznate
+ */
+public class TraceTagAspect {
+    private static final Logger logger = LoggerFactory.getLogger( TraceTagAspect.class );
+
+    @Resource
+    private TraceTagManager traceTagManager;
+
+
+    public Object applyTrace( ProceedingJoinPoint pjp ) throws Throwable {
+        String tagName = pjp.toLongString();
+        logger.debug( "Applyng trace on {}", tagName );
+        TimedOpTag timedOpTag = traceTagManager.timerInstance();
+        boolean success = true;
+        try {
+            return pjp.proceed();
+        }
+        catch ( Exception e ) {
+            success = false;
+            throw e;
+        }
+        finally {
+            timedOpTag.stopAndApply( tagName, success );
+            traceTagManager.addTimer( timedOpTag );
+            logger.debug( "TimedOpTag added in Aspect on {}", tagName );
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/util/TraceTagManager.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/util/TraceTagManager.java b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/util/TraceTagManager.java
new file mode 100644
index 0000000..9383ffe
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/util/TraceTagManager.java
@@ -0,0 +1,156 @@
+package org.apache.usergrid.persistence.cassandra.util;
+
+
+import javax.annotation.Resource;
+
+import org.apache.usergrid.utils.UUIDUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.google.common.base.Preconditions;
+
+
+/**
+ * Keeps the TraceTag as a ThreadLocal
+ *
+ * @author zznate
+ */
+public class TraceTagManager {
+    private Logger logger = LoggerFactory.getLogger( TraceTagManager.class );
+
+    private static ThreadLocal<TraceTag> localTraceTag = new ThreadLocal<TraceTag>();
+
+    private boolean traceEnabled;
+
+    private boolean reportUnattached;
+
+    private boolean explicitOnly;
+
+    private int flushAtOpCount = 100;
+
+    @Resource
+    private TraceTagReporter traceTagReporter;
+
+
+    /** Enable tracing. Off by default. */
+    public void setTraceEnabled( boolean traceEnabled ) {
+        this.traceEnabled = traceEnabled;
+    }
+
+
+    public boolean getTraceEnabled() {
+        return traceEnabled;
+    }
+
+
+    /**
+     * The maximum number of o TimedOpTag objects we can attach to a tracing instance. Excess of this will for a
+     * blocking flush on the current thread to the configured reporter instance.
+     * <p/>
+     * The default is 100. If you have other ThreadLocal variables, you should probably lower this value.
+     */
+    public int getFlushAtOpCount() {
+        return flushAtOpCount;
+    }
+
+
+    public void setFlushAtOpCount( int flushAtOpCount ) {
+        this.flushAtOpCount = flushAtOpCount;
+    }
+
+
+    /** If set to true we log all TimedOpTag objects not attached to a Trace */
+    public void setReportUnattached( boolean reportUnattached ) {
+        this.reportUnattached = reportUnattached;
+    }
+
+
+    /**
+     * Allow for/check against traces in piecemeal. Use this when {@link #setTraceEnabled(boolean)} is set to false and
+     * you want callers to control whether or not to initiate a trace. An example would be initiating traces in a
+     * ServletFilter by looking for a header or parameter as tracing all requests would be expensive.
+     */
+    public boolean getExplicitOnly() {
+        return explicitOnly;
+    }
+
+
+    public void setExplicitOnly( boolean explicitOnly ) {
+        this.explicitOnly = explicitOnly;
+    }
+
+
+    /** Get the tag from a ThreadLocal. Will return null if no tag is attached. */
+    public TraceTag acquire() {
+        return localTraceTag.get();
+    }
+
+
+    public TimedOpTag timerInstance() {
+        return TimedOpTag.instance( acquire() );
+    }
+
+
+    /**
+     * Add this TimedOpTag to the underlying trace if there is one. Optionally log it's contents if no trace is active.
+     * If an active trace was found and {@link org.apache.usergrid.persistence.cassandra.util.TraceTag#getOpCount()} exceeded
+     * {@link #getFlushAtOpCount()}, then the trace is dumped to the reporter and {@link
+     * org.apache.usergrid.persistence.cassandra.util.TraceTag#removeOps()} is invoked. The TraceTag stay attached with the
+     * same name and ID, but now with no pending ops.
+     */
+    public void addTimer( TimedOpTag timedOpTag ) {
+        if ( isActive() ) {
+            TraceTag tag = acquire();
+            if ( tag.getOpCount() >= flushAtOpCount ) {
+                traceTagReporter.report( tag );
+                tag.removeOps();
+            }
+            tag.add( timedOpTag );
+
+            // if TraceTag#metered, send to meter by tag name
+        }
+        else {
+            if ( reportUnattached ) {
+                traceTagReporter.reportUnattached( timedOpTag );
+            }
+        }
+    }
+
+
+    /** Returns true if there is a trace in progress */
+    public boolean isActive() {
+        return acquire() != null;
+    }
+
+
+    /**
+     * Attache the tag to the current Thread. Will throw an IllegalStateException if there is already a trace in
+     * progress.
+     */
+    public void attach( TraceTag traceTag ) {
+        Preconditions.checkState( !isActive(), "Attempt to attach on already active trace" );
+        localTraceTag.set( traceTag );
+        logger.debug( "Attached TraceTag {} to thread", traceTag );
+    }
+
+
+    /** Detach the tag from the current thread. Throws an IllegalStateException if there is no trace in progress. */
+    public TraceTag detach() {
+        TraceTag traceTag = localTraceTag.get();
+        Preconditions.checkState( isActive(), "Attempt to detach on no active trace" );
+        localTraceTag.remove();
+        logger.debug( "Detached TraceTag {} from thread", traceTag );
+        return traceTag;
+    }
+
+
+    /** Create a TraceTag */
+    public TraceTag create( String tagName ) {
+        return TraceTag.getInstance( UUIDUtils.newTimeUUID(), tagName );
+    }
+
+
+    public TraceTag createMetered( String tagName ) {
+        return TraceTag.getMeteredInstance( UUIDUtils.newTimeUUID(), tagName );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/util/TraceTagReporter.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/util/TraceTagReporter.java b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/util/TraceTagReporter.java
new file mode 100644
index 0000000..ce607f1
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/util/TraceTagReporter.java
@@ -0,0 +1,10 @@
+package org.apache.usergrid.persistence.cassandra.util;
+
+
+/** @author zznate */
+public interface TraceTagReporter {
+
+    void report( TraceTag traceTag );
+
+    void reportUnattached( TimedOpTag timedOpTag );
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/apache/usergrid/persistence/entities/Activity.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/entities/Activity.java b/stack/core/src/main/java/org/apache/usergrid/persistence/entities/Activity.java
new file mode 100644
index 0000000..1ecb16e
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/entities/Activity.java
@@ -0,0 +1,685 @@
+/*******************************************************************************
+ * Copyright 2012 Apigee Corporation
+ *
+ * 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.persistence.entities;
+
+
+import java.util.Arrays;
+import java.util.Date;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.UUID;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.apache.usergrid.persistence.Entity;
+import org.apache.usergrid.persistence.EntityRef;
+import org.apache.usergrid.persistence.TypedEntity;
+import org.apache.usergrid.persistence.annotations.EntityDictionary;
+import org.apache.usergrid.persistence.annotations.EntityProperty;
+import org.codehaus.jackson.annotate.JsonAnyGetter;
+import org.codehaus.jackson.annotate.JsonAnySetter;
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
+
+import static org.apache.usergrid.utils.StringUtils.toStringFormat;
+
+
+/**
+ * An entity type for representing activity stream actions. These are similar to the more generic message entity type
+ * except provide the necessary properties for supporting activity stream implementations.
+ *
+ * @see http://activitystrea.ms/specs/json/1.0/
+ */
+@XmlRootElement
+public class Activity extends TypedEntity {
+
+    public static final String ENTITY_TYPE = "activity";
+
+    public static final String PROPERTY_OBJECT_NAME = "objectName";
+    public static final String PROPERTY_OBJECT_ENTITY_TYPE = "objectEntityType";
+    public static final String PROPERTY_ACTOR_NAME = "actorName";
+    public static final String PROPERTY_OBJECT = "object";
+    public static final String PROPERTY_ACTOR = "actor";
+    public static final String PROPERTY_TITLE = "title";
+    public static final String PROPERTY_CONTENT = "content";
+    public static final String PROPERTY_CATEGORY = "category";
+    public static final String PROPERTY_VERB = "verb";
+    public static final String PROPERTY_UUID = "uuid";
+    public static final String PROPERTY_ENTITY_TYPE = "entityType";
+    public static final String PROPERTY_OBJECT_TYPE = "objectType";
+    public static final String PROPERTY_DISPLAY_NAME = "displayName";
+
+    public static final String VERB_ADD = "add";
+    public static final String VERB_CANCEL = "cancel";
+    public static final String VERB_CHECKIN = "checkin";
+    public static final String VERB_DELETE = "delete";
+    public static final String VERB_FAVORITE = "favorite";
+    public static final String VERB_FOLLOW = "follow";
+    public static final String VERB_GIVE = "give";
+    public static final String VERB_IGNORE = "ignore";
+    public static final String VERB_INVITE = "invite";
+    public static final String VERB_JOIN = "join";
+    public static final String VERB_LEAVE = "leave";
+    public static final String VERB_LIKE = "like";
+    public static final String VERB_MAKE_FRIEND = "make-friend";
+    public static final String VERB_PLAY = "play";
+    public static final String VERB_POST = "post";
+    public static final String VERB_RECEIVE = "receive";
+    public static final String VERB_REMOVE = "remove";
+    public static final String VERB_REMOVE_FRIEND = "remove-friend";
+    public static final String VERB_REQUEST_FRIEND = "request-friend";
+    public static final String VERB_RSVP_MAYBE = "rsvp-maybe";
+    public static final String VERB_RSVP_NO = "rsvp-no";
+    public static final String VERB_RSVP_YES = "rsvp-yes";
+    public static final String VERB_SAVE = "save";
+    public static final String VERB_SHARE = "share";
+    public static final String VERB_STOP_FOLLOWING = "stop-following";
+    public static final String VERB_TAG = "tag";
+    public static final String VERB_UNFAVORITE = "unfavorite";
+    public static final String VERB_UNLIKE = "unlike";
+    public static final String VERB_UNSAVE = "unsave";
+    public static final String VERB_UPDATE = "update";
+
+    public static final String OBJECT_TYPE_ARTICLE = "article";
+    public static final String OBJECT_TYPE_AUDIO = "audio";
+    public static final String OBJECT_TYPE_BADGE = "badge";
+    public static final String OBJECT_TYPE_BOOKMARK = "bookmark";
+    public static final String OBJECT_TYPE_COLLECTION = "collection";
+    public static final String OBJECT_TYPE_COMMENT = "comment";
+    public static final String OBJECT_TYPE_EVENT = "event";
+    public static final String OBJECT_TYPE_FILE = "file";
+    public static final String OBJECT_TYPE_GROUP = "group";
+    public static final String OBJECT_TYPE_IMAGE = "image";
+    public static final String OBJECT_TYPE_NOTE = "note";
+    public static final String OBJECT_TYPE_PERSON = "person";
+    public static final String OBJECT_TYPE_PLACE = "place";
+    public static final String OBJECT_TYPE_PRODUCT = "product";
+    public static final String OBJECT_TYPE_QUESTION = "question";
+    public static final String OBJECT_TYPE_REVIEW = "review";
+    public static final String OBJECT_TYPE_SERVICE = "service";
+    public static final String OBJECT_TYPE_VIDEO = "video";
+
+    @EntityProperty(required = true, mutable = false, indexed = true)
+    ActivityObject actor;
+
+    @EntityProperty(indexed = true, fulltextIndexed = true, required = false, mutable = false)
+    protected String content;
+
+    ActivityObject generator;
+
+    @EntityProperty(indexed = false, fulltextIndexed = false, required = false, mutable = false)
+    protected MediaLink icon;
+
+    @EntityProperty(fulltextIndexed = false, required = false, mutable = false, indexed = true)
+    String category;
+
+    @EntityProperty(fulltextIndexed = false, required = true, mutable = false, indexed = true)
+    String verb;
+
+    @EntityProperty(indexed = true, required = true, mutable = false, timestamp = true)
+    protected Long published;
+
+    @EntityProperty(indexed = false, required = false, mutable = false)
+    ActivityObject object;
+
+    @EntityProperty(indexed = true, fulltextIndexed = true, required = false, mutable = false)
+    protected String title;
+
+    @EntityDictionary(keyType = java.lang.String.class)
+    protected Set<String> connections;
+
+
+    public Activity() {
+        // id = UUIDUtils.newTimeUUID();
+    }
+
+
+    public Activity( UUID id ) {
+        uuid = id;
+    }
+
+
+    public static Activity newActivity( String verb, String title, String content, String category, Entity user,
+                                        EntityRef object, String objectType, String objectName, String objectContent )
+            throws Exception {
+
+        Activity activity = new Activity();
+        activity.setVerb( verb );
+        activity.setCategory( category );
+        activity.setContent( content );
+        activity.setTitle( title );
+
+        ActivityObject actor = new ActivityObject();
+        actor.setObjectType( "person" );
+        if ( user != null ) {
+            actor.setDisplayName( ( String ) user.getProperty( "name" ) );
+            actor.setEntityType( user.getType() );
+            actor.setUuid( user.getUuid() );
+        }
+        activity.setActor( actor );
+
+        ActivityObject obj = new ActivityObject();
+        obj.setDisplayName( objectName );
+        obj.setObjectType( objectType );
+        if ( object != null ) {
+            obj.setEntityType( object.getType() );
+            obj.setUuid( object.getUuid() );
+        }
+        if ( objectContent != null ) {
+            obj.setContent( objectContent );
+        }
+        else {
+            obj.setContent( content );
+        }
+        activity.setObject( obj );
+
+        return activity;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public ActivityObject getActor() {
+        return actor;
+    }
+
+
+    public void setActor( ActivityObject actor ) {
+        this.actor = actor;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public ActivityObject getGenerator() {
+        return generator;
+    }
+
+
+    public void setGenerator( ActivityObject generator ) {
+        this.generator = generator;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public String getCategory() {
+        return category;
+    }
+
+
+    public void setCategory( String category ) {
+        this.category = category;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public String getVerb() {
+        return verb;
+    }
+
+
+    public void setVerb( String verb ) {
+        this.verb = verb;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public Long getPublished() {
+        return published;
+    }
+
+
+    public void setPublished( Long published ) {
+        this.published = published;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public ActivityObject getObject() {
+        return object;
+    }
+
+
+    public void setObject( ActivityObject object ) {
+        this.object = object;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public String getTitle() {
+        return title;
+    }
+
+
+    public void setTitle( String title ) {
+        this.title = title;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public MediaLink getIcon() {
+        return icon;
+    }
+
+
+    public void setIcon( MediaLink icon ) {
+        this.icon = icon;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public String getContent() {
+        return content;
+    }
+
+
+    public void setContent( String content ) {
+        this.content = content;
+    }
+
+
+    @JsonSerialize(include = Inclusion.NON_NULL)
+    public Set<String> getConnections() {
+        return connections;
+    }
+
+
+    public void setConnections( Set<String> connections ) {
+        this.connections = connections;
+    }
+
+
+    @XmlRootElement
+    static public class MediaLink {
+
+        int duration;
+
+        int height;
+
+        String url;
+
+        int width;
+
+        protected Map<String, Object> dynamic_properties = new TreeMap<String, Object>( String.CASE_INSENSITIVE_ORDER );
+
+
+        public MediaLink() {
+        }
+
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public int getDuration() {
+            return duration;
+        }
+
+
+        public void setDuration( int duration ) {
+            this.duration = duration;
+        }
+
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public int getHeight() {
+            return height;
+        }
+
+
+        public void setHeight( int height ) {
+            this.height = height;
+        }
+
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public String getUrl() {
+            return url;
+        }
+
+
+        public void setUrl( String url ) {
+            this.url = url;
+        }
+
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public int getWidth() {
+            return width;
+        }
+
+
+        public void setWidth( int width ) {
+            this.width = width;
+        }
+
+
+        @JsonAnySetter
+        public void setDynamicProperty( String key, Object value ) {
+            dynamic_properties.put( key, value );
+        }
+
+
+        @JsonAnyGetter
+        public Map<String, Object> getDynamicProperties() {
+            return dynamic_properties;
+        }
+
+
+        @Override
+        public String toString() {
+            return "MediaLink [duration=" + duration + ", height=" + height + ", url=" + url + ", width=" + width
+                    + ", dynamic_properties=" + dynamic_properties + "]";
+        }
+    }
+
+
+    @XmlRootElement
+    static public class ActivityObject {
+
+        ActivityObject[] attachments;
+
+        ActivityObject author;
+
+        String content;
+
+        String displayName;
+
+        String[] downstreamDuplicates;
+
+        String id;
+
+        MediaLink image;
+
+        String objectType;
+
+        Date published;
+
+        String summary;
+
+        String updated;
+
+        String upstreamDuplicates;
+
+        String url;
+
+        UUID uuid;
+
+        String entityType;
+
+        protected Map<String, Object> dynamic_properties = new TreeMap<String, Object>( String.CASE_INSENSITIVE_ORDER );
+
+
+        public ActivityObject() {
+        }
+
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public ActivityObject[] getAttachments() {
+            return attachments;
+        }
+
+
+        public void setAttachments( ActivityObject[] attachments ) {
+            this.attachments = attachments;
+        }
+
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public ActivityObject getAuthor() {
+            return author;
+        }
+
+
+        public void setAuthor( ActivityObject author ) {
+            this.author = author;
+        }
+
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public String getContent() {
+            return content;
+        }
+
+
+        public void setContent( String content ) {
+            this.content = content;
+        }
+
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public String getDisplayName() {
+            return displayName;
+        }
+
+
+        public void setDisplayName( String displayName ) {
+            this.displayName = displayName;
+        }
+
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public String[] getDownstreamDuplicates() {
+            return downstreamDuplicates;
+        }
+
+
+        public void setDownstreamDuplicates( String[] downstreamDuplicates ) {
+            this.downstreamDuplicates = downstreamDuplicates;
+        }
+
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public String getId() {
+            return id;
+        }
+
+
+        public void setId( String id ) {
+            this.id = id;
+        }
+
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public MediaLink getImage() {
+            return image;
+        }
+
+
+        public void setImage( MediaLink image ) {
+            this.image = image;
+        }
+
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public String getObjectType() {
+            return objectType;
+        }
+
+
+        public void setObjectType( String objectType ) {
+            this.objectType = objectType;
+        }
+
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public Date getPublished() {
+            return published;
+        }
+
+
+        public void setPublished( Date published ) {
+            this.published = published;
+        }
+
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public String getSummary() {
+            return summary;
+        }
+
+
+        public void setSummary( String summary ) {
+            this.summary = summary;
+        }
+
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public String getUpdated() {
+            return updated;
+        }
+
+
+        public void setUpdated( String updated ) {
+            this.updated = updated;
+        }
+
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public String getUpstreamDuplicates() {
+            return upstreamDuplicates;
+        }
+
+
+        public void setUpstreamDuplicates( String upstreamDuplicates ) {
+            this.upstreamDuplicates = upstreamDuplicates;
+        }
+
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public String getUrl() {
+            return url;
+        }
+
+
+        public void setUrl( String url ) {
+            this.url = url;
+        }
+
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public UUID getUuid() {
+            return uuid;
+        }
+
+
+        public void setUuid( UUID uuid ) {
+            this.uuid = uuid;
+        }
+
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public String getEntityType() {
+            return entityType;
+        }
+
+
+        public void setEntityType( String entityType ) {
+            this.entityType = entityType;
+        }
+
+
+        @JsonAnySetter
+        public void setDynamicProperty( String key, Object value ) {
+            dynamic_properties.put( key, value );
+        }
+
+
+        @JsonAnyGetter
+        public Map<String, Object> getDynamicProperties() {
+            return dynamic_properties;
+        }
+
+
+        @Override
+        public String toString() {
+            return "ActivityObject [" + toStringFormat( attachments, "attachments=%s, " ) + toStringFormat( author,
+                    "author=%s, " ) + toStringFormat( content, "content=%s, " ) + toStringFormat( displayName,
+                    "displayName=%s, " ) + toStringFormat( downstreamDuplicates, "downstreamDuplicates=%s, " )
+                    + toStringFormat( id, "id=%s, " ) + toStringFormat( image, "image=%s, " ) + toStringFormat(
+                    objectType, "objectType=%s, " ) + toStringFormat( published, "published=%s, " ) + toStringFormat(
+                    summary, "summary=%s, " ) + toStringFormat( updated, "updated=%s, " ) + toStringFormat(
+                    upstreamDuplicates, "upstreamDuplicates=%s, " ) + toStringFormat( url, "url=%s, " )
+                    + toStringFormat( uuid, "uuid=%s, " ) + toStringFormat( entityType, "entityType=%s, " )
+                    + toStringFormat( dynamic_properties, "dynamic_properties=%s" ) + "]";
+        }
+    }
+
+
+    @XmlRootElement
+    static public class ActivityCollection {
+
+        int totalItems;
+
+        ActivityObject[] items;
+
+        String url;
+
+        protected Map<String, Object> dynamic_properties = new TreeMap<String, Object>( String.CASE_INSENSITIVE_ORDER );
+
+
+        public ActivityCollection() {
+        }
+
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public int getTotalItems() {
+            return totalItems;
+        }
+
+
+        public void setTotalItems( int totalItems ) {
+            this.totalItems = totalItems;
+        }
+
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public ActivityObject[] getItems() {
+            return items;
+        }
+
+
+        public void setItems( ActivityObject[] items ) {
+            this.items = items;
+        }
+
+
+        @JsonSerialize(include = Inclusion.NON_NULL)
+        public String getUrl() {
+            return url;
+        }
+
+
+        public void setUrl( String url ) {
+            this.url = url;
+        }
+
+
+        @JsonAnySetter
+        public void setDynamicProperty( String key, Object value ) {
+            dynamic_properties.put( key, value );
+        }
+
+
+        @JsonAnyGetter
+        public Map<String, Object> getDynamicProperties() {
+            return dynamic_properties;
+        }
+
+
+        @Override
+        public String toString() {
+            return "ActivityCollection [totalItems=" + totalItems + ", items=" + Arrays.toString( items ) + ", url="
+                    + url + ", dynamic_properties=" + dynamic_properties + "]";
+        }
+    }
+}


[23/96] [abbrv] [partial] Change package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c2acbe4/stack/core/src/main/java/org/usergrid/mq/QueryFilterLexer.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/usergrid/mq/QueryFilterLexer.java b/stack/core/src/main/java/org/usergrid/mq/QueryFilterLexer.java
deleted file mode 100644
index ebef342..0000000
--- a/stack/core/src/main/java/org/usergrid/mq/QueryFilterLexer.java
+++ /dev/null
@@ -1,1842 +0,0 @@
-// $ANTLR 3.1.3 Mar 17, 2009 19:23:44 org/usergrid/persistence/query/QueryFilter.g 2012-03-07 22:54:28
-
-package org.usergrid.mq;
-
-
-import org.antlr.runtime.BaseRecognizer;
-import org.antlr.runtime.CharStream;
-import org.antlr.runtime.DFA;
-import org.antlr.runtime.EarlyExitException;
-import org.antlr.runtime.Lexer;
-import org.antlr.runtime.MismatchedSetException;
-import org.antlr.runtime.NoViableAltException;
-import org.antlr.runtime.RecognitionException;
-import org.antlr.runtime.RecognizerSharedState;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-public class QueryFilterLexer extends Lexer {
-    public static final int T__40 = 40;
-    public static final int EXPONENT = 6;
-    public static final int T__29 = 29;
-    public static final int T__28 = 28;
-    public static final int T__27 = 27;
-    public static final int T__26 = 26;
-    public static final int UUID = 12;
-    public static final int T__25 = 25;
-    public static final int T__24 = 24;
-    public static final int T__23 = 23;
-    public static final int T__22 = 22;
-    public static final int T__21 = 21;
-    public static final int UNICODE_ESC = 13;
-    public static final int T__20 = 20;
-    public static final int OCTAL_ESC = 14;
-    public static final int HEX_DIGIT = 11;
-    public static final int INT = 5;
-    public static final int FLOAT = 7;
-    public static final int ID = 4;
-    public static final int EOF = -1;
-    public static final int T__30 = 30;
-    public static final int T__19 = 19;
-    public static final int T__31 = 31;
-    public static final int T__32 = 32;
-    public static final int T__16 = 16;
-    public static final int T__33 = 33;
-    public static final int ESC_SEQ = 8;
-    public static final int BOOLEAN = 10;
-    public static final int WS = 15;
-    public static final int T__34 = 34;
-    public static final int T__18 = 18;
-    public static final int T__35 = 35;
-    public static final int T__17 = 17;
-    public static final int T__36 = 36;
-    public static final int T__37 = 37;
-    public static final int T__38 = 38;
-    public static final int T__39 = 39;
-    public static final int STRING = 9;
-
-
-    private static final Logger logger = LoggerFactory.getLogger( QueryFilterLexer.class );
-
-
-    @Override
-    public void emitErrorMessage( String msg ) {
-        logger.info( msg );
-    }
-
-
-    // delegates
-    // delegators
-
-
-    public QueryFilterLexer() {;}
-
-
-    public QueryFilterLexer( CharStream input ) {
-        this( input, new RecognizerSharedState() );
-    }
-
-
-    public QueryFilterLexer( CharStream input, RecognizerSharedState state ) {
-        super( input, state );
-    }
-
-
-    public String getGrammarFileName() { return "org/usergrid/persistence/query/QueryFilter.g"; }
-
-
-    // $ANTLR start "T__16"
-    public final void mT__16() throws RecognitionException {
-        try {
-            int _type = T__16;
-            int _channel = DEFAULT_TOKEN_CHANNEL;
-            // org/usergrid/persistence/query/QueryFilter.g:21:7: ( '<' )
-            // org/usergrid/persistence/query/QueryFilter.g:21:9: '<'
-            {
-                match( '<' );
-            }
-
-            state.type = _type;
-            state.channel = _channel;
-        }
-        finally {
-        }
-    }
-    // $ANTLR end "T__16"
-
-
-    // $ANTLR start "T__17"
-    public final void mT__17() throws RecognitionException {
-        try {
-            int _type = T__17;
-            int _channel = DEFAULT_TOKEN_CHANNEL;
-            // org/usergrid/persistence/query/QueryFilter.g:22:7: ( '<=' )
-            // org/usergrid/persistence/query/QueryFilter.g:22:9: '<='
-            {
-                match( "<=" );
-            }
-
-            state.type = _type;
-            state.channel = _channel;
-        }
-        finally {
-        }
-    }
-    // $ANTLR end "T__17"
-
-
-    // $ANTLR start "T__18"
-    public final void mT__18() throws RecognitionException {
-        try {
-            int _type = T__18;
-            int _channel = DEFAULT_TOKEN_CHANNEL;
-            // org/usergrid/persistence/query/QueryFilter.g:23:7: ( '=' )
-            // org/usergrid/persistence/query/QueryFilter.g:23:9: '='
-            {
-                match( '=' );
-            }
-
-            state.type = _type;
-            state.channel = _channel;
-        }
-        finally {
-        }
-    }
-    // $ANTLR end "T__18"
-
-
-    // $ANTLR start "T__19"
-    public final void mT__19() throws RecognitionException {
-        try {
-            int _type = T__19;
-            int _channel = DEFAULT_TOKEN_CHANNEL;
-            // org/usergrid/persistence/query/QueryFilter.g:24:7: ( '>' )
-            // org/usergrid/persistence/query/QueryFilter.g:24:9: '>'
-            {
-                match( '>' );
-            }
-
-            state.type = _type;
-            state.channel = _channel;
-        }
-        finally {
-        }
-    }
-    // $ANTLR end "T__19"
-
-
-    // $ANTLR start "T__20"
-    public final void mT__20() throws RecognitionException {
-        try {
-            int _type = T__20;
-            int _channel = DEFAULT_TOKEN_CHANNEL;
-            // org/usergrid/persistence/query/QueryFilter.g:25:7: ( '>=' )
-            // org/usergrid/persistence/query/QueryFilter.g:25:9: '>='
-            {
-                match( ">=" );
-            }
-
-            state.type = _type;
-            state.channel = _channel;
-        }
-        finally {
-        }
-    }
-    // $ANTLR end "T__20"
-
-
-    // $ANTLR start "T__21"
-    public final void mT__21() throws RecognitionException {
-        try {
-            int _type = T__21;
-            int _channel = DEFAULT_TOKEN_CHANNEL;
-            // org/usergrid/persistence/query/QueryFilter.g:26:7: ( 'in' )
-            // org/usergrid/persistence/query/QueryFilter.g:26:9: 'in'
-            {
-                match( "in" );
-            }
-
-            state.type = _type;
-            state.channel = _channel;
-        }
-        finally {
-        }
-    }
-    // $ANTLR end "T__21"
-
-
-    // $ANTLR start "T__22"
-    public final void mT__22() throws RecognitionException {
-        try {
-            int _type = T__22;
-            int _channel = DEFAULT_TOKEN_CHANNEL;
-            // org/usergrid/persistence/query/QueryFilter.g:27:7: ( 'eq' )
-            // org/usergrid/persistence/query/QueryFilter.g:27:9: 'eq'
-            {
-                match( "eq" );
-            }
-
-            state.type = _type;
-            state.channel = _channel;
-        }
-        finally {
-        }
-    }
-    // $ANTLR end "T__22"
-
-
-    // $ANTLR start "T__23"
-    public final void mT__23() throws RecognitionException {
-        try {
-            int _type = T__23;
-            int _channel = DEFAULT_TOKEN_CHANNEL;
-            // org/usergrid/persistence/query/QueryFilter.g:28:7: ( 'lt' )
-            // org/usergrid/persistence/query/QueryFilter.g:28:9: 'lt'
-            {
-                match( "lt" );
-            }
-
-            state.type = _type;
-            state.channel = _channel;
-        }
-        finally {
-        }
-    }
-    // $ANTLR end "T__23"
-
-
-    // $ANTLR start "T__24"
-    public final void mT__24() throws RecognitionException {
-        try {
-            int _type = T__24;
-            int _channel = DEFAULT_TOKEN_CHANNEL;
-            // org/usergrid/persistence/query/QueryFilter.g:29:7: ( 'gt' )
-            // org/usergrid/persistence/query/QueryFilter.g:29:9: 'gt'
-            {
-                match( "gt" );
-            }
-
-            state.type = _type;
-            state.channel = _channel;
-        }
-        finally {
-        }
-    }
-    // $ANTLR end "T__24"
-
-
-    // $ANTLR start "T__25"
-    public final void mT__25() throws RecognitionException {
-        try {
-            int _type = T__25;
-            int _channel = DEFAULT_TOKEN_CHANNEL;
-            // org/usergrid/persistence/query/QueryFilter.g:30:7: ( 'lte' )
-            // org/usergrid/persistence/query/QueryFilter.g:30:9: 'lte'
-            {
-                match( "lte" );
-            }
-
-            state.type = _type;
-            state.channel = _channel;
-        }
-        finally {
-        }
-    }
-    // $ANTLR end "T__25"
-
-
-    // $ANTLR start "T__26"
-    public final void mT__26() throws RecognitionException {
-        try {
-            int _type = T__26;
-            int _channel = DEFAULT_TOKEN_CHANNEL;
-            // org/usergrid/persistence/query/QueryFilter.g:31:7: ( 'gte' )
-            // org/usergrid/persistence/query/QueryFilter.g:31:9: 'gte'
-            {
-                match( "gte" );
-            }
-
-            state.type = _type;
-            state.channel = _channel;
-        }
-        finally {
-        }
-    }
-    // $ANTLR end "T__26"
-
-
-    // $ANTLR start "T__27"
-    public final void mT__27() throws RecognitionException {
-        try {
-            int _type = T__27;
-            int _channel = DEFAULT_TOKEN_CHANNEL;
-            // org/usergrid/persistence/query/QueryFilter.g:32:7: ( 'contains' )
-            // org/usergrid/persistence/query/QueryFilter.g:32:9: 'contains'
-            {
-                match( "contains" );
-            }
-
-            state.type = _type;
-            state.channel = _channel;
-        }
-        finally {
-        }
-    }
-    // $ANTLR end "T__27"
-
-
-    // $ANTLR start "T__28"
-    public final void mT__28() throws RecognitionException {
-        try {
-            int _type = T__28;
-            int _channel = DEFAULT_TOKEN_CHANNEL;
-            // org/usergrid/persistence/query/QueryFilter.g:33:7: ( 'within' )
-            // org/usergrid/persistence/query/QueryFilter.g:33:9: 'within'
-            {
-                match( "within" );
-            }
-
-            state.type = _type;
-            state.channel = _channel;
-        }
-        finally {
-        }
-    }
-    // $ANTLR end "T__28"
-
-
-    // $ANTLR start "T__29"
-    public final void mT__29() throws RecognitionException {
-        try {
-            int _type = T__29;
-            int _channel = DEFAULT_TOKEN_CHANNEL;
-            // org/usergrid/persistence/query/QueryFilter.g:34:7: ( ',' )
-            // org/usergrid/persistence/query/QueryFilter.g:34:9: ','
-            {
-                match( ',' );
-            }
-
-            state.type = _type;
-            state.channel = _channel;
-        }
-        finally {
-        }
-    }
-    // $ANTLR end "T__29"
-
-
-    // $ANTLR start "T__30"
-    public final void mT__30() throws RecognitionException {
-        try {
-            int _type = T__30;
-            int _channel = DEFAULT_TOKEN_CHANNEL;
-            // org/usergrid/persistence/query/QueryFilter.g:35:7: ( 'of' )
-            // org/usergrid/persistence/query/QueryFilter.g:35:9: 'of'
-            {
-                match( "of" );
-            }
-
-            state.type = _type;
-            state.channel = _channel;
-        }
-        finally {
-        }
-    }
-    // $ANTLR end "T__30"
-
-
-    // $ANTLR start "T__31"
-    public final void mT__31() throws RecognitionException {
-        try {
-            int _type = T__31;
-            int _channel = DEFAULT_TOKEN_CHANNEL;
-            // org/usergrid/persistence/query/QueryFilter.g:36:7: ( ':' )
-            // org/usergrid/persistence/query/QueryFilter.g:36:9: ':'
-            {
-                match( ':' );
-            }
-
-            state.type = _type;
-            state.channel = _channel;
-        }
-        finally {
-        }
-    }
-    // $ANTLR end "T__31"
-
-
-    // $ANTLR start "T__32"
-    public final void mT__32() throws RecognitionException {
-        try {
-            int _type = T__32;
-            int _channel = DEFAULT_TOKEN_CHANNEL;
-            // org/usergrid/persistence/query/QueryFilter.g:37:7: ( 'asc' )
-            // org/usergrid/persistence/query/QueryFilter.g:37:9: 'asc'
-            {
-                match( "asc" );
-            }
-
-            state.type = _type;
-            state.channel = _channel;
-        }
-        finally {
-        }
-    }
-    // $ANTLR end "T__32"
-
-
-    // $ANTLR start "T__33"
-    public final void mT__33() throws RecognitionException {
-        try {
-            int _type = T__33;
-            int _channel = DEFAULT_TOKEN_CHANNEL;
-            // org/usergrid/persistence/query/QueryFilter.g:38:7: ( 'desc' )
-            // org/usergrid/persistence/query/QueryFilter.g:38:9: 'desc'
-            {
-                match( "desc" );
-            }
-
-            state.type = _type;
-            state.channel = _channel;
-        }
-        finally {
-        }
-    }
-    // $ANTLR end "T__33"
-
-
-    // $ANTLR start "T__34"
-    public final void mT__34() throws RecognitionException {
-        try {
-            int _type = T__34;
-            int _channel = DEFAULT_TOKEN_CHANNEL;
-            // org/usergrid/persistence/query/QueryFilter.g:39:7: ( '*' )
-            // org/usergrid/persistence/query/QueryFilter.g:39:9: '*'
-            {
-                match( '*' );
-            }
-
-            state.type = _type;
-            state.channel = _channel;
-        }
-        finally {
-        }
-    }
-    // $ANTLR end "T__34"
-
-
-    // $ANTLR start "T__35"
-    public final void mT__35() throws RecognitionException {
-        try {
-            int _type = T__35;
-            int _channel = DEFAULT_TOKEN_CHANNEL;
-            // org/usergrid/persistence/query/QueryFilter.g:40:7: ( '{' )
-            // org/usergrid/persistence/query/QueryFilter.g:40:9: '{'
-            {
-                match( '{' );
-            }
-
-            state.type = _type;
-            state.channel = _channel;
-        }
-        finally {
-        }
-    }
-    // $ANTLR end "T__35"
-
-
-    // $ANTLR start "T__36"
-    public final void mT__36() throws RecognitionException {
-        try {
-            int _type = T__36;
-            int _channel = DEFAULT_TOKEN_CHANNEL;
-            // org/usergrid/persistence/query/QueryFilter.g:41:7: ( '}' )
-            // org/usergrid/persistence/query/QueryFilter.g:41:9: '}'
-            {
-                match( '}' );
-            }
-
-            state.type = _type;
-            state.channel = _channel;
-        }
-        finally {
-        }
-    }
-    // $ANTLR end "T__36"
-
-
-    // $ANTLR start "T__37"
-    public final void mT__37() throws RecognitionException {
-        try {
-            int _type = T__37;
-            int _channel = DEFAULT_TOKEN_CHANNEL;
-            // org/usergrid/persistence/query/QueryFilter.g:42:7: ( 'select' )
-            // org/usergrid/persistence/query/QueryFilter.g:42:9: 'select'
-            {
-                match( "select" );
-            }
-
-            state.type = _type;
-            state.channel = _channel;
-        }
-        finally {
-        }
-    }
-    // $ANTLR end "T__37"
-
-
-    // $ANTLR start "T__38"
-    public final void mT__38() throws RecognitionException {
-        try {
-            int _type = T__38;
-            int _channel = DEFAULT_TOKEN_CHANNEL;
-            // org/usergrid/persistence/query/QueryFilter.g:43:7: ( 'where' )
-            // org/usergrid/persistence/query/QueryFilter.g:43:9: 'where'
-            {
-                match( "where" );
-            }
-
-            state.type = _type;
-            state.channel = _channel;
-        }
-        finally {
-        }
-    }
-    // $ANTLR end "T__38"
-
-
-    // $ANTLR start "T__39"
-    public final void mT__39() throws RecognitionException {
-        try {
-            int _type = T__39;
-            int _channel = DEFAULT_TOKEN_CHANNEL;
-            // org/usergrid/persistence/query/QueryFilter.g:44:7: ( 'and' )
-            // org/usergrid/persistence/query/QueryFilter.g:44:9: 'and'
-            {
-                match( "and" );
-            }
-
-            state.type = _type;
-            state.channel = _channel;
-        }
-        finally {
-        }
-    }
-    // $ANTLR end "T__39"
-
-
-    // $ANTLR start "T__40"
-    public final void mT__40() throws RecognitionException {
-        try {
-            int _type = T__40;
-            int _channel = DEFAULT_TOKEN_CHANNEL;
-            // org/usergrid/persistence/query/QueryFilter.g:45:7: ( 'order by' )
-            // org/usergrid/persistence/query/QueryFilter.g:45:9: 'order by'
-            {
-                match( "order by" );
-            }
-
-            state.type = _type;
-            state.channel = _channel;
-        }
-        finally {
-        }
-    }
-    // $ANTLR end "T__40"
-
-
-    // $ANTLR start "ID"
-    public final void mID() throws RecognitionException {
-        try {
-            int _type = ID;
-            int _channel = DEFAULT_TOKEN_CHANNEL;
-            // org/usergrid/persistence/query/QueryFilter.g:45:5: ( ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' |
-            // 'A' .. 'Z' | '0' .. '9' | '_' | '.' )* )
-            // org/usergrid/persistence/query/QueryFilter.g:45:7: ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' |
-            // 'A' .. 'Z' | '0' .. '9' | '_' | '.' )*
-            {
-                if ( ( input.LA( 1 ) >= 'A' && input.LA( 1 ) <= 'Z' ) || input.LA( 1 ) == '_' || ( input.LA( 1 ) >= 'a'
-                        && input.LA( 1 ) <= 'z' ) ) {
-                    input.consume();
-                }
-                else {
-                    MismatchedSetException mse = new MismatchedSetException( null, input );
-                    recover( mse );
-                    throw mse;
-                }
-
-                // org/usergrid/persistence/query/QueryFilter.g:45:31: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' |
-                // '.' )*
-                loop1:
-                do {
-                    int alt1 = 2;
-                    int LA1_0 = input.LA( 1 );
-
-                    if ( ( LA1_0 == '.' || ( LA1_0 >= '0' && LA1_0 <= '9' ) || ( LA1_0 >= 'A' && LA1_0 <= 'Z' )
-                            || LA1_0 == '_' || ( LA1_0 >= 'a' && LA1_0 <= 'z' ) ) ) {
-                        alt1 = 1;
-                    }
-
-
-                    switch ( alt1 ) {
-                        case 1:
-                            // org/usergrid/persistence/query/QueryFilter.g:
-                        {
-                            if ( input.LA( 1 ) == '.' || ( input.LA( 1 ) >= '0' && input.LA( 1 ) <= '9' ) || (
-                                    input.LA( 1 ) >= 'A' && input.LA( 1 ) <= 'Z' ) || input.LA( 1 ) == '_' || (
-                                    input.LA( 1 ) >= 'a' && input.LA( 1 ) <= 'z' ) ) {
-                                input.consume();
-                            }
-                            else {
-                                MismatchedSetException mse = new MismatchedSetException( null, input );
-                                recover( mse );
-                                throw mse;
-                            }
-                        }
-                        break;
-
-                        default:
-                            break loop1;
-                    }
-                }
-                while ( true );
-            }
-
-            state.type = _type;
-            state.channel = _channel;
-        }
-        finally {
-        }
-    }
-    // $ANTLR end "ID"
-
-
-    // $ANTLR start "INT"
-    public final void mINT() throws RecognitionException {
-        try {
-            int _type = INT;
-            int _channel = DEFAULT_TOKEN_CHANNEL;
-            // org/usergrid/persistence/query/QueryFilter.g:48:5: ( ( '-' )? ( '0' .. '9' )+ )
-            // org/usergrid/persistence/query/QueryFilter.g:48:7: ( '-' )? ( '0' .. '9' )+
-            {
-                // org/usergrid/persistence/query/QueryFilter.g:48:7: ( '-' )?
-                int alt2 = 2;
-                int LA2_0 = input.LA( 1 );
-
-                if ( ( LA2_0 == '-' ) ) {
-                    alt2 = 1;
-                }
-                switch ( alt2 ) {
-                    case 1:
-                        // org/usergrid/persistence/query/QueryFilter.g:48:8: '-'
-                    {
-                        match( '-' );
-                    }
-                    break;
-                }
-
-                // org/usergrid/persistence/query/QueryFilter.g:48:14: ( '0' .. '9' )+
-                int cnt3 = 0;
-                loop3:
-                do {
-                    int alt3 = 2;
-                    int LA3_0 = input.LA( 1 );
-
-                    if ( ( ( LA3_0 >= '0' && LA3_0 <= '9' ) ) ) {
-                        alt3 = 1;
-                    }
-
-
-                    switch ( alt3 ) {
-                        case 1:
-                            // org/usergrid/persistence/query/QueryFilter.g:48:14: '0' .. '9'
-                        {
-                            matchRange( '0', '9' );
-                        }
-                        break;
-
-                        default:
-                            if ( cnt3 >= 1 ) {
-                                break loop3;
-                            }
-                            EarlyExitException eee = new EarlyExitException( 3, input );
-                            throw eee;
-                    }
-                    cnt3++;
-                }
-                while ( true );
-            }
-
-            state.type = _type;
-            state.channel = _channel;
-        }
-        finally {
-        }
-    }
-    // $ANTLR end "INT"
-
-
-    // $ANTLR start "FLOAT"
-    public final void mFLOAT() throws RecognitionException {
-        try {
-            int _type = FLOAT;
-            int _channel = DEFAULT_TOKEN_CHANNEL;
-            // org/usergrid/persistence/query/QueryFilter.g:52:5: ( ( '-' )? ( ( '0' .. '9' )+ '.' ( '0' .. '9' )* (
-            // EXPONENT )? | '.' ( '0' .. '9' )+ ( EXPONENT )? | ( '0' .. '9' )+ EXPONENT ) )
-            // org/usergrid/persistence/query/QueryFilter.g:52:8: ( '-' )? ( ( '0' .. '9' )+ '.' ( '0' .. '9' )* (
-            // EXPONENT )? | '.' ( '0' .. '9' )+ ( EXPONENT )? | ( '0' .. '9' )+ EXPONENT )
-            {
-                // org/usergrid/persistence/query/QueryFilter.g:52:8: ( '-' )?
-                int alt4 = 2;
-                int LA4_0 = input.LA( 1 );
-
-                if ( ( LA4_0 == '-' ) ) {
-                    alt4 = 1;
-                }
-                switch ( alt4 ) {
-                    case 1:
-                        // org/usergrid/persistence/query/QueryFilter.g:52:9: '-'
-                    {
-                        match( '-' );
-                    }
-                    break;
-                }
-
-                // org/usergrid/persistence/query/QueryFilter.g:52:15: ( ( '0' .. '9' )+ '.' ( '0' .. '9' )* (
-                // EXPONENT )? | '.' ( '0' .. '9' )+ ( EXPONENT )? | ( '0' .. '9' )+ EXPONENT )
-                int alt11 = 3;
-                alt11 = dfa11.predict( input );
-                switch ( alt11 ) {
-                    case 1:
-                        // org/usergrid/persistence/query/QueryFilter.g:52:17: ( '0' .. '9' )+ '.' ( '0' .. '9' )* (
-                        // EXPONENT )?
-                    {
-                        // org/usergrid/persistence/query/QueryFilter.g:52:17: ( '0' .. '9' )+
-                        int cnt5 = 0;
-                        loop5:
-                        do {
-                            int alt5 = 2;
-                            int LA5_0 = input.LA( 1 );
-
-                            if ( ( ( LA5_0 >= '0' && LA5_0 <= '9' ) ) ) {
-                                alt5 = 1;
-                            }
-
-
-                            switch ( alt5 ) {
-                                case 1:
-                                    // org/usergrid/persistence/query/QueryFilter.g:52:18: '0' .. '9'
-                                {
-                                    matchRange( '0', '9' );
-                                }
-                                break;
-
-                                default:
-                                    if ( cnt5 >= 1 ) {
-                                        break loop5;
-                                    }
-                                    EarlyExitException eee = new EarlyExitException( 5, input );
-                                    throw eee;
-                            }
-                            cnt5++;
-                        }
-                        while ( true );
-
-                        match( '.' );
-                        // org/usergrid/persistence/query/QueryFilter.g:52:33: ( '0' .. '9' )*
-                        loop6:
-                        do {
-                            int alt6 = 2;
-                            int LA6_0 = input.LA( 1 );
-
-                            if ( ( ( LA6_0 >= '0' && LA6_0 <= '9' ) ) ) {
-                                alt6 = 1;
-                            }
-
-
-                            switch ( alt6 ) {
-                                case 1:
-                                    // org/usergrid/persistence/query/QueryFilter.g:52:34: '0' .. '9'
-                                {
-                                    matchRange( '0', '9' );
-                                }
-                                break;
-
-                                default:
-                                    break loop6;
-                            }
-                        }
-                        while ( true );
-
-                        // org/usergrid/persistence/query/QueryFilter.g:52:45: ( EXPONENT )?
-                        int alt7 = 2;
-                        int LA7_0 = input.LA( 1 );
-
-                        if ( ( LA7_0 == 'E' || LA7_0 == 'e' ) ) {
-                            alt7 = 1;
-                        }
-                        switch ( alt7 ) {
-                            case 1:
-                                // org/usergrid/persistence/query/QueryFilter.g:52:45: EXPONENT
-                            {
-                                mEXPONENT();
-                            }
-                            break;
-                        }
-                    }
-                    break;
-                    case 2:
-                        // org/usergrid/persistence/query/QueryFilter.g:53:9: '.' ( '0' .. '9' )+ ( EXPONENT )?
-                    {
-                        match( '.' );
-                        // org/usergrid/persistence/query/QueryFilter.g:53:13: ( '0' .. '9' )+
-                        int cnt8 = 0;
-                        loop8:
-                        do {
-                            int alt8 = 2;
-                            int LA8_0 = input.LA( 1 );
-
-                            if ( ( ( LA8_0 >= '0' && LA8_0 <= '9' ) ) ) {
-                                alt8 = 1;
-                            }
-
-
-                            switch ( alt8 ) {
-                                case 1:
-                                    // org/usergrid/persistence/query/QueryFilter.g:53:14: '0' .. '9'
-                                {
-                                    matchRange( '0', '9' );
-                                }
-                                break;
-
-                                default:
-                                    if ( cnt8 >= 1 ) {
-                                        break loop8;
-                                    }
-                                    EarlyExitException eee = new EarlyExitException( 8, input );
-                                    throw eee;
-                            }
-                            cnt8++;
-                        }
-                        while ( true );
-
-                        // org/usergrid/persistence/query/QueryFilter.g:53:25: ( EXPONENT )?
-                        int alt9 = 2;
-                        int LA9_0 = input.LA( 1 );
-
-                        if ( ( LA9_0 == 'E' || LA9_0 == 'e' ) ) {
-                            alt9 = 1;
-                        }
-                        switch ( alt9 ) {
-                            case 1:
-                                // org/usergrid/persistence/query/QueryFilter.g:53:25: EXPONENT
-                            {
-                                mEXPONENT();
-                            }
-                            break;
-                        }
-                    }
-                    break;
-                    case 3:
-                        // org/usergrid/persistence/query/QueryFilter.g:54:9: ( '0' .. '9' )+ EXPONENT
-                    {
-                        // org/usergrid/persistence/query/QueryFilter.g:54:9: ( '0' .. '9' )+
-                        int cnt10 = 0;
-                        loop10:
-                        do {
-                            int alt10 = 2;
-                            int LA10_0 = input.LA( 1 );
-
-                            if ( ( ( LA10_0 >= '0' && LA10_0 <= '9' ) ) ) {
-                                alt10 = 1;
-                            }
-
-
-                            switch ( alt10 ) {
-                                case 1:
-                                    // org/usergrid/persistence/query/QueryFilter.g:54:10: '0' .. '9'
-                                {
-                                    matchRange( '0', '9' );
-                                }
-                                break;
-
-                                default:
-                                    if ( cnt10 >= 1 ) {
-                                        break loop10;
-                                    }
-                                    EarlyExitException eee = new EarlyExitException( 10, input );
-                                    throw eee;
-                            }
-                            cnt10++;
-                        }
-                        while ( true );
-
-                        mEXPONENT();
-                    }
-                    break;
-                }
-            }
-
-            state.type = _type;
-            state.channel = _channel;
-        }
-        finally {
-        }
-    }
-    // $ANTLR end "FLOAT"
-
-
-    // $ANTLR start "STRING"
-    public final void mSTRING() throws RecognitionException {
-        try {
-            int _type = STRING;
-            int _channel = DEFAULT_TOKEN_CHANNEL;
-            // org/usergrid/persistence/query/QueryFilter.g:58:5: ( '\\'' ( ESC_SEQ | ~ ( '\\\\' | '\\'' ) )* '\\'' )
-            // org/usergrid/persistence/query/QueryFilter.g:58:8: '\\'' ( ESC_SEQ | ~ ( '\\\\' | '\\'' ) )* '\\''
-            {
-                match( '\'' );
-                // org/usergrid/persistence/query/QueryFilter.g:58:13: ( ESC_SEQ | ~ ( '\\\\' | '\\'' ) )*
-                loop12:
-                do {
-                    int alt12 = 3;
-                    int LA12_0 = input.LA( 1 );
-
-                    if ( ( LA12_0 == '\\' ) ) {
-                        alt12 = 1;
-                    }
-                    else if ( ( ( LA12_0 >= '\u0000' && LA12_0 <= '&' ) || ( LA12_0 >= '(' && LA12_0 <= '[' ) || (
-                            LA12_0 >= ']' && LA12_0 <= '\uFFFF' ) ) ) {
-                        alt12 = 2;
-                    }
-
-
-                    switch ( alt12 ) {
-                        case 1:
-                            // org/usergrid/persistence/query/QueryFilter.g:58:15: ESC_SEQ
-                        {
-                            mESC_SEQ();
-                        }
-                        break;
-                        case 2:
-                            // org/usergrid/persistence/query/QueryFilter.g:58:25: ~ ( '\\\\' | '\\'' )
-                        {
-                            if ( ( input.LA( 1 ) >= '\u0000' && input.LA( 1 ) <= '&' ) || ( input.LA( 1 ) >= '('
-                                    && input.LA( 1 ) <= '[' ) || ( input.LA( 1 ) >= ']'
-                                    && input.LA( 1 ) <= '\uFFFF' ) ) {
-                                input.consume();
-                            }
-                            else {
-                                MismatchedSetException mse = new MismatchedSetException( null, input );
-                                recover( mse );
-                                throw mse;
-                            }
-                        }
-                        break;
-
-                        default:
-                            break loop12;
-                    }
-                }
-                while ( true );
-
-                match( '\'' );
-            }
-
-            state.type = _type;
-            state.channel = _channel;
-        }
-        finally {
-        }
-    }
-    // $ANTLR end "STRING"
-
-
-    // $ANTLR start "BOOLEAN"
-    public final void mBOOLEAN() throws RecognitionException {
-        try {
-            // org/usergrid/persistence/query/QueryFilter.g:62:9: ( ( 'true' | 'false' ) )
-            // org/usergrid/persistence/query/QueryFilter.g:62:11: ( 'true' | 'false' )
-            {
-                // org/usergrid/persistence/query/QueryFilter.g:62:11: ( 'true' | 'false' )
-                int alt13 = 2;
-                int LA13_0 = input.LA( 1 );
-
-                if ( ( LA13_0 == 't' ) ) {
-                    alt13 = 1;
-                }
-                else if ( ( LA13_0 == 'f' ) ) {
-                    alt13 = 2;
-                }
-                else {
-                    NoViableAltException nvae = new NoViableAltException( "", 13, 0, input );
-
-                    throw nvae;
-                }
-                switch ( alt13 ) {
-                    case 1:
-                        // org/usergrid/persistence/query/QueryFilter.g:62:12: 'true'
-                    {
-                        match( "true" );
-                    }
-                    break;
-                    case 2:
-                        // org/usergrid/persistence/query/QueryFilter.g:62:20: 'false'
-                    {
-                        match( "false" );
-                    }
-                    break;
-                }
-            }
-        }
-        finally {
-        }
-    }
-    // $ANTLR end "BOOLEAN"
-
-
-    // $ANTLR start "UUID"
-    public final void mUUID() throws RecognitionException {
-        try {
-            int _type = UUID;
-            int _channel = DEFAULT_TOKEN_CHANNEL;
-            // org/usergrid/persistence/query/QueryFilter.g:64:6: ( HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT
-            // HEX_DIGIT HEX_DIGIT HEX_DIGIT '-' HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT '-' HEX_DIGIT HEX_DIGIT
-            // HEX_DIGIT HEX_DIGIT '-' HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT '-' HEX_DIGIT HEX_DIGIT HEX_DIGIT
-            // HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT )
-            // org/usergrid/persistence/query/QueryFilter.g:64:8: HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT
-            // HEX_DIGIT HEX_DIGIT HEX_DIGIT '-' HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT '-' HEX_DIGIT HEX_DIGIT
-            // HEX_DIGIT HEX_DIGIT '-' HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT '-' HEX_DIGIT HEX_DIGIT HEX_DIGIT
-            // HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT
-            {
-                mHEX_DIGIT();
-                mHEX_DIGIT();
-                mHEX_DIGIT();
-                mHEX_DIGIT();
-                mHEX_DIGIT();
-                mHEX_DIGIT();
-                mHEX_DIGIT();
-                mHEX_DIGIT();
-                match( '-' );
-                mHEX_DIGIT();
-                mHEX_DIGIT();
-                mHEX_DIGIT();
-                mHEX_DIGIT();
-                match( '-' );
-                mHEX_DIGIT();
-                mHEX_DIGIT();
-                mHEX_DIGIT();
-                mHEX_DIGIT();
-                match( '-' );
-                mHEX_DIGIT();
-                mHEX_DIGIT();
-                mHEX_DIGIT();
-                mHEX_DIGIT();
-                match( '-' );
-                mHEX_DIGIT();
-                mHEX_DIGIT();
-                mHEX_DIGIT();
-                mHEX_DIGIT();
-                mHEX_DIGIT();
-                mHEX_DIGIT();
-                mHEX_DIGIT();
-                mHEX_DIGIT();
-                mHEX_DIGIT();
-                mHEX_DIGIT();
-                mHEX_DIGIT();
-                mHEX_DIGIT();
-            }
-
-            state.type = _type;
-            state.channel = _channel;
-        }
-        finally {
-        }
-    }
-    // $ANTLR end "UUID"
-
-
-    // $ANTLR start "EXPONENT"
-    public final void mEXPONENT() throws RecognitionException {
-        try {
-            // org/usergrid/persistence/query/QueryFilter.g:75:10: ( ( 'e' | 'E' ) ( '+' | '-' )? ( '0' .. '9' )+ )
-            // org/usergrid/persistence/query/QueryFilter.g:75:12: ( 'e' | 'E' ) ( '+' | '-' )? ( '0' .. '9' )+
-            {
-                if ( input.LA( 1 ) == 'E' || input.LA( 1 ) == 'e' ) {
-                    input.consume();
-                }
-                else {
-                    MismatchedSetException mse = new MismatchedSetException( null, input );
-                    recover( mse );
-                    throw mse;
-                }
-
-                // org/usergrid/persistence/query/QueryFilter.g:75:22: ( '+' | '-' )?
-                int alt14 = 2;
-                int LA14_0 = input.LA( 1 );
-
-                if ( ( LA14_0 == '+' || LA14_0 == '-' ) ) {
-                    alt14 = 1;
-                }
-                switch ( alt14 ) {
-                    case 1:
-                        // org/usergrid/persistence/query/QueryFilter.g:
-                    {
-                        if ( input.LA( 1 ) == '+' || input.LA( 1 ) == '-' ) {
-                            input.consume();
-                        }
-                        else {
-                            MismatchedSetException mse = new MismatchedSetException( null, input );
-                            recover( mse );
-                            throw mse;
-                        }
-                    }
-                    break;
-                }
-
-                // org/usergrid/persistence/query/QueryFilter.g:75:33: ( '0' .. '9' )+
-                int cnt15 = 0;
-                loop15:
-                do {
-                    int alt15 = 2;
-                    int LA15_0 = input.LA( 1 );
-
-                    if ( ( ( LA15_0 >= '0' && LA15_0 <= '9' ) ) ) {
-                        alt15 = 1;
-                    }
-
-
-                    switch ( alt15 ) {
-                        case 1:
-                            // org/usergrid/persistence/query/QueryFilter.g:75:34: '0' .. '9'
-                        {
-                            matchRange( '0', '9' );
-                        }
-                        break;
-
-                        default:
-                            if ( cnt15 >= 1 ) {
-                                break loop15;
-                            }
-                            EarlyExitException eee = new EarlyExitException( 15, input );
-                            throw eee;
-                    }
-                    cnt15++;
-                }
-                while ( true );
-            }
-        }
-        finally {
-        }
-    }
-    // $ANTLR end "EXPONENT"
-
-
-    // $ANTLR start "HEX_DIGIT"
-    public final void mHEX_DIGIT() throws RecognitionException {
-        try {
-            // org/usergrid/persistence/query/QueryFilter.g:78:11: ( ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' ) )
-            // org/usergrid/persistence/query/QueryFilter.g:78:13: ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' )
-            {
-                if ( ( input.LA( 1 ) >= '0' && input.LA( 1 ) <= '9' ) || ( input.LA( 1 ) >= 'A'
-                        && input.LA( 1 ) <= 'F' ) || ( input.LA( 1 ) >= 'a' && input.LA( 1 ) <= 'f' ) ) {
-                    input.consume();
-                }
-                else {
-                    MismatchedSetException mse = new MismatchedSetException( null, input );
-                    recover( mse );
-                    throw mse;
-                }
-            }
-        }
-        finally {
-        }
-    }
-    // $ANTLR end "HEX_DIGIT"
-
-
-    // $ANTLR start "ESC_SEQ"
-    public final void mESC_SEQ() throws RecognitionException {
-        try {
-            // org/usergrid/persistence/query/QueryFilter.g:82:5: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' |
-            // '\\'' | '\\\\' ) | UNICODE_ESC | OCTAL_ESC )
-            int alt16 = 3;
-            int LA16_0 = input.LA( 1 );
-
-            if ( ( LA16_0 == '\\' ) ) {
-                switch ( input.LA( 2 ) ) {
-                    case '\"':
-                    case '\'':
-                    case '\\':
-                    case 'b':
-                    case 'f':
-                    case 'n':
-                    case 'r':
-                    case 't': {
-                        alt16 = 1;
-                    }
-                    break;
-                    case 'u': {
-                        alt16 = 2;
-                    }
-                    break;
-                    case '0':
-                    case '1':
-                    case '2':
-                    case '3':
-                    case '4':
-                    case '5':
-                    case '6':
-                    case '7': {
-                        alt16 = 3;
-                    }
-                    break;
-                    default:
-                        NoViableAltException nvae = new NoViableAltException( "", 16, 1, input );
-
-                        throw nvae;
-                }
-            }
-            else {
-                NoViableAltException nvae = new NoViableAltException( "", 16, 0, input );
-
-                throw nvae;
-            }
-            switch ( alt16 ) {
-                case 1:
-                    // org/usergrid/persistence/query/QueryFilter.g:82:9: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' |
-                    // '\\\"' | '\\'' | '\\\\' )
-                {
-                    match( '\\' );
-                    if ( input.LA( 1 ) == '\"' || input.LA( 1 ) == '\'' || input.LA( 1 ) == '\\' || input.LA( 1 ) == 'b'
-                            || input.LA( 1 ) == 'f' || input.LA( 1 ) == 'n' || input.LA( 1 ) == 'r'
-                            || input.LA( 1 ) == 't' ) {
-                        input.consume();
-                    }
-                    else {
-                        MismatchedSetException mse = new MismatchedSetException( null, input );
-                        recover( mse );
-                        throw mse;
-                    }
-                }
-                break;
-                case 2:
-                    // org/usergrid/persistence/query/QueryFilter.g:83:9: UNICODE_ESC
-                {
-                    mUNICODE_ESC();
-                }
-                break;
-                case 3:
-                    // org/usergrid/persistence/query/QueryFilter.g:84:9: OCTAL_ESC
-                {
-                    mOCTAL_ESC();
-                }
-                break;
-            }
-        }
-        finally {
-        }
-    }
-    // $ANTLR end "ESC_SEQ"
-
-
-    // $ANTLR start "OCTAL_ESC"
-    public final void mOCTAL_ESC() throws RecognitionException {
-        try {
-            // org/usergrid/persistence/query/QueryFilter.g:89:5: ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7'
-            // ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) )
-            int alt17 = 3;
-            int LA17_0 = input.LA( 1 );
-
-            if ( ( LA17_0 == '\\' ) ) {
-                int LA17_1 = input.LA( 2 );
-
-                if ( ( ( LA17_1 >= '0' && LA17_1 <= '3' ) ) ) {
-                    int LA17_2 = input.LA( 3 );
-
-                    if ( ( ( LA17_2 >= '0' && LA17_2 <= '7' ) ) ) {
-                        int LA17_4 = input.LA( 4 );
-
-                        if ( ( ( LA17_4 >= '0' && LA17_4 <= '7' ) ) ) {
-                            alt17 = 1;
-                        }
-                        else {
-                            alt17 = 2;
-                        }
-                    }
-                    else {
-                        alt17 = 3;
-                    }
-                }
-                else if ( ( ( LA17_1 >= '4' && LA17_1 <= '7' ) ) ) {
-                    int LA17_3 = input.LA( 3 );
-
-                    if ( ( ( LA17_3 >= '0' && LA17_3 <= '7' ) ) ) {
-                        alt17 = 2;
-                    }
-                    else {
-                        alt17 = 3;
-                    }
-                }
-                else {
-                    NoViableAltException nvae = new NoViableAltException( "", 17, 1, input );
-
-                    throw nvae;
-                }
-            }
-            else {
-                NoViableAltException nvae = new NoViableAltException( "", 17, 0, input );
-
-                throw nvae;
-            }
-            switch ( alt17 ) {
-                case 1:
-                    // org/usergrid/persistence/query/QueryFilter.g:89:9: '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0'
-                    // .. '7' )
-                {
-                    match( '\\' );
-                    // org/usergrid/persistence/query/QueryFilter.g:89:14: ( '0' .. '3' )
-                    // org/usergrid/persistence/query/QueryFilter.g:89:15: '0' .. '3'
-                    {
-                        matchRange( '0', '3' );
-                    }
-
-                    // org/usergrid/persistence/query/QueryFilter.g:89:25: ( '0' .. '7' )
-                    // org/usergrid/persistence/query/QueryFilter.g:89:26: '0' .. '7'
-                    {
-                        matchRange( '0', '7' );
-                    }
-
-                    // org/usergrid/persistence/query/QueryFilter.g:89:36: ( '0' .. '7' )
-                    // org/usergrid/persistence/query/QueryFilter.g:89:37: '0' .. '7'
-                    {
-                        matchRange( '0', '7' );
-                    }
-                }
-                break;
-                case 2:
-                    // org/usergrid/persistence/query/QueryFilter.g:90:9: '\\\\' ( '0' .. '7' ) ( '0' .. '7' )
-                {
-                    match( '\\' );
-                    // org/usergrid/persistence/query/QueryFilter.g:90:14: ( '0' .. '7' )
-                    // org/usergrid/persistence/query/QueryFilter.g:90:15: '0' .. '7'
-                    {
-                        matchRange( '0', '7' );
-                    }
-
-                    // org/usergrid/persistence/query/QueryFilter.g:90:25: ( '0' .. '7' )
-                    // org/usergrid/persistence/query/QueryFilter.g:90:26: '0' .. '7'
-                    {
-                        matchRange( '0', '7' );
-                    }
-                }
-                break;
-                case 3:
-                    // org/usergrid/persistence/query/QueryFilter.g:91:9: '\\\\' ( '0' .. '7' )
-                {
-                    match( '\\' );
-                    // org/usergrid/persistence/query/QueryFilter.g:91:14: ( '0' .. '7' )
-                    // org/usergrid/persistence/query/QueryFilter.g:91:15: '0' .. '7'
-                    {
-                        matchRange( '0', '7' );
-                    }
-                }
-                break;
-            }
-        }
-        finally {
-        }
-    }
-    // $ANTLR end "OCTAL_ESC"
-
-
-    // $ANTLR start "UNICODE_ESC"
-    public final void mUNICODE_ESC() throws RecognitionException {
-        try {
-            // org/usergrid/persistence/query/QueryFilter.g:96:5: ( '\\\\' 'u' HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT )
-            // org/usergrid/persistence/query/QueryFilter.g:96:9: '\\\\' 'u' HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT
-            {
-                match( '\\' );
-                match( 'u' );
-                mHEX_DIGIT();
-                mHEX_DIGIT();
-                mHEX_DIGIT();
-                mHEX_DIGIT();
-            }
-        }
-        finally {
-        }
-    }
-    // $ANTLR end "UNICODE_ESC"
-
-
-    // $ANTLR start "WS"
-    public final void mWS() throws RecognitionException {
-        try {
-            int _type = WS;
-            int _channel = DEFAULT_TOKEN_CHANNEL;
-            // org/usergrid/persistence/query/QueryFilter.g:99:4: ( ( ' ' | '\\t' | '\\n' | '\\r' | '\\f' )+ )
-            // org/usergrid/persistence/query/QueryFilter.g:99:6: ( ' ' | '\\t' | '\\n' | '\\r' | '\\f' )+
-            {
-                // org/usergrid/persistence/query/QueryFilter.g:99:6: ( ' ' | '\\t' | '\\n' | '\\r' | '\\f' )+
-                int cnt18 = 0;
-                loop18:
-                do {
-                    int alt18 = 2;
-                    int LA18_0 = input.LA( 1 );
-
-                    if ( ( ( LA18_0 >= '\t' && LA18_0 <= '\n' ) || ( LA18_0 >= '\f' && LA18_0 <= '\r' )
-                            || LA18_0 == ' ' ) ) {
-                        alt18 = 1;
-                    }
-
-
-                    switch ( alt18 ) {
-                        case 1:
-                            // org/usergrid/persistence/query/QueryFilter.g:
-                        {
-                            if ( ( input.LA( 1 ) >= '\t' && input.LA( 1 ) <= '\n' ) || ( input.LA( 1 ) >= '\f'
-                                    && input.LA( 1 ) <= '\r' ) || input.LA( 1 ) == ' ' ) {
-                                input.consume();
-                            }
-                            else {
-                                MismatchedSetException mse = new MismatchedSetException( null, input );
-                                recover( mse );
-                                throw mse;
-                            }
-                        }
-                        break;
-
-                        default:
-                            if ( cnt18 >= 1 ) {
-                                break loop18;
-                            }
-                            EarlyExitException eee = new EarlyExitException( 18, input );
-                            throw eee;
-                    }
-                    cnt18++;
-                }
-                while ( true );
-
-                _channel = HIDDEN;
-            }
-
-            state.type = _type;
-            state.channel = _channel;
-        }
-        finally {
-        }
-    }
-    // $ANTLR end "WS"
-
-
-    public void mTokens() throws RecognitionException {
-        // org/usergrid/persistence/query/QueryFilter.g:1:8: ( T__16 | T__17 | T__18 | T__19 | T__20 | T__21 | T__22
-        // | T__23 | T__24 | T__25 | T__26 | T__27 | T__28 | T__29 | T__30 | T__31 | T__32 | T__33 | T__34 | T__35 |
-        // T__36 | T__37 | T__38 | T__39 | T__40 | ID | INT | FLOAT | STRING | UUID | WS )
-        int alt19 = 31;
-        alt19 = dfa19.predict( input );
-        switch ( alt19 ) {
-            case 1:
-                // org/usergrid/persistence/query/QueryFilter.g:1:10: T__16
-            {
-                mT__16();
-            }
-            break;
-            case 2:
-                // org/usergrid/persistence/query/QueryFilter.g:1:16: T__17
-            {
-                mT__17();
-            }
-            break;
-            case 3:
-                // org/usergrid/persistence/query/QueryFilter.g:1:22: T__18
-            {
-                mT__18();
-            }
-            break;
-            case 4:
-                // org/usergrid/persistence/query/QueryFilter.g:1:28: T__19
-            {
-                mT__19();
-            }
-            break;
-            case 5:
-                // org/usergrid/persistence/query/QueryFilter.g:1:34: T__20
-            {
-                mT__20();
-            }
-            break;
-            case 6:
-                // org/usergrid/persistence/query/QueryFilter.g:1:40: T__21
-            {
-                mT__21();
-            }
-            break;
-            case 7:
-                // org/usergrid/persistence/query/QueryFilter.g:1:46: T__22
-            {
-                mT__22();
-            }
-            break;
-            case 8:
-                // org/usergrid/persistence/query/QueryFilter.g:1:52: T__23
-            {
-                mT__23();
-            }
-            break;
-            case 9:
-                // org/usergrid/persistence/query/QueryFilter.g:1:58: T__24
-            {
-                mT__24();
-            }
-            break;
-            case 10:
-                // org/usergrid/persistence/query/QueryFilter.g:1:64: T__25
-            {
-                mT__25();
-            }
-            break;
-            case 11:
-                // org/usergrid/persistence/query/QueryFilter.g:1:70: T__26
-            {
-                mT__26();
-            }
-            break;
-            case 12:
-                // org/usergrid/persistence/query/QueryFilter.g:1:76: T__27
-            {
-                mT__27();
-            }
-            break;
-            case 13:
-                // org/usergrid/persistence/query/QueryFilter.g:1:82: T__28
-            {
-                mT__28();
-            }
-            break;
-            case 14:
-                // org/usergrid/persistence/query/QueryFilter.g:1:88: T__29
-            {
-                mT__29();
-            }
-            break;
-            case 15:
-                // org/usergrid/persistence/query/QueryFilter.g:1:94: T__30
-            {
-                mT__30();
-            }
-            break;
-            case 16:
-                // org/usergrid/persistence/query/QueryFilter.g:1:100: T__31
-            {
-                mT__31();
-            }
-            break;
-            case 17:
-                // org/usergrid/persistence/query/QueryFilter.g:1:106: T__32
-            {
-                mT__32();
-            }
-            break;
-            case 18:
-                // org/usergrid/persistence/query/QueryFilter.g:1:112: T__33
-            {
-                mT__33();
-            }
-            break;
-            case 19:
-                // org/usergrid/persistence/query/QueryFilter.g:1:118: T__34
-            {
-                mT__34();
-            }
-            break;
-            case 20:
-                // org/usergrid/persistence/query/QueryFilter.g:1:124: T__35
-            {
-                mT__35();
-            }
-            break;
-            case 21:
-                // org/usergrid/persistence/query/QueryFilter.g:1:130: T__36
-            {
-                mT__36();
-            }
-            break;
-            case 22:
-                // org/usergrid/persistence/query/QueryFilter.g:1:136: T__37
-            {
-                mT__37();
-            }
-            break;
-            case 23:
-                // org/usergrid/persistence/query/QueryFilter.g:1:142: T__38
-            {
-                mT__38();
-            }
-            break;
-            case 24:
-                // org/usergrid/persistence/query/QueryFilter.g:1:148: T__39
-            {
-                mT__39();
-            }
-            break;
-            case 25:
-                // org/usergrid/persistence/query/QueryFilter.g:1:154: T__40
-            {
-                mT__40();
-            }
-            break;
-            case 26:
-                // org/usergrid/persistence/query/QueryFilter.g:1:160: ID
-            {
-                mID();
-            }
-            break;
-            case 27:
-                // org/usergrid/persistence/query/QueryFilter.g:1:163: INT
-            {
-                mINT();
-            }
-            break;
-            case 28:
-                // org/usergrid/persistence/query/QueryFilter.g:1:167: FLOAT
-            {
-                mFLOAT();
-            }
-            break;
-            case 29:
-                // org/usergrid/persistence/query/QueryFilter.g:1:173: STRING
-            {
-                mSTRING();
-            }
-            break;
-            case 30:
-                // org/usergrid/persistence/query/QueryFilter.g:1:180: UUID
-            {
-                mUUID();
-            }
-            break;
-            case 31:
-                // org/usergrid/persistence/query/QueryFilter.g:1:185: WS
-            {
-                mWS();
-            }
-            break;
-        }
-    }
-
-
-    protected DFA11 dfa11 = new DFA11( this );
-    protected DFA19 dfa19 = new DFA19( this );
-    static final String DFA11_eotS = "\5\uffff";
-    static final String DFA11_eofS = "\5\uffff";
-    static final String DFA11_minS = "\2\56\3\uffff";
-    static final String DFA11_maxS = "\1\71\1\145\3\uffff";
-    static final String DFA11_acceptS = "\2\uffff\1\2\1\3\1\1";
-    static final String DFA11_specialS = "\5\uffff}>";
-    static final String[] DFA11_transitionS = {
-            "\1\2\1\uffff\12\1", "\1\4\1\uffff\12\1\13\uffff\1\3\37\uffff\1\3", "", "", ""
-    };
-
-    static final short[] DFA11_eot = DFA.unpackEncodedString( DFA11_eotS );
-    static final short[] DFA11_eof = DFA.unpackEncodedString( DFA11_eofS );
-    static final char[] DFA11_min = DFA.unpackEncodedStringToUnsignedChars( DFA11_minS );
-    static final char[] DFA11_max = DFA.unpackEncodedStringToUnsignedChars( DFA11_maxS );
-    static final short[] DFA11_accept = DFA.unpackEncodedString( DFA11_acceptS );
-    static final short[] DFA11_special = DFA.unpackEncodedString( DFA11_specialS );
-    static final short[][] DFA11_transition;
-
-
-    static {
-        int numStates = DFA11_transitionS.length;
-        DFA11_transition = new short[numStates][];
-        for ( int i = 0; i < numStates; i++ ) {
-            DFA11_transition[i] = DFA.unpackEncodedString( DFA11_transitionS[i] );
-        }
-    }
-
-
-    class DFA11 extends DFA {
-
-        public DFA11( BaseRecognizer recognizer ) {
-            this.recognizer = recognizer;
-            this.decisionNumber = 11;
-            this.eot = DFA11_eot;
-            this.eof = DFA11_eof;
-            this.min = DFA11_min;
-            this.max = DFA11_max;
-            this.accept = DFA11_accept;
-            this.special = DFA11_special;
-            this.transition = DFA11_transition;
-        }
-
-
-        public String getDescription() {
-            return "52:15: ( ( '0' .. '9' )+ '.' ( '0' .. '9' )* ( EXPONENT )? | '.' ( '0' .. '9' )+ ( EXPONENT )? | "
-                    + "( '0' .. '9' )+ EXPONENT )";
-        }
-    }
-
-
-    static final String DFA19_eotS = "\1\uffff\1\33\1\uffff\1\35\6\30\1\uffff\1\30\1\uffff\2\30\3\uffff" +
-            "\2\30\1\uffff\1\56\10\uffff\1\61\1\62\1\30\1\65\1\67\3\30\1\73\5" +
-            "\30\2\56\5\uffff\1\30\1\105\1\uffff\1\106\1\uffff\3\30\1\uffff\1" +
-            "\30\1\113\1\114\2\30\1\56\1\uffff\1\26\1\30\2\uffff\4\30\2\uffff" +
-            "\1\127\1\30\1\56\1\uffff\1\26\3\30\1\137\1\30\1\uffff\1\30\1\56" +
-            "\1\uffff\1\26\2\30\1\147\2\uffff\1\150\1\56\1\uffff\1\26\2\30\2" +
-            "\uffff\1\56\1\uffff\1\26\1\30\1\161\1\56\1\uffff\1\26\2\uffff\4" +
-            "\26";
-    static final String DFA19_eofS = "\167\uffff";
-    static final String DFA19_minS = "\1\11\1\75\1\uffff\1\75\1\156\1\60\2\164\1\60\1\150\1\uffff\1\146" +
-            "\1\uffff\2\60\3\uffff\1\145\1\60\2\56\10\uffff\2\56\1\60\2\56\1" +
-            "\156\1\164\1\145\1\56\1\144\1\143\1\144\1\60\1\154\2\56\1\uffff" +
-            "\1\53\3\uffff\1\60\1\56\1\uffff\1\56\1\uffff\1\164\1\150\1\162\1" +
-            "\uffff\1\145\2\56\1\143\1\145\1\56\1\53\2\60\2\uffff\1\141\1\151" +
-            "\1\145\1\162\2\uffff\1\56\1\143\1\56\1\53\2\60\1\151\1\156\1\56" +
-            "\1\40\1\uffff\1\164\1\56\1\53\2\60\1\156\1\56\2\uffff\2\56\1\53" +
-            "\2\60\1\163\2\uffff\1\56\1\53\1\60\1\55\1\56\1\55\1\53\1\55\1\uffff" +
-            "\4\60\1\55";
-    static final String DFA19_maxS = "\1\175\1\75\1\uffff\1\75\1\156\1\161\2\164\1\157\1\151\1\uffff\1" +
-            "\162\1\uffff\1\163\1\146\3\uffff\1\145\1\146\1\71\1\146\10\uffff" +
-            "\2\172\1\146\2\172\1\156\1\164\1\145\1\172\1\144\1\143\1\144\1\163" +
-            "\1\154\1\145\1\146\1\uffff\1\146\3\uffff\1\146\1\172\1\uffff\1\172" +
-            "\1\uffff\1\164\1\150\1\162\1\uffff\1\145\2\172\1\143\1\145\4\146" +
-            "\2\uffff\1\141\1\151\1\145\1\162\2\uffff\1\172\1\143\4\146\1\151" +
-            "\1\156\1\172\1\40\1\uffff\1\164\4\146\1\156\1\172\2\uffff\1\172" +
-            "\4\146\1\163\2\uffff\3\146\1\55\1\172\1\145\1\71\1\55\1\uffff\4" +
-            "\146\1\55";
-    static final String DFA19_acceptS = "\2\uffff\1\3\7\uffff\1\16\1\uffff\1\20\2\uffff\1\23\1\24\1\25\4" +
-            "\uffff\1\34\1\35\1\32\1\37\1\2\1\1\1\5\1\4\20\uffff\1\33\1\uffff" +
-            "\1\36\1\6\1\7\2\uffff\1\10\1\uffff\1\11\3\uffff\1\17\11\uffff\1" +
-            "\12\1\13\4\uffff\1\21\1\30\12\uffff\1\22\7\uffff\1\27\1\31\6\uffff" +
-            "\1\15\1\26\10\uffff\1\14\5\uffff";
-    static final String DFA19_specialS = "\167\uffff}>";
-    static final String[] DFA19_transitionS = {
-            "\2\31\1\uffff\2\31\22\uffff\1\31\6\uffff\1\27\2\uffff\1\17\1" +
-                    "\uffff\1\12\1\24\1\26\1\uffff\12\25\1\14\1\uffff\1\1\1\2\1\3" +
-                    "\2\uffff\6\23\24\30\4\uffff\1\30\1\uffff\1\15\1\23\1\10\1\16" +
-                    "\1\5\1\23\1\7\1\30\1\4\2\30\1\6\2\30\1\13\3\30\1\22\3\30\1\11" +
-                    "\3\30\1\20\1\uffff\1\21", "\1\32", "", "\1\34", "\1\36",
-            "\12\40\7\uffff\6\40\32\uffff\6\40\12\uffff\1\37", "\1\41", "\1\42",
-            "\12\40\7\uffff\6\40\32\uffff\6\40\10\uffff\1\43", "\1\45\1\44", "", "\1\46\13\uffff\1\47", "",
-            "\12\40\7\uffff\6\40\32\uffff\6\40\7\uffff\1\51\4\uffff\1\50",
-            "\12\40\7\uffff\6\40\32\uffff\4\40\1\52\1\40", "", "", "", "\1\53", "\12\40\7\uffff\6\40\32\uffff\6\40",
-            "\1\26\1\uffff\12\54", "\1\26\1\uffff\12\55\7\uffff\4\60\1\57\1\60\32\uffff\4\60\1" + "\57\1\60", "", "",
-            "", "", "", "", "", "", "\1\30\1\uffff\12\30\7\uffff\32\30\4\uffff\1\30\1\uffff\32\30",
-            "\1\30\1\uffff\12\30\7\uffff\32\30\4\uffff\1\30\1\uffff\32\30", "\12\63\7\uffff\6\63\32\uffff\6\63",
-            "\1\30\1\uffff\12\30\7\uffff\32\30\4\uffff\1\30\1\uffff\4\30" + "\1\64\25\30",
-            "\1\30\1\uffff\12\30\7\uffff\32\30\4\uffff\1\30\1\uffff\4\30" + "\1\66\25\30", "\1\70", "\1\71", "\1\72",
-            "\1\30\1\uffff\12\30\7\uffff\32\30\4\uffff\1\30\1\uffff\32\30", "\1\74", "\1\75", "\1\76",
-            "\12\63\7\uffff\6\63\32\uffff\6\63\14\uffff\1\77", "\1\100",
-            "\1\26\1\uffff\12\54\13\uffff\1\26\37\uffff\1\26",
-            "\1\26\1\uffff\12\101\7\uffff\4\60\1\102\1\60\32\uffff\4\60" + "\1\102\1\60", "",
-            "\1\26\1\uffff\1\26\2\uffff\12\103\7\uffff\6\60\32\uffff\6\60", "", "", "",
-            "\12\104\7\uffff\6\104\32\uffff\6\104", "\1\30\1\uffff\12\30\7\uffff\32\30\4\uffff\1\30\1\uffff\32\30", "",
-            "\1\30\1\uffff\12\30\7\uffff\32\30\4\uffff\1\30\1\uffff\32\30", "", "\1\107", "\1\110", "\1\111", "",
-            "\1\112", "\1\30\1\uffff\12\30\7\uffff\32\30\4\uffff\1\30\1\uffff\32\30",
-            "\1\30\1\uffff\12\30\7\uffff\32\30\4\uffff\1\30\1\uffff\32\30", "\1\115", "\1\116",
-            "\1\26\1\uffff\12\117\7\uffff\4\60\1\120\1\60\32\uffff\4\60" + "\1\120\1\60",
-            "\1\26\1\uffff\1\26\2\uffff\12\121\7\uffff\6\60\32\uffff\6\60", "\12\121\7\uffff\6\60\32\uffff\6\60",
-            "\12\122\7\uffff\6\122\32\uffff\6\122", "", "", "\1\123", "\1\124", "\1\125", "\1\126", "", "",
-            "\1\30\1\uffff\12\30\7\uffff\32\30\4\uffff\1\30\1\uffff\32\30", "\1\130",
-            "\1\26\1\uffff\12\131\7\uffff\4\60\1\132\1\60\32\uffff\4\60" + "\1\132\1\60",
-            "\1\26\1\uffff\1\26\2\uffff\12\133\7\uffff\6\60\32\uffff\6\60", "\12\133\7\uffff\6\60\32\uffff\6\60",
-            "\12\134\7\uffff\6\134\32\uffff\6\134", "\1\135", "\1\136",
-            "\1\30\1\uffff\12\30\7\uffff\32\30\4\uffff\1\30\1\uffff\32\30", "\1\140", "", "\1\141",
-            "\1\26\1\uffff\12\142\7\uffff\4\60\1\143\1\60\32\uffff\4\60" + "\1\143\1\60",
-            "\1\26\1\uffff\1\26\2\uffff\12\144\7\uffff\6\60\32\uffff\6\60", "\12\144\7\uffff\6\60\32\uffff\6\60",
-            "\12\145\7\uffff\6\145\32\uffff\6\145", "\1\146",
-            "\1\30\1\uffff\12\30\7\uffff\32\30\4\uffff\1\30\1\uffff\32\30", "", "",
-            "\1\30\1\uffff\12\30\7\uffff\32\30\4\uffff\1\30\1\uffff\32\30",
-            "\1\26\1\uffff\12\151\7\uffff\4\60\1\152\1\60\32\uffff\4\60" + "\1\152\1\60",
-            "\1\26\1\uffff\1\26\2\uffff\12\153\7\uffff\6\60\32\uffff\6\60", "\12\153\7\uffff\6\60\32\uffff\6\60",
-            "\12\154\7\uffff\6\154\32\uffff\6\154", "\1\155", "", "",
-            "\1\26\1\uffff\12\156\7\uffff\4\60\1\157\1\60\32\uffff\4\60" + "\1\157\1\60",
-            "\1\26\1\uffff\1\26\2\uffff\12\160\7\uffff\6\60\32\uffff\6\60", "\12\160\7\uffff\6\60\32\uffff\6\60",
-            "\1\60", "\1\30\1\uffff\12\30\7\uffff\32\30\4\uffff\1\30\1\uffff\32\30",
-            "\1\60\1\26\1\uffff\12\54\13\uffff\1\26\37\uffff\1\26", "\1\26\1\uffff\1\162\2\uffff\12\26", "\1\60", "",
-            "\12\163\7\uffff\6\60\32\uffff\6\60", "\12\164\7\uffff\6\60\32\uffff\6\60",
-            "\12\165\7\uffff\6\60\32\uffff\6\60", "\12\166\7\uffff\6\60\32\uffff\6\60", "\1\60"
-    };
-
-    static final short[] DFA19_eot = DFA.unpackEncodedString( DFA19_eotS );
-    static final short[] DFA19_eof = DFA.unpackEncodedString( DFA19_eofS );
-    static final char[] DFA19_min = DFA.unpackEncodedStringToUnsignedChars( DFA19_minS );
-    static final char[] DFA19_max = DFA.unpackEncodedStringToUnsignedChars( DFA19_maxS );
-    static final short[] DFA19_accept = DFA.unpackEncodedString( DFA19_acceptS );
-    static final short[] DFA19_special = DFA.unpackEncodedString( DFA19_specialS );
-    static final short[][] DFA19_transition;
-
-
-    static {
-        int numStates = DFA19_transitionS.length;
-        DFA19_transition = new short[numStates][];
-        for ( int i = 0; i < numStates; i++ ) {
-            DFA19_transition[i] = DFA.unpackEncodedString( DFA19_transitionS[i] );
-        }
-    }
-
-
-    class DFA19 extends DFA {
-
-        public DFA19( BaseRecognizer recognizer ) {
-            this.recognizer = recognizer;
-            this.decisionNumber = 19;
-            this.eot = DFA19_eot;
-            this.eof = DFA19_eof;
-            this.min = DFA19_min;
-            this.max = DFA19_max;
-            this.accept = DFA19_accept;
-            this.special = DFA19_special;
-            this.transition = DFA19_transition;
-        }
-
-
-        public String getDescription() {
-            return "1:1: Tokens : ( T__16 | T__17 | T__18 | T__19 | T__20 | T__21 | T__22 | T__23 | T__24 | T__25 | " +
-                    "T__26 | T__27 | T__28 | T__29 | T__30 | T__31 | T__32 | T__33 | T__34 | T__35 | T__36 | T__37 | " +
-                    "T__38 | T__39 | T__40 | ID | INT | FLOAT | STRING | UUID | WS );";
-        }
-    }
-}


[83/96] [abbrv] USERGRID-2 package namespace to org.apache.usergrid

Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/entities/class-use/Activity.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/entities/class-use/Activity.html b/sdks/android/doc/org/usergrid/android/client/entities/class-use/Activity.html
index f17e98e..ae2ea24 100644
--- a/sdks/android/doc/org/usergrid/android/client/entities/class-use/Activity.html
+++ b/sdks/android/doc/org/usergrid/android/client/entities/class-use/Activity.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Class org.usergrid.android.client.entities.Activity
+Uses of Class org.apache.usergrid.android.client.entities.Activity
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Class org.usergrid.android.client.entities.Activity
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Class org.usergrid.android.client.entities.Activity";
+        parent.document.title="Uses of Class org.apache.usergrid.android.client.entities.Activity";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,30 +81,30 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Class<br>org.usergrid.android.client.entities.Activity</B></H2>
+<B>Uses of Class<br>org.apache.usergrid.android.client.entities.Activity</B></H2>
 </CENTER>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Packages that use <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A></FONT></TH>
+Packages that use <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client"><B>org.usergrid.android.client</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client"><B>org.apache.usergrid.android.client</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client.entities"><B>org.usergrid.android.client.entities</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client.entities"><B>org.apache.usergrid.android.client.entities</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A> in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A></FONT></TH>
+Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A> in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -112,22 +112,22 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postGroupActivity(java.lang.String, org.usergrid.android.client.entities.Activity)">postGroupActivity</A></B>(java.lang.String&nbsp;groupId,
-                  <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>&nbsp;activity)</CODE>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postGroupActivity(java.lang.String, org.apache.usergrid.android.client.entities.Activity)">postGroupActivity</A></B>(java.lang.String&nbsp;groupId,
+                  <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>&nbsp;activity)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Posts an activity to a group.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postUserActivity(java.lang.String, org.usergrid.android.client.entities.Activity)">postUserActivity</A></B>(java.lang.String&nbsp;userId,
-                 <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A>&nbsp;activity)</CODE>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postUserActivity(java.lang.String, org.apache.usergrid.android.client.entities.Activity)">postUserActivity</A></B>(java.lang.String&nbsp;userId,
+                 <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A>&nbsp;activity)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Posts an activity to a user.</TD>
@@ -135,11 +135,11 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client.entities"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client.entities"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A> in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A></FONT></TH>
+Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A> in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -147,17 +147,17 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A> that return <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A> that return <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>static&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A></CODE></FONT></TD>
-<TD><CODE><B>Activity.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html#newActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.entities.User, org.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)">newActivity</A></B>(java.lang.String&nbsp;verb,
+<CODE>static&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A></CODE></FONT></TD>
+<TD><CODE><B>Activity.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html#newActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.entities.User, org.apache.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)">newActivity</A></B>(java.lang.String&nbsp;verb,
             java.lang.String&nbsp;title,
             java.lang.String&nbsp;content,
             java.lang.String&nbsp;category,
-            <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>&nbsp;user,
-            <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;object,
+            <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>&nbsp;user,
+            <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;object,
             java.lang.String&nbsp;objectType,
             java.lang.String&nbsp;objectName,
             java.lang.String&nbsp;objectContent)</CODE>
@@ -182,7 +182,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Activity
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/entities/class-use/Device.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/entities/class-use/Device.html b/sdks/android/doc/org/usergrid/android/client/entities/class-use/Device.html
index fa51d01..a843d78 100644
--- a/sdks/android/doc/org/usergrid/android/client/entities/class-use/Device.html
+++ b/sdks/android/doc/org/usergrid/android/client/entities/class-use/Device.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Class org.usergrid.android.client.entities.Device
+Uses of Class org.apache.usergrid.android.client.entities.Device
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Class org.usergrid.android.client.entities.Device
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Class org.usergrid.android.client.entities.Device";
+        parent.document.title="Uses of Class org.apache.usergrid.android.client.entities.Device";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,30 +81,30 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Class<br>org.usergrid.android.client.entities.Device</B></H2>
+<B>Uses of Class<br>org.apache.usergrid.android.client.entities.Device</B></H2>
 </CENTER>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Packages that use <A HREF="../../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities">Device</A></FONT></TH>
+Packages that use <A HREF="../../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities">Device</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client"><B>org.usergrid.android.client</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client"><B>org.apache.usergrid.android.client</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client.callbacks"><B>org.usergrid.android.client.callbacks</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client.callbacks"><B>org.apache.usergrid.android.client.callbacks</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities">Device</A> in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A></FONT></TH>
+Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities">Device</A> in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -112,11 +112,11 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Device.h
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A> that return <A HREF="../../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities">Device</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A> that return <A HREF="../../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities">Device</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities">Device</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities">Device</A></CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#registerDevice(android.content.Context, java.util.Map)">registerDevice</A></B>(android.content.Context&nbsp;context,
                java.util.Map&lt;java.lang.String,java.lang.Object&gt;&nbsp;properties)</CODE>
 
@@ -126,11 +126,11 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Device.h
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client.callbacks"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client.callbacks"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities">Device</A> in <A HREF="../../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.usergrid.android.client.callbacks</A></FONT></TH>
+Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities">Device</A> in <A HREF="../../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.apache.usergrid.android.client.callbacks</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -138,12 +138,12 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Device.h
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.usergrid.android.client.callbacks</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities">Device</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.apache.usergrid.android.client.callbacks</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities">Device</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>DeviceRegistrationCallback.</B><B><A HREF="../../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html#onDeviceRegistration(org.usergrid.android.client.entities.Device)">onDeviceRegistration</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities">Device</A>&nbsp;device)</CODE>
+<TD><CODE><B>DeviceRegistrationCallback.</B><B><A HREF="../../../../../../org/usergrid/android/client/callbacks/DeviceRegistrationCallback.html#onDeviceRegistration(org.apache.usergrid.android.client.entities.Device)">onDeviceRegistration</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities">Device</A>&nbsp;device)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -165,7 +165,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Device.h
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/entities/class-use/Entity.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/entities/class-use/Entity.html b/sdks/android/doc/org/usergrid/android/client/entities/class-use/Entity.html
index a32c317..7670b4b 100644
--- a/sdks/android/doc/org/usergrid/android/client/entities/class-use/Entity.html
+++ b/sdks/android/doc/org/usergrid/android/client/entities/class-use/Entity.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Class org.usergrid.android.client.entities.Entity
+Uses of Class org.apache.usergrid.android.client.entities.Entity
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Class org.usergrid.android.client.entities.Entity
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Class org.usergrid.android.client.entities.Entity";
+        parent.document.title="Uses of Class org.apache.usergrid.android.client.entities.Entity";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,34 +81,34 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Class<br>org.usergrid.android.client.entities.Entity</B></H2>
+<B>Uses of Class<br>org.apache.usergrid.android.client.entities.Entity</B></H2>
 </CENTER>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Packages that use <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></FONT></TH>
+Packages that use <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client"><B>org.usergrid.android.client</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client"><B>org.apache.usergrid.android.client</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client.entities"><B>org.usergrid.android.client.entities</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client.entities"><B>org.apache.usergrid.android.client.entities</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client.response"><B>org.usergrid.android.client.response</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client.response"><B>org.apache.usergrid.android.client.response</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A> in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A></FONT></TH>
+Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A> in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -116,12 +116,12 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.h
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#createEntity(org.usergrid.android.client.entities.Entity)">createEntity</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;entity)</CODE>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#createEntity(org.apache.usergrid.android.client.entities.Entity)">createEntity</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;entity)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a new entity on the server.</TD>
@@ -129,21 +129,21 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.h
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#createEntityAsync(org.usergrid.android.client.entities.Entity, org.usergrid.android.client.callbacks.ApiResponseCallback)">createEntityAsync</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;entity,
-                  <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#createEntityAsync(org.apache.usergrid.android.client.entities.Entity, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">createEntityAsync</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;entity,
+                  <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a new entity on the server.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postGroupActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.entities.User, org.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)">postGroupActivity</A></B>(java.lang.String&nbsp;verb,
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postGroupActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.entities.User, org.apache.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)">postGroupActivity</A></B>(java.lang.String&nbsp;verb,
                   java.lang.String&nbsp;title,
                   java.lang.String&nbsp;content,
                   java.lang.String&nbsp;category,
-                  <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>&nbsp;user,
-                  <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;object,
+                  <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>&nbsp;user,
+                  <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;object,
                   java.lang.String&nbsp;objectType,
                   java.lang.String&nbsp;objectName,
                   java.lang.String&nbsp;objectContent)</CODE>
@@ -154,29 +154,29 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.h
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postGroupActivityAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.entities.User, org.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">postGroupActivityAsync</A></B>(java.lang.String&nbsp;verb,
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postGroupActivityAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.entities.User, org.apache.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">postGroupActivityAsync</A></B>(java.lang.String&nbsp;verb,
                        java.lang.String&nbsp;title,
                        java.lang.String&nbsp;content,
                        java.lang.String&nbsp;category,
-                       <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>&nbsp;user,
-                       <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;object,
+                       <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>&nbsp;user,
+                       <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;object,
                        java.lang.String&nbsp;objectType,
                        java.lang.String&nbsp;objectName,
                        java.lang.String&nbsp;objectContent,
-                       <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+                       <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates and posts an activity to a group.</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postUserActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.entities.User, org.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)">postUserActivity</A></B>(java.lang.String&nbsp;verb,
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html" title="class in org.apache.usergrid.android.client.response">ApiResponse</A></CODE></FONT></TD>
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postUserActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.entities.User, org.apache.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)">postUserActivity</A></B>(java.lang.String&nbsp;verb,
                  java.lang.String&nbsp;title,
                  java.lang.String&nbsp;content,
                  java.lang.String&nbsp;category,
-                 <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>&nbsp;user,
-                 <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;object,
+                 <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>&nbsp;user,
+                 <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;object,
                  java.lang.String&nbsp;objectType,
                  java.lang.String&nbsp;objectName,
                  java.lang.String&nbsp;objectContent)</CODE>
@@ -187,16 +187,16 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.h
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postUserActivityAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.entities.User, org.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.callbacks.ApiResponseCallback)">postUserActivityAsync</A></B>(java.lang.String&nbsp;verb,
+<TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#postUserActivityAsync(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.entities.User, org.apache.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.callbacks.ApiResponseCallback)">postUserActivityAsync</A></B>(java.lang.String&nbsp;verb,
                       java.lang.String&nbsp;title,
                       java.lang.String&nbsp;content,
                       java.lang.String&nbsp;category,
-                      <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>&nbsp;user,
-                      <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;object,
+                      <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>&nbsp;user,
+                      <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;object,
                       java.lang.String&nbsp;objectType,
                       java.lang.String&nbsp;objectName,
                       java.lang.String&nbsp;objectContent,
-                      <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
+                      <A HREF="../../../../../../org/usergrid/android/client/callbacks/ApiResponseCallback.html" title="interface in org.apache.usergrid.android.client.callbacks">ApiResponseCallback</A>&nbsp;callback)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates and posts an activity to a user.</TD>
@@ -204,11 +204,11 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.h
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client.entities"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client.entities"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A> in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A></FONT></TH>
+Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A> in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -216,12 +216,12 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.h
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Subclasses of <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A> in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Subclasses of <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A> in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;class</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A></B></CODE>
+<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A></B></CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;An entity type for representing activity stream actions.</TD>
@@ -229,7 +229,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.h
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;class</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.usergrid.android.client.entities">Device</A></B></CODE>
+<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/entities/Device.html" title="class in org.apache.usergrid.android.client.entities">Device</A></B></CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -237,7 +237,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.h
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;class</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A></B></CODE>
+<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A></B></CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -245,7 +245,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.h
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;class</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.usergrid.android.client.entities">Message</A></B></CODE>
+<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/entities/Message.html" title="class in org.apache.usergrid.android.client.entities">Message</A></B></CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -253,7 +253,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.h
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;class</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A></B></CODE>
+<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A></B></CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -264,11 +264,11 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.h
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Fields in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A> with type parameters of type <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Fields in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A> with type parameters of type <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>static&nbsp;java.util.Map&lt;java.lang.String,java.lang.Class&lt;? extends <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt;&gt;</CODE></FONT></TD>
+<CODE>static&nbsp;java.util.Map&lt;java.lang.String,java.lang.Class&lt;? extends <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt;&gt;</CODE></FONT></TD>
 <TD><CODE><B>Entity.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html#CLASS_FOR_ENTITY_TYPE">CLASS_FOR_ENTITY_TYPE</A></B></CODE>
 
 <BR>
@@ -280,7 +280,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.h
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A> with type parameters of type <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A> with type parameters of type <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
@@ -288,7 +288,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.h
 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
 <TR ALIGN="right" VALIGN="">
 <TD NOWRAP><FONT SIZE="-1">
-<CODE>&lt;T extends <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt; 
+<CODE>&lt;T extends <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt; 
 <BR>
 T</CODE></FONT></TD>
 </TR>
@@ -305,13 +305,13 @@ T</CODE></FONT></TD>
 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
 <TR ALIGN="right" VALIGN="">
 <TD NOWRAP><FONT SIZE="-1">
-<CODE>&lt;T extends <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt; 
+<CODE>&lt;T extends <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt; 
 <BR>
 T</CODE></FONT></TD>
 </TR>
 </TABLE>
 </CODE></FONT></TD>
-<TD><CODE><B>Entity.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html#toType(org.usergrid.android.client.entities.Entity, java.lang.Class)">toType</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;entity,
+<TD><CODE><B>Entity.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html#toType(org.apache.usergrid.android.client.entities.Entity, java.lang.Class)">toType</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;entity,
        java.lang.Class&lt;T&gt;&nbsp;t)</CODE>
 
 <BR>
@@ -323,13 +323,13 @@ T</CODE></FONT></TD>
 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
 <TR ALIGN="right" VALIGN="">
 <TD NOWRAP><FONT SIZE="-1">
-<CODE>&lt;T extends <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt; 
+<CODE>&lt;T extends <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt; 
 <BR>
 java.util.List&lt;T&gt;</CODE></FONT></TD>
 </TR>
 </TABLE>
 </CODE></FONT></TD>
-<TD><CODE><B>Entity.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html#toType(java.util.List, java.lang.Class)">toType</A></B>(java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt;&nbsp;entities,
+<TD><CODE><B>Entity.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html#toType(java.util.List, java.lang.Class)">toType</A></B>(java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt;&nbsp;entities,
        java.lang.Class&lt;T&gt;&nbsp;t)</CODE>
 
 <BR>
@@ -341,17 +341,17 @@ java.util.List&lt;T&gt;</CODE></FONT></TD>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>static&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.usergrid.android.client.entities">Activity</A></CODE></FONT></TD>
-<TD><CODE><B>Activity.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html#newActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.usergrid.android.client.entities.User, org.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)">newActivity</A></B>(java.lang.String&nbsp;verb,
+<CODE>static&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html" title="class in org.apache.usergrid.android.client.entities">Activity</A></CODE></FONT></TD>
+<TD><CODE><B>Activity.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html#newActivity(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.usergrid.android.client.entities.User, org.apache.usergrid.android.client.entities.Entity, java.lang.String, java.lang.String, java.lang.String)">newActivity</A></B>(java.lang.String&nbsp;verb,
             java.lang.String&nbsp;title,
             java.lang.String&nbsp;content,
             java.lang.String&nbsp;category,
-            <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.usergrid.android.client.entities">User</A>&nbsp;user,
-            <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;object,
+            <A HREF="../../../../../../org/usergrid/android/client/entities/User.html" title="class in org.apache.usergrid.android.client.entities">User</A>&nbsp;user,
+            <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;object,
             java.lang.String&nbsp;objectType,
             java.lang.String&nbsp;objectName,
             java.lang.String&nbsp;objectContent)</CODE>
@@ -365,13 +365,13 @@ java.util.List&lt;T&gt;</CODE></FONT></TD>
 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
 <TR ALIGN="right" VALIGN="">
 <TD NOWRAP><FONT SIZE="-1">
-<CODE>&lt;T extends <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt; 
+<CODE>&lt;T extends <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt; 
 <BR>
 T</CODE></FONT></TD>
 </TR>
 </TABLE>
 </CODE></FONT></TD>
-<TD><CODE><B>Entity.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html#toType(org.usergrid.android.client.entities.Entity, java.lang.Class)">toType</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;entity,
+<TD><CODE><B>Entity.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html#toType(org.apache.usergrid.android.client.entities.Entity, java.lang.Class)">toType</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;entity,
        java.lang.Class&lt;T&gt;&nbsp;t)</CODE>
 
 <BR>
@@ -383,7 +383,7 @@ T</CODE></FONT></TD>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Method parameters in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A> with type arguments of type <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Method parameters in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A> with type arguments of type <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
@@ -391,13 +391,13 @@ T</CODE></FONT></TD>
 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
 <TR ALIGN="right" VALIGN="">
 <TD NOWRAP><FONT SIZE="-1">
-<CODE>&lt;T extends <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt; 
+<CODE>&lt;T extends <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt; 
 <BR>
 java.util.List&lt;T&gt;</CODE></FONT></TD>
 </TR>
 </TABLE>
 </CODE></FONT></TD>
-<TD><CODE><B>Entity.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html#toType(java.util.List, java.lang.Class)">toType</A></B>(java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt;&nbsp;entities,
+<TD><CODE><B>Entity.</B><B><A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html#toType(java.util.List, java.lang.Class)">toType</A></B>(java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt;&nbsp;entities,
        java.lang.Class&lt;T&gt;&nbsp;t)</CODE>
 
 <BR>
@@ -409,34 +409,34 @@ java.util.List&lt;T&gt;</CODE></FONT></TD>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Constructors in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.usergrid.android.client.entities</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Constructors in <A HREF="../../../../../../org/usergrid/android/client/entities/package-summary.html">org.apache.usergrid.android.client.entities</A> with parameters of type <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html#Activity(org.usergrid.android.client.entities.Entity)">Activity</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;entity)</CODE>
+<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/entities/Activity.html#Activity(org.apache.usergrid.android.client.entities.Entity)">Activity</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;entity)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/entities/Device.html#Device(org.usergrid.android.client.entities.Entity)">Device</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;entity)</CODE>
+<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/entities/Device.html#Device(org.apache.usergrid.android.client.entities.Entity)">Device</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;entity)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/entities/Group.html#Group(org.usergrid.android.client.entities.Entity)">Group</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;entity)</CODE>
+<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/entities/Group.html#Group(org.apache.usergrid.android.client.entities.Entity)">Group</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;entity)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/entities/Message.html#Message(org.usergrid.android.client.entities.Entity)">Message</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;entity)</CODE>
+<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/entities/Message.html#Message(org.apache.usergrid.android.client.entities.Entity)">Message</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;entity)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/entities/User.html#User(org.usergrid.android.client.entities.Entity)">User</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&nbsp;entity)</CODE>
+<TD><CODE><B><A HREF="../../../../../../org/usergrid/android/client/entities/User.html#User(org.apache.usergrid.android.client.entities.Entity)">User</A></B>(<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&nbsp;entity)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -444,11 +444,11 @@ java.util.List&lt;T&gt;</CODE></FONT></TD>
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client.response"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client.response"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A> in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A></FONT></TH>
+Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A> in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -456,7 +456,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.h
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A> with type parameters of type <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A> with type parameters of type <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
@@ -464,7 +464,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.h
 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
 <TR ALIGN="right" VALIGN="">
 <TD NOWRAP><FONT SIZE="-1">
-<CODE>&lt;T extends <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt; 
+<CODE>&lt;T extends <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt; 
 <BR>
 java.util.List&lt;T&gt;</CODE></FONT></TD>
 </TR>
@@ -481,7 +481,7 @@ java.util.List&lt;T&gt;</CODE></FONT></TD>
 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
 <TR ALIGN="right" VALIGN="">
 <TD NOWRAP><FONT SIZE="-1">
-<CODE>&lt;T extends <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt; 
+<CODE>&lt;T extends <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt; 
 <BR>
 T</CODE></FONT></TD>
 </TR>
@@ -498,7 +498,7 @@ T</CODE></FONT></TD>
 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
 <TR ALIGN="right" VALIGN="">
 <TD NOWRAP><FONT SIZE="-1">
-<CODE>&lt;T extends <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt; 
+<CODE>&lt;T extends <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt; 
 <BR>
 T</CODE></FONT></TD>
 </TR>
@@ -515,11 +515,11 @@ T</CODE></FONT></TD>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A> that return <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A> that return <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></CODE></FONT></TD>
 <TD><CODE><B>ApiResponse.</B><B><A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html#getFirstEntity()">getFirstEntity</A></B>()</CODE>
 
 <BR>
@@ -527,7 +527,7 @@ T</CODE></FONT></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></CODE></FONT></TD>
 <TD><CODE><B>ApiResponse.</B><B><A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html#getLastEntity()">getLastEntity</A></B>()</CODE>
 
 <BR>
@@ -535,7 +535,7 @@ T</CODE></FONT></TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></CODE></FONT></TD>
+<CODE>&nbsp;<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></CODE></FONT></TD>
 <TD><CODE><B>ApiResponse.</B><B><A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html#getLastMessage()">getLastMessage</A></B>()</CODE>
 
 <BR>
@@ -547,11 +547,11 @@ T</CODE></FONT></TD>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A> that return types with arguments of type <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A> that return types with arguments of type <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt;</CODE></FONT></TD>
+<CODE>&nbsp;java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt;</CODE></FONT></TD>
 <TD><CODE><B>ApiResponse.</B><B><A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html#getEntities()">getEntities</A></B>()</CODE>
 
 <BR>
@@ -563,12 +563,12 @@ T</CODE></FONT></TD>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Method parameters in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.usergrid.android.client.response</A> with type arguments of type <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Method parameters in <A HREF="../../../../../../org/usergrid/android/client/response/package-summary.html">org.apache.usergrid.android.client.response</A> with type arguments of type <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>ApiResponse.</B><B><A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html#setEntities(java.util.List)">setEntities</A></B>(java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities">Entity</A>&gt;&nbsp;entities)</CODE>
+<TD><CODE><B>ApiResponse.</B><B><A HREF="../../../../../../org/usergrid/android/client/response/ApiResponse.html#setEntities(java.util.List)">setEntities</A></B>(java.util.List&lt;<A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities">Entity</A>&gt;&nbsp;entities)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -590,7 +590,7 @@ T</CODE></FONT></TD>
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Entity.html" title="class in org.apache.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3ccbfd8a/sdks/android/doc/org/usergrid/android/client/entities/class-use/Group.html
----------------------------------------------------------------------
diff --git a/sdks/android/doc/org/usergrid/android/client/entities/class-use/Group.html b/sdks/android/doc/org/usergrid/android/client/entities/class-use/Group.html
index 71ca921..d1217a1 100644
--- a/sdks/android/doc/org/usergrid/android/client/entities/class-use/Group.html
+++ b/sdks/android/doc/org/usergrid/android/client/entities/class-use/Group.html
@@ -4,7 +4,7 @@
 <HEAD>
 <!-- Generated by javadoc (build 1.6.0_29) on Fri Mar 09 16:00:54 PST 2012 -->
 <TITLE>
-Uses of Class org.usergrid.android.client.entities.Group
+Uses of Class org.apache.usergrid.android.client.entities.Group
 </TITLE>
 
 <META NAME="date" CONTENT="2012-03-09">
@@ -15,7 +15,7 @@ Uses of Class org.usergrid.android.client.entities.Group
 function windowTitle()
 {
     if (location.href.indexOf('is-external=true') == -1) {
-        parent.document.title="Uses of Class org.usergrid.android.client.entities.Group";
+        parent.document.title="Uses of Class org.apache.usergrid.android.client.entities.Group";
     }
 }
 </SCRIPT>
@@ -39,7 +39,7 @@ function windowTitle()
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
@@ -81,30 +81,30 @@ function windowTitle()
 <HR>
 <CENTER>
 <H2>
-<B>Uses of Class<br>org.usergrid.android.client.entities.Group</B></H2>
+<B>Uses of Class<br>org.apache.usergrid.android.client.entities.Group</B></H2>
 </CENTER>
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Packages that use <A HREF="../../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A></FONT></TH>
+Packages that use <A HREF="../../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client"><B>org.usergrid.android.client</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client"><B>org.apache.usergrid.android.client</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><A HREF="#org.usergrid.android.client.callbacks"><B>org.usergrid.android.client.callbacks</B></A></TD>
+<TD><A HREF="#org.apache.usergrid.android.client.callbacks"><B>org.apache.usergrid.android.client.callbacks</B></A></TD>
 <TD>&nbsp;&nbsp;</TD>
 </TR>
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A> in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A></FONT></TH>
+Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A> in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -112,11 +112,11 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Group.ht
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.usergrid.android.client</A> that return types with arguments of type <A HREF="../../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../../org/usergrid/android/client/package-summary.html">org.apache.usergrid.android.client</A> that return types with arguments of type <A HREF="../../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;java.util.Map&lt;java.lang.String,<A HREF="../../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A>&gt;</CODE></FONT></TD>
+<CODE>&nbsp;java.util.Map&lt;java.lang.String,<A HREF="../../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A>&gt;</CODE></FONT></TD>
 <TD><CODE><B>Client.</B><B><A HREF="../../../../../../org/usergrid/android/client/Client.html#getGroupsForUser(java.lang.String)">getGroupsForUser</A></B>(java.lang.String&nbsp;userId)</CODE>
 
 <BR>
@@ -125,11 +125,11 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Group.ht
 </TABLE>
 &nbsp;
 <P>
-<A NAME="org.usergrid.android.client.callbacks"><!-- --></A>
+<A NAME="org.apache.usergrid.android.client.callbacks"><!-- --></A>
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
-Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A> in <A HREF="../../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.usergrid.android.client.callbacks</A></FONT></TH>
+Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A> in <A HREF="../../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.apache.usergrid.android.client.callbacks</A></FONT></TH>
 </TR>
 </TABLE>
 &nbsp;
@@ -137,12 +137,12 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Group.ht
 
 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
-<TH ALIGN="left" COLSPAN="2">Method parameters in <A HREF="../../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.usergrid.android.client.callbacks</A> with type arguments of type <A HREF="../../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A></FONT></TH>
+<TH ALIGN="left" COLSPAN="2">Method parameters in <A HREF="../../../../../../org/usergrid/android/client/callbacks/package-summary.html">org.apache.usergrid.android.client.callbacks</A> with type arguments of type <A HREF="../../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A></FONT></TH>
 </TR>
 <TR BGCOLOR="white" CLASS="TableRowColor">
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 <CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B>GroupsRetrievedCallback.</B><B><A HREF="../../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html#onGroupsRetrieved(java.util.Map)">onGroupsRetrieved</A></B>(java.util.Map&lt;java.lang.String,<A HREF="../../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities">Group</A>&gt;&nbsp;groups)</CODE>
+<TD><CODE><B>GroupsRetrievedCallback.</B><B><A HREF="../../../../../../org/usergrid/android/client/callbacks/GroupsRetrievedCallback.html#onGroupsRetrieved(java.util.Map)">onGroupsRetrieved</A></B>(java.util.Map&lt;java.lang.String,<A HREF="../../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities">Group</A>&gt;&nbsp;groups)</CODE>
 
 <BR>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
@@ -164,7 +164,7 @@ Uses of <A HREF="../../../../../../org/usergrid/android/client/entities/Group.ht
   <TR ALIGN="center" VALIGN="top">
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
+  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../org/usergrid/android/client/entities/Group.html" title="class in org.apache.usergrid.android.client.entities"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>